Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a Linode with Ubuntu installed. The machine is used for things like web sites and Minecraft.

I would like to create a complete 'offline' copy of the server to test some new packages and upgrades of current packages. I would want to place this copy into a VirtualBox VM.

Data is less important (e.g. user files, web sites, Minecraft worlds, etc), but I would very much like to be able to copy configuration (web site configs, packages installed, etc).

Is this possible? I feel that there might be an easy way to get the same packages installed across two systems (obtain a list of installed packages and feed this into an installing system), but perhaps it may be more difficult to get the config files (stuffs found in /etc for example) - perhaps difficult is wrong, perhaps more manual is a better description.

share|improve this question

5 Answers 5

up vote 2 down vote accepted

To install the same packages you could copy the /etc/apt/sources.list contents to the new server and then issue dpkg -l | awk -F" " '{print $2,$3}' | tr " " "=" | tr "\n" " " which will give you all packages installed (via dpkg, apt-get, aptitude, etc).

You could redirect to a file and then use apt-get install < file.txt to install all the same packages with the same version.

Since you're running same distro, same kernel (possibly different after upgrade) and same packages versions it should be OK for you just to copy the /etc folder.

share|improve this answer

Linode has a "duplicate disk image" feature that you can use to copy your VM disks.

This doesn't allow a VirtualBox installation, but it does allow to have a test environment after cloning.

share|improve this answer

One way to do this would be to image the system using Clonezilla. Then create a new virtual machine, boot up the Live CD of Clonezilla in there, and slap the image on a Virtual Hard Drive.

share|improve this answer

I suggest you two different approaches: 1. dd your current disk to a file and back out to your VM disk; or 2. Install a fresh copy of linode on you VM and rsync all the files you want/need into it.

The rsync command will be, from the linode VM, something like this:

rsync -avzgroupP --excude=/proc --exclude=/dev --exclude=/sys --exclude=/lost+found --exclude=/var/log -e ssh /

For the command to be run from the host machine, just switch / to / root@vm.

share|improve this answer

You may want to try Devstructure's Blueprint. It inventories the system and will generate chef, puppet, or bash scripts to regenerate it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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