• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Mirroring entire site

T

todd@

Guest
I need an expert to tell me if there is a simple way to mirror my entire site to a local server. It would consist of the site itself and the backend MySQL database as well.

Is there a tool or script I can use?

After doing the initial replication I would just need to do incremental backups of the database on a daily basis. Is there an efficient way to do that as well?

Thanks for an help or suggestions you can offer.

Todd
 
Big move then cronjob

Heya Mate,

I don't know what system you're running but anyways the easiest way is first to move everything (wget), move the databases using mysqldump and mysql (I'm assuming u have shell access).

Now the rest is dependant on how your system is built - the good way is all dynamic using databases - which in that case u can just have a primary key to each table, and run a daily cronjob on your mirror that checks your original server's primary keys and compares it to it's own - if there's s change just make a simple script on the other server that accepts a number and table name and returns all records from that table with a higher id (assuming that's the primary key).

You can make that script just printout the sql query to insert it to your local table line by line - the script on the mirror will run the php command file on that script, and just run foreach and mysql_query each of the lines.. hope you understand and see what I'm saying..

Hope it helps,
- Ben
 
Whew

How about a link to some good documentation on what you just said. :p

We are increasing our hosting to 4 servers and would like to set some of our sites up to run ns1 from one server ns2 from another to help keep downtime (if ever) to the barest minimum.

We also have some database driven apps we'd like to run this way.

Thought I'd stop by here first to see if there was a way.

Thanks
 
Dump the database (to restore locally), tar/gz the files and download them, boom, you're done.

EDIT: Oh yeah, don't forget to set up the local server to utilize the information. However, I'd highly discourage doing this for a public mirror. Perhaps a good idea for something to test & break...
 
Back
Top