Moving to a new machine
Dear all,
We are planning to move our site to a new machine, with as little as down time as possible. The site is a small forum, so it can always changing every minutes. As a note both machine are remote machine. We only have ssh tunnel and http connection. So here is what we have for a plan:
My question is:
This is my first experience moving host on a live site. Any help appreciated. Thanks and regards, yoachan |
yes rsync will sync up the changes once the bulk has been copied over.
man rsync will show you all you need. |
@Mago: Thanks, Man! This bring me a relief :)
|
I wouldn't use rsync on the databases. I would do a backup and restore or set up mysql replication. rsync'ing databases can cause problems with the integrity of the database.
|
Agree with Blue Ice. I would like to suggest you use mysqldump.
|
The problem is dumped database will takes time to be copied over.
For this two machines were thousands mile away. One in US and one in Asia. Any other solution(s)? |
How big is the dump?.
How much does it weight compress?. How long is the maintenance window? Which engine are you using for MySQL? There are lots of ways to skin a cat, one just need some info. |
The biggest chunk is 550MB, and will take transfer time 30-60 minutes.
Other databases are smaller. To move everything will takes approximately two hours... I didn't do compression, but I'm using on the fly compression during rsync/scp. Just thinking that direct rsync will be easier, faster, and fail-proof :) :) We just want our down time as short as it can, just for user's comfort :) |
Well if you use InnoDB and you can enable binary logs, upload the dump of the day before and sync up the logs of the day, then import from the logs up to the date.
Another way to go is to compress on the fly the same day: Code:
mysqldump --opt --single-transaction -uuser -ppassword database | gzip -9 | ssh user@remoteserver "dd of=/path/for/dump/backup-`date +%Y%m%d`.sql.gz" So if 550MB is the largest this way you transfer about 60MB then uncompress on destination server and import it. Let me know how it goes. |
Tomorrow will be the D-Day
Today we prepare everything that needed. :) |
Huff... huff...
All data moved. rsync home directories and document_roots, dump and zip databases than transfers. Still waiting for DNS to propagate. :) Thanks for everyone's help :) |
All times are GMT -5. The time now is 09:17 PM. |