X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=backup.sh;h=5e0cfb57f2da14b07593638a099a2a2a4c959db9;hb=265046e79d6e6e38e9c2e3eb660a054f6db296cd;hp=9f92f5c1fee9e18606a28ea60663e8e518227b68;hpb=1fe2cff5aef7de71e7c987f1b92890c57242cf1c;p=backup.sh diff --git a/backup.sh b/backup.sh index 9f92f5c..5e0cfb5 100755 --- a/backup.sh +++ b/backup.sh @@ -123,7 +123,9 @@ backup() # Move tar file in place mv $TARFILE $DATE.tgz - mv $SNARFILE.tmp $SNARFILE + if [ "$incrementalsnar" ]; then + mv $SNARFILE.tmp $SNARFILE + fi # Update timestamp echo $DATEs > ../.date && touch -t $DATE ../.date @@ -219,7 +221,6 @@ for filesystem in $filesystems; do then # Take the first full backup of this filesystem on this computer backuplevel=full - echo $DATEs > $storagedir/$computer/$sfilesystem/.date fi # Check if we want a full backup @@ -277,6 +278,9 @@ done if ! ssh root@$computer "[ ! -f /root/.backup/postexec ] || /bin/bash -x /root/.backup/postexec" >&2; then diemsg "Could not run $computer:/root/.backup/postexec" fi + +echo `date`": $computer: Backup completed successfully." +echo `date`": $computer: Backup completed successfully." >&2 # Remove lockfile rm $LOCKFILE