diff --git a/inventory/service/group_vars/translate.yaml b/inventory/service/group_vars/translate.yaml new file mode 100644 index 0000000000..0f98162313 --- /dev/null +++ b/inventory/service/group_vars/translate.yaml @@ -0,0 +1,3 @@ +borg_backup_excludes: + # backed up via streaming + - '/var/backups/mysql_backups*' diff --git a/modules/openstack_project/manifests/translate.pp b/modules/openstack_project/manifests/translate.pp index 030cb2c4fd..5a35ab76fb 100644 --- a/modules/openstack_project/manifests/translate.pp +++ b/modules/openstack_project/manifests/translate.pp @@ -130,6 +130,12 @@ class openstack_project::translate( require => Exec['register-zanata-projects'], } + # NOTE(ianw) 2021-02-05 : the --all-databases option to mysqldump + # this sets up appears to not be dumping all databases since a + # recent upgrade; see + # https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1914695 + # This effectively makes this dump useless. Below we are streaming + # the database directly into borg, which does still work. mysql_backup::backup_remote { 'translate': database_host => $mysql_host, database_user => $mysql_user, @@ -138,9 +144,21 @@ class openstack_project::translate( require => Class['zanata'], } - include bup - bup::site { 'ord.rax': - backup_user => 'bup-translate', - backup_server => 'backup01.ord.rax.ci.openstack.org', + # Streaming backup of zanata db; see borg-backup role + file { '/etc/borg-streams': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', } + + file { '/etc/borg-streams/mysql': + ensure => file, + owner => 'root', + group => 'root', + mode => '0755', + content => '/usr/bin/mysqldump --defaults-file=/root/.translate_db.cnf --ignore-table mysql.event --skip-extended-insert --single-transaction zanata', + require => File['/etc/borg-streams'], + } + }