Skip to content

Commit

Permalink
fix(dbdump): add DB_BACKUPS_CLEAN_OLDER_DAYS to config
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Mar 22, 2017
1 parent 89d87ae commit 9311de4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 10 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ server_scripts_dbdump_remote_user: backup # required
#server_scripts_dbdump_remote_host: backup.remote.com # required
server_scripts_dbdump_remote_dir: "{{ server_scripts_dbdump_dir }}/{{ ansible_fqdn }}"
server_scripts_dbdump_excluded_dbs: "_test$"
server_scripts_dbdump_clean_older_days: 30
server_scripts_dbdump_clean_older_days_to_one: 3

server_scripts_check_dirs: |
"{{ server_scripts_dbdump_dir }}" \
Expand Down Expand Up @@ -41,7 +43,7 @@ server_scripts_drupal_get_drupals_site_info_file: ".info"
server_scripts_drupal_get_password_length: 12

server_scripts_influxdb_annotate_host: ""
server_scripts_influxdb_annotate_port: ""
server_scripts_influxdb_annotate_port: "8086"
server_scripts_influxdb_annotate_user: ""
server_scripts_influxdb_annotate_password: ""
server_scripts_influxdb_annotate_database: ""
Expand Down Expand Up @@ -82,7 +84,12 @@ server_scripts_cron_tasks:
minute: 5
job: "ionice -c mysql_backup backup"

- name: "server-scripts: mysql_backup backup and send and clean"
- name: "server-scripts: mysql_backup backup and send"
hour: 5
minute: 5
job: "ionice -c mysql_backup backup && mysql_backup send && mysql_backup clean"
job: "ionice -c mysql_backup backup && mysql_backup send"

- name: "server-scripts: mysql_backup clean"
hour: 5
minute: 10
job: "ionice -c mysql_backup clean"
2 changes: 2 additions & 0 deletions templates/server-scripts.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ DB_BACKUPS_REMOTE_HOST="{{ server_scripts_dbdump_remote_host }}"
DB_BACKUPS_REMOTE_DIR="{{ server_scripts_dbdump_remote_dir }}"

DB_BACKUPS_EXCLUDED_DBS="{{ server_scripts_dbdump_excluded_dbs }}"
DB_BACKUPS_CLEAN_OLDER_DAYS="{{ server_scripts_dbdump_clean_older_days }}"
DB_BACKUPS_CLEAN_OLDER_DAYS_TO_ONE="{{ server_scripts_dbdump_clean_older_days_to_one }}"

# backups-check
BACKUPS_CHECK_DIRS=( \
Expand Down

0 comments on commit 9311de4

Please sign in to comment.