Jump to content
IGNORED

Backups with rdiff-backup


Recommended Posts

 

I have a Western Digital My Passport 500Gb portable drive, formatted as Mac OS X HFS Plus, that I use for storing my ripped CDs. I back it up onto another 500Gb Verbatim portable USB drive formatted as Linux ext3.

 

 

 

I've had some problems with losing the data on the Western Digital drive. The first drive I bought totally failed and I lost all 330 albums I had ripped. I had just began to think about what to do about backups, and then 'bam!' the thing broke, and a load of work got lost. Subsequently the HFS Plus drive has failed twice with disk corruption problems, that the Mac OS X Disk Utility wasn't able to fix. Fortunately the first time I have managed to fix the disk with 'fsck_hfs -rd /dev/disk2s3'. The second time I managed to mount the disk in read only mode and copy everything off it, reformat the drive and then copy everything back. These failures don't give me much confidence in HFS Plus though, and that is why I prefer to have the backup formatted with a Linux file system such as 'ext3'.

 

 

 

So after I got a replacement WD disk, I got the second portable USB disk and periodically copied the iTunes media folder from the WD onto the Verbatim disk. I use a 27 inch iMac with Linux Kubuntu running under VMWare as my work machine, and so I could mount both disks in Linux and use the 'tar' utility to copy from one to another.

 

 

 

That was better than nothing, but it was starting to take a long time, and it didn't keep a record of what had changed. I looked for something better and found a command line utility called rdiff-backup. rdiff-backup copies a file heirachy to a specified destination and keeps the backup in synch. The backup is identical to the original apart from a directory/folder at the top level called 'rdiff-backup-data'. Inside that directory is a sub-directory called 'increments' with a directory corresponding to each directory in the original iTunes media folder. Everytime a file changes or is deleted, rdiff-backup puts a copy with a filename that includes a datetime stamp inside the 'increments' directory.

 

 

 

The basic backup command I use is:

 

 

 

 

rdiff-backup -v5 --print-statistics /media/Music01/Music /media/Music02/Music

 

 

 

 

This copies the iTunes folder on /media/Music01 to the backup on /media/Music01. You can use rdiff-backup commands to rollback the history if something goes wrong, and you can also wipe all the history before a given time in the past. It works across a network and you can use a command like this to copy from a remote machine:

 

 

 

 

rdiff-backup [email protected]::/remote-dir local-dir

 

 

 

 

You need to install rdiff-backup and ssh on both the local and remote machines to get that to work. But rdiff-backup works fine on both Linux and Mac OS X as well as Windows.

 

 

 

A big advantage to me is that the backup disk is perfectly usable with an MPD daemon to provide the media in AIFF format running under Linux. While at the same time the main disk will work fine connected via Firewire on my MacBook with XLD/iTunes/AyreWave.

 

 

 

In the future I plan to get a pair of 2Gb LaCie d2 Quadras, in two different formats, one formatted as HFS Plus and the other as ext3, just like I'm doing at the moment with the portable drives. I can attach the ext3 one to my Linux GuruPlug via eSATA, and do backups over the network at night with a cron job.

 

 

System (i): Stack Audio Link > Denafrips Iris 12th/Ares 12th-1; Gyrodec/SME V/Hana SL/EAT E-Glo Petit/Magnum Dynalab FT101A) > PrimaLuna Evo 100 amp > Klipsch RP-600M/REL T5x subs

System (ii): Allo USB Signature > Bel Canto uLink+AQVOX psu > Chord Hugo > APPJ EL34 > Tandy LX5/REL Tzero v3 subs

System (iii) KEF LS50W/KEF R400b subs

System (iv) Technics 1210GR > Leak 230 > Tannoy Cheviot

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...