X-Git-Url: https://git.sesse.net/?p=backup.sh;a=blobdiff_plain;f=backup.sh;fp=backup.sh;h=dfe8d45564859a4cc317814404d78e8cd44c00a3;hp=b808d5611e49636cec8adf41705ab2f7b6aaac01;hb=8dde456890eb37f4efdc7e47fb80a6c191ef4d02;hpb=f5e26aba1db0b44ffd29cb239532fa42c002cbce diff --git a/backup.sh b/backup.sh index b808d56..dfe8d45 100755 --- a/backup.sh +++ b/backup.sh @@ -90,7 +90,7 @@ backup() localsnar="${storagedir}/${computer}/${sfilesystem}/.incremental.snar" remotesnar="$remotehome/.backup/${sfilesystem}.snar" - if [ "$backuplevel" = "daglig" ]; then + if [ "$backuplevel" = "daily" ]; 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 "$localsnar" ]; then @@ -177,7 +177,7 @@ nonprivbackup() { infomsg "$computer:$filesystem $backuplevel non-privileged backup" - if [ "$backuplevel" = "daglig" ]; then + if [ "$backuplevel" = "daily" ]; then lastd=`cat ../.date` lastcmd="'$lastd'" else @@ -292,10 +292,10 @@ for filesystem in $filesystems; do # Prepare storage area mkdir -m 755 -p $storagedir/$computer/$sfilesystem/full 2>/dev/null - mkdir -m 755 -p $storagedir/$computer/$sfilesystem/daglig 2>/dev/null + mkdir -m 755 -p $storagedir/$computer/$sfilesystem/daily 2>/dev/null # Default backuplevel - backuplevel=daglig + backuplevel=daily if [ ! -s $storagedir/$computer/$sfilesystem/.date ]; then # Take the first full backup of this filesystem on this computer @@ -339,7 +339,7 @@ for filesystem in $filesystems; do # Delete incremental backups older than the oldest full backup oldf=`ls -t1 $storagedir/$computer/$sfilesystem/full/*tgz* | tail -1` find \ - $storagedir/$computer/$sfilesystem/daglig \ + $storagedir/$computer/$sfilesystem/daily \ -type f \ \! -newer $oldf \ -printf "`date`: $computer: Deleting old incremental backup: %p\n" \