mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-22 13:44:08 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f455abc1a | ||
|
|
c16add4525 | ||
|
|
d5769b1588 |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,9 +1,21 @@
|
||||
## 4.0.10 2023-11-11 <dave at tiredofit dot ca>
|
||||
|
||||
### Changed
|
||||
- Change environment variable parsing routines to properly accomodate for Passwords containing '=='
|
||||
|
||||
|
||||
## 4.0.9 2023-11-11 <dave at tiredofit dot ca>
|
||||
|
||||
### Changed
|
||||
- Fix issue with quotes being wrapped around _PASS variables
|
||||
|
||||
|
||||
## 4.0.8 2023-11-11 <dave at tiredofit dot ca>
|
||||
|
||||
### Changed
|
||||
- Tidy up file_encryption() routines
|
||||
- Change environment variable _ENCRYPTION_PUBKEY to _ENCRYPTION_PUBLIC_KEY
|
||||
- Add new environment variable _ENCRYPTION_PRIVATE_KEY
|
||||
- Change environment variable _ENCRYPT_PUBKEY to _ENCRYPT_PUBLIC_KEY
|
||||
- Add new environment variable _ENCRYPT_PRIVATE_KEY
|
||||
|
||||
|
||||
## 4.0.7 2023-11-11 <dave at tiredofit dot ca>
|
||||
|
||||
@@ -153,18 +153,23 @@ bootstrap_variables() {
|
||||
fi
|
||||
##
|
||||
|
||||
if grep -qo ".*_PASS='.*'" "${backup_instance_vars}"; then
|
||||
print_debug "[bootstrap_variables] [backup_init] Found _PASS variable with quotes"
|
||||
sed -i "s|_PASS='\(.*\)'|_PASS=\1|g" "${backup_instance_vars}"
|
||||
fi
|
||||
|
||||
transform_backup_instance_variable() {
|
||||
if grep -q "^DB${1}_${2}=" "${backup_instance_vars}" && [ "$(grep "^DB${1}_${2}=" "${backup_instance_vars}" | cut -d = -f2)" != "unset" ]; then
|
||||
export "$3"="$(grep "^DB${1}_${2}=" "${backup_instance_vars}" | cut -d = -f2)"
|
||||
export "$3"="$(grep "^DB${1}_${2}=" "${backup_instance_vars}" | cut -d = -f2-)"
|
||||
elif grep -q "^DB_${2}=" "${backup_instance_vars}" && [ "$(grep "^DB_${2}=" "${backup_instance_vars}" | cut -d = -f2)" != "unset" ]; then
|
||||
# Allow old legacy work, perhaps remove old DB_ functionality in future? This should allow for seamless upgrades
|
||||
#print_warn "Legacy Variable 'DB_${2}'' detected - Please upgrade your variables as they will be removed in version 4.3.0"
|
||||
export "$3"="$(grep "^DB_${2}=" "${backup_instance_vars}" | cut -d = -f2)"
|
||||
export "$3"="$(grep "^DB_${2}=" "${backup_instance_vars}" | cut -d = -f2-)"
|
||||
elif grep -q "^${2}=" "${backup_instance_vars}" && [ "$(grep "^${2}=" "${backup_instance_vars}" | cut -d = -f2)" != "unset" ]; then
|
||||
print_warn "Legacy unsupported variable '${2}' detected - Please upgrade your variables as they will be removed in version 4.3.0"
|
||||
export "$3"="$(grep "^${2}=" "${backup_instance_vars}" | cut -d = -f2)"
|
||||
export "$3"="$(grep "^${2}=" "${backup_instance_vars}" | cut -d = -f2-)"
|
||||
elif grep -q "^DEFAULT_${2}=" "${backup_instance_vars}" && [ "$(grep "^DEFAULT_${2}=" "${backup_instance_vars}" | cut -d = -f2)" != "unset" ]; then
|
||||
export "$3"="$(grep "^DEFAULT_${2}=" "${backup_instance_vars}" | cut -d = -f2)"
|
||||
export "$3"="$(grep "^DEFAULT_${2}=" "${backup_instance_vars}" | cut -d = -f2-)"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1183,7 +1188,7 @@ EOF
|
||||
}
|
||||
|
||||
ctrl_c() {
|
||||
sed -i "/^{{BACKUP_NUMBER}}/d" /tmp/.container/db-backup-backups
|
||||
sed -i "/^${backup_instance_number}/d" /tmp/.container/db-backup-backups
|
||||
symlink_log
|
||||
print_warn "User aborted"
|
||||
exit
|
||||
@@ -1738,7 +1743,7 @@ process_limiter() {
|
||||
}
|
||||
|
||||
run_as_user() {
|
||||
sudo -u "${DBBACKUP_USER}" $@
|
||||
sudo -Eu "${DBBACKUP_USER}" $@
|
||||
}
|
||||
|
||||
setup_mode() {
|
||||
|
||||
Reference in New Issue
Block a user