Mac Photos backup export tool. This tool will export all photos in your Photos application
to a directory
of your choice with 3 naming options to choose from.
$ brew tap Celtech/iReaver
$ brew install iReaver
$ go install github.com/Celtech/iReaver@latest
You can download the pre-compiled binary for you specific OS from the releases page. You will need to copy the and extract the binary, then move it to your local bin folder. Please, refer to the example below:
curl https://github.com/Celtech/iReaver/releases/download/${VERSION}/${PACKAGE_NAME} -o ${PACKAGE_NAME}
sudo tar -xvf ${PACKAGE_NAME} -C /usr/local/bin/
sudo chmod +x /usr/local/bin/iReaver
Before we can use iReaver, we first need to configure a setting inside the photos application. Open the Photos application
on your Mac. Once open, click Photos -> Prefernces...
in the menu bar. Once your preferences window opens, head to the
iCloud tab, and ensure that Download Originals to this Mac
is selected.
Once you have this done, wait for Photos to finish downloading all the files. After that let's run the following command:
$ ireaver -o "~/photos-backup"
This command will copy all the files from your Photos app to a folder in your home directory using the original file names. For a complete list of all possible flags, see the flags section below.
$ crontab -e
# add the following to the crontab to schedule a backup at 8am daily.
0 8 * * * ireaver -o "~/photos-backup"
-h, --help help for ireaver
-n, --name string Renames output images (options: "sequential", "original", "guid") (default "original")
-o, --output string Directory path to the folder you want to output images to
-p, --path string Path to your local iCloud photos library (default "$HOME/Pictures/Photos Library.photoslibrary/")
The name flag is used to modify the copied file name pattern.
Option | Description |
---|---|
sequential | Names the files in sequential order based on their index, this will guarantee the newest files are always the last index. |
original | Names the files using their original names as displayed in the photos app, this is the default. I.e img_1234.heic |
guid | Names the files using the asset GUID, note images will be in a random order if used. |
The output directory of the copied files. This flag supports both ~
and $HOME
which represent the users home directory.
It does not matter if the file path ends with a /
or not.
The directory where your Photos application lives. On most Macs this is $HOME/Pictures/Photos Library.photoslibrary/
,
and this is the default path.