Change in osmo-ci[master]: obs-mirror.sh: Keep log files of rsync job

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Dec 29 16:07:14 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/26694 )


Change subject: obs-mirror.sh: Keep log files of rsync job
......................................................................

obs-mirror.sh: Keep log files of rsync job

Before this commit, the obs-mirror.log was overwritten every night,
meaning we have no history of rsync log files.

Change-Id: I26392ed8615b9f4a6aa23e92b82ad9aff01eac4b
---
M contrib/obs-mirror/obs-mirror.sh
1 file changed, 4 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/94/26694/1

diff --git a/contrib/obs-mirror/obs-mirror.sh b/contrib/obs-mirror/obs-mirror.sh
index 529aea1..895afac 100755
--- a/contrib/obs-mirror/obs-mirror.sh
+++ b/contrib/obs-mirror/obs-mirror.sh
@@ -9,8 +9,10 @@
 #
 # See also: OS#4862
 
-echo "Redirecting all output to: /home/pkgmirror/obs-mirror.log"
-exec >"/home/pkgmirror/obs-mirror.log" 2>&1
+DATE=`date +%Y%m%d-%H%M%S`
+LOGFILE="/home/pkgmirror/obs-mirror-$DATE.log"
+echo "Redirecting all output to: $LOGFILE"
+exec >$LOGFILE 2>&1
 
 set -e -x
 SCRIPT_DIR="$(realpath "$(dirname "$(realpath "$0")")")"
@@ -24,7 +26,6 @@
 
 RSYNC_ARGS="-av --delete"
 RSYNC_ARGS="$RSYNC_ARGS --files-from $SCRIPT_DIR/obs-mirror-include.txt --recursive"
-DATE=`date +%Y%m%d-%H%M%S`
 DIR="$BASE_DIR/$DATE"
 TEMP_DIR="$BASE_DIR/.temp"
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/26694
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I26392ed8615b9f4a6aa23e92b82ad9aff01eac4b
Gerrit-Change-Number: 26694
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211229/623d9cdd/attachment.htm>


More information about the gerrit-log mailing list