Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Nov 2003 23:00:29 -0500
From:      Damian Gerow <damian@sentex.net>
To:        Frank Laszlo <laszlof@vonostingroup.com>
Cc:        freebsd-isp@freebsd.org
Subject:   Re: Moving to New Server.. Passwd Questions
Message-ID:  <20031201040029.GB51594@sentex.net>
In-Reply-To: <3FCABADF.5090001@vonostingroup.com>
References:  <000801c3b7bd$2eb54740$df0a0a0a@visionsix.net> <3FCABADF.5090001@vonostingroup.com>

next in thread | previous in thread | raw e-mail | index | archive | help
(Quoting cleaned up.)

Thus spake Frank Laszlo (laszlof@vonostingroup.com) [30/11/03 22:52]:
> Lewis Watson wrote:
> 
> >I am moving to a new server and trying to maintain user,uid, and gid info.
> >I have the entire /etc directory tar'd and am wondering when I get to the
> >new server what I need as far as to maintain the user info files. I am
> >thinking passwd, master.passwd, and group. After I move these files I run
> >pwd_mkdb - p /etc/master.passwd. Is there any need to copy spwd.db and
> >pwd.db? If I understand it correctly these will be created/updated when I
> >run pwd_mkdb.
> >
> >Also, is there a better way to  sync these files from one server to
> >another?
> 
> You could use dd to mirror the disks. Thats assuming you want to copy
> everything.

Having moved, and participated in moving, a number of servers, we've always
used dump/restore to move files over.  I tried rsync once, and it works just
fine *so long as you don't need to maintain the last access time* on the
files you're rsync'ing.

Depending on the partitions that need to be moved over (i.e. if /var/mail is
mounted on its own), it can be easier to pop the old drive into the new
system, and do a 'dump -0af - <old drive mount path> | restore -rf -' in the
directory you want to restore into.

In the case where you just want *some* of the files moved over, however,
chances are rsync might be your best option. Although a 'restore -if
<dumpfile>' would work just as well.

Note that CVS would work as well, I just haven't ever used it for this.

Getting back to the original question, yes.  If *all* you want to maintain
is userid<->username, groupid<->groupname mappings (and user passwords),
then that should be all you need.  But you'll also need home directories,
and limits you've put in place, and any other custom configuration you'll
want to copy over.

  - Damian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031201040029.GB51594>