diff --git a/groups/all.py b/groups/all.py index 51eb6b9..428676c 100644 --- a/groups/all.py +++ b/groups/all.py @@ -2,8 +2,13 @@ groups['all'] = { 'member_patterns': { r".*", }, + 'subgroups': { + # This is only needed because we're overriding stuff in the group. + 'home', + }, 'bundles': { 'apt', + 'backup-client', 'cron', 'hostname', 'postfix', @@ -19,6 +24,9 @@ groups['all'] = { 'mail': 'hostmaster@kunsmann.eu', }, }, + 'backup-client': { + 'server': 'franzi-home.kunbox.net', + }, }, 'pip_command': 'pip3', } diff --git a/groups/locations.py b/groups/locations.py index ad40492..0a64000 100644 --- a/groups/locations.py +++ b/groups/locations.py @@ -55,6 +55,9 @@ groups['home'] = { # than our own domains. 'relayhost': '[mx0.kunbox.net]:2525', }, + 'backup-client': { + 'server': '172.19.138.20', + }, }, } diff --git a/nodes/gce/dns02.py b/nodes/gce/dns02.py index 7e2120f..2fbb6ca 100644 --- a/nodes/gce/dns02.py +++ b/nodes/gce/dns02.py @@ -17,6 +17,9 @@ nodes['gce.dns02'] = { }, }, 'external_ipv4': '35.187.109.249', + 'backups': { + 'exclude_from_backups': True, + }, 'powerdns': { 'my_hostname': 'ns-2.kunbox.net', }, diff --git a/nodes/gce/dns03.py b/nodes/gce/dns03.py index 60d31c4..3259f17 100644 --- a/nodes/gce/dns03.py +++ b/nodes/gce/dns03.py @@ -17,6 +17,9 @@ nodes['gce.dns03'] = { }, }, 'external_ipv4': '35.228.143.71', + 'backups': { + 'exclude_from_backups': True, + }, 'powerdns': { 'my_hostname': 'ns-3.kunbox.net', }, diff --git a/nodes/htz-cloud/pirmasens.py b/nodes/htz-cloud/pirmasens.py index b48fbc7..f6e08d6 100644 --- a/nodes/htz-cloud/pirmasens.py +++ b/nodes/htz-cloud/pirmasens.py @@ -25,9 +25,6 @@ nodes['htz-cloud.pirmasens'] = { 'redis': {}, }, }, - 'cron': { - 'backup': '0 2 * * * root /root/backup.sh', - }, 'nginx': { 'vhosts': { 'mail.kunsmann.info': { diff --git a/nodes/htz/ex42-1048908.py b/nodes/htz/ex42-1048908.py index 05741cf..39cddbc 100644 --- a/nodes/htz/ex42-1048908.py +++ b/nodes/htz/ex42-1048908.py @@ -70,9 +70,16 @@ nodes['htz.ex42-1048908'] = { }, }, }, + 'backups': { + 'paths': { + '/home/kunsi/.weechat', + '/opt/matrix/matrix-dimension', + '/opt/matrix/matrix-media-repo', + '/var/matrix', + }, + }, 'cron': { # TODO move to a proper bundle - 'backup': '0 1 * * * root /root/backup.sh', 'restart_mautrix_whatsapp': '0 3 * * * root systemctl restart matrix-bridge-whatsapp.service', 'telekom_nervkram': vault.decrypt('encrypt$gAAAAABfqXi23M96wrSLhqlbhqgePYX06LjPXfyQU2y_07kqYYLztj_PhS1-dk4r5FiiL2Ofmx5iCKW1sZNqiQSuHj2uKaitH0GnwHqj5CI2JwkAS9HrFxw=').format_into('0 0 * * * root date | mail -s \'daily test mail \' -r postmaster@mx0.kunbox.net {}'), }, diff --git a/nodes/rx300.py b/nodes/rx300.py index 7232492..616c5cd 100644 --- a/nodes/rx300.py +++ b/nodes/rx300.py @@ -24,6 +24,9 @@ nodes['rx300'] = { 'dhcp': True, }, }, + 'backups': { + 'exclude_from_backups': True, + }, 'zfs': { 'module_options': { 'zfs_arc_max_mb': 16384, # 16GB