PSla Blog

Blog Piotra Ślatały | Peter Slatala's Blog

RSnapshot – migrate to other drive

Once you start using rsnapshot and you haven’t thought about increasing hard drive requirements, you didn’t setup LVM, you might want to migrate yours rsnasphot directory to bigger drive, preferably under LVM.

You might see how to setup LVM here

When it comes to migrate your current rsnapshot backup to other drive, you have two options:

  •  Migrate block by block from device1 to device2
    [cc lang=”bash”]
    dd if=/dev/device1 of=/dev/device2 bs=1024k
    e2fsck -f /dev/device2
    resize2fs /dev/device2
    [/cc]
  • Using rsync
    [cc lang=”bash”]
    rsync -az -H –delete –numeric-ids –sparse –xattrs –acls source destination
    [/cc]
    you might use also –verbose to see progress

First version will copy whole drive (or partition), while the latter will copy data itself. But don’t be surprised, if the latter takes more time. Due to plenty of hard links rsnapshot is creating, memory requirement is pretty high and speed of moving is slower than when copying partition byte by byte.

Leave a Reply

Your email address will not be published. Required fields are marked *