nixos/scripts/backups_hdd_sync.sh
Jake Hillion 187c15b5ab
All checks were successful
flake / flake (push) Successful in 1m28s
backups: update scripts for new host/path
2024-10-26 23:47:34 +01:00

18 lines
464 B
Bash
Executable File

#!/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/ restic
echo 'checking 128G'
restic -r restic/128G check --read-data
echo 'checking 1.6T'
restic -r restic/1.6T check --read-data
touch last_synced