[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I clone Computer A from Computer B?



Dne, 03. 03. 2011 18:42:02 je Jason Hsu napisal(a):
Computer A is running minimal Debian with a firewall and servers, including SSH.

I can use Computer B to ssh my way into Computer A. How do I use Computer B to clone Computer A? So far, I've only been able to clone Computer A by booting up a live CD on Computer A and running PartImage.


I assume that by "use Computer B" to clone Computer A you mean "how do I clone A to B over the network". One solution would be piping dd through ssh, as was explained somewhere on this very list several days ago (apparently, dd can copy between hosts). A less "daring" approach would be to simply use rsync. It is capable of resuming broken downloads, and uses compression to save bandwidth. You should create and mount the target partition on the remote server in advance. I've cloned (actually, rsynced) data partitions with rsync and recently I've successfully cloned my /home subtree over my LAN with

rsync -turboSzxpvg /home remoteserver:/destination_dir

Caveats: rsync has a very complex set of command line options. You should study the man page in detail if you want things such as hard links and ownership/permissions preserved. You may need to allow root login in the remote ssh daemon, and then run rsync as root in order to copy your / partition with the correct ownership/permissions. I'm not sure how the "virtual" subtrees will behave though (/proc, /sys and the like); and I don't know whether, for the / partition, it can be done live. The other partitons should probably be OK.

--
Cheerio,

Klistvud http://bufferoverflow.tiddlyspot.com Certifiable Loonix User #481801 Please reply to the list, not to me.


Reply to: