From 5e148150e655160f36529f12b5438e2e0c75f022 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Sun, 14 Oct 2018 07:09:01 -0600 Subject: [PATCH] Redirected output from borg to logfile --- backup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index 092b658..74bae0d 100755 --- a/backup.sh +++ b/backup.sh @@ -516,7 +516,8 @@ if [ -z "$borgExclude" ]; then >> "$logFile" borg --show-rc create ${borgCreateParams} :: `date +%Y-%m-%d_%H%M%S` \ "${xtraFiles[@]}" \ - "${sqlDumpDir}" "${ncDataDir}" + "${sqlDumpDir}" "${ncDataDir}" \ + 2>> "$logFile" else # borgExclude is not empty echo -e "${op}${stamp} Executing borg with exclusions${normal}" \ @@ -524,7 +525,8 @@ else borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \ :: `date +%Y-%m-%d_%H%M%S` \ "${xtraFiles[@]}" \ - "${sqlDumpDir}" "${ncDataDir}" + "${sqlDumpDir}" "${ncDataDir}" \ + 2>> "$logFile" fi ## Check status of borg operation