When i set quietRake=1 option in the configuration file, it is simply ignored and rake still prints lots of debug messages. After a quick research it turned out that the rake command is generated before the configuration file is actually loaded. The fix seems to be very simple, look at my patch which solves the issue for me:
diff --git a/auto-gitlab-backup.sh b/auto-gitlab-backup.sh
index 0faddad..d50f67a 100755
--- a/auto-gitlab-backup.sh
+++ b/auto-gitlab-backup.sh
@@ -41,12 +41,6 @@ gitlab_rails="/opt/gitlab/embedded/service/gitlab-rails"
PDIR=$(dirname $(readlink -f $0))
dateStamp=`date +"%F %H:%m:%S"`
confFile="$PDIR/auto-gitlab-backup.conf"
-if [[ $quietRake == 1 ]]
-then
- rakeBackup="gitlab-rake gitlab:backup:create CRON=1"
-else
- rakeBackup="gitlab-rake gitlab:backup:create"
-fi
###
## Functions
@@ -95,6 +89,14 @@ archiveConfig() {
rakeBackup() {
echo ===== raking a backup =====
cd $gitRakeBackups
+
+ if [[ $quietRake == 1 ]]
+ then
+ rakeBackup="gitlab-rake gitlab:backup:create CRON=1"
+ else
+ rakeBackup="gitlab-rake gitlab:backup:create"
+ fi
+
$rakeBackup
}
Anyway, thank you for a useful script. It saves me a lot of time!
When i set
quietRake=1option in the configuration file, it is simply ignored and rake still prints lots of debug messages. After a quick research it turned out that therakecommand is generated before the configuration file is actually loaded. The fix seems to be very simple, look at my patch which solves the issue for me:Anyway, thank you for a useful script. It saves me a lot of time!