How-To: Configure and Schedule Automated Backups in Linux

2

Comments

+ Add a Comment
avatar

azathir

Very nice simple guide, thank you. However, instead of occasionally manually running the bash script you can just have it email you if it fails.

 rsync -a [source] [destination] || mail .....

 I can't remember the syntax for the mail command right now but the double-pipes will ensure that the second command only runs if the first one fails (the 'or' logic).

 Also, running linux on Optimus Prime? Very nice. :)

avatar

thefuzz4

mail somebody@maximumpc.com < file.txt This will cat the contents of the file and e-mail it to the address provided.

I think that what you would use for your statement would just be

  rsync -a [source] [destination] || mail youraddress@yourdomain.com

Log in to MaximumPC directly or log in using Facebook

Forgot your username or password?
Click here for help.

Login with Facebook
Log in using Facebook to share comments and articles easily with your Facebook feed.