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.
Leeann Morgan
Last Update 3 jaar geleden
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 [email protected]:/directory/on/remote/server/ /mnt
1. Use partimage available within the Linux Rescue System to backup partitions:
- root@jarvis ~ # partimage
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 accidentally.
- dd copies empty parts of the hard drive (which may be unnecessary).