3

I rented a virtual server running Ubuntu. To test changes to my configuration I'd like to be able to try them on a local machine. So basically I'd like to create a clone of the virtual server (I don't care if this clone will then run as a physical server or virtualized on a local machine) and either keep track of any changes to get some kind of script or playbook to recreate these on the remote system or publish these changes automatically.

On the remote system I've got ssh, while the target system is mine with physical access so there shouldn't be any limitations locally.

As there is a bandwith limitation I'd like to reduce the files copied as much as possible.

What it boils down to:

  1. Which files or directories are needed to replicate the remote machine?
  2. What's the best way to transfer the data? (tar'ing everyting up and scp'ing it?)
  3. Is there a way to create the script or playbook?
  • I have done it in the past rsyncing the VDI, but it's far from efficient. – Javier Rivera Mar 5 '13 at 8:11
  • @JavierRivera Is there anything you can suggest as more efficient or would you just skip it alltogether? – David Mar 5 '13 at 8:31
  • Not really, just make the first copy using a faster method like and USB stick or LAN connection. – Javier Rivera Mar 5 '13 at 10:25
  • Have you asked your provider for a disk image? – Chris Montanaro Jul 15 '13 at 20:46
0

You can use dd over SSH.

dd makes a literal copy of whatever you point it at and puts it in a file at whatever destination you specify.

Here's an article with details:

http://karlherrick.com/dev/2008/09/12/dd-backups-over-ssh/

The amount of time copying the drive image will probably significantly less than the amount of time you would spend figuring out which files need to be copied, and you can tar/gzip the file if you want to reduce transfer overhead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.