I'm running a web/email server using ispconfig2 on ubuntu 8.10 (server A). I followed the perfect server guide here
. I have another server running ubuntu 8.04 (server B) that i set up using the same guide. I want server B to be an exact mirror of server A so that if server A crashes, I can just plug up B.
What I need to know is exactly what needs to be copied from A to B. Looking at this post
on migrating servers, I think the following will work:
On server B:
- Use rsync to sync /var/www on B with /var/www on A.
- Use rsync to copy Vhosts_ispconfig.conf, /etc/postfix/local-host-names, /etc/postfix/virtusertable, named.conf, and all the pri.* zone files from server A to B.
- Use perl to replace server A's local ip address and fqdn with server B's local ip and fqdn in all the files copied over from previous step.
- Use mysqldump and rysnc to sync db on server A with db on B.
Now here is where i get stuck. The users and groups in /etc/shadow, /etc/passwd, and /etc/group need to be updated on server B. Can I copy these files from server A to B, or is that going to cause problems on server B? The idea is to write a bash script that does everything and is called from a crontab, so I can't manually open these files and add the lines that don't exist on server B.
Thanks in advance for any help!