blog.mironov.live

How to backup your iPhone photos to S3

#backups#apps

December 25, 2021

I have 345 GB of photos in iCloud dated back to 1988. One of my favorite parts of the day is to remind myself what happened on this day in previous years (thanks to the Memories app). It’s unbelievable how fast memories fade and how entertaining it is to live through them again.

At some point, I caught myself on the thought that I would be pretty upset if I ever lost my photos library. Some of you will wonder why worry about that — you already backup your photos to iCloud, don’t you?

Yes, but you don’t fully own your data as with any cloud. It happened more than once already that Apple banned users from accessing their data. Or an iOS app with access to the photos library can mess it up due to a bug or a hack.

There are two kinds of people: those who backup, and those who have never lost all their data.

I found a great app in the App Store called PhotoSync that can be configured to back up your photos every night to remote storage, e.g., AWS S3. Yes, it is another cloud, and probably an even better solution would be to backup to a local RAID which is also possible with PhotoSync.

However, storing photos in two clouds is better than in one. It is unlikely you will be banned from both, at least not simultaneously.

To configure nightly backups, you must create a private S3 bucket and an IAM user/policy to let PhotoSync only put files into the bucket.

Necessary IAM permissions:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::*/*",
                "arn:aws:s3:::YOURBUCKETNAME"
            ]
        }
    ]
}

There is no need to let the app delete or read files in the bucket.


Anton Mironov

Written by Anton Mironov.
Follow on Twitter

Stay up to date with the latest posts:

Powered by Buttondown.