Browse Source

ask: stream db backup

Despite be deprecated, the ask server is our 3rd biggest backup.  Even
though the site is R/O we're still backing up the fresh rotations of
the gzipped backups every day.

To reduce the incremental space requirements, move to our plain-text
streaming for the db backup.  This just needs a file dropped in /etc;
see the backup-borg role README documentation.  We do this in puppet
to avoid complexity adding this deprecated service to ansible.  This
then excludes the on-disk db backup dir.

Drop the bup backups while we are here.

Change-Id: Icfd81aca58b9a0dc3a3b74de04c1b00f03160327
changes/81/774181/2
Ian Wienand 6 months ago
parent
commit
f9184ce323
  1. 3
      inventory/service/group_vars/ask.yaml
  2. 23
      modules/openstack_project/manifests/ask.pp

3
inventory/service/group_vars/ask.yaml

@ -1,2 +1,5 @@
extra_users:
- mkiss
borg_backup_excludes:
# backed up via streaming
- /var/backups/pgsql_backups

23
modules/openstack_project/manifests/ask.pp

@ -103,6 +103,23 @@ class openstack_project::ask (
password => postgresql_password($db_user, $db_password),
}
# Streaming backup of db; see borg-backup role
file { '/etc/borg-streams':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
}
file { '/etc/borg-streams/pgsql':
ensure => file,
owner => 'root',
group => 'root',
mode => '0755',
content => '/usr/bin/pg_dump -h localhost -U ask -p 5432 askbotdb',
require => File['/etc/borg-streams'],
}
# redis cache
class { 'redis':
redis_port => $redis_port,
@ -171,12 +188,6 @@ class openstack_project::ask (
num_backups => '10',
}
include bup
bup::site { 'ord.rax':
backup_user => 'bup-ask01',
backup_server => 'backup01.ord.rax.ci.openstack.org',
}
class { '::httpd::logrotate':
options => [
'daily',

Loading…
Cancel
Save