Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Variable for drive name #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions vzbackup-rclone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down