auf meinem Heimserver laufen ein paar Dienste als systemweite unprivilegierte LXC-Container. Wöchentlich läuft ein rsnapshot-Backup durch, das die Container anfangs herunter- und danach wieder hochfährt, gesteuert über ein preexit/postexit-Script.
rsnapshot_preexit.sh (Ausschnitt):
Code: Alles auswählen
#!/bin/sh
[...]
# Container stoppen
echo "Stopping LXC containers..."
#lxc-stop -n lms0
#lxc-stop -n wolke0
lxc-autostart -s -g rsnapshot
[...]
Code: Alles auswählen
#!/bin/sh
# Container starten
echo "Starting LXC containers..."
#lxc-start -n lms0
#lxc-start -n wolke0
lxc-autostart -g rsnapshot
Code: Alles auswählen
Saving package selections...
Stopping LXC containers...
Dumping PostgreSQL databases...
Starting LXC containers...
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot gamma
----------------------------------------------------------------------------
ERROR: cmd_postexec "/usr/local/sbin/rsnapshot_postexec.sh" returned 2
Nachtrag: Debian 10 amd64, Kernel 5.3 aus den Backports.
Gruß
Jan