I have a moderately big site with around 50000 posts. As I live in a country where the internet access is not so fast, I wanted to know if I could create a mirror site of my site, so that whenever my original site is updates, the changes are synced into the mirror site... Is there anything like that?
Or atleast, its ok if its able to copy my sql database to the other site without asking me to actually backup the site every now and then.... Are these possible?
Is there something like a mirror site?
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Yes, it's possible. Look into replication of the database. It's typically the most efficient means of duplicating the site. Otherwise you will need to send a spider over the site each time you want to update the copy, which will be more time consuming, generally.
Do not duplicate your threads please.
Do not duplicate your threads please.
I'm really sorry about the duplicate thread. I thought it was somehow related to scripting. It won't happen again.
Anyways, coming to replication of databases, I have a doubt. My host doesn't give me anything like the /etc/mysql/my.cnf discussed in this article:
There is an etc directory but there's nothing similar to what has been discussed. So, is it possible to carry out these things through the cPanel or rather more specifically the PHPMyAdmin? Or is there a third party script that can achieve this?
Anyways, coming to replication of databases, I have a doubt. My host doesn't give me anything like the /etc/mysql/my.cnf discussed in this article:
Code: Select all
http://www.howtoforge.com/mysql_database_replicationThere is no script to achieve this. To mirror the database you will need to follow the directions for replication on both servers. I strongly suggest you play with this at home on some test PCs and understand what you are doing. The my.cnf file could be in a subdirectory within /etc, or it could be named something else. Or it could be hidden from you. Talk to your hosting provider.
To mirror your site, like your php files and all of that, rsync is not a bad way to go. This will also catch if your site accepts uploaded files or anything. Rsync will duplicate all of the site files over to the other server.
FYI, replication is typically one way with mysql. The backup site will be readonly. There are ways to fudge around this, for instance by setting primary keys on one server to be even and then setting them to be odd on the other, then setting the servers to replicate to each other. You will however need to make sure your site is coded to handle this kind of thing.
To mirror your site, like your php files and all of that, rsync is not a bad way to go. This will also catch if your site accepts uploaded files or anything. Rsync will duplicate all of the site files over to the other server.
FYI, replication is typically one way with mysql. The backup site will be readonly. There are ways to fudge around this, for instance by setting primary keys on one server to be even and then setting them to be odd on the other, then setting the servers to replicate to each other. You will however need to make sure your site is coded to handle this kind of thing.