SHARE
TWEET

Untitled

a guest Jun 24th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Needs to be placed in ~/.config/systemd/user/
  2. [Unit]
  3. Description=Backup with restic before shutdown
  4. Before=poweroff.target halt.target
  5. After=networking.service
  6.  
  7. [Service]
  8. Type=oneshot
  9. ExecStart=/usr/bin/restic backup --verbose --one-file-system --tag systemd.shutdown $BACKUP_EXCLUDES $BACKUP_PATHS
  10. ExecStartPost=/usr/bin/restic forget --verbose --tag systemd.shutdown --group-by paths,tags --keep-daily $RETENTION_DAYS --keep-weekly $RETENTION_WEEKS --keep-monthly $RETENTION_MONTHS --keep-yearly $RETENTION_YEARS
  11. EnvironmentFile=%h/.config/restic-backup.conf
  12. RemainAfterExit=yes
  13.  
  14. [Install]
  15. WantedBy=poweroff.target halt.target
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top