rclone/restic config

This commit is contained in:
Simon Zürn 2025-06-12 21:54:28 +02:00
parent 19548d6f99
commit e373e1f266
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,39 @@
#!/bin/bash
# check for pwgen
if ! command -v pwgen >/dev/null 2>&1
then
echo "pwgen could not be found"
source /etc/os-release
if [ "$ID" = "arch" ];
then
sudo pacman -S pwgen
else
exit 1
fi
fi
# check for rclone
if ! command -v rclone >/dev/null 2>&1
then
echo "pwgen could not be found"
source /etc/os-release
if [ "$ID" = "arch" ];
then
sudo pacman -S rclone
else
exit 1
fi
fi
echo "---create unencrypted volume---"
sudo rclone config
pwgen -sy --num-passwords=1 32
echo "---create encrypted volume on previously created volume---"
sudo rclone config
echo "Now initialize all repos with:"
echo "restic -r rclone:drive:path init"

View File

@ -0,0 +1,5 @@
sudo -i -u root bash << EOF
export RESTIC_PASSWORD="RESTIC_PASSWORD_PLACEHOLDER"
export RESTIC_PROGRESS_FPS=0.01
restic -r rclone:DRIVE:PATH --verbose backup LOCAL_PATH &> LOGFILE.log
EOF