Good Team Plays Hard
In: Ubuntu or Linux
28 Feb 2008FlyBack is a tool similar to Apple’s TimeMachine. It is intended to create snapshot-backups of selected directories or even your full hard drive. From the FlyBack project page: “FlyBack is a snapshot-based backup tool based on rsync. It creates successive backup directories mirroring the files you wish to backup, but hard-links unchanged files to the previous backup. This prevents wasting disk space while providing you with full access to all your files without any sort of recovery program. If your machine crashes, just move your external drive to your new machine and copy the latest backup using whatever file browser you normally use.” This article shows how to install and use FlyBack on Ubuntu 7.10 (Gutsy Gibbon).
In order to install FlyBack, we open a terminal (Applications > Accessories > Terminal):
First we install FlyBack’s dependencies as follows:
sudo apt-get install python python-glade2 python-gnome2 python-sqlite python-gconf rsync
Then we download and unpack FlyBack (in our home directory) like this:
cd ~wget http://flyback.googlecode.com/files/flyback_0.4.0.tar.gztar -zxvf flyback_0.4.0.tar.gz
That’s it already, FlyBack can now be used.
It’s a good idea to store your backups on an external hard drive. Please plug in an external hard drive and wait until it gets mounted (an icon should then appear on your desktop):
Now, in a terminal, type in the following command to start FlyBack:
cd ~/flyback/python flyback.py
FlyBack starts. If you see the following error message, simply click on OK – you can ignore this error:
FlyBack starts with the Preferences window. On the Storage Location tab, select your external hard drive:
Then go to the Included/Excluded Directories tab. Here you must specify which directories you want to back up and which ones you want to exclude from the backups:
Select the directories you want to back up (e.g. your home directory)…
… and click on the Add button:
The selected directory should now be listed under included dirs. Repeat this step for as many directories as you want to back up. The exclude patterns field already contains a good default selection of files/directories not to back up. Modify it only if you know what you’re doing:
On the Backup Schedule tab you can automate FlyBack backups if you like:
Please note that FlyBack doesn’t have to be running if you’ve selected to create automatic backups on the Backup Schedule tab. FlyBack creates a cron job for it. You can check that by opening a terminal and running:
crontab -lIn the output there should be a cron job for FlyBack (e.g. like this, running at the selected time):
falko@falko-desktop:~$ crontab -l0 3 * * * python /home/falko/flyback/flyback.py --backup #flybackfalko@falko-desktop:~$
Now that we’ve configured FlyBack to our likings, we can close the Preferences window.
The main window looks as follows, showing you the contents of your hard drive. The right window (system snapshots) lists all available backups – as we’ve created none yet, it only shows now which refers to the actual content of your hard drive.
You can browse the contents of your hard drive like you know it from your default file browser. The Home button takes you to your home directory (e.g. /home/falko):
To create your first backup, click on the Backup button. Please note that this will back up only the directories that you’ve selected on the Included/Excluded Directories tab in the Preferences window, regardless of what directory you’re currently in.
While the backup is being created, the Backup button is greyed out (saying Backup is running):
Afterwards, the system snapshots window lists your new backup. If you click on it, you see the contents of the backup, not your hard drive:
If you browse the contents of the backup, you’ll notice that it really only includes the directories and files that you’ve specified on the Included/Excluded Directories tab and nothing else:
Now let’s delete some files or directories from our hard drive (of course, these files/directories must be in the directory that you’ve backed up!) and see if we can restore them from our backup. I’ve backed up my home directory, so I go to Places > Home Folder…
… and delete some diretories in it:
Now in FlyBack, if you go to the snapshot called now (which is the current content of your hard drive), you’ll see that the deleted directories are missing there as well:
Now go to the snapshot you’ve just created, and you’ll find the deleted directories in there. Mark them (hold down the CTRL key and click on the directories if you want to mark multiple directories at a time) and click on the Restore button:
Afterwards go to the now snapshot, and you should find the directories on your hard drive again:
Backups can simply be deleted using a file browser. On the external hard drive you should find a folder called flyback:
In the flyback folder, you will find all your snapshots:
To delete a snapshot, right-click on it and select Move To Trash:
In FlyBack, you’ll still see the backup in the system snapshots window. Click on the Refresh button…
… and the backup is gone:
If you don’t want to start FlyBack form the terminal each time, you can create a menu entry for it. Right-click on Applications and select Edit Menus:
Select System Tools and click on the New Item button:
A Launcher Properties window opens. In the Name field, type in FlyBack, and in the Command field specify something like this:
python /home/falko/flyback/flyback.py
Please replace /home/falko with your own path! Then click on Close:
Click on Close again to leave the menu settings:
Now you can start FlyBack under Applications > System Tools >FlyBack:
This is a place I create just for fun and to write down some experience and notes for myself. So feel free to enjoy and drop any comments you have. I had been employed as Programmer, System Analysts, System Administrator, DBA and Project Manager. I will share some of my case study here as well. Enjoy!