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 @@ -769,19 +769,20 @@ gitlab_configure_backups_schedule() {
769
769
daily|weekly|monthly)
770
770
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
771
771
echo " Configuring gitlab::backups::schedule..."
772
- read hour min <<< ${GITLAB_BACKUP_TIME// [:]/ }
773
- day_of_month=*
774
- month=*
775
- day_of_week=*
772
+ gitlab_backup_log=" ${GITLAB_LOG_DIR} /gitlab/gitlab-backup.log"
773
+ read -r hour min <<< " ${GITLAB_BACKUP_TIME//[:]/ }"
774
+ day_of_month=" *"
775
+ month=" *"
776
+ day_of_week=" *"
776
777
case ${GITLAB_BACKUP_SCHEDULE} in
777
778
daily) ;;
778
779
weekly) day_of_week=0 ;;
779
780
monthly) day_of_month=01 ;;
780
781
esac
781
782
if [[ -n ${GITLAB_BACKUP_DIR_GROUP} ]]; then
782
- 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}
783
+ 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} "
783
784
else
784
- 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}
785
+ 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} "
785
786
fi
786
787
crontab -u ${GITLAB_USER} /tmp/cron.${GITLAB_USER}
787
788
fi
You can’t perform that action at this time.
0 commit comments