halkyon/deploy/backup/halkyon-backup.service
Tizian 「ティツィアーン」 5469ce791f
All checks were successful
CI / check (push) Successful in 40m10s
CI / deploy (push) Successful in 58s
build(deploy): the server's checkout is ~deploy/halkyon, the repository's name
The folder kept its name from before the monorepo (ADR 0015), though
Train and Todo deploy from it too. redeploy.sh, the backup's units and
the operator's steps name ~deploy/halkyon; the Compose project keeps the
name halkyon-learn, as Docker names its volumes after it.

The server moves after this is deployed: the running redeploy.sh is read
whole before it runs, so the deploy of this commit still works in the
old folder; then the folder is moved, the pinned commands in deploy's
authorized_keys and the backup's units changed, and the containers
recreated on the new paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-02 18:56:39 +01:00

24 lines
818 B
Desktop File

# The hourly off-site backup of learn.halkyon.eu, on its server: deploy/backup.sh, as
# deploy, started by halkyon-backup.timer. Installed with the timer as
# /etc/systemd/system/halkyon-backup.service; deploy/backups.md has the steps.
#
# deploy is in the docker group, which is as good as root, so sandboxing this unit
# would protect little: it keeps to the basics.
[Unit]
Description=Off-site backup of learn.halkyon.eu's database
Documentation=file:///home/deploy/halkyon/deploy/backups.md
After=network-online.target docker.service
Wants=network-online.target
[Service]
Type=oneshot
User=deploy
Group=deploy
ExecStart=/home/deploy/halkyon/deploy/backup.sh
PrivateTmp=yes
NoNewPrivileges=yes
ProtectSystem=full
# Behind the instance for CPU and disk.
Nice=10
IOSchedulingClass=best-effort
IOSchedulingPriority=7