Skip to content
Snippets Groups Projects
Commit 899a90fb authored by root's avatar root
Browse files

backup: Disable debug printouts

parent a88eec46
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,6 @@ TYPE=$1 ...@@ -18,7 +18,6 @@ TYPE=$1
if ! ls *.snar >&/dev/null; then if ! ls *.snar >&/dev/null; then
TYPE=full TYPE=full
else else
set -x
LAST_FULL=$(date --date=$(ls *.snar | sort | grep full | tail -n1 | sed 's/[.].*$//') +%s) LAST_FULL=$(date --date=$(ls *.snar | sort | grep full | tail -n1 | sed 's/[.].*$//') +%s)
LAST_BIG=$(date --date=$(ls *.snar | sort | grep '\(full\|weekly\)' | tail -n1 | sed 's/[.].*$//') +%s) LAST_BIG=$(date --date=$(ls *.snar | sort | grep '\(full\|weekly\)' | tail -n1 | sed 's/[.].*$//') +%s)
NOW=$(date +%s) NOW=$(date +%s)
...@@ -30,7 +29,6 @@ TYPE=$1 ...@@ -30,7 +29,6 @@ TYPE=$1
else else
TYPE=daily TYPE=daily
fi fi
set +x
fi fi
echo "Performing $TYPE backup (autodetected)" >&2 echo "Performing $TYPE backup (autodetected)" >&2
} }
...@@ -39,7 +37,6 @@ TYPE=$1 ...@@ -39,7 +37,6 @@ TYPE=$1
TARGET=backup-$HOSTNAME@antea TARGET=backup-$HOSTNAME@antea
LOCAL_HOME_ID=$(stat -c %d /home) LOCAL_HOME_ID=$(stat -c %d /home)
set -x
SOURCES_FILE=$SCRIPT_DIR/sources_$HOSTNAME SOURCES_FILE=$SCRIPT_DIR/sources_$HOSTNAME
. $SOURCES_FILE . $SOURCES_FILE
[[ $SOURCES ]] || fail "SOURCES expected to be set in $SOURCES_FILE" [[ $SOURCES ]] || fail "SOURCES expected to be set in $SOURCES_FILE"
...@@ -58,8 +55,6 @@ fi ...@@ -58,8 +55,6 @@ fi
mkdir lock || fail "ERROR: backup already in progress (lock dir exists)" mkdir lock || fail "ERROR: backup already in progress (lock dir exists)"
trap "rmdir lock" EXIT trap "rmdir lock" EXIT
set -x
[[ -f $INCFILE_TMP ]] && fail "ERROR: backup already in progress (incremental backup file exists)" [[ -f $INCFILE_TMP ]] && fail "ERROR: backup already in progress (incremental backup file exists)"
if [[ "$TYPE" != "full" ]]; then if [[ "$TYPE" != "full" ]]; then
LAST=$(ls *.snar | sort | grep $INC_FILTER | tail -n1) LAST=$(ls *.snar | sort | grep $INC_FILTER | tail -n1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment