Skip to content

Commit

Permalink
fix: mongodb-backup issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoysrt committed Jun 4, 2024
1 parent 6642ab5 commit 32bf911
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/mongodb-backup/6.0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ echo "=> Creating a backup on startup"
echo "${CRON_TIME} . /root/project_env.sh; /backup.sh" > /crontab.conf
crontab /crontab.conf
echo "=> Running cron job"
cron
cron -f
3 changes: 1 addition & 2 deletions build/mongodb-backup/7.0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ S3BACKUP=${S3PATH}\${BACKUP_NAME}
aws configure set default.s3.signature_version s3v4
echo "=> Backup started"
echo "${HOST_STR}${PORT_STR}${USER_STR}${PASS_STR}${DB_STR} --archive=\${BACKUP_NAME} --gzip"
if mongodump ${HOST_STR}${PORT_STR}${USER_STR}${PASS_STR}${DB_STR} --archive=\${BACKUP_NAME} --gzip && aws s3 cp \${BACKUP_NAME} \${S3BACKUP} ${REGION_STR} ${ENDPOINT_STR} && rm \${BACKUP_NAME} ;then
echo " > Backup succeeded"
else
Expand All @@ -44,4 +43,4 @@ echo "=> Creating a backup on startup"
echo "${CRON_TIME} . /root/project_env.sh; /backup.sh" > /crontab.conf
crontab /crontab.conf
echo "=> Running cron job"
cron
cron -f

0 comments on commit 32bf911

Please sign in to comment.