[kde-linux] Backing up your Linux PC

John Hunt john.kde at yoredale.uklinux.net
Tue Nov 22 08:25:23 UTC 2005


On Monday 21 Nov 2005 06:10, Dan Maday wrote:
> I am running Fedora 4. I have two disk drives. I would like to create a
> backup image of the primary disk (the one with Linux) to the secondary
> disk. What free software would you recommend?

It is difficult to beat rsync for a job like this. It can produce an exact 
replica of the file system from one partition onto another partition, 
including preserving hard links. It lends itself to running as a cron job. 
It is quick (after the first time) because it only copies changed files. 
Unlike an actual partition image, the partition you restore to can be any 
size, so long as it is large enough for the files.

To back up the root partition onto the same machine, something like:

rsync -avHx --delete --exclude='/lost+found' / /dev /mnt/sparepartn

To back up to another PC:

rsync -avHxz -e ssh --delete --numeric-ids --exclude='/lost+found' \
   / /dev otherPC:/mnt/sparepartn

NB test with the -n option first to make sure you have the command right, 
you can do a lot of damage if you write the files to the wrong location!

To restore the files, boot using knoppix and reverse the procedure.

If you want the second disk to be a bootable replica of the first disk that 
you could swap to, partition it the same as the first disk, mount every 
partition and rsync the files from the corresponding partion on the first 
disk to it.

There is a script called ribs that can manage this for you, and takes it a 
step further by keeping past-copies of the backup as an archive. Use of 
hard links means it achieves this without eating huge amounts of disk 
space. http://ribs-backup.org/

...John

-- 
- -------------------------------------------------------------------
  John Hunt, Stokesley, N Yorks, UK, http://www.yoredale.uklinux.net/



More information about the kde-linux mailing list