I have backintime storing backups to a hard drive. I'm replacing that hard drive and wish to copy everything from the old drive to the new one. How can I do that, preferably with rsync?

I have 600GB data in total and both drives are 2TB capacity, so space should not be an issue. My first attempt was to run rsync -rt --progress /SOURCE /DESTINATION but this filled the 2TB drive and failed. I thought soft/hard links might be the problem so I next tried rsync -a --progress /SOURCE /DESTINATION but this failed the same way.

There is a similar question here about moving the metadata and settings to a new computer, but I'm trying to move my backup sets to a new drive within the same computer. The only change I want is the physical swap of the hard drives (and I'm okay editingfstab, etc, once I have a successful copy).

Is rsync the right way to do this, with some argument I've overlooked, or do I need to use something like dd to copy? I am reluctant to keep trying because each attempt takes many hours to run before failing.

  • I say use dd bs=4M – Android Dev Jul 7 '16 at 16:48
  • @AndroidDev How would specifying block size address the issue of 600GB 'filling' a 2TB drive? – Tom Brossman Jul 7 '16 at 16:53
  • Adding bs=4M will drastically speed it up. – Android Dev Jul 7 '16 at 16:53
up vote 1 down vote accepted

You need to add rsync -H to preserve hard-links.

rsync -avhH --progress /SOURCE /DESTINATION

Alternative you could use tar to copy the snapshots because tar will preserve hard-links as well

cd /DESTINATION; tar cf - /SOURCE/* | tar xf -
  • Thanks, you are right it was the hard-links giving me trouble. This worked for me (and is more readable for when I forget what worked later...) rsync -a --hard-links --progress /SOURCE /DESTINATION. – Tom Brossman Jul 18 '16 at 14:55

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.