Skip to content

Commit

Permalink
keep backup for BACKUP_KEEP_DAYS days
Browse files Browse the repository at this point in the history
  • Loading branch information
eltorio committed Dec 31, 2023
1 parent 90b6902 commit f7cbbb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion autobackup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ curl -X POST \


# delete old backups
find ${BACKUP_DIR} -type f -mtime +7 -name "${ODOO_DATABASE_NAME}.*.zip" -delete
find ${BACKUP_DIR} -type f -mtime +${BACKUP_KEEP_DAYS} -name "${ODOO_DATABASE_NAME}.*.zip" -delete

(
cat << EOF
Expand Down
2 changes: 2 additions & 0 deletions helm/odoo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ odoo:
value: "admin@example.org"
- name: FQDN
value: odoo.example.org
- name: BACKUP_KEEP_DAYS
value: 60
customPostInitScripts:
start-autobackup-cron: |
#!/bin/bash
Expand Down

0 comments on commit f7cbbb2

Please sign in to comment.