File Backups – Thoughts

I have used rsnapshot a lot in the past to provide snapshots in time for my backup purposes, and I loved how I was able to to pull data from remote machines to backup locally. However, doing the reverse seemed to be a lot trickier. I wanted to push backups to a server instead of have the server pull data. Because when the server started its backup routine, some machines may be switched off. So rather than the server be responsible for backing up the clients, I wanted the clients to be responsible for backing themselves up onto the server itself.

rsnapshot didn’t seem to lend itself to easily to do this, but then I thought “why not use sshfs?”. With sshfs, I can mount a directory from a remote SSH server on the local filesystem as a directory, use that as a the snapshot root and it should work. The only downside is that since rsnapshot must run as root to do a full system file backup, it also means the sshfs must be mounted as root too, and therefore it tries to connect as root to the remote server. This might be fine if you wanted to do a full remote system backup, but enabling root SSH access is a potential security hole. Possible workaround this by making a standard user who is a member of the root or admin group (haven’t checked whether this would work yet.)

Then I found out about rdiff-backup.

rdiff, for those unfamiliar with the term, is rsync diff (or reverse diff, depending on your school of thought.) It uses the rsync algorithm (the same used by rsnapshot) to create a diff file (or delta) which, when applied to a file, can produce another file – a bit like patching using a patch file. Since we only save the differences between a file and its other version, the actual storage space is low.

rsnapshot utilises hard links to store same versions of files across multiple backups, but has a full copy of each new version. rdiff-backup stores the latest version, and stores diffs that enable you to go back to a previous point in time.

In this sense, rsnapshot works like a full backup style, storing each new version in its entirety, whereas rdiff-backup works as full-plus-(reverse) differential. Restoring from the latest backup on either tool takes the same time, but restoring from an older backup would take longer for rdiff-backup, because it would have to assemble that particular version of the files via the diff files, whereas with rsnapshot, the full version is stored (although at the cost of more space). rdiff-backup works great for files which change often, but change only slightly. Rsnapshot works great for files which change rarely, but change entirely. Using a combination of both might be a good idea (say, use Rsnapshot for /home and rdiff-backup for /var and /etc)

Sharing Stats

Most used sharing sites:
Pinterest 1111
LinkedIn 1074
Reddit 1068
Pocket 1067
StumbleUpon 1065
Twitter 1052
Facebook 1036
Tumblr 1034

Most Shared Posts (>=30 Shares)
Doctor Who: Next Doctor Peter Capaldi still hasn’t chosen his outfit, reveals Steven Moffat 47
Ubuntu Saucy Salamander 43
BlenderArt Magazine Issue 41 Imagine The Possibilities 42
MinutePhysics Maths Trolling (Adding Past Infinity) – YouTube 41
Snippet: Chromium Snapshot Download (Cygwin) (Updated 3rd April) 40
Doctor Who: Steven Moffat clears up the whole Doctor regeneration problem… sort of 39
Dungeon Hunter 4 39
Doctor Who 50th anniversary special is ratings triumph as The Day of the Doctor pulls in 10.6million viewers 38
NetbootCD 38
Off the scale: Sainsbury’s in epic pun-filled Twitter exchange with fishy customer 37
Interactive Billboards 35
Running Foundation Training 34
OpenSUSE 34
Debian 34
Tails – Privacy for anyone anywhere 34
Memory 33
10K Training – Day 17: Getting Faster – Day 13 33
Winter Olympics 32
h7FE74136 (500×458) 32
Dentist 32
Cloud Storage 32
Concatenating Videos 32
Dilbert comic strip for 11/28/2013 from the official Dilbert comic strips archive. 31
15 nostalgic classic Doctor Who hat-tips in the Day of the Doctor – what did you spot? 31
Hatsune Miku v3 | Blend Swap 31
Zombies, Run! 31
Microsoft and Google lead coalition demanding limits on government surveillance 30
9GAG – Social Media Sites and Browsers as Anime Characters 30
10K Training – Day 23: Getting Faster – Day 19 30
13 Children’s Book Quotes Every Adult Should Know 30
AKB49 (sic) 30
Modular Modelling 30
Doctor Who theme played by Tesla coils – YouTube 30
Somersby Cider – The Somersby Store – YouTube 30

%d bloggers like this: