From 3b1ef1eb411f4aebd366935cd132faccc5469123 Mon Sep 17 00:00:00 2001 From: cronekorkn Date: Sun, 18 Sep 2022 23:00:32 +0200 Subject: [PATCH] backup server recordsize --- bundles/backup-server/metadata.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/bundles/backup-server/metadata.py b/bundles/backup-server/metadata.py index a683f09..235cb2a 100644 --- a/bundles/backup-server/metadata.py +++ b/bundles/backup-server/metadata.py @@ -16,7 +16,14 @@ defaults = { '/usr/bin/rsync', '/sbin/zfs', }, - } + }, + 'zfs': { + 'datasets': { + 'tank': { + 'recordsize': "1048576", + }, + }, + }, } @@ -25,7 +32,7 @@ defaults = { ) def zfs(metadata): datasets = {} - + for other_node in repo.nodes: if ( other_node.has_bundle('backup') and @@ -42,7 +49,7 @@ def zfs(metadata): 'com.sun:auto-snapshot': 'false', 'backup': False, } - + # for rsync backups datasets[f'{base_dataset}/fs'] = { 'mountpoint': f"/mnt/backups/{id}", @@ -51,10 +58,10 @@ def zfs(metadata): 'com.sun:auto-snapshot': 'true', 'backup': False, } - + # for zfs send/recv if other_node.has_bundle('zfs'): - + # base datasets for each tank for pool in other_node.metadata.get('zfs/pools'): datasets[f'{base_dataset}/{pool}'] = { @@ -64,7 +71,7 @@ def zfs(metadata): 'com.sun:auto-snapshot': 'false', 'backup': False, } - + # actual datasets for path in other_node.metadata.get('backup/paths'): for dataset, config in other_node.metadata.get('zfs/datasets').items():