From 69df7da2b150158b6b67fed8034ffdfdc2c6542c Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Tue, 3 Jan 2023 12:48:12 -0500 Subject: backup services/timers --- dot_config/systemd/user/backup-email.service | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 dot_config/systemd/user/backup-email.service (limited to 'dot_config/systemd/user/backup-email.service') diff --git a/dot_config/systemd/user/backup-email.service b/dot_config/systemd/user/backup-email.service new file mode 100644 index 0000000..47260f1 --- /dev/null +++ b/dot_config/systemd/user/backup-email.service @@ -0,0 +1,38 @@ +[Unit] +Description=backup dovecot +Wants=network-online.target +BindsTo=dovecot.service +After=network-online.target +ConditionFileNotEmpty=/media/t/Archives/email/rak.ac/backup.sh +Before=borgmatic@tosh.service + +[Install] +WantedBy=borgmatic@tosh.service + +[Service] +Type=oneshot +LockPersonality=true +MemoryDenyWriteExecute=no +NoNewPrivileges=yes +PrivateTmp=yes +ProtectControlGroups=yes +ProtectHostname=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK +RestrictNamespaces=yes +RestrictRealtime=yes +RestrictSUIDSGID=yes +SystemCallArchitectures=native +SystemCallFilter=@system-service +SystemCallErrorNumber=EPERM +ProtectSystem=full + +Nice=19 +CPUSchedulingPolicy=batch +IOSchedulingClass=best-effort +IOSchedulingPriority=7 +IOWeight=100 + +Restart=no +LogRateLimitIntervalSec=0 + +ExecStart=/media/t/Archives/email/rak.ac/backup.sh -- cgit v1.2.3