[CentOS] Moving files to new server
Benjamin Smith
lists at benjamindsmith.com
Mon Mar 6 19:47:20 UTC 2006
I keep a file called "Migration Script" for each server. It's a list of
everything I had to install to operate everything on the server. Any time I
have to install or change the config on the server, I update this file as
well. Every 2 years or so, when I'm getting ready to set up a new server, I
review this file as I build a new system.
After everything has been installed, I prepare a final "switchover plan" that
contains detailed (line by line, file by file) instructions in review for
switching over things like /etc/passwd & /etc/shadow, ntp.conf,
sshd_conf, /etc/sysctl.conf, and so on.
This keeps downtime in switchover minimal, even when I'm doing a "worst case"
emergency switchover. (EG: hosting provider goes belly-up without any warning
at all, which happened once)
One of the steps in this whole process is that I carefully keep a list of all
client data in var by directory (eg: /var/spool/mail, /var/spool/cron) and
otherwise keep all other client data in /home, so that I know exactly what
files to keep from OS to OS. (For example, copying over /var/lib/rpm could
seriously bork things, while keeping /var/www can be crucial)
I use rsync to copy over this data, either from the server-to-be-replaced or
from backups as appropriate to the new server.
-Ben
On Sunday 05 March 2006 06:34, Thomas E Dukes wrote:
> I am getting a new computer and am going to need to move the files from the
> old to the new. What is the best way to do this?
>
> Should I install CentOS from scratch on the new computer then move the
> directories I need? How do I maintain permissions if this is the best way?
--
"The best way to predict the future is to invent it."
- XEROX PARC slogan, circa 1978
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the CentOS
mailing list