Wednesday 14 October 2009 1:18:42 am
Hi, my problem is the following: we have 2 servers: production server with Ubuntu 8.10 and development server - virtual machine with similar configuration. I've created a simple script which synchronizes the DB (you can find it at the end of my post). My current problem is to synchronize the uploaded files storage. I've found some mentions of cluster mode in ez publish which puts all the files (storage and cache), but I can't switch my production into this mode. Another possibility is to set up rsync, but it requires some efforts and this approach is not flexible enough. Had anyone had the same problem? Any suggestions? !/bin/sh
date=`date +%Y%m%d%H%M%S` filename=../sql/$date."bz2"
ssh sysuser@10.10.41.74 \
"mysqldump -udbuser -pdbpass -hproduction_db_server db_name | bzip2 -cz" \ > $filename
cd ../sql
bunzip2 $filename mv $date db.sql mysql -udev_db_user -pdev_db_pass dev_db < db.sql
|