I'm trying to run Rsync to move static files from our Dedicated server to our new cloud server.
The following command works but when it runs it is stopping any web pages being served
rsync -azP --delete -e 'ssh -p 1234' /var/www/vhosts/example.com/httpdocs/images/20* user@server:/var/www/vhosts/example.com/httpdocs/images/.
So I've tried using
ionice to lower the CPI and I/O priority, and using a different cipher over SSH - I'd found posts suggesting this will lower the server load:
nice -n19 ionice -c2 -n7 rsync -azP --delete --rsh="ssh -c arcfour" -e 'ssh -p 1234' /var/www/vhosts/example.com/httpdocs/images/20* user@server:/var/www/vhosts/example.com/httpdocs/images/.
But this does not make a difference, as soon as the script runs pages on http://example.com stop serving, and once I use CTRL+C to kill the Rsync the command the pages start serving again.
I could put this in a crontab job to run when site traffic is low, but I'd like to be able to sync the servers through the day.
Is there a way of getting Rsync to stop blocking apache or is there another way I can transfer the data?
I've also tried making a
tar.gz archive and transferring via
scp, but the file is 2.5GB and I just get the same problem.
We will be moving all our static content onto Amazon S3 - but that's a much larger job and I'm hoping I can just get the static content moved across in the meantime to kill off the old machine