2

The original question How do I migrate currently installed Ubuntu to a Virtual Machine? was insightful, but with the improvements and developments in systems like Vagrant or Docker, perhaps Clonezilla is becoming archaic for replicating development environments. I think it's worth revisiting.

My impressions about Vagrant and Docker with respect to this topic:

  1. Vagrant. Good for creating virtual machines in which to run your code. However, if you have an existing Ubuntu machine with lots of configurations, etc... seems like there is no way to export the setting of this machine to a vagrantfile?
  2. Docker. Seems to be good for running your app anywhere where docker is installed, but not developing your app anywhere. I might be wrong on this, which is why I am asking. If your main dev machine breaks, is having a docker container enough to get back up and running quickly in a development environment?

Question: Can Vagrant or Docker replace Clonezilla for dev machine cloning onto virtual machines? If so, which one would you choose and could you give some key points about implementation in this case?

2

Sure but they're different approaches to roughly the same thing.

  • Clonezilla (et al) involves taking a complete bootloader-through-application image. It's big and there's no de-duplication. If you have 50 instances of a similar stack, take a full backup of each and store 50 full images. You store a load of stuff that is easily replaceable.
  • Docker installs on stock Ubuntu (installable from a CD). Each container can be based on a public image. You overlay your irreplaceable data over the top. That's all you need to back up. In the previous scenario that means there are now 50 base copies of Ubuntu you don't have to back up.

To restore the first you just need to get your image and burn it. To restore an entire Docker stack you need to reinstall Ubuntu, Docker, grab the [tiny] Ubuntu base image and then reinstall your layers and configuration. You can —and should— automate the buildout process (Chef, Puppet, etc).

The long term ramification is simple: disk space. You can back up your Docker app a billion times in the same space as your Clonezilla images... At the cost of complexity.


Sidebar: While I'm mentioning automation, there is a third school of thought that just uses Chef/Puppet to automate the installation and configuration of Ubuntu installs. You end up with full installs so none of the runtime memory/storage benefits Docker affords you, but small backups and easy replication.


Containers are a good idea. Containers and layers are probably an even better idea. I'm still yet to implement them in anger but I'm only just starting to see the benefits of LXC so it won't be long, I'm sure.

And in your case don't forget you can use both backup techniques at once if you're unsure. That's to say, you can take a Clonezilla image of a Docker host (and still keep backups of your private Docker images elsewhere)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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