Skip to content
Snippets Groups Projects
Verified Commit 5a6bb53e authored by nd's avatar nd
Browse files

move backup to folder and include oplog; add logging

parent eb0cc393
Branches
Tags release/user_oidc/6.1.0
No related merge requests found
......@@ -9,7 +9,7 @@
- name: add backup cronjob for easier backup/restore
cron:
name: mongodb backup
job: '/usr/bin/mongodump --gzip --archive=/opt/mongodbbackup/$(date "+\%Y\%m\%d-\%H\%M.dump.gz") 2>/dev/null'
job: '/usr/bin/mongodump --oplog --out=/opt/mongodbbackup/$(date "+\%Y\%m\%d-\%H\%M") 2>&1 | /usr/bin/logger -t "mongodump"'
user: root
hour: "3"
minute: "45"
......@@ -17,6 +17,6 @@
- name: add backup cleanup cronjob
cron:
name: mongodb backup cleanup
job: 'find /opt/mongodbbackup/ -mtime +{{ mongodb.backup.keep_days - 1 }} -type f -exec rm {} \;'
job: 'find /opt/mongodbbackup/ -mtime +{{ mongodb.backup.keep_days - 1 }} -type d -mindepth 1 -exec rm -r {} \;'
minute: "0"
hour: "5"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment