encrypted_backups_to_the_cloud

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
encrypted_backups_to_the_cloud [14.08.2017 08:23] – [the script] Pascal Suterencrypted_backups_to_the_cloud [14.08.2017 08:24] – [the script] Pascal Suter
Line 78: Line 78:
 #!/bin/bash  #!/bin/bash 
  
-# (c) 2017 Pascal Suter, Version 0.Beta+# (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://www.0x1b.ch/misc/hacks/rubi) # ideally suited to work with rubi (http://www.0x1b.ch/misc/hacks/rubi)
Line 105: Line 105:
     echo "here are the last lines of the rsync process:"     echo "here are the last lines of the rsync process:"
     tail -n 3 /tmp/offsiteBackup.log ) | mail -s "offsiteBackup successfully updated" "$RECIPIENTS"     tail -n 3 /tmp/offsiteBackup.log ) | mail -s "offsiteBackup successfully updated" "$RECIPIENTS"
 +    umount $PLAINMOUNT 2>/dev/null
 +    exit 0
 } }
  
Line 140: Line 142:
  
 # rsync to offsite location # rsync to offsite location
-rsync -AaHvXx $RSYNCOPTS "$CRYPTED/" "$TARGET"+rsync -AaHvXx --delete $RSYNCOPTS "$CRYPTED/" "$TARGET" 2>&1
 res=$? res=$?
 if [ $res -gt 0 ]; then if [ $res -gt 0 ]; then
  • encrypted_backups_to_the_cloud.txt
  • Last modified: 15.08.2017 08:44
  • by Pascal Suter