Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dictoresno

macrumors 601
Original poster
Apr 30, 2012
4,520
659
NJ
Are photos stored in iCloud Photo Library on my Mac also stored locally on the drive by default? I have all photos saved in my iCloud Photo Library and save originals on my phone. They also then appear automatically in my photos app on my iMac. I'm looking to set up my photo library backup once a day to an external drive in an external dock. I have the app Sync Folders pro, so I can set it up sync one local folder to an external drive, just need to point the app to the source path/folder location.

I guess I can look in the drive and set it to download originals to the HDD and then sync right over? Anyone else doing it this way as opposed to cloning or time machine?
 
Ok so I tried it and it didn't work out as planned.

Well, it did back it up, however inside the one folder were a few system folders with files and system info, then tons of individual folders nested within tons of other folders sorted by date/year. And I mean, maybe 2-4 pics per folder......for 4500 photos, 17GB worth.

I just want it to copy all the pics over and then everytime a new pic is added via iCloud photos on my iMac, that new pic is then automatically backed up/copied into the new folder on the external.

It would sure beat needing to drag/drop all the time, but that's the kinda thing I'm trying to accomplish.
 
If you download originals to your Mac, they're all stored in a folder called masters within your photos library bundle (which is actually a folder). They're stored in subdirectories by date (date added I think).

If you sync this masters folder to an external drive it should achieve what you want.

This won't include any modified photos though as modifications are non-destructive and don't actually create another photo unless you export / share it
 
If you download originals to your Mac, they're all stored in a folder called masters within your photos library bundle (which is actually a folder). They're stored in subdirectories by date (date added I think).

If you sync this masters folder to an external drive it should achieve what you want.

This won't include any modified photos though as modifications are non-destructive and don't actually create another photo unless you export / share it

Yes it did sync the masters folder, among 6 or so others. My issue is that the masters folder as you have stated, has them broken down by date. Sometimes only 2 pics per folder.

There's no way to have them save as all photos into one folder is there? i guess the bottom line, it's a true backup. Just would be a huge PITA to have to go through all the folders to get the actual pics.
 
dictoresno wrote:
"Yes it did sync the masters folder, among 6 or so others. My issue is that the masters folder as you have stated, has them broken down by date. Sometimes only 2 pics per folder.
There's no way to have them save as all photos into one folder is there? i guess the bottom line, it's a true backup. Just would be a huge PITA to have to go through all the folders to get the actual pics."


This is why I don't let ANY photo editing app "manage" my originals.
Not iPhoto, not Photos, not Aperture, not Photoshop, not ANY of them.

I have a separate "media" partition and I keep ALL my originals on it, in a hierarchy of named folders that I create myself.

Each folder has a name meaningful to me, along with the date I create it.
I then enter a "day's shoot" into that folder.
New shoot = new folder.

If I want to use a photo editing app to process pics, I then "reference" the original folder, without "importing" it into the app.

Thus, my originals are ALWAYS grouped in one place, and easily "findable" for me.

I also back up my "media" volume to several different backup drives.

This IS "more work" than the average person will do -- they just want to "dump their pics" into an app (like iPhoto or Photos), and expect to "find them there" afterwards. In most cases, this works ok, but once you commit your pics to an app's "database scheme", it becomes VERY difficult to "extract them from it", as the OP has discovered above.

But I -know- where my originals are, and find them without much trouble...
 
It's easier for me to manage my photos using iCloud Photo Library and they remain very organized while in the app in albums I created and make it great for syncing across devices. But as you see, I can't just have one folder with all photos in it as a raw type of backup. They are all nested in folders by day and it would take me hours to go into each folder to extract them all.
 
Yes it did sync the masters folder, among 6 or so others. My issue is that the masters folder as you have stated, has them broken down by date. Sometimes only 2 pics per folder.

There's no way to have them save as all photos into one folder is there? i guess the bottom line, it's a true backup. Just would be a huge PITA to have to go through all the folders to get the actual pics.

It would be fairly easy to copy all the photos out of "Masters" into one folder on the external drive. However, there is no guarantee that the filenames are unique. Photos stores the images under the original filename created by the camera, and sometimes over the years you can get several photos with the same filename.

Frankly I really like the way the originals are organized under "Masters". It makes it fairly easy to find photos imported on a specific date, and I can back them all up in one fell swoop.
 
It would be fairly easy to copy all the photos out of "Masters" into one folder on the external drive. However, there is no guarantee that the filenames are unique. Photos stores the images under the original filename created by the camera, and sometimes over the years you can get several photos with the same filename.

Frankly I really like the way the originals are organized under "Masters". It makes it fairly easy to find photos imported on a specific date, and I can back them all up in one fell swoop.

Yea but if I took let's say 30 pictures, one each day of the month, instead of having a folder with 30 pics, I'll have a folder with 30 folders nested in it each with one pic inside it. Waste of time going into each folder just to pull each pic individually.

Yes, keep it as it is, it will continually backup properly and will have all the pictures. But they won't be grouped by album or anything. Just hundreds of folders, by day, you need to open just to view them.
 
