Home

Fat German Productions
Attachments
tardis1.jpg (27774 bytes)
tardis2.jpg (31273 bytes)
tardis3.jpg (32224 bytes)

This is TARDIS

TARDIS is the backup system that makes your disc bigger on the inside than on the outside.

What's it for?

The idea is that TARDIS takes a backup of your personal data at a schedule set by you (by default, once an hour). It will automatically clean up old backups after a set amount of time (set by you) and make sure your backup disc never fills up.
Never lose data again. You'll not even be aware that TARDIS is there rescuing your valuable files.

So How Do I Use It?

TARDIS comes with a configuration GUI that runs under KDE's Plasma desktop so these instructions are KDE-centric. There's a guide about how to make TARDIS work under GNOME [Using TARDIS without KDE]
First thing you need is a disc to back things up into. This could be as simple as a directory or partition on your computer's internal disc, but for the best safety you should use an external disc such as a USB hard disc. These things are cheap these days. The bigger the disc the more backups you'll be able to retain and the longer your data will be safe for.
The biggest, most important rule, is that the disc must be formatted using a linux format eg ext4, ext3, etc[1]. (In technical terms it must support hard-linking). Most external discs are formatted for Windows (NTFS) so you'll have to use a linux partition tool (partitionmanager under KDE) to create a suitable partition.
Once you've done it, plug the disc in to your KDE computer and wait for it to mount. It helps if you use KDE's system settings 'Removable Devices' tool to make KDE automatically mount the disc every time you log in.

[1] Recent investigations suggest this might not be true - NTFS discs might work but I need to test this. Or you do... :)

Installing The Plasma Widget

If you have a previous version installed you must first uninstall it.
Remove the widget from your panel or desktop (don't worry you won't lose your configuration) then open a terminal and type
plasmapkg -r tardis
Download the ZIP file from here into a directory. Open a terminal in that directory and type
plasmapkg -i tardis-0.04.zip
The plasma widget is now installed and can be added to your panel or desktop in the normal way.
(You can also install TARDIS using KDE's 'Get New Plasma Widgets' - but I have found that this doesn't work for updates unless you manually remove the old version first)
If you don't get a pretty TARDIS icon after installing TARDIS, then this is because KDE STILL doesn't have a decent and reliable method of installing icons. One workaround is to switch the KDE icon theme to something else. You can switch it back again afterwards.

Important!

You also need to install some Perl modules.
On Ubuntu you need to do
sudo apt-get install libfilesys-df-perl libdatetime-perl libdate-manip-perl
I'm not sure what names these packages will have on other systems.

Configuring the Backups

TARDIS has a configuration interface like any plasma widget (right-click on the icon if you installed it on your panel). There are three panes.

The first pane should be pretty self-explanatory. Run TARDIS every x hours at y minutes past the hour. Back up the folder you specify into the second folder you specify. What could be simpler?
NOTE: TARDIS is really only intended to back up your home directory. Although it can be used to make backups of your entire system (eg setting '/' as the directory to back up) you need to be careful to do things like exclude the backup directory (or you'll fall foul of horrible recursion). Also because it runs as you and not as root, permissions will be lost and some files won't be readable. Only do this if you're sure you know what you're doing.


Now we come to backup retention. This is how long each backup will be kept for before TARDIS automatically removes it.
The example here shows:
It will keep 48 hours worth of hourly backups - eg I'm running it once an hour, so the 48 most recent backups will be kept.
Backups older than 48 hours will be pruned down to one backup per day for backups up to a month old
Backups older than a month will be pruned down to one per week for anything up to 6 months old.
Anything older than 6 months will be pruned down to a monthly backup until the disc becomes more than 80% full, at which point the oldest backups will start to be deleted.
It sounds complicated but it isn't really. It's much harder to explain than it is to use.


Finally we can add some exclusions if we want to. In my example I've set /home/bob as the directory to back up but I don't want to back up /home/bob/.cache so in Exclusions I've added '.cache' as well as a bunch of other folders I don't want to back up. That's it.

Restoring Files

There is no specific interface for restoring files. You can use your favourite file manager.
If you choose to backup into the directory /media/Backup/HomeBackups then you will get a series of directories with names like
/media/Backup/HomeBackups/back-2012-01-03T14:04:01
which is the backup made at 14:04:01 on 3rd January 2012. You can simply browse through these backups to find the file you want and copy it anywhere you want.

Using A Network Share To Back Up To

NFS and SMB (Windows) Shares

Currently it'll back up to an NFS share which has been mounted using the normal /etc/fstab method of mounting an NFS share.
It will probably back up to an SMB/CIFS share mounted in this way too.
Browsing for network shares in the config dialog (eg choosing smb://somserver or sftp://someserver) will NOT work but it won't stop you doing it.

Backing Up To A Remote Host Using ssh

This is the best way to backup remotely. See [Backing Up Over SSH]

Important Notes

Once TARDIS is configured, you don't need to keep the plasma applet running. TARDIS is, in technical terms, a cron job and does not rely on the plasma widget at all except for configuration. If you want to stop TARDIS from running you need to uncheck the box in the first configuration screen, or use KDE's Task Scheduler in system settings to remove the cron job.

Technical Notes

Tardis uses rsync to make its backups. It's important to realise that only files which have changed from one backup to the next will be copied. However because of the way rsync works (with hard-linking) when you browse the directory you backed up into it will look as if everything was copied in every backup. It's very clever.
If you have a home directory that takes up, say, 100MB then after one backup you will have used 100MB of space on your backup disc. If no files have changed when the next backup happens then you will still have only used 100MB of your backup disc but it will appear that you have 2 copies of everything and if you select everything and count it it will say it is 200MB in size. Magic!

Log Files

Tardis keeps a log of the 10 most recent backups in ~/.tardis. If it's not working, reading the one called 'latest.log' might help you figure out why


Related

Wiki: Backing Up Over SSH
Wiki: Using TARDIS without KDE