Compare commits
No commits in common. "72561bdb52f63840abfd5572d68fdb480ea94aaa" and "fa300ca547f3c046f0919a699ed2deb8ffc32371" have entirely different histories.
72561bdb52
...
fa300ca547
5 changed files with 7 additions and 23 deletions
|
@ -40,16 +40,9 @@ def zfs(metadata):
|
||||||
'readonly': 'off',
|
'readonly': 'off',
|
||||||
'backup': False,
|
'backup': False,
|
||||||
}
|
}
|
||||||
|
|
||||||
# for zfs send/recv
|
# for zfs send/recv
|
||||||
if other_node.has_bundle('zfs'):
|
if other_node.has_bundle('zfs'):
|
||||||
# base datasets for each tank
|
|
||||||
for pool in other_node.metadata.get('zfs/pools'):
|
|
||||||
datasets[f"tank/{other_node.metadata.get('id')}/{pool}"] = {
|
|
||||||
'mountpoint': None,
|
|
||||||
'readonly': 'on',
|
|
||||||
'backup': False,
|
|
||||||
}
|
|
||||||
# actual datasets
|
|
||||||
for path in other_node.metadata.get('backup/paths'):
|
for path in other_node.metadata.get('backup/paths'):
|
||||||
for dataset, config in other_node.metadata.get('zfs/datasets').items():
|
for dataset, config in other_node.metadata.get('zfs/datasets').items():
|
||||||
if path == config.get('mountpoint'):
|
if path == config.get('mountpoint'):
|
||||||
|
|
|
@ -45,7 +45,7 @@ fi
|
||||||
if [[ "$?" == "0" ]]
|
if [[ "$?" == "0" ]]
|
||||||
then
|
then
|
||||||
zfs bookmark "$source_dataset@$new_bookmark" "$source_dataset#$new_bookmark"
|
zfs bookmark "$source_dataset@$new_bookmark" "$source_dataset#$new_bookmark"
|
||||||
#zfs destroy "$source_dataset@$new_bookmark" # keep snapshots?
|
zfs destroy "$source_dataset@$new_bookmark"
|
||||||
echo "SUCCESS"
|
echo "SUCCESS"
|
||||||
else
|
else
|
||||||
zfs destroy "$source_dataset@$new_bookmark"
|
zfs destroy "$source_dataset@$new_bookmark"
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
defaults = {
|
defaults = {
|
||||||
'apt': {
|
'apt': {
|
||||||
'packages': {
|
'packages': {
|
||||||
'jq': {
|
'jq': {},
|
||||||
'needed_by': {
|
'rsync': {},
|
||||||
'svc_systemd:backup.timer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'rsync': {
|
|
||||||
'needed_by': {
|
|
||||||
'svc_systemd:backup.timer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'backup': {
|
'backup': {
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
{
|
{
|
||||||
'hostname': '10.0.0.17',
|
'hostname': '10.0.0.17',
|
||||||
'groups': [
|
'groups': [
|
||||||
'backup',
|
'raspberry-pi',
|
||||||
'debian-11',
|
'debian-11',
|
||||||
'monitored',
|
'monitored',
|
||||||
'raspberry-pi',
|
|
||||||
'webserver',
|
'webserver',
|
||||||
],
|
],
|
||||||
'bundles': [
|
'bundles': [
|
||||||
|
@ -40,7 +39,7 @@
|
||||||
'pools': {
|
'pools': {
|
||||||
'tank': {
|
'tank': {
|
||||||
'devices': [
|
'devices': [
|
||||||
'/dev/mmcblk1p3',
|
'/dev/sda',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
bundlewrap>=4.13.1
|
bundlewrap>=4.13.0
|
||||||
pycryptodome
|
pycryptodome
|
||||||
PyNaCl
|
PyNaCl
|
||||||
PyYAML
|
PyYAML
|
||||||
|
|
Loading…
Reference in a new issue