Files
kernel-automation/server/kernelwatch-backup.service
T
patrickandClaude Sonnet 5.5 4a9bc77a08
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
Back up the database nightly with a timer
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>
2026-10-30 10:23:45 -04:00

38 lines
858 B
Desktop File

[Unit]
Description=Back up the kernelwatch database
[Service]
Type=oneshot
User=kernelwatch
Group=kernelwatch
Environment=KERNELWATCH_CONFIG=/etc/kernelwatch/server.toml
ExecStart=/usr/bin/python3 -I /opt/kernelwatch/kernelwatch-server scheduled-backup
TimeoutStartSec=10min
StateDirectory=kernelwatch
StateDirectoryMode=0750
CapabilityBoundingSet=
AmbientCapabilities=
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectControlGroups=yes
ProtectClock=yes
ProtectHostname=yes
ProtectProc=invisible
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
RestrictAddressFamilies=AF_UNIX
PrivateNetwork=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
UMask=0077