remote copy disk
I have a server that have many partition like /var , /usr .... , now I would like to make a copy of this disk ( like diskcopy a: a: in windows ) , including anything in this server ( data & partition etc ) , except plug a harddisk into the server then run diskcopy , can I do it via the network copy ? thx
|
scp can copy recursively. But making a image-copy onto a remote location will require suitable permissions in ssh ...that is all. You can make a image, send it and write it too. A script should do
|
Quote:
scp could copy the files but seems can not copy operating system / partition , if I want the destination server is completely the same as the original server , can advise what can i do ? thx |
You should be able to create an image of a device from a remote machine, provided you have root access to that machine. You would need to un-mount the device, and then scp it's device node to the local machine, like this (example disk is /dev/sdb, which is my USB pendrive):
Code:
localhost% ssh root@remotehost Playing with images like this is fiddly though. IMO, a better way is just to use a mirroring tool to copy files from the remove device to some local directory. rsync is a tool designed to mirror large number of files between two machines. It is especially good when it comes to updating a previously-made copy, as it will intelligently choose which files to copy, and with large files will only copy parts of files which have been modified. |
Quote:
thx reply , for your umount method , I must do it at same size harddisk / partitiion ? if yes , how can I do it when the size is different ? why need umount , I can't copy it when it is mount ? |
Quote:
I imagine it is necessary to un-mount a device before imaging it because a mounted drive which is simply powered off without un-mounting has to go through some sort of recovery process, and I guess the same thing would happen with an image if you did not un-mount the device first, with some risk of data loss. |
All times are GMT -5. The time now is 06:52 AM. |