One thing you can do is synchronize the old with the new server.
First thing to do may be to add users of /etc/passwd
and groups of /etc/group
into the corresponding files of the new server.
You may try to use the same uid
and gid
For data, you have rsync
that may be used with the following options:
--archive
--verbose
--recursive
--hard-links
--compress (optionally - compress data for faster transfer of data)
-e 'ssh -p 2234' (use ssh for secure connection between servers)
The first time, you can rsync
every directory that contains relevant data. Permissions will remain the same, as you used the --archive
option.
After this, you can try to simulate access to the new server and check if accesses are working fine: for mysql
, http
, other...
You don't say if the centos version is the same or not. If not, you should verify whether mysql
version is a major upgrade (for example, 5.1 in old server and 5.5 in new one) or not. If it's a major upgrade, you should read the mysql
documentation and probably run mysql_upgrade
.
As you'll be using centos
in both server, I presume, the user mysql
runs under should be the same.
Mysql should run fine if you copy or rsync
the data between the two servers.
At a certain point you will need to synchronize again data and cut off the old server and bring the new one for live status.
When this moment comes, you should stop mysql
and rsync data using two more options:
--update (transfers only new data)
--delete (deletes data in new server that doesn't exist anymore in old server)
For the most part, I think you can follow these guidelines.