bundles/zfs: introduce zfs-snapshot-backups, enable backups for nodes which need zfs-snapshot-backups
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-05-15 20:32:23 +02:00
parent 93e36156a0
commit 479b730be4
Signed by: kunsi
GPG key ID: 12E3D2136B818350
11 changed files with 96 additions and 18 deletions

View file

@ -60,9 +60,7 @@ files = {
},
}
# FIXME currently we do not have a mechanism to use snapshot-backups of
# zfs datasets.
if node.has_bundle('backup-client'): # and not node.has_bundle('zfs'):
if node.has_bundle('backup-client') and not node.has_bundle('zfs'):
files['/etc/backup-pre-hooks.d/90-postgresql-dump-all'] = {
'source': 'backup-pre-hook',
'content_type': 'mako',
@ -72,6 +70,10 @@ if node.has_bundle('backup-client'): # and not node.has_bundle('zfs'):
'mode': '0700',
}
directories['/var/tmp/postgresdumps'] = {}
else:
files['/var/tmp/postgresdumps'] = {
'delete': True,
}
postgres_roles = {
'root': {

View file

@ -2,9 +2,6 @@ defaults = {
'backups': {
'paths': {
'/var/lib/postgresql',
# FIXME
'/var/tmp/postgresdumps',
},
},
'bash_functions': {
@ -66,9 +63,8 @@ if node.has_bundle('zfs'):
},
},
}
# FIXME
#else:
# defaults['backups']['paths'].add('/var/tmp/postgresdumps')
else:
defaults['backups']['paths'].add('/var/tmp/postgresdumps')
@metadata_reactor.provides(