Portal Home > Knowledgebase > Articles Database > rsync / backup


rsync / backup




Posted by omniman, 11-10-2007, 08:21 PM
Hello, First, I apologize for the newbie question, but I'm more of a programmer than a network guy... I am setting up a mirror server to kick on in the event my main server fails and I need some help with syncing the two. It is my understanding I can use rsync to mirror the two. But, will that cover everything (ie. database, mail, etc) or only files? Any help or direction that could be provided would be greatly appreciated. Thank you.

Posted by pmabraham, 11-10-2007, 08:35 PM
Greetings: Check out http://www.r1soft.com/ as their system is a bare metal backup which means easy, complete, restores including the operating system. rsync backs up data, and typically with databases it can be tricky. If you are running two servers with the other as a hot spare, then database replication may help, not sure. Thank you.

Posted by optikalus, 11-10-2007, 08:37 PM
You can, in theory, use rsync to backup your databases (as long as the disaster recovery server isn't currently running the database [but it can be installed]). The only downside to this is the delay of noticing that the primary server is down and starting up the database on the DR server. I would recommend setting up the DR server to be a slave database using replication or logshipping to the master database. Then, set up the DR server to be a secondary MX and configure your email server software as such. This will make it so that everyone already knows of your secondary MX and will send email to it if they can't connect to the primary MX. You can easily have both configs on the server and quickly swap the secondary and primary config if the primary is going to be out for a while. If you receive a /lot/ of email, rsync is going to take a long time to sync the mbox or maildirs between the servers. If you consider mail to be absolutely essential, go for it. For the rest, a simple rsync would be fine.

Posted by omniman, 11-10-2007, 08:56 PM
Thank you both for such quick responses. I didn't mention before, these are both virtual servers - does that affect anything? dynamicnet: yes, the second is a hot spare. I have been reading about MySql replication... is that two-way? Ie. when the main DB comes back online, will that get updated with any changes made on the slave during downtime? optikalus: the DR server will be running the database, so you're saying rsync wouldn't work? I have about 180 hosting clients running on this server, and a good portion of them utilize a database. In the event the main server goes down, I would need to redirect all of the databases manually - correct? I don't suppose there is a server-wide solution for that.

Posted by pmabraham, 11-11-2007, 02:38 PM
Greetings: I believe you can set it up so the slave updates the master when back on line. Also see http://www.drbd.org/ in terms of HA clusters. Thank you.

Posted by SmilieBG, 11-11-2007, 03:21 PM
Hi, Well, it could be pain in the *** to set it up at this point (once sites are up & running). You did not provide us with info about 'acceptable' down time There are many ways around this. About rsync - it syncs files. MySQL dump is then just a simple file. So you could do it this way. Depending on size of databases, you could do this 4 to 6 times a day. Rsync will not push _all_ files over again, only changes in them, so only first rsync will be large, every following will be very small. As far as master / slave DB, you wouldn't have to manually adjust code if sites are using (domain)name based host to connect. Then, in case one goes down, DNS should be setup to switch automaticly to another one... A lot of pain in the *** if you ask me Good luck! Regards, Aleks



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read