File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -784,19 +784,20 @@ gitlab_configure_backups_schedule() {
784
784
daily|weekly|monthly)
785
785
if ! crontab -u ${GITLAB_USER} -l > /tmp/cron.${GITLAB_USER} 2> /dev/null || ! grep -q ' bundle exec rake gitlab:backup:create' /tmp/cron.${GITLAB_USER} ; then
786
786
echo " Configuring gitlab::backups::schedule..."
787
- read hour min <<< ${GITLAB_BACKUP_TIME// [:]/ }
788
- day_of_month=*
789
- month=*
790
- day_of_week=*
787
+ gitlab_backup_log=" ${GITLAB_LOG_DIR} /gitlab/gitlab-backup.log"
788
+ read -r hour min <<< " ${GITLAB_BACKUP_TIME//[:]/ }"
789
+ day_of_month=" *"
790
+ month=" *"
791
+ day_of_week=" *"
791
792
case ${GITLAB_BACKUP_SCHEDULE} in
792
793
daily) ;;
793
794
weekly) day_of_week=0 ;;
794
795
monthly) day_of_month=01 ;;
795
796
esac
796
797
if [[ -n ${GITLAB_BACKUP_DIR_GROUP} ]]; then
797
- echo " $min $hour $day_of_month $month $day_of_week /bin/bash -l -c 'cd ${GITLAB_INSTALL_DIR} && bundle exec rake gitlab:backup:create SKIP=${GITLAB_BACKUP_SKIP} DIRECTORY=${GITLAB_BACKUP_DIR_GROUP} RAILS_ENV=${RAILS_ENV} '" >> /tmp/cron.${GITLAB_USER}
798
+ echo " $min $hour $day_of_month $month $day_of_week /bin/bash -l -c 'cd ${GITLAB_INSTALL_DIR} && bundle exec rake gitlab:backup:create SKIP=${GITLAB_BACKUP_SKIP} DIRECTORY=${GITLAB_BACKUP_DIR_GROUP} RAILS_ENV=${RAILS_ENV} ' >> ${gitlab_backup_log} 2>&1 " >> " /tmp/cron.${GITLAB_USER} "
798
799
else
799
- echo " $min $hour $day_of_month $month $day_of_week /bin/bash -l -c 'cd ${GITLAB_INSTALL_DIR} && bundle exec rake gitlab:backup:create SKIP=${GITLAB_BACKUP_SKIP} RAILS_ENV=${RAILS_ENV} '" >> /tmp/cron.${GITLAB_USER}
800
+ echo " $min $hour $day_of_month $month $day_of_week /bin/bash -l -c 'cd ${GITLAB_INSTALL_DIR} && bundle exec rake gitlab:backup:create SKIP=${GITLAB_BACKUP_SKIP} RAILS_ENV=${RAILS_ENV} ' >> ${gitlab_backup_log} 2>&1 " >> " /tmp/cron.${GITLAB_USER} "
800
801
fi
801
802
crontab -u ${GITLAB_USER} /tmp/cron.${GITLAB_USER}
802
803
fi
You can’t perform that action at this time.
0 commit comments