Rsync script for backup


  1. #!/bin/bash
  2. rsync -aze ssh username@server:/path/on/remote/box /local/path 2> /home/err.log
  3. if [ -s /home/err.log ] ; then
  4. # file is not empty, some error has occured, do your email here
  5. echo “error occured!” ;
  6. else
  7. echo “no error occured, everything went fine!” ;
  8. fi

You can also use smarbs for backups written in ruby. Please go through the link below.

http://sourceforge.net/projects/smarbs/

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: