summaryrefslogtreecommitdiff
path: root/stdlib/backups/borg/systemd-service-template
diff options
context:
space:
mode:
authorJulien Dessaux2024-08-29 20:22:56 +0200
committerJulien Dessaux2024-08-29 20:22:56 +0200
commit48f2e9a2cbc35aefc11e14e8504f0090414291c8 (patch)
tree9ec3b7fe4b64a04eddbcf7177133ddcd292ab8b5 /stdlib/backups/borg/systemd-service-template
parentfeat(services): support service timers for which a running state means waiting (diff)
downloadgonf-48f2e9a2cbc35aefc11e14e8504f0090414291c8.tar.gz
gonf-48f2e9a2cbc35aefc11e14e8504f0090414291c8.tar.bz2
gonf-48f2e9a2cbc35aefc11e14e8504f0090414291c8.zip
feat(stdlib): added a basic borg client custom promise
Diffstat (limited to 'stdlib/backups/borg/systemd-service-template')
-rw-r--r--stdlib/backups/borg/systemd-service-template15
1 files changed, 15 insertions, 0 deletions
diff --git a/stdlib/backups/borg/systemd-service-template b/stdlib/backups/borg/systemd-service-template
new file mode 100644
index 0000000..336f6d2
--- /dev/null
+++ b/stdlib/backups/borg/systemd-service-template
@@ -0,0 +1,15 @@
+[Unit]
+Description=BorgBackup job %s
+
+[Service]
+Environment="BORG_REPO=ssh://borg@%s/srv/borg/%s"
+Environment="BORG_RSH=ssh -i /etc/borg/%s.key"
+CPUSchedulingPolicy=idle
+ExecStart=/etc/borg/%s.sh
+Group=root
+IOSchedulingClass=idle
+PrivateTmp=true
+ProtectSystem=strict
+ReadWritePaths=/root/.config/borg
+ReadWritePaths=/root/.cache/borg
+User=root