From 8dde456890eb37f4efdc7e47fb80a6c191ef4d02 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 15 Oct 2016 12:22:34 +0200 Subject: [PATCH] =?utf8?q?Rename=20=E2=80=9Cdaglig=E2=80=9D=20backup=20to?= =?utf8?q?=20=E2=80=9Cdaily=E2=80=9D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- backup.sh | 10 +++++----- list-incr.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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" \ diff --git a/list-incr.sh b/list-incr.sh index 8bf99bf..71ce781 100755 --- a/list-incr.sh +++ b/list-incr.sh @@ -10,4 +10,4 @@ fi # Get timestamp on form 2012-10-15 00:16 LASTFULL_TIMESTAMP=$(echo `basename $LASTFULL .tgz` | sed -re 's/^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2}).*/\1-\2-\3 \4:\5/') find $DIR/full/$LASTFULL -find $DIR/daglig -newermt "$LASTFULL_TIMESTAMP" -name '*.tgz' +find $DIR/daily -newermt "$LASTFULL_TIMESTAMP" -name '*.tgz' -- 2.39.2