How I backup my photos & videos

The short version:

  • Self-hosted Immich + official Android app to sync gallery with server.
  • Configured Rclone with S3 Glacier as remote.
  • Configured a cronjob to sync local with S3 Glacier every 2 weeks.
  • Used ntfy to report the cronjob execution.


Since the beginning of 2025, I've been backing up my phone gallery locally instead of relying on a paid Google Drive subscription. It was a simple setup with Photoprism as the server and PhotoSync app to sync my Android phone to it. Recently, I migrated to Immich server + its official Android app but the concept is the same: backup my photos and videos from my phone into my NAS.

It's always a nice feeling to replace a paid subscription from big tech with a self-hosted solution but, in this case, it was also quite scary. Without the instant backup sync of my phone with Drive and without state-of-the-art sharding and multi-region replication from Google, it felt like I could easily lose my data if something happened to my server. It could be something like a house fire or one of my HDDs failing on me (the latter being much more likely to happen and would be devastating since these price hikes have me running on a RAID 0 right now, sad times).

Searching solutions to ease my mind from this feeling, I found the absolute golden 3-2-1 rule: you make 3 copies of your data, in 2 different storage devices, 1 copy offsite. I realized that with my setup, I only needed one more copy and a offsite copy and I would be 3-2-1 rule compliant.

For this offsite copy, I wanted a solution that was cheap, automated and easy to configure. I think I found this solution combining a few components: AWS S3 Glacier for storage, Rclone for syncing the files with the remote storage and a simple cronjob to start the sync without me pressing the button (Look, Mom, no hands!).

Remote storage

I've chosen AWS S3 for the copy offsite because I already worked with it many times before in my professional career but there are many alternatives to it (e.g. Cloudflare R2, Google Cloud Storage, Azure Blob Storage, etc). Assessing my needs for this offsite copy, I realized that I will need to write often but I would only read this copy if my NAS fails for some reason. Due to the this access pattern, I can use S3 Glacier storage class which is super cheap if you do tons of write operations and almost never retrieve the data.

Worth noting: retrieving data from S3 Glacier can take up to a couple of days, which I'm fine with since the cost is so low.

Just a quick side note: I had this impression for the longest time that Google, AWS, etc, were a silver bullet when it comes to backups due to their top notch backup strategies but permanently losing data can also happen to them (shocking /s): example 1 and example 2.

Sync engine

For handling the file sync with the remote storage, I landed on Rclone. It is super simple to configure (just a couple of steps to keep an eye out) and also has some flags that are cost effective for S3 Glacier backups that I will mention shortly.

For the configuration, follow the official documentation. Make sure to set ACL to private and, to use S3 Glacier, select DEEP_ARCHIVE for storage class. I also recommend using client side encryption (documentation) so your data can't be viewed by anyone but you.

For the command itself to sync files from my NAS to S3, I use copy instead of sync because I don't want to delete any files from the backup ever, even if they don't exist locally anymore. I use --size-only flag to avoid an extra request to get the object metadata and --fast-list to reduce API calls trading off memory usage. Rclone has a whole section on reducing costs that is worth checking it out get a detailed explanation on all the flags.

rclone copy $GALLERY_PATH s3-immich-encrypted: \
  --size-only \
  --fast-list \
  --transfers=8 \
  --checkers=16 \
  --stats=30s \
  --stats-log-level NOTICE

Making it automatic

Is there a simpler way to run a cli command or script then using a cronjob? If it exists, I am unaware of it. I just configured it to run every 1st and 15th of the month on my NAS server and forgot about it.

I would check from time to time if it ran correctly but after the third time that I had to check, I wrote a simple script to get the output from Rclone and pipe it into a ntfy.sh topic and never cared about it again. Example of a notification:

Upload finished!
Checks:            748 / 748, 100%, Listed 2746
Transferred:       130 / 130, 100%
Elapsed time:      1m56.8s

Conclusion

I've been running this setup for about 10 months. I have ~80k objects totaling ~200 GB of data in my buckets, all of which was backed up this way. The initial upload cost me around $3, and now that I'm doing only incremental syncs (around 2k objects), my monthly AWS bill is about $0.30.

With this setup, I have a remote backup routine that runs every 2 weeks, its automatic, cheap, encrypted, it notifies me when it's done syncing and I'm 3-2-1 rule compliant now. To lose my photos and videos now would need a catastrophic event on my AWS region + my NAS failing at the same time.

I'm not saying that can't happen, but if it comes to it, take my dog pictures away, Universe. You've earned it!