Re: Script updating secondary server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I have one server in USA and one server in Thailand. The server in USA is
the one containing the updated information. The Thai server will be a copy
of the USA server.

I want to write a PHP script that does this for me:
1. Once a day copies the files on the USA server to the Thai server and put
them in the web folder
2. Once a day copy the database in USA (dump) and then empty the Thai
database and insert the USA content (inserts)

Maybe PHP is not the right way? Do you know any code that already do this
(PHP)? I would like to do this in PHP, because I am in the learning process
of this great language.

To be honest you're better off using tools other than php.

rsync will copy files quite efficiently (http://rsync.samba.org) and will only copy *changed files* - so a copy each day won't take much time at all.

On the US server, make sure you place a database dump before the sync starts.

From the Thai server, initiate the sync.

When the copy is finished, import the database dump.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux