views:

148

answers:

2

I have a website using cPanel on a dedicated account, I would like to be able to automatically sync the website to a second hosting company or perhaps to a local (in house ) server.

Basically this is a type of replication. The website is database driven (MySQL), so Ideally it would sync everything (content, database, emails etc.) , but most importantly is syncing the website files and its database.

I'm not so much looking for a fail-over solution as an automatic replication solution, so if the primary site (Server) goes off-line, I can manually bring up the replicated site quickly.

I'm familiar with tools like unison and rsync, but most of these only sync file(s) and do not do too well with open database connections.

A: 

Don't use one tool when two is better; Use rsync for files, but use replication for MySQL.

geocar
A: 

If, for some reason, you don't want to use replication, you might want to consider using DRBD. This is of course only applicable if you're running Linux. DRBD is now part of the main kernel (since version 2.6.33).

And yes - I am aware of at least one large enterprise deployment of DRBD which is used, among other things, store MySQL database files. In fact, MySQL website even has relevant page on this topic.

You might also want to Google for articles against DRBD/MySQL combination; I remember reading few posts of that.

mindas