External volume snapshots

This commit is contained in:
Wojciech Kozlowski 2024-09-07 16:41:26 +02:00
parent 41cf7e25f0
commit 872be00880
4 changed files with 20 additions and 0 deletions

View File

@ -215,6 +215,7 @@ services_backups_snapshots_services: "\
{ service: {
'user_name': ( 'pod-' ~ service ),
'data_dataset': ( services_data_dataset ~ '/pod-' ~ service ),
'external_dataset': ( services_external_dataset ~ '/pod-' ~ service ),
'backup_dataset': ( services_backups_snapshots_data_dataset ~ '/pod-' ~ service ),
'recursive': true,
'skip_parent': true,

View File

@ -28,6 +28,18 @@
autosnap = yes
autoprune = yes
# Template for datasets with external data. Unlike production datasets these are not backed up
# anywhere. External datasets contain data that can be lost and that generally take up a lot of disk
# space. Since they don't have a backup, they keep snapshots around for longer than production/
[template_external]
frequently = 0
hourly = 36
daily = 30
monthly = 3
yearly = 0
autosnap = yes
autoprune = yes
# Template for backup datasets which also doubles as a hot spare. The assumption is that these
# backup production datasets. In addition to three months of snapshots, keep 36 hourly snapshots for
# quick rollback in case of trouble. No monthly snapshots are kept as that would require the

View File

@ -10,6 +10,11 @@
recursive = yes
process_children_only = yes
[{{ backups_snapshots_user_external_dataset }}]
use_template = external
recursive = yes
process_children_only = yes
[{{ backups_snapshots_user_backup_dataset }}]
use_template = backup
recursive = yes

View File

@ -154,6 +154,8 @@
{{ services_backups_snapshots_services[services_service_name].user_name }}"
backups_snapshots_user_data_dataset: "\
{{ services_backups_snapshots_services[services_service_name].data_dataset }}"
backups_snapshots_user_external_dataset: "\
{{ services_backups_snapshots_services[services_service_name].external_dataset }}"
backups_snapshots_user_backup_dataset: "\
{{ services_backups_snapshots_services[services_service_name].backup_dataset }}"
backups_snapshots_user_recursive: "\