Fix all BACKUP_SET_NAME call order
Set PREFIX before name so we can use the prefix in the db name to always lock them. Also fix BACKUP_SET_NAME for gitea backup
This commit is contained in:
@@ -99,8 +99,8 @@ if [ ! -z "${DATABASE_FULL_DUMP}" ]; then
|
||||
# Filename
|
||||
FILENAME-"all.${DB_USER}.NONE.${schema_flag}-${DB_VERSION}_${DB_HOST}_${DB_PORT}.c.sql"
|
||||
# backup set:
|
||||
BACKUP_SET_NAME="all-${schema_flag}-${BACKUP_SET}";
|
||||
BACKUP_SET_PREFIX="all-";
|
||||
BACKUP_SET_NAME="${BACKUP_SET_PREFIX}${schema_flag}-${BACKUP_SET}";
|
||||
# borg call
|
||||
BORG_CALL=$(echo "${_BORG_CALL}" | sed -e "s/##FILENAME##/${FILENAME}/" | sed -e "s/##BACKUP_SET##/${BACKUP_SET_NAME}/");
|
||||
BORG_PRUNE=$(echo "${_BORG_PRUNE}" | sed -e "s/##BACKUP_SET_PREFIX##/${BACKUP_SET_PREFIX}/");
|
||||
@@ -127,8 +127,8 @@ else
|
||||
# Filename
|
||||
FILENAME="${db}.${DB_USER}.NONE.${schema_flag}-${DB_VERSION}_${DB_HOST}_${DB_PORT}.c.sql"
|
||||
# backup set:
|
||||
BACKUP_SET_NAME="${db}-${schema_flag}-${BACKUP_SET}";
|
||||
BACKUP_SET_PREFIX="${db}-";
|
||||
BACKUP_SET_NAME="${BACKUP_SET_PREFIX}${schema_flag}-${BACKUP_SET}";
|
||||
# borg call
|
||||
BORG_CALL=$(echo "${_BORG_CALL}" | sed -e "s/##FILENAME##/${FILENAME}/" | sed -e "s/##BACKUP_SET##/${BACKUP_SET_NAME}/");
|
||||
BORG_PRUNE=$(echo "${_BORG_PRUNE}" | sed -e "s/##BACKUP_SET_PREFIX##/${BACKUP_SET_PREFIX}/");
|
||||
|
||||
Reference in New Issue
Block a user