Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| encrypted_backups_to_the_cloud [13.08.2017 16:57] – [the script] Pascal Suter | encrypted_backups_to_the_cloud [15.08.2017 08:44] (current) – [the script] Pascal Suter | ||
|---|---|---|---|
| Line 78: | Line 78: | ||
| # | # | ||
| - | # (c) 2017 Pascal Suter, Version | + | # (c) 2017 Pascal Suter, Version 0.10 Beta |
| # this script creates an enecrypted offsite backup of a locally kept backup. | # this script creates an enecrypted offsite backup of a locally kept backup. | ||
| # ideally suited to work with rubi (http:// | # ideally suited to work with rubi (http:// | ||
| Line 99: | Line 99: | ||
| echo " | echo " | ||
| exit 1 | exit 1 | ||
| + | } | ||
| + | |||
| + | function success { | ||
| + | ( echo "the offsite backup was successfully updated to backup version $LATEST" | ||
| + | echo "here are the last lines of the rsync process:" | ||
| + | tail -n 3 / | ||
| + | umount $PLAINMOUNT 2>/ | ||
| + | exit 0 | ||
| } | } | ||
| Line 134: | Line 142: | ||
| # rsync to offsite location | # rsync to offsite location | ||
| - | rsync -AaHvXx $RSYNCOPTS " | + | rsync -AaHvXx |
| - | if [ $? -gt 0 ]; then | + | res=$? |
| - | fail "there was a problem with the offsite backup, check / | + | if [ $res -gt 0 ]; then |
| + | | ||
| + | #some files vanished during the backup, that's not a failure of the backup, so send the success message | ||
| + | success | ||
| + | else | ||
| + | | ||
| + | fi | ||
| else | else | ||
| - | | + | |
| - | echo "here are the last lines of the rsync process:" | + | |
| - | tail -n 3 / | + | |
| fi | fi | ||
| </ | </ | ||
| + | === Known Issues === | ||
| + | For some reason gocryptfs seems to generate some files (two in my case) like '' | ||
| + | |||
| ===== Restoring Files ===== | ===== Restoring Files ===== | ||
| to restore files you could use '' | to restore files you could use '' | ||