I have a EC2 and Digital Ocean servers and I want to re-create them locally (same config files and everything). By local I mean virtual box (vagrant).

I had started out by managing them with Chef but had to go around that for a while (time crunched). My Chef recipes are no longer synced with the servers.

Any way I can reverse engineer this? I tried blueprint but wasn't able to get it to install the apps right.

1 Answer 1


If all else fails, there's the old fashioned way - On Ubuntu or debian,use dpkg --get-selections to dump out a list of installed packages, and install them with dpkg --set-selections. The equivalent of this for red hat based distros is yum-debug-dump and yum-debug-restore (optionally with --install-latest).

Create the same users as the source system if necessary - cat /etc/passwd should list them out, and you can check with diff to see if the two lists are identical.

Then use rsync to duplicate your /etc/ folder for settings, various /home/ folders for users (and check permissions here) and other folders like /var/www/. Test, make sure everything's there and working, and starting up as needed, and you're done. Takes me less time than to set up a fresh server.

Sometimes, the old, simple ways are the best. If you work this out manually, simply write a script that will replicate this off your current server automatically.

  • 1
    Thanks! I'll try to hack this together. I tried the dpkg --set-selections command and seems to work.
    – iDev247
    Sep 23, 2013 at 3:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .