Hi I have a set of neat scripts that backup my dbs into db.sql.gz files under a folder on on ec2 host. My files are of the form (as you can see they are weekly rolling backups)
/var/backs/db/db1_Mon.sql.gz /var/backs/db/db1_Tue.sql.gz /var/backs/db/db1_Wed.sql.gz ... ... /var/backs/db/db4_Fri.sql.gz /var/backs/db/db4_Sat.sql.gz /var/backs/db/db4_sun.sql.gz
Now I would like to somehow (well using s3sync) at say 3am every morning stream these to an s3 bucket called mys3bucket/myec2instance/var/backs/db/ and then all my .sql.gz files under that directory.
To do this I have the following script:
#!/bin/sh cd /var/backs ruby s3sync/s3sync.rb -r -s -v /var/backs/db mys3bucket:myec2instance/var/backs/db/ > /var/backs/logs/s3sync.log
and to invoke the whole contraption I use the following cron entry:
1 3 * * * /var/backs/s3.sh # this is where the script resides.
The problem with all this is that it works rather intermittently .... Actually if I kick it off manually it tends to work find ... pretty efficient
Any thoughts would be mighty appreciated.