sync file and database drupal
i have 3 ser开发者_StackOverflow中文版vers and install centos 5.5 ,drupal now i want all server sync file and database
thank you
If you want to have this fully automatic:
- Declare on server as master/source server. Any changes on the client machines are overwritten.
- Use crontab to start the synchronization repeatedly on the client machines and to start drupal cron on the master machine.
- Install ssh and install key files without pass phrase to get secure, reliable and unatended communication between the servers.
- Use the backup and migrate module to get a MySql backup triggered by cron.
- Do the file synchronization with rsync and keep an eye on file permissions to make sure files are accessible by the apache user on the destination servers.
- Import the result of the backup and migrate backup into the client servers db.
A completely different approach would be to use the views module and create RSS Feeds of your nodes. The other servers could read and view them or update their data.
Again a different case: If you want to setup your 3 servers for load balancing / fail over purposes choose a distributed file system and a mirror setup for your db. This way the systems look like one big logical machine with the advantage that single physical machines can crash without crashing the whole system.
精彩评论