Back up the database nightly with a timer
CI / tests (Python 3.10) (pull_request) Successful in 23s
CI / tests (Python 3.11) (pull_request) Successful in 25s
CI / tests (Python 3.12) (pull_request) Successful in 24s
CI / tests (Python 3.13) (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 3s
CI / tests (Python 3.10) (pull_request) Successful in 23s
CI / tests (Python 3.11) (pull_request) Successful in 25s
CI / tests (Python 3.12) (pull_request) Successful in 24s
CI / tests (Python 3.13) (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 3s
kernelwatch scheduled-backup writes kernelwatch-YYYY-MM-DD.db into backup_dir and prunes dated copies backup_keep_days or older, only after the new backup succeeded and only files with exactly that name. kernelwatch-backup.timer runs it at about 03:30 as the unprivileged service user with no network, and server/install.sh enables it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3624f0e5d9
commit
4a9bc77a08
10 files changed
+281
-3
No files matched your search
+3
-1
@@ -44,11 +44,13 @@ fi
|
||||
install -d -m 0750 -o kernelwatch -g kernelwatch "$root/var/lib/kernelwatch"
|
||||
|
||||
install -m 0644 "$here/kernelwatch.service" "$root/etc/systemd/system/"
|
||||
install -m 0644 "$here/kernelwatch-alerts.service" "$here/kernelwatch-alerts.timer" "$root/etc/systemd/system/"
|
||||
install -m 0644 "$here/kernelwatch-alerts.service" "$here/kernelwatch-alerts.timer" \
|
||||
"$here/kernelwatch-backup.service" "$here/kernelwatch-backup.timer" "$root/etc/systemd/system/"
|
||||
systemctl daemon-reload
|
||||
systemctl enable kernelwatch.service
|
||||
systemctl restart kernelwatch.service
|
||||
systemctl enable --now kernelwatch-alerts.timer
|
||||
systemctl enable --now kernelwatch-backup.timer
|
||||
|
||||
echo
|
||||
echo "kernelwatch is running on $(grep -E '^listen_' "$root/etc/kernelwatch/server.toml" | tr '\n' ' ')"
|
||||
|
||||
Reference in new issue
Block a user