From 8ce52735702cd10249fc44325e256a073ce5303a Mon Sep 17 00:00:00 2001 From: Rob Date: Sun, 10 Jul 2022 19:20:36 +0200 Subject: [PATCH] move backup scripts to /restic/ --- .aliases | 3 ++- restic/backup-status.sh | 16 ++++++++++++++++ backup.excludes => restic/backup.excludes | 0 backup.sh => restic/backup.sh | 0 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 restic/backup-status.sh rename backup.excludes => restic/backup.excludes (100%) rename backup.sh => restic/backup.sh (100%) diff --git a/.aliases b/.aliases index 637c0e2..96817f7 100644 --- a/.aliases +++ b/.aliases @@ -51,4 +51,5 @@ alias wifioff="/home/rob/code/lokale-scripte/wifioff.sh" #alias python2='/usr/bin/python' # restic backups ausführen -alias backup-me="/home/rob/code/lokale-scripte/backup.sh" +alias backup-me="/home/rob/code/lokale-scripte/restic/backup.sh" +alias backup-status="/home/rob/code/lokale-scripte/restic/backup-status.sh" diff --git a/restic/backup-status.sh b/restic/backup-status.sh new file mode 100755 index 0000000..a8d42fd --- /dev/null +++ b/restic/backup-status.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# Hint: to exclude any directory (for example an cache dir) +# place the CACHEDIR.TAG file in there: https://bford.info/cachedir/ +# don't forget the signature in there and set the parameter: --exclude-caches + +export RESTIC_REPOSITORY=bfds:/mnt/bfds/rob-restic-backups/restic-repo-t520-user +export RESTIC_PASSWORD=kopenhagenhatsuperinternetwirklich + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +# backup the whole user dir to bfds +# restic -r sftp:${RESTIC_REPOSITORY} backup /home/rob --exclude-caches --exclude-file=${SCRIPT_DIR}/backup.excludes + +#restic stats -r sftp:${RESTIC_REPOSITORY} +restic snapshots -r sftp:${RESTIC_REPOSITORY} diff --git a/backup.excludes b/restic/backup.excludes similarity index 100% rename from backup.excludes rename to restic/backup.excludes diff --git a/backup.sh b/restic/backup.sh similarity index 100% rename from backup.sh rename to restic/backup.sh