[NBLUG/talk] Duplicating a server

Mark Street mark at oswizards.com
Sun Nov 20 10:16:57 PST 2005


The key points here are;

1.  Replication of data between two servers.
2.  User and group ownership are not identical/common between the two servers.
-----------
If memory serves me right I had a lab exercise in one of my Linux Admin 
courses at SRJC that had /home shared between two different distributions (RH 
and Debian, dual boot), which brought to light one of the UID, GID problems 
faced here.

... it depends on how one defines simple...

Possible Solutions;

1.  rsync or rdiff-backup ; ) http://www.nongnu.org/rdiff-backup, nfs on 
another machine altogether.
2.  Identical id and authentication scheme between servers.  Either share 
authentication files and schemes (copy passwd and shadow) or use nis or 
ldap.... that route can go from simple to slightly difficult in a hurry.  
Separate your data from your commodity servers, consolidate your 
authentication scheme.

Murphy's law has to come in here somewhere.....  I recall that I did something 
like this in the lab sharing /home with NFS, NIS  back in 2002 with Red Hat, 
Debian and FreeBSD.... a learning experience to say the least.

I have to give a nod to rdiff-backup as it has saved my buttocks on more than 
1 occasion.  Take a look, it is a serious tool that can be scripted and/or 
run as a cron job.

On Saturday 19 November 2005 9:30 pm, Dave Sisley wrote:
> Todd Cary wrote:
> > I know that I have asked this before and I received some answers, but
> > I have not found a simple solution yet...maybe there isn't one.
> >
> > Task: keep a backup server ready in case the main one dies.
> >
> > Though my server is not running critcal tasks, I along with my clients
> > have become dependent on it for FTP and testing of PHP apps.
> > Currently it is running Centos 4.1.  My backup server which is offline
> > is running RH 8 (will not accept Centos) is in standby mode.  From
> > time to time I tar the "/home" directory and untar it on the standby
> > server, but then I have to reset the owners and groups on the files.
> > Also, the dot files for the users may not be compatible (have not had
> > that problem so far).
> >
> > Is there some automated way to get this task done?


> I second the votes you've already recieved for rsync.  It seems a little
> confusing at first, but it's very easy to incorporate into a script.  I
> don't think you want to 'duplicate' the server, just copy the
> directories you'll need to recreate if the original server goes down.
>
> What's cool is that rsync will only copy the files that have changed
> since the last backup.  For instance, it took me over 24 hours to copy
> everything off of the main server at work to a remote, offsite drive,
> but most of those files never change.  The subsequent nightly rsync
> backups now take less than 5 minutes.  Obviously, yours may take longer
> than that if there's a lot of fresh data on your server.
-- 
Mark Street, RHCE
http://www.oswizards.com
--
Key fingerprint = 3949 39E4 6317 7C3C 023E  2B1F 6FB3 06E7 D109 56C0
GPG key http://www.oswizards.com/pubkey.asc



More information about the talk mailing list