Harvest data using rsync

 Harvest Time

Slow going today – its raining in London and I’ve got lots to do with the US side of the business which I’m not too fussed about today so I’ve decided to harvest all live data from a server I’m trying to decommission. First stage in this is to get all the data off the server locally to my machine which I can then backup or offload to another server or maybe even push to S3 depending on the data.

The script is using rsync and connects via ssh, the important points of the script is using OPTS to exclude files that we don’t want copy down in this case it’s zips and temp files.  We are also using nohup just in case the SSH shell crashes so it still runs in the background.

The end of the script has a simple email function to email the logs when complete or when it errors

Leave a Comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>