How do you back your systems up?

JaSauders

n00b
Joined
Jan 21, 2013
Messages
13
For years I've been using rsync in a simple bash script to automate my backups. Typically my script looks something like this:

#!/bin/bash
rsync -a --delete --exclude=.gvfs /home/jason [email protected]:/media/storage/jason

chmod +x it to be executable, cron it (or bind it to a key combination), and you're golden. The other day a user asked me why I bother with rsync and why don't I use rdiff-backup. I was quick to dispute it since I thought rsync was amazing in every way, and it is, but rdiff-backup has begun to win me over. I love how rdiff-backup still keeps a mirrored copy of your data - JUST like rsync - it just ALSO keeps an incremental revision history, which is undoubtedly a bonus.

I ended up whipping up a quick command like so:

#!/bin/bash
rdiff-backup --exclude /home/jason/.gvfs /home/jason [email protected]::/media/storage/jason

chmod +x like before, cron it or bind to a key combo, and bam. It ran fine without a hitch. For kicks I would restore it via rdiff-backup -r date:T:time /path/to/restore, and it worked fine with no complaints. I can also run rdiff-backup -l /path/to/backups to see which incremental backups exist. Likewise, rdiff-backup --remove-older-than 5D /path/to/backups will remove any backups older than 5 days (or run with --force you can delete multiple backups at once).

The only downside is, I can't find a GUI that's worth a damn with rdiff-backup. Don't get me wrong, I love my terminal like you can't imagine, and terminal wise rdiff-backup (along with rsync for the most part) seems pretty dang easy to flow through, but GUI wise I was coming up short. Back In Time appears to be an exceptional implementation of it, but the lack of SSH support with Back In Time is an instant buzz kill. I always like to (at the very least) be aware of what GUI tools are out there so if I'm ever asked I can direct less savvy users to them accordingly. Then again, if users know how to SSH they should surely be okay with typing a command once in a text file, adding some #!/bin/bash jazz to it, save, set to executable, and call it a day, so maybe Back In Time will be a very viable local based solution... But I keep looking at the super easy Deja Dup and I can't help but to think even they have SSH support... anyway... moving along.

This thought process got me wondering... what do you guys use for a backup system? Do you guys have scripts cron'd or GUI's with backup profiles scheduled? What do you have going on? Any rdiff-backup users out there or am I flying solo? Anybody out here running any home-made scripts through anacron by chance?
 
Right now I'm just doing the rsync cron job shenanigans. I think eventually I'd like to move to rsnapshot for the version history like you mention, but right now my primary need is just to have a backup in case of disk failure.
 
Nice. Well if you guys have a chance, look into rdiff-backup and see what you think. It's literally rsync + version history. Food for thought in case you do want to go back to another version, even though I can recall 0 times where I needed it... it's at least nice to know it's there.
 
# directory to backup# rsync -vaH --delete-delay --partial --stats --numeric-ids --inplace --archive --compress --hard-links --one-file-system --bwlimit=1000 --fileflags --force-change --exclude-from="/usr/svnexclude.fil" . /destination
(/destination/second file system, after changing to it... and note the "dot" as the source). I don't ever type it all, I've it in scripts or the equivalent. ) [The bwlimit is to slow it down... so the system can be used normally in the meantime...]...
Sorry for not including the entire instruction set if one wants to implement it from scratch. Not enough time...
 
I've been using rsnapshot for several years now. It's was originally based on the automated backups by Mike Rubel link posted above. Uses rsync and hard links to make multiple, full backups.
 
I use BackupPC to get the laptops and a couple of directories on my desktop.

CrashPlan gets the BackupPC pool and some other stuff into the cloud.

For my work desktop I wrote a backup script to see if my luksCrypt disk is mounted, and if so then run rdiff-backups for each of my partitions (/boot /home / /tmp /var /var/log /var/log/audit)
 
Back
Top