Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
thx reply ,
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):
Presumably, you could then use dd to raw-write that image to a local device of the same size/type.
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.
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):
Presumably, you could then use dd to raw-write that image to a local device of the same size/type.
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.
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 ?
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 ?
Yes, I think you do need a device of similar size. I think you can use a larger device as the destination if you like, but some of the space will be wasted.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.