From 59889c29c4cf695d3d92cda759b0fe965744e769 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 18 Sep 2024 16:21:41 +0900 Subject: [PATCH] ++ restic direct option --- backup-via-restic | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backup-via-restic b/backup-via-restic index 5582ad4..00c6f0b 100755 --- a/backup-via-restic +++ b/backup-via-restic @@ -21,7 +21,11 @@ repo=s3:${endpoint}/${bucket_name}/restic export RESTIC_PASSWORD="$(pass git co nico-privat >/dev/null 2>&1; pass notebook/restic-password)" -restic -r ${repo} backup \ +# Allow sing restic directly +if [ $# -ge 1 ]; then + restic -r ${repo} "$@" +else + restic -r ${repo} backup \ --exclude ~/Nextcloud \ --exclude ~/Downloads \ --exclude ~/movies/ \ @@ -31,4 +35,5 @@ restic -r ${repo} backup \ --exclude ~/.config/**/logs \ ~/ -restic -r ${repo} forget --keep-last 20 --prune + restic -r ${repo} forget --keep-last 20 --prune +fi