How to copy images of your server’s partitions to another server

Warning: Should you not have the expertise to perform these tasks, please consult with your system administrator.

Copy images of your server’s partitions to another server with the Linux Rescue System using sshfs and part image:

    1. Install sshfs in the Linux Rescue System and load the fuse module to mount a foreign directory on a server using ssh.

root@jarvis ~ # apt-get update


root@jarvis ~ # apt-get install sshfs


root@jarvis ~ # modprobe fuse

    1. Mount an encrypted directory from the remote server.

root@jarvis ~ # sshfs username@remote.host:/directory/on/remote/server/ /mnt

    1. Use partimage available within the Linux Rescue System to backup partitions:

root@jarvis ~ # partimage

    1. Choose the partition your wish to save/restore and insert the name of the image file and its path.

Alternatives to sshfs are NFS or SMB/CIFS mounts. Since neither of them are very common on the average Linux server and for the encryption that sshfs offers, sshfs is usually the best choice.

  1. Use dd to copy the entire hard drive instead of copying single partitions.

Note:

  • dd copies on a per block basis. If it encounters an error, the program terminates (should this be the case, you can use dd_rescue).
  • Take care to use the right device names for if= and of=, to avoid deleting all data accidently.
  • dd copies empty parts of the hard drive (which may be unnecessary).
Assist Note

All Self-Managed tools and features are now available in the new xneelo Control Panel. Make the switch to the new xneelo Control Panel and discover a simpler, more secure way to manage your hosting.