Once a year, we back up Tina’s Photos library to an external hard drive and deliver it to friends who keep it at their house, just in case ours burns down or something terrible. For whatever reason, it seems we can’t just drag her “Photos Library.photoslibrary” to an external hard drive or at least when we do, it seemingly spins forever without a good status updated. In steps rsync.
From Terminal.app, I pasted in the following command on her MacBook Pro while the backup drive is plugged in and this seems to do the trick with a live status update spewing in Terminal’s window.
sudo rsync --archive --stats --human-readable --progress /Users/christinaschwie/Pictures/Photos\ Library.photoslibrary /Volumes/Tina\ Photos/Photos\ Library.photoslibrary
I should’ve published this as a tip for others. And even if you’re not syncing a 250+ GB photo library like this scenario, hopefully it helps you with your large directory transfer needs.
** UPDATE 2-15-2024 **
Resource forks may have been damaged using the above command. Next time, try it with “–hfs-mode=appledouble”, such as:
sudo rsync --archive --stats --hfs-mode=appledouble --human-readable --progress /Users/christinaschwie/Pictures/Photos\ Library.photoslibrary /Volumes/Tina\ Photos/Photos\ Library.photoslibrary
Or install rsync with brew and then add –xattr to the command.
Or sudo rsync -xrlptgoXvHS --progress --delete --fileflags / /Volumes/BackupClone
using tips here.
** UPDATE 11-11-2024 **
This is the command I ended up executing that works great:
rsync -Pha –delete –stats /Users/christinaschwie/Pictures/Photos\ Library.photoslibrary/ /Volumes/Tina\ Photos/Photos\ Library.photoslibrary/
Note: while testing these commands, one of them made a “Resources” folder and a “.photoslibrary” file within the main .photoslibrary I was syncing over that I learned about here – this happened when I omitted a trailing / after .photosplibrary. Fortunately, deleting the Resources folder (it was empty anyway) moving the nested .photoslibrary document up one directory (and deleting the main one) fixed this mess and left me with a single .photoslibrary document that opens in Photos.app and can up updated using the command above a second time. Future updates seemed to be fast, finishing in less than 5 minutes and this on a mid-2015 13-inch MacBook Pro. If I have enterprising friends or family who want to store backups safely off-site, this could be a useful command. So glad this is working!
A few additional notes. It appears check sums are verified after the transfer completes. If for some reason you want to verify check sums before the transfer, append a “c” to “-Pha” to make “-Phac”.
Kevin talks about making a cron job out of this, but these days it will likely have to be launchd.
If we start messing around more with iCloud Photos, this script may be helpful.