I have two debian servers, the first is the operating one (main), the latter is for security purposes.
I want to have the 2nd server like a twin of the first, rsyncing it continually in order to switch to it in case of any fault of the first.
I'm thinking of syncing them every night, this way:
- sync packages as in https://stackoverflow.com/questions/187629/how-do-i-preserve-installed-applications-when-migrating-ubuntu-to-another-platfo
- rsync all the /var/www stuff (excluding cache dirs)
- rsync all /etc/ directory
In the rsync scripts I'm putting a control on the IP that activates the script only if I'm on the main server.
My question is what should I care in all this procedure:
- maybe some /etc/ files are to be excluded from sync? passwd and shadow? but I'd like to have some new user propagating from the main to the slave server
- maybe some other dir is to be synced?
Any help is appreciated!