1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2026-05-03 23:18:02 +01:00
Files
operating-system/buildroot-external/rootfs-overlay/usr/libexec/haos-freeze-hook
Stefan Agner 893a49a3f3 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
2023-10-02 08:30:20 +02:00

16 lines
302 B
Bash
Executable File

#!/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