Is there a Time Machine like backup system for Ubuntu? If not, what is the closest thing?
I've used rsnapshot to excellent effect. You can have it rsync and keep as many old versions, based on time as you want/have space for. I've got 6 potential versions of things from today, daily for a week, 4 weeks, and then 6 months worth. I've already used it to recover several file I thought I'd lost due to overwriting.
The only problems I have had was it not running due to the previous run not completing in time, and so it left the lockfile dangling. This was on a remote machine that did password-less logins over SSH to rsync files off for backup/archive and I didn't log in very often to the server to check it. Running a logwatch script on there (emailing problems from the logs) at least made sure I saw the problems to restart it, and it's been hassle free ever since. On my local server, it's been no problem at all.
You may want to try Back In Time
Déjà Dup (day-ja-doop) is a simple backup program. It hides the complexity of doing backups the Right Way (encrypted, off-site, and regular) and uses duplicity as the backend.
- Support for local or remote backup locations, including Amazon S3
- Securely encrypts and compresses your data
- Incrementally backs up, letting you restore from any particular backup
- Schedules regular backups
- Integrates well into your GNOME desktop
rsync, see Time Machine for every Unix out there for a tutorial, using the
--link-dest option to create hard links to files that have not changed since the last backup. Like:
#!/bin/sh # Mount point of the external disk dest=/media/backupdisk date=`date "+%Y%m%d-%H%M%S"` latest=$dest/latest current=$dest/$date rsync -aP --link-dest=$latest $HOME/Documents $current ln -s $current $latest-$date mv -f $latest-$date $latest
Mac OS X Time Machine not only uses hard links to unchanged files, but also uses hard links for folders in which no file has changed at all.
I think that most Unices do not allow hard links to folders, but if your
rsync creates them, then beware when deleting old backups: you should use
unlink to remove hard links to folders, and never remove any file you see in such hard-linked folder. When using
rm on hard-linked files, only the hard link is removed. Good. But when recursing into a hard-linked folder and then deleting the files one sees there, the "original" files are removed and that affects all hard-linked folders that refer to the same thing, even more recent backups!
In other words: running something like
rm -R 20140101-221000 might recurse into hard-linked folders and then boldly invoke
rm on the "original" files. You've been warned.
TimeVault was specifically designed to emulate TimeMachine. The theoretical feature set is what I want from a TimeMachine clone, specifically the space savings. Unfortunately it appears to be dormant: there's been little development activity in a while. I mention it for completeness, and because, if they can be prodded to work on it further, it looks quite promising.