Advice on cloning disk

2

I'm going to buy a second disk for backup, the same size as my laptops. I want to mount it in a casing via usb and backup an entire hdd every soemtime. That's because I want the posibility to just switch drives in case of something goes wrong. I'm using Linux and obviously the right tool seems to be dd. The thing is that my laptop drive has a speed of around 50-70 MB/s and usb 2.0 is 57 MB/s. So to copy my 250GB disk should take me more than 1 hour if I'm lucky. I can't wait this much. I want some differential backup. I read one of JWZ articles. In it he gives more details for using rsync on Mac. He writes that there is possibility of making rsync'ed disk bootable.

So my question is: how to make rsync'ed hdd bootable under Linux or are there other 'quick backup' tools for Linux that would allow me to just swap drives? Or should I just stick to dd :( ?

hks

Posted 2011-02-16T23:10:21.383

Reputation: 121

1Obviously your first backup will still take some time, and I don't think you're using the full 250GB are you? That said, I would create a dd backup first, and then use rsync to update the differential data. – None – 2011-02-16T23:12:28.187

you sould put that as answer .. short and painless solution – matthias krull – 2011-02-16T23:19:09.570

Usb 2.0 has a theoretical bandwidth of 480 Mb/s, but real world speeds are going to be 25-30 MB/s. (Yes, I'm using both Mb and MB in this comment) – afrazier – 2011-02-16T23:22:18.270

@randolph-potter I think that will work. I just need to learn more on rsync. I dont quite understand how it works. Post is as answer. I will accept it once I check it in reality. – hks – 2011-02-16T23:28:08.617

Posted as an answer. – None – 2011-02-17T01:10:18.490

Answers

2

Obviously your first backup will still take some time, and I don't think you're using the full 250GB are you? That said, I would create a dd backup first, and then use rsync to update the differential data.

user3463

Posted 2011-02-16T23:10:21.383

Reputation:

One more thing. Given that I have installed few OSes on my drive and I will always use rsync from the same OS, will I be able to backup other partitions. I mean logically 'rsync -a --exclude '/mnt/backup-drive*' / /mnt/backup-drive' should synchronize partitions wherever I mounted them. Right? Gosh it is so much simpler to copy raw bytes. – hks – 2011-02-17T09:38:10.933

The rsync may start getting dodgy with file permissions across file systems, so obviously dd is preferred in that case, but I think a good test might help. – None – 2011-02-17T23:36:35.917

0

The only thing that need exact copy from one disk to the other is the boot process. The mbr point to somewhere quite fix, after that Grub know how to find a file on the disk.

My advise is to make a minimal /boot partition that you clone with dd. (100MB are enough if you clean your kernels copies 3-4 times a year). And the other partition(s) are rsync'ed.

After a first full-disk dd. Next times, I would

  • mount -o remount,ro /boot
  • dd the MBR and the /boot partition
  • mount -o remount,rw /boot
  • rsync the other partitions.

I would also check cylinders and heads count to be sure to have similar enough disks.

shellholic

Posted 2011-02-16T23:10:21.383

Reputation: 8 177

0

I would suggest using a flexRAID or a RAID_1.

To my understanding FLEXraid will do an initial Full backup of the data then a Differential backup their after.

Lightly Salted

Posted 2011-02-16T23:10:21.383

Reputation: 777

I prefer once a day or a week depending on how much content changed. RAID is designed with constant disk access in mind. It just doesn't fit my need. – hks – 2011-02-16T23:38:15.980