move to push backups

This commit is contained in:
Pim Kunis 2023-04-25 22:02:00 +02:00
parent 514dd7d096
commit d49257dabd
14 changed files with 326 additions and 63 deletions

View file

@ -0,0 +1,15 @@
VIRSH="virsh --connect qemu:///system"
read -p "" option
case "$option" in
up)
for i in $($VIRSH list --all --name --autostart); do $VIRSH start "$i"; done
;;
down)
for i in $($VIRSH list --state-running --name --autostart); do
$VIRSH shutdown "$i"
until $VIRSH domstate "$i" | grep shut; do
sleep 0.5
done
done
;;
esac

View file

@ -0,0 +1,14 @@
TrustedUserCAKeys /etc/ssh/user_ca_key.pub
Match User {{ backup_share_user }}
AuthorizedPrincipalsFile /etc/ssh/backup_principals
ChrootDirectory /kvm/data
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
Match User {{ backup_control_user }}
AuthorizedPrincipalsFile /etc/ssh/backup_principals
ForceCommand /home/{{ backup_control_user }}/control.sh
AllowTcpForwarding no
X11Forwarding no