Yea but if I took let's say 30 pictures, one each day of the month, instead of having a folder with 30 pics, I'll have a folder with 30 folders nested in it each with one pic inside it. Waste of time going into each folder just to pull each pic individually.

Yes, keep it as it is, it will continually backup properly and will have all the pictures. But they won't be grouped by album or anything. Just hundreds of folders, by day, you need to open just to view them.

Hi there, there is a tool you can use called Rsync. It should already be installed as part of OSX and is used by Time Machine (conjecture) to back things up.
Many people use it on Linux as a backup tool and I think it will suit your needs if configured correctly. It is a command line tool, but you can write a script that will search and grab all files of a certain type (e.g *.jpg) and copy them into a folder of your choice (even to a different computer/server). Also, it works with checksums so will only copy files that have changed, so it wont have to copy every photo every time you back up.

http://linuxcommand.org/man_pages/rsync1.html
 
It is really hard and complicated to backup icloud photos to an external drive without a professional software. You just have to download your photos to your computer then transfer them to your external drive, in the process, you may confront problems like causing a lot of useless folders.
So i think you should try some kind of professional software to help you do this. easeus everysync may be your option, download it and have a try, it may serve you well.
 
I'm using SyncFolders Pro to assist with the automated backups but it just backups the raw data, as it should. I would need it to back up the iCloud photos as properly sorted albums or at least as one giant folder of pictures in date order or something.
 
Come on guys, you don't need to purchase software for this...

Copy this into a terminal window and it will back up your photos to a folder on the desktop called Photos. Just alter the destination path to where to want the photos to go.

Code:
rsync -aPvz ~/Pictures/Photos\ Library.photoslibrary/Masters/ ~/Desktop/Photos --delete

When you're satisfied the backup works, create a bash script using your favourite text editor like this:

Code:
#!/bin/bash

echo "Backing Up..."
rsync -aPvz ~/Pictures/Photos\ Library.photoslibrary/Masters/ ~/Desktop/Photos --delete
echo "Done!"
exit 0

Then when you want a backup you can just launch the script from terminal like

Code:
./MyBackUpScript.sh

and watch it do its thing.
 
