update restic
This commit is contained in:
@@ -46,7 +46,16 @@ if [[ $1 == 'prune' ]]; then
|
||||
info "Pruning snapshots..."
|
||||
$HOME/.local/bin/restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} prune --max-unused 0
|
||||
info "Done"
|
||||
|
||||
info "Checking repository..."
|
||||
$HOME/.local/bin/restic -r ${RESTIC_REPOSITORY} check
|
||||
info "Done"
|
||||
else
|
||||
if ! eval which snapper 2> /dev/null; then
|
||||
# fallback
|
||||
BACKUP_PATHS="/home/flexo"
|
||||
fi
|
||||
|
||||
info "Starting backup..."
|
||||
$HOME/.local/bin/restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} backup ${BACKUP_PATHS} \
|
||||
--exclude-file ${EXCLUDES_FILE}
|
||||
@@ -1,10 +1,8 @@
|
||||
[Unit]
|
||||
Description=restic backup
|
||||
Description=restic Backup
|
||||
Documentation=man:restic(1)
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/usr/bin/nm-online -q
|
||||
ExecStart=%h/.bin/restic-backup
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Type=simple
|
||||
ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 1; done;'
|
||||
ExecStart=%h/.dotfiles/bin/restic-backup
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[Unit]
|
||||
Description=restic backup
|
||||
Description=restic Backup Trigger
|
||||
Documentation=man:restic(1)
|
||||
|
||||
[Timer]
|
||||
Persistent=true
|
||||
|
||||
Reference in New Issue
Block a user