splitbrain.org

electronic brain surgery since 2001

Digital Backups

Everybody knows you should do backups. Over the years I developed a system that hopefully keeps my digital data secure against loss. I followed two principles during setup:

  1. important data should be stored on at least two different physical storage mediums → protection from loss through media failure
  2. very important data should be stored in at least two different physical locations → protection from loss through disaster (like a fire)

The whole thing roughly looks like this:

All of this is in permanent flux. Paper backup is coming soon (blog post in preparation) and will probably result in the integration of Google Drive somewhere in the grand scheme of things.

Some more details after the jump. I'm also interested in your strategies. What do you back up and where?


NAS

My Synology DS213J is at the core of my backup strategy. All important data is centrally stored there. Photos, Videos, Documents, Music, Software. It is configured as a RAID-1 as a safe guard against disk failure.

The most important things are my photos. These are automatically backed up through an rsync script to an online storage I rent at Hi-Drive (250GB for 6.90EUR per month).

My music collection has also been uploaded to Google Music.

Desktop/Laptop PCs

What is not stored on the NAS but still is too important to lose is simply stored in Dropbox. This ensures it gets synced to multiple machines as well as Dropbox' datacenter.

Gmail

All my mail is in GMail. I trust Google is doing backups, but still I don't want to lose my mails. So a backup is needed. This I do from my root server. All mail is automatically synced through imapsync to a locally running Dovecot IMAP server.

The backup is triggered through the following cronjob:

#/usr/bin/bash
 
ME=/home/andi/gmailbackup
MDIR=/home/andi/Maildir
 
$ME/imapsync \
   --host1 imap.gmail.com \
   --ssl1 \
   --authmech1 LOGIN \
   --user1 me@gmail.com \
   --passfile1 $ME/gmail-pass \
   --host2 localhost \
   --ssl2 \
   --user2 andi \
   --passfile2 $ME/local-pass \
   --useheader="X-Gmail-Received" \
   --useheader 'Message-Id' \
   --exclude 'Spam' \
   --usecache \
   --tmpdir $ME/cache
 
/usr/bin/fdupes --recurse --quiet --hardlink $MDIR

Phone

My mobile phone holds a lot of data that is dear to me and it's also the most volatile thing. A total loss of the phone has the highest probability. The most important data here are messages and photos which I back up automatically with the following three tools:

I use SMS Backup + to automatically backup SMS and Whatsapp messages to folders in my GMail account.

Foldersync is an awesome tool to auto-copy files between your phone and various storage systems. I use it to backup all my photos (not just the ones produced by the camera app, eg. Whatsapp conversation pictures).

I set up two folder pairs to sync to my NAS:

  • /storage/sdcard0/DCIM → /photo/mobile
  • /storage/sdcard0/WhatsApp/Media → /photo/mobile/Whatsapp

I use Dropbox's camera upload feature, even though my photos are already backed up by foldersync. This is to make sure photos can be stored off-device immediately even when I'm not at home.

Tags:
backups, infrastructure