Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a production server running Ubuntu. I would like to setup similar configuration installed on my local machine. I'd like to have same packages installed.

Since bandwidth is a constraint the traditional disk cloning methods won't work for me. Having same packages installed and same users with same passwords created would be wonderful; i'll tweak rest of the things manually.

Is there a good solution to my requirements?

share|improve this question
add comment

5 Answers 5

up vote 3 down vote accepted
dpkg --get-selections > packlist.txt  
cat packlist.txt | dpkg --set-selections  
dselect install  

for details check here: http://joysofprogramming.com/dpkg-set-selections-clone/

if you need the same users and passwords you should grab /etc/group /etc/passwd and /etc/shadow

if you need the user data you need to copy /home (it's usually HUGE, so it was left out of the original post)

share|improve this answer
    
note: this will only replicate packages installed, NOT configuration. over low bandwidth links with proper configure scripts it can be a lifesaver though –  hbdgaf Nov 20 '10 at 16:34
    
In case some things are installed by hand compilation and not through package manager, would rsyncing /usr suffice? –  sharjeel Nov 21 '10 at 5:41
1  
it depends on what you installed and how exactly...some things may need directories/files in other directories(var opt)...manual compilation adds a completely new dimension. If you still have the configure script you could try debianizing it and copying the debs to a local repo –  hbdgaf Nov 21 '10 at 12:07
    
as a testing step, you could diff a recursive directory listing before and after compilation to find out what files get dropped/directories made –  hbdgaf Nov 21 '10 at 12:10
    
I would recommend copying debconf settings as well. –  Jayen Jun 22 at 4:03
add comment

Install aptoncd.

$sudo apt-get install aptoncd   

$aptoncd

Select the packages, create iso, take to other machine, install aptoncd, and then restore from iso.

share|improve this answer
add comment

You can use remastersys for that.Remastersys can make a full system backup including personal data to a live cd or dvd that you can use anywhere and install.

remastersys Install remastersys

For reference see the posts below

Tutorial 1
Tutorial 2
Tutorial 3

share|improve this answer
    
As I've put in my question, my scenario requires installation of same packages from internet rather than copying from server as bandwidth is the constraint. I don't think remastersys fits here –  sharjeel Nov 20 '10 at 14:36
add comment

i haven't tried clonezilla myself, and i hardly know how it works, though, what i've been told so far is that you should be able to make an exact copy of your system, and i guess you should be able to install the copy as well.

you can read about Clonezilla here

share|improve this answer
add comment

I'm sure there is a better solution but maybe this fits your needs: capistrano Install capistrano

See here for more information:

https://github.com/capistrano/capistrano/wiki/Documentation-v2.x

share|improve this answer
    
installing another tool for package management when we already have several seems a bit obtuse...just a thought. –  hbdgaf Nov 20 '10 at 18:53
1  
Capistrano is more than a tool for package management, it is a full featured deployment tool for automating tasks on remote servers. There is nothing wrong in offering more alternatives to someone's needs. It is the purpose of this site. Anyway, let our friend choose whatever solution he thinks best fit his needs. –  zuzust Nov 20 '10 at 20:20
add comment

Your Answer

 
discard

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.