X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=bin%2Fbackup-script;h=494efca1dfa37a818d913e06797ea48ca56cc136;hb=aba5624aa96d65abdd38ddefd137ca9ef4270243;hp=71a17cf8c12aae63017a6e1b4c74285bc3abf74c;hpb=d368bca81a38049088fc1b26a12b3010ff32a536;p=backup-script.git diff --git a/bin/backup-script b/bin/backup-script index 71a17cf..494efca 100755 --- a/bin/backup-script +++ b/bin/backup-script @@ -596,11 +596,22 @@ for f in $sys; do ok=0 if [ "$DRYRUN" -eq 0 ]; then - rm -f "$sys_target/.stamp" + stamp_file="$sys_target/.stamp" + rm -f "$stamp_file" + + # Execute backup command: + start_t=$(date "+%s") $SHELL -c "$cmd"; ret=$? - echo "code=$ret" >"$sys_target/.stamp" + end_t=$(date "+%s") + + echo "code=$ret" >"$stamp_file" + echo "start_t=$start_t" >>"$stamp_file" + echo "end_t=$end_t" >>"$stamp_file" + echo "cmd='$cmd'" >>"$stamp_file" + echo "backup_host='`hostname -f`'" >>"$stamp_file" + echo "backup_user='`id -un`'" >>"$stamp_file" else - echo " *** Trial run, not executing synchronization command!" + echo " *** Trial run, not executing save command!" ret=0 fi