From c093c8210498430045f2f144ebcb05129b29475c Mon Sep 17 00:00:00 2001 From: sim hoki Date: Fri, 30 Oct 2020 10:38:52 +0900 Subject: [PATCH] Add Variable for drive name Added "DRIVE_NAME" --- vzbackup-rclone.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vzbackup-rclone.sh b/vzbackup-rclone.sh index b93cd67..56b8af3 100755 --- a/vzbackup-rclone.sh +++ b/vzbackup-rclone.sh @@ -4,6 +4,7 @@ ############ /START CONFIG dumpdir="/mnt/pve/pvebackups01/dump" # Set this to where your vzdump files are stored MAX_AGE=3 # This is the age in days to keep local backup copies. Local backups older than this are deleted. +DRIVE_NAME="your_drive" # Set this as drive name in rclone.conf. ############ /END CONFIG _bdir="$dumpdir" @@ -24,7 +25,7 @@ if [[ ${COMMAND} == 'rehydrate' ]]; then #echo "For example, today would be: $timepath" #read -p 'Rehydrate Date => ' rehydrate rclone --config /root/.config/rclone/rclone.conf \ - --drive-chunk-size=32M copy gd-backup_crypt:/$rehydrate$CMDARCHIVE $dumpdir \ + --drive-chunk-size=32M copy $DRIVE_NAME:/$rehydrate$CMDARCHIVE $dumpdir \ -v --stats=60s --transfers=16 --checkers=16 fi @@ -40,7 +41,7 @@ if [[ ${COMMAND} == 'backup-end' ]]; then echo "rcloning $rclonedir" #ls $rclonedir rclone --config /root/.config/rclone/rclone.conf \ - --drive-chunk-size=32M copy $tarfile gd-backup_crypt:/$timepath \ + --drive-chunk-size=32M copy $tarfile $DRIVE_NAME:/$timepath \ -v --stats=60s --transfers=16 --checkers=16 fi @@ -77,7 +78,7 @@ if [[ ${COMMAND} == 'job-end' || ${COMMAND} == 'job-abort' ]]; then echo "rcloning $_filename4" #ls $rclonedir rclone --config /root/.config/rclone/rclone.conf \ - --drive-chunk-size=32M move $_filename4 gd-backup_crypt:/$timepath \ + --drive-chunk-size=32M move $_filename4 $DRIVE_NAME:/$timepath \ -v --stats=60s --transfers=16 --checkers=16 #rm -rfv $rcloneroot