Change how we backup database dumps.

We had been using rdiff-backup, which was easy to do, but it makes
very little sense with database backups to bother doing that.
Instead we just rsync them over and don't bother with looking at
chunks that may or may not be duplicated. This should make the daily
backup runs much faster.
This commit is contained in:
Kevin Fenzi
2017-10-05 22:16:08 +00:00
parent 421d371b18
commit 256b145135
21 changed files with 29 additions and 21 deletions

View File

@@ -62,7 +62,8 @@ fas_client_groups: sysadmin-noc,sysadmin-web,sysadmin-veteran
freezes: true
postfix_group: vpn.pagure
host_backup_targets: ['/backups', '/srv/git', '/var/www/releases']
host_backup_targets: ['/srv/git', '/var/www/releases']
db_backup_dir: ['/backups']
dbs_to_backup: ['pagure']
# Configuration for the git-daemon/server

View File

@@ -13,7 +13,8 @@ public_ip: 209.132.184.238
root_auth_users: gdk rbergero pfrields
description: Ansible Magazine
host_backup_targets: ['/backups', '/var/www/html']
host_backup_targets: ['/var/www/html']
db_backup_dir: ['/backups']
dbs_to_backup: ['wp']
mariadb_root_password: "{{ ansiblemagazine_db_password }}"
extra_enablerepos: ''

View File

@@ -13,7 +13,8 @@ public_ip: 209.132.184.207
root_auth_users: nb chrisroberts
description: fedora community blog
host_backup_targets: ['/backups', '/var/www/html']
host_backup_targets: ['/var/www/html']
db_backup_dir: ['/backups']
dbs_to_backup: ['wp']
mariadb_root_password: "{{ communityblog_mariadb_password }}"
extra_enablerepos: ''

View File

@@ -27,8 +27,7 @@ copr_hostbase: copr-fe
dbs_to_backup:
- coprdb
# Backup db dumps in /backups
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
nagios_Check_Services:
nrpe: true

View File

@@ -39,6 +39,6 @@ custom_rules: [ '-A INPUT -p tcp -m tcp -s 10.5.124.138 --dport 5432 -j ACCEPT'
nrpe_procs_warn: 600
nrpe_procs_crit: 700
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "2GB"
effective_cache_size: "6GB"

View File

@@ -27,6 +27,6 @@ fas_client_groups: sysadmin-dba,sysadmin-noc,sysadmin-veteran
# kernel SHMMAX value
kernel_shmmax: 68719476736
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "4GB"
effective_cache_size: "12GB"

View File

@@ -50,6 +50,6 @@ custom_rules: [
nrpe_procs_warn: 600
nrpe_procs_crit: 800
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "2GB"
effective_cache_size: "6GB"

View File

@@ -39,6 +39,6 @@ custom_rules:
nrpe_procs_warn: 400
nrpe_procs_crit: 500
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "1GB"
effective_cache_size: "3GB"

View File

@@ -44,6 +44,6 @@ custom_rules: [
nrpe_procs_warn: 600
nrpe_procs_crit: 700
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "8GB"
effective_cache_size: "24GB"

View File

@@ -43,6 +43,6 @@ custom_rules: [ '-A INPUT -p tcp -m tcp -s 10.5.129.240 --dport 5432 -j ACCEPT'
nrpe_procs_warn: 600
nrpe_procs_crit: 700
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "2GB"
effective_cache_size: "6GB"

View File

@@ -70,6 +70,6 @@ databases:
# kernel SHMMAX value
kernel_shmmax: 68719476736
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "2GB"
effective_cache_size: "6GB"

View File

@@ -47,6 +47,6 @@ fas_client_groups: sysadmin-qa,sysadmin-noc,sysadmin-veteran
# kernel SHMMAX value
kernel_shmmax: 68719476736
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "2GB"
effective_cache_size: "6GB"

View File

@@ -30,6 +30,6 @@ fas_client_groups: sysadmin-qa,sysadmin-noc,sysadmin-veteran
# kernel SHMMAX value
kernel_shmmax: 68719476736
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "2GB"
effective_cache_size: "6GB"

View File

@@ -39,6 +39,6 @@ custom_rules: [ '-A INPUT -p tcp -m tcp -s 10.5.129.180 --dport 5432 -j ACCEPT'
nrpe_procs_warn: 600
nrpe_procs_crit: 700
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "6GB"
effective_cache_size: "18GB"

View File

@@ -77,6 +77,6 @@ custom_rules: [ '-A INPUT -p tcp -m tcp --dport 5432 -j ACCEPT' ]
nrpe_procs_warn: 800
nrpe_procs_crit: 900
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "4GB"
effective_cache_size: "12GB"

View File

@@ -34,6 +34,6 @@ fas_client_groups: sysadmin-dba,sysadmin-noc,sysadmin-veteran
# kernel SHMMAX value
kernel_shmmax: 68719476736
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "4GB"
extra_enablerepos: ''

View File

@@ -28,6 +28,6 @@ fas_client_groups: sysadmin-dba,sysadmin-noc,sysadmin-veteran
# kernel SHMMAX value
kernel_shmmax: 68719476736
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
shared_buffers: "4GB"
extra_enablerepos: ''

View File

@@ -13,7 +13,8 @@ public_ip: 209.132.184.52
root_auth_users: nb chrisroberts pfrields
description: Fedora Magazine
host_backup_targets: ['/backups', '/var/www/html']
host_backup_targets: ['/var/www/html']
db_backup_dir: ['/backups']
dbs_to_backup: ['wp']
mariadb_root_password: "{{ magazine_mariadb_password }}"
extra_enablerepos: ''

View File

@@ -13,7 +13,7 @@ public_ip: 209.132.184.50
root_auth_users: ralph maxamillion kellin
description: taiga frontend server
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
dbs_to_backup: ['taiga']
volumes:

View File

@@ -26,7 +26,7 @@ freezes: false
shared_buffers: "32MB"
effective_cache_size: "256MB"
host_backup_targets: ['/backups']
db_backup_dir: ['/backups']
dbs_to_backup:
- testdays
- resultsdb

View File

@@ -24,6 +24,11 @@
with_items: '{{ global_backup_targets }}'
when: global_backup_targets is defined
- name: copy new database dumps into the backup server database dir
local_action: "shell rsync -a {{ inventory_hostname }}:{{ item }}/ /fedora_backups/databases/{{ inventory_hostname }}/"
with_items: '{{ db_backup_dir }}'
when: db_backup_dir is defined
- name: run rdiff-backup hitting all the host targets
local_action: "shell rdiff-backup --remote-schema 'ssh -p {{ ansible_port|default(22) }} -C %s rdiff-backup --server' --exclude='**git-seed*' --exclude='**git_seed' --exclude='**.snapshot' --create-full-path --print-statistics {{ inventory_hostname }}::{{ item }} /fedora_backups/{{ inventory_hostname }}/`basename {{ item }}` | mail -r sysadmin-backup-members@fedoraproject.org -s 'rdiff-backup: {{ inventory_hostname }}:{{ item }}' sysadmin-backup-members@fedoraproject.org"
with_items: '{{ host_backup_targets }}'