X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=backup.sh;h=b17ad65dffec7564860599e1f3c4e93614f85211;hb=dc3d68c24af006fb35d32043df6d8a710ea8a145;hp=0303824982b3e736861ae4de018b35fe30e7322e;hpb=70b331aca8f37be475b03258be60f16c0df6441f;p=backup.sh diff --git a/backup.sh b/backup.sh index 0303824..b17ad65 100755 --- a/backup.sh +++ b/backup.sh @@ -77,8 +77,7 @@ backup() SNARFILE="${storagedir}/${computer}/${sfilesystem}/.incremental.snar" incrementalsnar="/root/.backup/${sfilesystem}.snar" - if [ "$backuplevel" = "daglig" ] - then + if [ "$backuplevel" = "daglig" ]; then # If incremental backup, we need to copy the incremental status to $computer. # If it does not exist, whine a bit and then run date-based instead. if [ -s "$SNARFILE" ]; then @@ -217,11 +216,9 @@ for filesystem in $filesystems; do # Default backuplevel backuplevel=daglig - if [ ! -s $storagedir/$computer/$sfilesystem/.date ] - then + if [ ! -s $storagedir/$computer/$sfilesystem/.date ]; 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 @@ -279,6 +276,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