Moving to New Server.. Passwd Questions

Damian Gerow damian at sentex.net
Sun Nov 30 20:00:48 PST 2003


(Quoting cleaned up.)

Thus spake Frank Laszlo (laszlof at 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


More information about the freebsd-isp mailing list