views:

2284

answers:

8

Is there an easy way of cloning entire installed debian/ubuntu system?

I want to have identical installation in terms of installed packages and as much as possible of settings.

I've looked into options of aptitude, apt-get, synaptic but have found nothing.

A: 

There is RSYNC which let's you synchornise files between installations. So you could just rsync your entire distro, or at least the directories that contain the programs and the configuration files.

Also, I don't know if this is what you are asking, but you could turn your existing install into an ISO image, this would allow you to install it elsewhere, thus having a duplicate.

Hope that helps

hendrixski
+5  A: 

This guide should answer your direct question

But I would recomend Rsync and simply clone entire /root. Its only expensive the first time.

You can also create your own package repository and have all your machines run their daily updates from your repository.

Luka Marinko
The link you provided on debianadmin.com is mostly what I was searching for, and rsync for synchronization. Thank you and, hvala.
boskom
A: 

If the drives and systems are identical, you might consider using dd to copy the source machine to the target.

The only changes that would need to be made on booting the new machine would be to change the hostname.

Once the machine has been duplicated, go with what the other answers have suggested, and look at rsync. You won't want to rsync everything, though: system log files etc should be left alone.

Also, depending on how often "changes" are made to either system (from bookmarks to downloaded ISOs), you may need to run rsync in daemon mode, and have it update nearly constantly.

warren
+2  A: 

Supposing you want to install Ubuntu on multiple identical systems you could try with the Automatic Install feature.

agnul
A: 

SystemImager FAI

We have systemimager working great with RHEL and CentOS. Haven't tried it on Debian. The trick linked by Luka works great with debian though.

Bash
A: 

Well it all depends on scale, and how often you want to use it, using systemimager is basicly rsync on steroids, it has some scripts which make creation of images easy and allows you have network settings etc. This can be easily used where you need to create a farm of webservers or a farm of mailserver with only a small difference between installations where you are able to boot one blank system over the network and have it completely installed. This has the advantage that it's almost completely automated, a script learn your partitioning layout and automatically applies it.

When you only need one copy of a system, keep it simple, boot from a livecd, create your partitioning, copy over network using rsync, install your bootloader and everything 'll be fine.

amo-ej1
+1  A: 

You can use rsync for that and there is an interesting thread about it on ubuntuforms: ubuntuforms

mnml
A: 

How to mirror apt-get installs.

Primary System "dpkg --get-selections > installed-software" "scp installed-software $targetsystem:."

Target System "dpkg --set-selections < installed-software" "dselect"

done.

Patrick S. Roberts