Move B2_BUCKET_PREFIX to a variable

This commit is contained in:
Rob Pearce 2019-03-20 17:51:56 +11:00
parent 4218247c74
commit 41fa031306
1 changed files with 3 additions and 2 deletions

View File

@ -41,6 +41,7 @@ function usage-rc() {
echo " export B2_ACCOUNT_KEY=xxx"
echo " export B2_APP_ID=xxx"
echo " export B2_APP_KEY=xxx"
echo " export B2_BUCKET_PREFIX=xxx"
echo " export RESTIC_PASSWORD=xxx"
echo " export RSYNC_SERVER=xxx"
echo " export RSYNC_USER=backups"
@ -343,8 +344,8 @@ fi
for f in $REPOSTOBACKUP; do
REPO=${f}
DATAPATH=$(getdatapath $REPO)
export RESTIC_REPOSITORY="b2:nethack-${REPO}"
export RCLONE_REPOSITORY="remote:nethack-${REPO}"
export RESTIC_REPOSITORY="b2:${B2_BUCKET_PREFIX}-${REPO}"
export RCLONE_REPOSITORY="remote:${B2_BUCKET_PREFIX}-${REPO}"
export RSYNC_FULLDIR="${RSYNC_DIR}/${REPO}"
export RSYNC_REPOSITORY="${RSYNC_USER}@${RSYNC_SERVER}:${RSYNC_FULLDIR}"