relating to https://lxd.readthedocs.io/en/latest/backup/
full backup = a copy of lxd folder
in my case:
btrfs snapshots of /var/snap/lxd/common/lxd
- everything is on btrfs
- lxd installed via snapd
- all my Systems use systemd
aim:
if lxd will stopped:
- os reboot, restart …
- lxd update, reinstallation …
- and so on
a snapshot based backup should done
requirement:
-
the lxd folder to be backup:
- the lxd folder is a btrfs subvolume
- had to mount before the start of “lxd” in place
-
sysytemd service:
- listen to “lxd” start
- trigger mount service
- listen to “lxd” stop
- start btrfs backup script
My question is:
how can I monitor the status of “lxd” with systemd?
snap.lxd.daemon.unix.socket only works for start
but not for stop “lxd”
- tested with: snap remove lxd