[CentOS] Moving files to new server

Les Mikesell lesmikesell at gmail.com
Sun Mar 12 01:58:09 UTC 2006


On Sat, 2006-03-11 at 19:08, Thomas E Dukes wrote:


> The rsync works fine.  I used it to copy /home /var and /etc to the new
> server.  But something went wrong.  I think I copied something in /etc I
> shouldn't have.  The system won't mount the drive.  I am currently
> re-installing CentOS.
> 
> Any idea of what I SHOULDN'T copy?

Unless the source and target machines are identical, software
and hardware-wise, I'd only copy /home.  If you want to change
the password file to a different style of encryption you'll
have to add all the users again and specify identical uid
and gid numbers.  If you can keep the old encryption, you
can copy the contents of the old /etc/passwd and /etc/shadow
files for users with uids over 500 and paste into the
corresponding new files.  Likewise for the contents of
/etc/group and /etc/gshadow for the user-related groups.
 Use the other files in /etc only as a guide to setting up
identical configurations - the contents have changed across
versions.  Just before switching the new machine into
production, shut down the mail service on the old one
and copy over /var/spool/mail.  Also look under /var/spool/cron
for any jobs that should be set up (I don't think I'd copy
these blindly).  You might have undelivered outgoing mail
in /var/spool/mqueue.  If you rename the old machine you
might just let it continue the delivery retries - or you
can copy the contents to the new server but don't do both.

-- 
  Les Mikesell
   lesmikesell at gmail.com





More information about the CentOS mailing list