You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
571B

  1. [Unit]
  2. Description=Make a backup of the system using Restic
  3. After=syslog.target
  4. After=network.target
  5. [Service]
  6. Type=simple
  7. DynamicUser=true
  8. StateDirectory=restic
  9. CacheDirectory=restic
  10. Environment=RESTIC_REPOSITORY_FILE=/var/lib/restic/rest-server RESTIC_PASSWORD_FILE=/var/lib/restic/backup-key
  11. ExecStart=restic backup --exclude-file=/var/lib/restic/exclude --cache-dir $CACHE_DIRECTORY /
  12. # Allow Restic to bypass file read permission checks and directory read and execute permission checks
  13. AmbientCapabilities=CAP_DAC_READ_SEARCH
  14. [Install]
  15. WantedBy=multi-user.target