Don't be put off by the long command, it really is very simple.
One minor point about that script: I wouldn't recommend backing up to a folder on your desktop if you have iCloud document sync enabled otherwise you'll double the amount of space taken by your photos on iCloud (as they'll get synced as documents)
 
So the commands will basically send the photos to a folder on the desktop and they won't be in a jumbled mess of masters folders? How about everytime I take new pics, will they automatically keep showing in the new folder or do I need to keep running the command?
 
One minor point about that script: I wouldn't recommend backing up to a folder on your desktop if you have iCloud document sync enabled otherwise you'll double the amount of space taken by your photos on iCloud (as they'll get synced as documents)

Yes, this is a good point. The desktop location was just an example destination. The OP should change it to the folder on his/her external drive.

So the commands will basically send the photos to a folder on the desktop and they won't be in a jumbled mess of masters folders? How about everytime I take new pics, will they automatically keep showing in the new folder or do I need to keep running the command?

The command preserves the folder structure of the masters, so you'll have things like /year/day will be copied. This is important as if you have two images named the same myimage1.jpg, only one would be backed up to your singular folder.

If you want to remove the folder structure and have all photos in one folder, something like this should work (I've not tested it)

Code:
rsync -aq  --include '*/' --include '*.JPG' --exclude '*\' ~/Pictures/Photos\ Library.photoslibrary/Masters/ ~/Desktop/Photos --delete

You'd need to run the script every time you want an up-to-date back up, but rsync will only copy changes, so it wont have to copy every photo on each backup.

Edit - this above code is still copying the folders. I'll get back to you.

Edit 2 - I will have to think about this a bit more.

Edit 3 - This seems to do the job. It goes into the Masters folder and grabs all files and puts them into one folder in your desktop. Just edit the script to a destination of your choosing.

Code:
find ~/Pictures/Photos\ Library.photoslibrary/Masters/ -type f -exec rsync -aPvz {} ~/Desktop/Photos/ --delete \;
[doublepost=1486401601][/doublepost]There you go. ;)
 
Last edited:
Yes, this is a good point. The desktop location was just an example destination. The OP should change it to the folder on his/her external drive.



The command preserves the folder structure of the masters, so you'll have things like /year/day will be copied. This is important as if you have two images named the same myimage1.jpg, only one would be backed up to your singular folder.

If you want to remove the folder structure and have all photos in one folder, something like this should work (I've not tested it)

Code:
rsync -aq  --include '*/' --include '*.JPG' --exclude '*\' ~/Pictures/Photos\ Library.photoslibrary/Masters/ ~/Desktop/Photos --delete

You'd need to run the script every time you want an up-to-date back up, but rsync will only copy changes, so it wont have to copy every photo on each backup.

Edit - this above code is still copying the folders. I'll get back to you.

Edit 2 - I will have to think about this a bit more.

Edit 3 - This seems to do the job. It goes into the Masters folder and grabs all files and puts them into one folder in your desktop. Just edit the script to a destination of your choosing.

Code:
find ~/Pictures/Photos\ Library.photoslibrary/Masters/ -type f -exec rsync -aPvz {} ~/Desktop/Photos/ --delete \;
[doublepost=1486401601][/doublepost]There you go. ;)

Wow thanks. I'll look into it. Now I run these through which program?

Edit: I see you said terminal. Now this is looking promising however it won't do anything with file names. Photos are named whatever iOS has names the picture. So pulling them all out of masters folders will put them at risk of dupe names?
 
Last edited:
Wow thanks. I'll look into it. Now I run these through which program?

Just the last code snippet if you want to copy all photos into one folder. You can run it from Terminal.app (included with OSX). All you need to do is copy and paste the command and press return/enter.

If it works how you expect it, you can later put it in a text file which you can run whenever you need to do a backup.


Edit for your Edit:

[doublepost=1486403107][/doublepost]
Edit: I see you said terminal. Now this is looking promising however it won't do anything with file names. Photos are named whatever iOS has names the picture. So pulling them all out of masters folders will put them at risk of dupe names?

Yes, that is the issue, it wont rename photos so will only copy a file once if two files have the same name.



This will keep the masters folders, and so there will be no risk of name clashes.
Code:
rsync -aPvz ~/Pictures/Photos\ Library.photoslibrary/Masters/ ~/Desktop/Photos --delete

This will disregard the masters folders, and so there may be a risk of name clashes.
Code:
find ~/Pictures/Photos\ Library.photoslibrary/Masters/ -type f -exec rsync -aPvz {} ~/Desktop/Photos/ --delete \;

To rename files if there is a name clash is a problem you'd encounter even if you drag and dropped the photos manually. However, I think iOS names photos based on dates so they *should* be unique.
 
Last edited:
  • Like
Reactions: dictoresno
dictoresno wrote:
"Yes it did sync the masters folder, among 6 or so others. My issue is that the masters folder as you have stated, has them broken down by date. Sometimes only 2 pics per folder.
There's no way to have them save as all photos into one folder is there? i guess the bottom line, it's a true backup. Just would be a huge PITA to have to go through all the folders to get the actual pics."


This is why I don't let ANY photo editing app "manage" my originals.
Not iPhoto, not Photos, not Aperture, not Photoshop, not ANY of them.

I have a separate "media" partition and I keep ALL my originals on it, in a hierarchy of named folders that I create myself.

Each folder has a name meaningful to me, along with the date I create it.
I then enter a "day's shoot" into that folder.
New shoot = new folder.

If I want to use a photo editing app to process pics, I then "reference" the original folder, without "importing" it into the app.

Thus, my originals are ALWAYS grouped in one place, and easily "findable" for me.

I also back up my "media" volume to several different backup drives.

This IS "more work" than the average person will do -- they just want to "dump their pics" into an app (like iPhoto or Photos), and expect to "find them there" afterwards. In most cases, this works ok, but once you commit your pics to an app's "database scheme", it becomes VERY difficult to "extract them from it", as the OP has discovered above.

But I -know- where my originals are, and find them without much trouble...


Like Fishrrman, I do not use iCloud or Photos or anything else to manage my photo files. When I have a memory card of images to be processed, I use a card reader to get them into the computer, copying them directly into a designated folder on the desktop. Before taking any images into Aperture for processing, I quickly cull through them and only then do I move the chosen images on for the next step. With images from my iPhone or iPads, I plug the device into the computer and open up Image Capture, then transfer all the images into a designated folder. Sometimes I'll leave a few on the camera roll but I usually don't. Normally I delete everything from the Camera Roll once they're safely in the computer; that frees up space on the iPhone or iPads. Again, once the images are in the computer I cull through them and then take them into Aperture for processing. Most images then go to my online gallery at Zenfolio or pBase, but I also will add special favorites to my iPad Gallery Collection so that then the images will be on my iPhone and iPads. This is a special folder which I have synced in iTunes to automatically go into the iPads or iPhones when I sync them.

When I do backups into my external drives, of course all the images are backed up in there, too, regardless of which location they might be in at the time.
 
just did some rough searching. looks like iOS names photos in succession, starting with 1 for each device. example, on my iPhone 6 lets say i took 2000 photos, the pics would be named from IMG_0001.JPG up to IMG_2000.JPG. now lets say i bought an iPhone 7, it starts all over again at IMG_0001.JPG, so there will be dupes.

i have duped names of some pics which lets say are called "IMG_0106.JPG". ill have one taken with my iPhone 6 and one taken with my iPhone 7. so yes, i will have duped named photos so using the second terminal command won't help me.
 
just did some rough searching. looks like iOS names photos in succession, starting with 1 for each device. example, on my iPhone 6 lets say i took 2000 photos, the pics would be named from IMG_0001.JPG up to IMG_2000.JPG. now lets say i bought an iPhone 7, it starts all over again at IMG_0001.JPG, so there will be dupes.

i have duped names of some pics which lets say are called "IMG_0106.JPG". ill have one taken with my iPhone 6 and one taken with my iPhone 7. so yes, i will have duped named photos so using the second terminal command won't help me.

Thanks, I've learnt something today too. :)
In this case, if you do want a flat folder structure with photos being renamed you might need another tool. Sorry.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.