Wrap backup script in systemd service and timer

This commit is contained in:
Thomas Kleinendorst 2025-01-14 17:16:21 +01:00
parent cf23a37aa0
commit b7183ceeae
3 changed files with 52 additions and 8 deletions

View file

@ -0,0 +1,15 @@
[Unit]
Description=BorgBase backup service
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
User=root
Group=root
ExecStart={{ backups_script_path }} {{ backups_configuration_path }}
Environment="BORG_REPO={{ borg_base.repo_url }}"
Environment="BORG_PASSPHRASE={{ borg_backup_password }}"
[Install]
WantedBy=default.target