Backup with rdiff-backup

These days I only have my laptop and an external harddisc. Within the last half year I already had to recover my file twice. The first time my mainboard said “good bye” to me and there was no possibility to get a replacement here. So transfer my files to a new laptop. The second time, I destroyed the master boot record and the partition table and was not able to fix it without reinstalling the system.

My backup should consist of my home folder and my MySql databases saved encrypted on my external disc. First I tried pyBackpack a graphical interface for rdiff-backup. But I got several problems using it, so I changed to the command line based program rdiff-backup, on which pyBackpack is based upon.

Rdiff-backup is a program to create an incremental backups of one folder in another folder. For example via network or in my case on an external drive. The official homepage tell about it:

A remote incremental backup of all your files could be as easy as
“rdiff-backup /”

For installing, use the package rdiff-backup.

$ sudo apt-get install rdiff-backup

For encryption my external harddisc is a TrueCrypt Container. When it is mounted I can backup my files using the following two commends.

$ rdiff-backup /home/phynformatik /media/truecrypt1/home/
$ sudo rdiff-backup /var/lib/mysql /media/truecrypt1/var/

Herewith the complete structure of each folder is copied. Starting a new backup only changed or new files will be copied. The actual state is directly in the backup folder. Older versions of your files are in the folder rdiff-backup. To recover the latest state it will do to copy the files and folders (inclusively the hidden ones) but rdiff-backup from the backup folder back to the original folder.

For me a backup of my home folder and my MySql databases is enough. Some more files which are worth to be backed up may be in /etc/ or /var/.

[EDIT 03/07/2017]: As TrueCrypt is not continued anymore, you should look at one of its alternatives instead.

Gears 0.5.33 Workaround

I created a workaround for my gears problem by manually changing the version number within the .xpi file from 0.5.32 to 0.5.33. It seems to be working. Since yesterday there was no attempt for an automatic update.

You can download the patched file here: gears-linux-opt-0.5.32-patched.xpi

[Update 02/04/2010]
There is a more recent version than 0.5.33 available. The patched file contains now the version number 0.5.36

Gears 0.5.33

Gears tried to update itself automatically, but stopped with an error telling, it is not compatible with my system, all the time. My workaround: uninstall, and install it manually failed. I was not able to install it again.

The file install.rdf within the actual .xpi file shows:

<!-- Prevent this XPI from being installed on the wrong platform. -->

The problem is, google packed the 64-bit version instead the 32-bit version, which will not run on a 32-bit System.

To get gears running again I had to install an older, correct packaged version. Gears version 0.5.32 can be downloaded here:

iPod Nano 2. Gen und Rockbox

Since Summer 2009 Rockbox is running (unstable) on a iPod nano 2nd generation. Reason enough to try it.

Rockbox is a free software replacement for the firmware held on various forms of digital audio players (DAPs). Rockbox offers an alternative to the host device’s operating system firmware (in many cases without removing the original firmware) which provides a plug-in architecture for adding various enhancements and functionality to DAPs which are not present in the original OS. Enhancements include PDA functionality, applications, utilities, and games. Rockbox can also retrofit video playback functionality onto DAPs first released in mid-2000. Rockbox also includes a voice-driven user-interface suitable for operation by blind and visually impaired users. […]

Rockbox is free software released under the GNU General Public License.

(from Wikipedia, the free encyclopedia)

Especially the possibility to watch movies on my iPod makes the try worth it.


For installing I used the RockboxUtility.

The iPod Nano second generation is not yet recognized automatically, therefore you need to set the mountpoint correctly in the settings dialogue. Automatic installation is also not yet working. Open the tap Installation and install the bootloader and Rochbox separately. The most recent version will be downloaded automatically. Within the tab Extras, you can install more themes and fonts, to make your iPod look better, than already the case. For Doom on your iPod you also find the needed files here.

When the installation is finished Rockbox will be loaded when starting your iPod the next time. The handling feels as nice as with the original firmware, but there are much more menu points. To get the music in your iTunes database played you need to actualize the database once.


To transfer music to the iPod you still need to load the original firmware, because Rockbox freezes when connecting. Therefore flip the hold switch while starting. Now connect the iPod and fill it either per Drag&Drop, or using a program like Banshee.

Banshee recognizes the iPod as Rockbox Device and you can just put all your music there. Banshee saves the album covers as cover.jpg in the appropriate folders, so that they are shown while playing your music.


Movies need to be a MPEG1/2 file with an resolution of 176×132 pixels in order to be played properly. To convert a movie you can use on of those commands:

$ ffmpeg -i inputfile.suffix -s 176x132 outputfile.mpeg
$ mencoder -vf scale=176:132 -oac lavc -ovc lavc
  inputfile.suffix -o outputfile.mpeg

Then it is ready to be transferred and to be watched. It is nearly like cinema.

A detailed manual for Rockbox and the iPod Nano 2nd generation is available on the developer’s page.

Warning: Doing so you might lose all your warranty and spoil your device. You can do it, but at your own risk.

[Update 24/03/2010]
If you accidentially destroy your iPod firmware, you might be able to get it working again using this manual: How to repair / restore iPod firmware on linux. Take care, what you are doing. Like the author of this article i have overwritten the master boot record and my partition table trying it the first time.

Filling the iPod with music is now also working with Rockbox natively.

Qemu and Samba

I use Samba to share files between my host and guest system in Qemu. Reading files on the host worked from the beginning, without problems. Writing not.

Solution: Simply set the access permissions for the folder to 777. Is my case just:

$ sudo chmod 777 share/