Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

copying entire systems

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
viniosity
Posts: 46
Joined: 2004-09-15 04:39
Location: DC

copying entire systems

#1 Post by viniosity »

I have two Debian testing systems on the same LAN (let's call them A and B). I'd like to take the entire contents of computer A and move it to computer B. That includes my websites, installed packages, etc. (everything except the kernel and IP info). Is there a pretty straight forward way to do that? The goal is to set aside computer B and keep it as an emergency spare in case computer A fails)

TIA

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#2 Post by lacek »

It is simple: grab the HDD of B, put it into A, copy everything except /proc (for which you need to create an empty dir).
Before that, umount all mounted directories (network shares, for example), and after it is finished, you have a bootable system.
If you want to preserve some parts of the original system (like the kernel), you move it to a directory and be careful not to overwrite that dir (/boot, for example).
You may need to tweak a little on the 'copied' system, but generally, systems can be 'cloned' with simply copying.

User avatar
viniosity
Posts: 46
Joined: 2004-09-15 04:39
Location: DC

#3 Post by viniosity »

Is there any way to do this without pulling open the computer? Maybe even through some combination of ssh and rsync?

Jeroen
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 483
Joined: 2004-04-06 18:19
Location: Utrecht, NL
Contact:

#4 Post by Jeroen »

Sure, at the study association where I admin the workstations, we have a script that simply rsyncs all of /usr, /var/lib, and a few other places from one place to the other, to duplicate the exact configuration. This way, we only have to maintain one workstation, the others can be brought completely in sync easily, and every time we buy a new computer, we duplicate the whole config this way.

Just boot on the target PC with a bootable linux distribution (knoppix for example), partition the harddisk accordingly, and just rsync the whole thing over (per partition, otherwise you're going to try to copy /proc over... won't work. Or just umount /proc first, it isn't essential for running your computer anyway (okay, lots of stuff might crash, but the important stuff remains running).

User avatar
viniosity
Posts: 46
Joined: 2004-09-15 04:39
Location: DC

#5 Post by viniosity »

Thanks for the replies everyone. I found a couple of other good sources:

Unison:
http://www.cis.upenn.edu/~bcpierce/unis ... anual.html

Rsync:
http://www.linux.com/article.pl?sid=04/09/15/1931240

Post Reply