Created
October 12, 2012 03:53
-
-
Save jwatney/3877211 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| log="$(mktemp)" | |
| email="[email protected]" | |
| mount /media/Backup && | |
| rsync -vax --delete --ignore-errors --log-file=$log /media/Data/ /media/Backup/ && | |
| umount /media/Backup && | |
| (cat $log | mail -s "[rsync] Mirror Data drive $(date)" $email) && | |
| rm $log | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment