mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-24 13:36:31 +00:00
Add fsfreeze support for QEMU/KVM/Proxmox installations (#2781)
* Add fsfreeze support for QEMU/KVM/Proxmox installations Add fsfreeze scripts which calls the new Supervisor API to freeze Home Assistant Core and add-ons which support the backup freeze scripts (`backup_pre` and `backup_post`). This allows to create safe snapshots with databases running. * Fix lint issues
This commit is contained in:
parent
a72c6c0322
commit
893a49a3f3
@ -0,0 +1,3 @@
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/usr/libexec/qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 --fsfreeze-hook /usr/libexec/haos-freeze-hook
|
15
buildroot-external/rootfs-overlay/usr/libexec/haos-freeze-hook
Executable file
15
buildroot-external/rootfs-overlay/usr/libexec/haos-freeze-hook
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
action="$1"
|
||||
|
||||
if [ "${action}" = "freeze" ]; then
|
||||
echo "File system freeze requested, freezing Home Assistant"
|
||||
ha backups freeze
|
||||
elif [ "${action}" = "thaw" ]; then
|
||||
echo "File system thaw requested, thawing Home Assistant"
|
||||
ha backups thaw
|
||||
else
|
||||
echo "Unknown action ${action}"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user