rclone/restic config
This commit is contained in:
parent
19548d6f99
commit
e373e1f266
39
server/create_encrypted_rclone.sh
Normal file
39
server/create_encrypted_rclone.sh
Normal 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"
|
||||||
5
server/restic_backup_script_template.sh.template
Normal file
5
server/restic_backup_script_template.sh.template
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user