How to sync Mac OS Photos Library to an external disk storageOn 17 January 2020 in Tech
Note: This tutorial assumes that you are familiar with command line program and you are using Mac OS.
In this article I’m going to share how I back up all my photos and videos from Mac OS Photos Library to an external disk storage.
This method is not strictly about how to sync Photos Library. It actually can be used for syncing any folder in your Mac to an external disk.
I’m using the command line program rsync to perform this task. Use Homebrew to install it:
$ brew install rsync
External disk storage I’m using here is Seagate Expansion 1TB, I bought it online for a discount during 12.12 sale last year. Quite satisfied with the quality, nothing to complain about 😁.
This external disk comes default with NTFS filesystem. Mac OS can read the files in this filesystem format, but not writing to it. Therefore I have to format it to Mac OS Extended (Journaled) to enable read & write access.
After I plug it in to the USB port, it is mounted to this folder:
/Volumes/Seagate Expansion 1/. Take note of this path, as your external disk name might be different.
Now, I want to back up my Photos Library inside my Pictures folder. So the path to this photos folder is
~/Pictures/Photos Library.photoslibrary. Your photos folder might be different so adjust accordingly.
So, now we have the source path (photos folder) and the destination path (external disk folder), we can perform the sync.
First, we need to perform initial sync, by executing command below. This will copy all of the files in the source path to the destination path:
$ rsync -raz --progress ~/Pictures/Photos\ Library.photoslibrary /Volumes/Seagate\ Expansion\ 1/
Your photos now successfully backed up to the external disk storage.
However, for next time, if you want to do another sync, don’t run the previous command, as it will perform the full copy-paste again, which may took longer time to complete. Instead, do this:
$ rsync --update -raz --progress ~/Pictures/Photos\ Library.photoslibrary /Volumes/Seagate\ Expansion\ 1/
This command will compare files and their timestamps, so that only files with newer changes will be copied over, leaving unchanged files, which results in faster sync process.
Good thing about syncing the whole Photos Library is that all the photo metadata and the folder structure are stored together, so you can just double click the Photos Library in the external disk to view it 👍.