25 ms·
I use a systemd user service. It sounds like you're on OS X, so you won't have systemd. Cron should work. Here are my systemd files for reference. Service:
by l3s2d 6y ago
I use a systemd user service. It sounds like you're on OS X, so you won't have systemd. Cron should work.
Here are my systemd files for reference.
Service:
[Unit]
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
ExecStart=/bin/bash -c "/usr/bin/restic unlock && /usr/bin/restic backup --verbose --one-file-system --exclude-caches --exclude=$XDG_CACHE_HOME %h && /usr/bin/restic forget --keep-last 5 --prune && /usr/bin/restic cache --cleanup --max-age 30"
[Install]
WantedBy=default.target
Environment (fill these in with your keys):
[Service]
Environment="B2_ACCOUNT_ID="
Environment="B2_ACCOUNT_KEY="
Environment="RESTIC_REPOSITORY="
Environment="RESTIC_PASSWORD="
Timer:
[Timer]
OnCalendar=*-*-* 00:30:00
RandomizedDelaySec=20min
[Install]
WantedBy=timers.target