From 187c15b5abfb0f3584c78f6e14f919922313232d Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Sat, 26 Oct 2024 23:47:25 +0100 Subject: [PATCH] backups: update scripts for new host/path --- scripts/backups_flash_drive_sync.sh | 15 +++++++++++++++ scripts/backups_hdd_sync.sh | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 scripts/backups_flash_drive_sync.sh diff --git a/scripts/backups_flash_drive_sync.sh b/scripts/backups_flash_drive_sync.sh new file mode 100644 index 0000000..ee2a97c --- /dev/null +++ b/scripts/backups_flash_drive_sync.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p restic rsync +set -e + +HOST="restic.ts.hillion.co.uk" + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$DIR" + +rsync -ar --no-perms --delete-after --rsync-path='sudo -u restic rsync' --progress $HOST:/practical-defiant-coffee/backups/restic/128G/ restic/128G + +echo 'checking 128G' +restic -r restic/128G check --read-data-subset=25% + +touch last_synced diff --git a/scripts/backups_hdd_sync.sh b/scripts/backups_hdd_sync.sh index 29ade2c..861dc44 100755 --- a/scripts/backups_hdd_sync.sh +++ b/scripts/backups_hdd_sync.sh @@ -2,12 +2,12 @@ #!nix-shell -i bash -p restic rsync set -e -HOST="tywin.storage.ts.hillion.co.uk" +HOST="restic.ts.hillion.co.uk" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "$DIR" -rsync -ar --no-perms --delete-after --rsync-path='sudo -u restic rsync' --progress $HOST:/data/backups/restic/ restic +rsync -ar --no-perms --delete-after --rsync-path='sudo -u restic rsync' --progress $HOST:/practical-defiant-coffee/backups/restic/ restic echo 'checking 128G' restic -r restic/128G check --read-data @@ -15,4 +15,3 @@ echo 'checking 1.6T' restic -r restic/1.6T check --read-data touch last_synced -