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 | |
|---|---|---|---|
|
|
fa8f43132c | ||
|
|
3f693feefc | ||
|
|
bc32b7d084 |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,3 +1,21 @@
|
|||||||
|
## 3.0.10 2022-03-21 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Fix for restore script not taking "custom" usernames or passwords
|
||||||
|
|
||||||
|
|
||||||
|
## 3.0.9 2022-03-21 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Switch to using parallel versions of compression tools all the time, yet explicitly state the threads in use (1 or ++)
|
||||||
|
|
||||||
|
|
||||||
|
## 3.0.8 2022-03-21 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Add PARALLEL_COMPRESSION_THREADS environment variable to limit amount of threads when compressing - Currently autodetects however many processors are avaialable to the container
|
||||||
|
|
||||||
|
|
||||||
## 3.0.7 2022-03-21 <dave at tiredofit dot ca>
|
## 3.0.7 2022-03-21 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
### Reverted
|
### Reverted
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ Be sure to view the following repositories to understand all the customizable op
|
|||||||
| `COMPRESSION` | Use either Gzip `GZ`, Bzip2 `BZ`, XZip `XZ`, ZSTD `ZSTD` or none `NONE` | `GZ` |
|
| `COMPRESSION` | Use either Gzip `GZ`, Bzip2 `BZ`, XZip `XZ`, ZSTD `ZSTD` or none `NONE` | `GZ` |
|
||||||
| `COMPRESSION_LEVEL` | Numberical value of what level of compression to use, most allow `1` to `9` except for `ZSTD` which allows for `1` to `19` - | `3` |
|
| `COMPRESSION_LEVEL` | Numberical value of what level of compression to use, most allow `1` to `9` except for `ZSTD` which allows for `1` to `19` - | `3` |
|
||||||
| `ENABLE_PARALLEL_COMPRESSION` | Use multiple cores when compressing backups `TRUE` or `FALSE` | `TRUE` |
|
| `ENABLE_PARALLEL_COMPRESSION` | Use multiple cores when compressing backups `TRUE` or `FALSE` | `TRUE` |
|
||||||
|
| `PARALLEL_COMPRESSION_THREADS` | Maximum amount of threads to use when compressing - Integer value e.g. `8` | `autodetected` |
|
||||||
| `ENABLE_CHECKSUM` | Generate either a MD5 or SHA1 in Directory, `TRUE` or `FALSE` | `TRUE` |
|
| `ENABLE_CHECKSUM` | Generate either a MD5 or SHA1 in Directory, `TRUE` or `FALSE` | `TRUE` |
|
||||||
| `CHECKSUM` | Either `MD5` or `SHA1` | `MD5` |
|
| `CHECKSUM` | Either `MD5` or `SHA1` | `MD5` |
|
||||||
| `EXTRA_OPTS` | If you need to pass extra arguments to the backup command, add them here e.g. `--extra-command` | |
|
| `EXTRA_OPTS` | If you need to pass extra arguments to the backup command, add them here e.g. `--extra-command` | |
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ MODE=${MODE:-"AUTO"}
|
|||||||
MYSQL_MAX_ALLOWED_PACKET=${MYSQL_MAX_ALLOWED_PACKET:-"512M"}
|
MYSQL_MAX_ALLOWED_PACKET=${MYSQL_MAX_ALLOWED_PACKET:-"512M"}
|
||||||
MYSQL_SINGLE_TRANSACTION=${MYSQL_SINGLE_TRANSACTION:-"TRUE"}
|
MYSQL_SINGLE_TRANSACTION=${MYSQL_SINGLE_TRANSACTION:-"TRUE"}
|
||||||
MYSQL_STORED_PROCEDURES=${MYSQL_STORED_PROCEDURES:-"TRUE"}
|
MYSQL_STORED_PROCEDURES=${MYSQL_STORED_PROCEDURES:-"TRUE"}
|
||||||
|
PARALLEL_COMPRESSION_THREADS=${PARALLEL_COMPRESSION_THREADS:-"$(nproc)"}
|
||||||
S3_CERT_SKIP_VERIFY=${S3_CERT_SKIP_VERIFY:-"TRUE"}
|
S3_CERT_SKIP_VERIFY=${S3_CERT_SKIP_VERIFY:-"TRUE"}
|
||||||
S3_PROTOCOL=${S3_PROTOCOL:-"https"}
|
S3_PROTOCOL=${S3_PROTOCOL:-"https"}
|
||||||
SIZE_VALUE=${SIZE_VALUE:-"bytes"}
|
SIZE_VALUE=${SIZE_VALUE:-"bytes"}
|
||||||
|
|||||||
@@ -3,15 +3,17 @@
|
|||||||
bootstrap_compression() {
|
bootstrap_compression() {
|
||||||
### Set Compression Options
|
### Set Compression Options
|
||||||
if var_true "${ENABLE_PARALLEL_COMPRESSION}" ; then
|
if var_true "${ENABLE_PARALLEL_COMPRESSION}" ; then
|
||||||
bzip="pbzip2 -${COMPRESSION_LEVEL}"
|
print_debug "Utilizing '${PARALLEL_COMPRESSION_THREADS}' compression threads"
|
||||||
gzip="pigz -${COMPRESSION_LEVEL}"
|
bzip="pbzip2 -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS}"
|
||||||
xzip="pixz -${COMPRESSION_LEVEL}"
|
gzip="pigz -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS}"
|
||||||
zstd="zstd --rm -${COMPRESSION_LEVEL}"
|
xzip="pixz -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS}"
|
||||||
|
zstd="zstd --rm -${COMPRESSION_LEVEL} -T${PARALLEL_COMPRESSION_THREADS}"
|
||||||
else
|
else
|
||||||
bzip="bzip2 -${COMPRESSION_LEVEL}"
|
print_debug "Utilizing single compression thread"
|
||||||
gzip="gzip -${COMPRESSION_LEVEL}"
|
bzip="pbzip2 -${COMPRESSION_LEVEL} -p 1"
|
||||||
xzip="xz -${COMPRESSION_LEVEL} "
|
gzip="pigz -${COMPRESSION_LEVEL} -p 1"
|
||||||
zstd="zstd --rm -${COMPRESSION_LEVEL}"
|
xzip="pixz -${COMPRESSION_LEVEL} -p 1"
|
||||||
|
zstd="zstd --rm -${COMPRESSION_LEVEL} -T1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -697,9 +697,9 @@ EOF
|
|||||||
c* )
|
c* )
|
||||||
counter=1
|
counter=1
|
||||||
q_dbuser=" "
|
q_dbuser=" "
|
||||||
while [[ $q_dbname = *" "* ]]; do
|
while [[ $q_dbuser = *" "* ]]; do
|
||||||
if [ $counter -gt 1 ] ; then print_error "DB Usernames can't have spaces in them, please re-enter." ; fi ;
|
if [ $counter -gt 1 ] ; then print_error "DB Usernames can't have spaces in them, please re-enter." ; fi ;
|
||||||
read -e -p "$(echo -e ${clg}** ${cdgy}What DB User do you wish to use:\ ${coff})" q_dbname
|
read -e -p "$(echo -e ${clg}** ${cdgy}What DB User do you wish to use:\ ${coff})" q_dbuser
|
||||||
(( counter+=1 ))
|
(( counter+=1 ))
|
||||||
done
|
done
|
||||||
r_dbuser=${q_dbuser}
|
r_dbuser=${q_dbuser}
|
||||||
@@ -766,9 +766,9 @@ EOF
|
|||||||
c* )
|
c* )
|
||||||
counter=1
|
counter=1
|
||||||
q_dbpass=" "
|
q_dbpass=" "
|
||||||
while [[ $q_dbname = *" "* ]]; do
|
while [[ $q_dbpass = *" "* ]]; do
|
||||||
if [ $counter -gt 1 ] ; then print_error "DB Passwords can't have spaces in them, please re-enter." ; fi ;
|
if [ $counter -gt 1 ] ; then print_error "DB Passwords can't have spaces in them, please re-enter." ; fi ;
|
||||||
read -e -p "$(echo -e ${clg}** ${cdgy}What DB Password do you wish to use:\ ${coff})" q_dbname
|
read -e -p "$(echo -e ${clg}** ${cdgy}What DB Password do you wish to use:\ ${coff})" q_dbpass
|
||||||
(( counter+=1 ))
|
(( counter+=1 ))
|
||||||
done
|
done
|
||||||
r_dbpass=${q_dbpass}
|
r_dbpass=${q_dbpass}
|
||||||
|
|||||||
Reference in New Issue
Block a user