Compare commits
No commits in common. "1ea39b8117fe0ca53beadb22377724e9540eac7e" and "dacb7cfec37259797834383d3eafa2f70275ab1e" have entirely different histories.
1ea39b8117
...
dacb7cfec3
7 changed files with 7 additions and 28 deletions
|
@ -15,7 +15,7 @@ Raspberry pi as soundcard
|
||||||
|
|
||||||
# install bw fork
|
# install bw fork
|
||||||
|
|
||||||
pip3 install --editable git+file:///Users/mwiegand/Projekte/bundlewrap-fork@main#egg=bundlewrap
|
pip3 install --editable git+file:///Users/mwiegand/Projekte/bundlewrap-fork#egg=bundlewrap
|
||||||
|
|
||||||
# monitor timers
|
# monitor timers
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ else
|
||||||
echo "INCREMENTAL BACKUP"
|
echo "INCREMENTAL BACKUP"
|
||||||
last_bookmark=$(zfs list -t bookmark -H -o name | grep "^$source_dataset#$bookmark_prefix" | sort | tail -1 | cut -d '#' -f 2)
|
last_bookmark=$(zfs list -t bookmark -H -o name | grep "^$source_dataset#$bookmark_prefix" | sort | tail -1 | cut -d '#' -f 2)
|
||||||
[[ -z "$last_bookmark" ]] && echo "ERROR - last_bookmark is empty" && exit 98
|
[[ -z "$last_bookmark" ]] && echo "ERROR - last_bookmark is empty" && exit 98
|
||||||
$(zfs send -v -L -i "#$last_bookmark" "$source_dataset@$new_bookmark" | $ssh sudo zfs recv "$target_dataset")
|
$(zfs send -v -L -c -i "#$last_bookmark" "$source_dataset@$new_bookmark" | $ssh sudo zfs recv "$target_dataset")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$?" == "0" ]]
|
if [[ "$?" == "0" ]]
|
||||||
|
|
|
@ -4,8 +4,7 @@ Host *
|
||||||
GSSAPIAuthentication yes
|
GSSAPIAuthentication yes
|
||||||
StrictHostKeyChecking yes
|
StrictHostKeyChecking yes
|
||||||
GlobalKnownHostsFile /etc/ssh/ssh_known_hosts
|
GlobalKnownHostsFile /etc/ssh/ssh_known_hosts
|
||||||
|
# fixme: prevents backup server from sleeping
|
||||||
Host ${' '.join(sorted(multiplex_hosts))}
|
# ControlMaster auto
|
||||||
ControlMaster auto
|
# ControlPath ~/.ssh/multiplex-%C
|
||||||
ControlPath ~/.ssh/multiplex-%C
|
# ControlPersist 5m
|
||||||
ControlPersist 5m
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
from ipaddress import ip_interface
|
|
||||||
|
|
||||||
|
|
||||||
# on debian bullseye raspberry images, starting the systemd ssh
|
# on debian bullseye raspberry images, starting the systemd ssh
|
||||||
# daemon seems to collide with an existing sysv daemon
|
# daemon seems to collide with an existing sysv daemon
|
||||||
dont_touch_sshd = node.metadata.get('FIXME_dont_touch_sshd', False)
|
dont_touch_sshd = node.metadata.get('FIXME_dont_touch_sshd', False)
|
||||||
|
@ -27,13 +24,6 @@ files = {
|
||||||
'/etc/ssh/ssh_config': {
|
'/etc/ssh/ssh_config': {
|
||||||
'content_type': 'mako',
|
'content_type': 'mako',
|
||||||
'context': {
|
'context': {
|
||||||
'multiplex_hosts': set(
|
|
||||||
str(ip_interface(other_node.metadata.get('network/internal/ipv4')).ip)
|
|
||||||
for other_node in repo.nodes
|
|
||||||
if other_node.has_bundle('ssh')
|
|
||||||
and other_node.metadata.get('network/internal/ipv4', None)
|
|
||||||
and other_node.metadata.get('ssh/multiplex_incoming')
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
'triggers': [
|
'triggers': [
|
||||||
'svc_systemd:ssh:restart'
|
'svc_systemd:ssh:restart'
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
from ipaddress import ip_interface
|
from ipaddress import ip_interface
|
||||||
from base64 import b64decode
|
from base64 import b64decode
|
||||||
|
|
||||||
defaults = {
|
|
||||||
'ssh': {
|
|
||||||
'multiplex_incoming': True,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
@metadata_reactor.provides(
|
||||||
'ssh/allow_users',
|
'ssh/allow_users',
|
||||||
|
|
|
@ -27,7 +27,7 @@ do
|
||||||
echo "INCREMENTAL BACKUP"
|
echo "INCREMENTAL BACKUP"
|
||||||
last_bookmark=$(zfs list -t bookmark -H -o name | grep "^$dataset#$bookmark_prefix" | sort | tail -1 | cut -d '#' -f 2)
|
last_bookmark=$(zfs list -t bookmark -H -o name | grep "^$dataset#$bookmark_prefix" | sort | tail -1 | cut -d '#' -f 2)
|
||||||
[[ -z "$last_bookmark" ]] && echo "ERROR - last_bookmark is empty" && exit 98
|
[[ -z "$last_bookmark" ]] && echo "ERROR - last_bookmark is empty" && exit 98
|
||||||
$(zfs send -v -L -i "#$last_bookmark" "$dataset@$new_bookmark" | $ssh sudo zfs recv "$dataset" -o mountpoint=none)
|
$(zfs send -v -c -L -i "#$last_bookmark" "$dataset@$new_bookmark" | $ssh sudo zfs recv "$dataset" -o mountpoint=none)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$?" == "0" ]]
|
if [[ "$?" == "0" ]]
|
||||||
|
|
|
@ -38,10 +38,6 @@
|
||||||
# 'apm': 1,
|
# 'apm': 1,
|
||||||
# },
|
# },
|
||||||
# },
|
# },
|
||||||
'ssh': {
|
|
||||||
# multipling prevents server from sleeping
|
|
||||||
'multiplex_incoming': False,
|
|
||||||
},
|
|
||||||
'wol-sleeper': {
|
'wol-sleeper': {
|
||||||
'network': 'internal',
|
'network': 'internal',
|
||||||
'waker': 'home.server',
|
'waker': 'home.server',
|
||||||
|
|
Loading…
Reference in a new issue