Compare commits

..

10 Commits
3.9.1 ... 3.9.5

Author SHA1 Message Date
dave@tiredofit.ca
425383639a Release 3.9.5 - See CHANGELOG.md 2023-06-13 16:24:17 -07:00
dave@tiredofit.ca
1e46996812 Release 3.9.4 - See CHANGELOG.md 2023-06-13 10:16:04 -07:00
Dave Conroy
e71334564f Drop auto builds for armv7 2023-06-11 11:42:13 -07:00
dave@tiredofit.ca
f83f97bf76 Release 3.9.3 - See CHANGELOG.md 2023-06-05 10:24:46 -07:00
Dave Conroy
94a8e45af6 Merge pull request #226 from vanzhiganov/patch-1
Update README.md
2023-06-05 10:13:57 -07:00
Dave Conroy
9d90e37339 Merge pull request #225 from alwynpan/bugfix/#199
#199 Report error when move the backup file to S3 or Blob fails
2023-06-05 10:13:44 -07:00
Vyacheslav Anzhiganov
085b7cd6ce Update README.md 2023-06-03 16:27:17 +03:00
Yao (Alwyn) Pan
12484bb3f3 feat: Add zip package to the image 2023-06-01 16:54:26 +10:00
Yao (Alwyn) Pan
8fc2721dd4 fix: #199 report error when move the backup file to S3 or Blob fails 2023-06-01 16:46:13 +10:00
dave@tiredofit.ca
68174c061f Release 3.9.2 - See CHANGELOG.md 2023-05-10 08:19:01 -07:00
7 changed files with 67 additions and 18 deletions

View File

@@ -8,8 +8,8 @@ on:
jobs:
build:
uses: tiredofit/github_actions/.github/workflows/default_amd64_armv7_arm64.yml@main
#uses: tiredofit/github_actions/.github/workflows/default_amd64_armv7_arm64.yml@main
#uses: tiredofit/github_actions/.github/workflows/default_amd64.yml@main
#uses: tiredofit/github_actions/.github/workflows/default_amd64_armv7_arm64.yml@main
#uses: tiredofit/github_actions/.github/workflows/default_amd64_arm64.yml@main
uses: tiredofit/github_actions/.github/workflows/default_amd64_arm64.yml@main
secrets: inherit

View File

@@ -9,8 +9,8 @@ on:
jobs:
build:
uses: tiredofit/github_actions/.github/workflows/default_amd64_armv7_arm64.yml@main
#uses: tiredofit/github_actions/.github/workflows/default_amd64_armv7_arm64.yml@main
#uses: tiredofit/github_actions/.github/workflows/default_amd64.yml@main
#uses: tiredofit/github_actions/.github/workflows/default_amd64_armv7_arm64.yml@main
#uses: tiredofit/github_actions/.github/workflows/default_amd64_arm64.yml@main
uses: tiredofit/github_actions/.github/workflows/default_amd64_arm64.yml@main
secrets: inherit

View File

@@ -1,3 +1,28 @@
## 3.9.5 2023-06-13 <dave at tiredofit dot ca>
### Changed
- Start building Influx DB v1 manually due to being removed from Alpine repositories
## 3.9.4 2023-06-13 <dave at tiredofit dot ca>
### Added
- Add abliity to use --rsyncable argument to zstd archives
## 3.9.3 2023-06-05 <dave at tiredofit dot ca>
### Added
- Add notification if blobxfer/s3 upload fails (credit @alwynpan)
- Add zip package
## 3.9.2 2023-05-10 <dave at tiredofit dot ca>
### Changed
- Alpine 3.18 base
## 3.9.1 2023-05-03 <dave at tiredofit dot ca>
### Changed

View File

@@ -1,8 +1,12 @@
FROM docker.io/tiredofit/alpine:3.17
ARG DISTRO=alpine
ARG DISTRO_VARIANT=3.18
FROM docker.io/tiredofit/${DISTRO}:${DISTRO_VARIANT}
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
### Set Environment Variables
ENV INFLUX2_VERSION=2.4.0 \
ENV INFLUX_VERSION=1.8.0 \
INFLUX2_VERSION=2.4.0 \
MSSQL_VERSION=18.0.1.1-1 \
CONTAINER_ENABLE_MESSAGING=FALSE \
CONTAINER_ENABLE_MONITORING=TRUE \
@@ -19,6 +23,7 @@ RUN source /assets/functions/00-container && \
build-base \
bzip2-dev \
git \
go \
libarchive-dev \
openssl-dev \
libffi-dev \
@@ -30,7 +35,6 @@ RUN source /assets/functions/00-container && \
package install .db-backup-run-deps \
aws-cli \
bzip2 \
influxdb \
libarchive \
mariadb-client \
mariadb-connector-c \
@@ -44,6 +48,7 @@ RUN source /assets/functions/00-container && \
redis \
sqlite \
xz \
zip \
zstd \
&& \
\
@@ -56,7 +61,9 @@ RUN source /assets/functions/00-container && \
\
if [ $mssql = "true" ] ; then curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/msodbcsql18_${MSSQL_VERSION}_amd64.apk ; curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/mssql-tools18_${MSSQL_VERSION}_amd64.apk ; echo y | apk add --allow-untrusted msodbcsql18_${MSSQL_VERSION}_amd64.apk mssql-tools18_${MSSQL_VERSION}_amd64.apk ; else echo >&2 "Detected non x86_64 build variant, skipping MSSQL installation" ; fi; \
if [ $influx2 = "true" ] ; then curl -sSL https://dl.influxdata.com/influxdb/releases/influxdb2-client-${INFLUX2_VERSION}-linux-${influx_arch}.tar.gz | tar xvfz - --strip=1 -C /usr/src/ ; chmod +x /usr/src/influx ; mv /usr/src/influx /usr/sbin/ ; else echo >&2 "Unable to build Influx 2 on this system" ; fi ; \
\
clone_git_repo https://github.com/influxdata/influxdb "${INFLUX_VERSION}" && \
go build -o /usr/sbin/influxd ./cmd/influxd && \
strip /usr/sbin/influxd && \
mkdir -p /usr/src/pbzip2 && \
curl -sSL https://launchpad.net/pbzip2/1.1/1.1.13/+download/pbzip2-1.1.13.tar.gz | tar xvfz - --strip=1 -C /usr/src/pbzip2 && \
cd /usr/src/pbzip2 && \
@@ -81,6 +88,7 @@ RUN source /assets/functions/00-container && \
/*.apk \
/etc/logrotate.d/* \
/root/.cache \
/root/go \
/tmp/* \
/usr/src/*

View File

@@ -135,7 +135,7 @@ Be sure to view the following repositories to understand all the customizable op
| Parameter | Description | Default |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| `BACKUP_LOCATION` | Backup to `FILESYSTEM` or `S3` compatible services like S3, Minio, Wasabi | `FILESYSTEM` |
| `BACKUP_LOCATION` | Backup to `FILESYSTEM`, `blobxfer` or `S3` compatible services like S3, Minio, Wasabi | `FILESYSTEM` |
| `MODE` | `AUTO` mode to use internal scheduling routines or `MANUAL` to simply use this as manual backups only executed by your own means | `AUTO` |
| `MANUAL_RUN_FOREVER` | `TRUE` or `FALSE` if you wish to try to make the container exit after the backup | `TRUE` |
| `TEMP_LOCATION` | Perform Backups and Compression in this temporary directory | `/tmp/backups/` |

View File

@@ -31,6 +31,8 @@ services:
- ./backups:/backup
#- ./post-script.sh:/assets/custom-scripts/post-script.sh
environment:
- TIMEZONE=America/Vancouver
- CONTAINER_ENABLE_MONITORING=FALSE
# - DEBUG_MODE=TRUE
- DB_TYPE=mariadb
- DB_HOST=example-db-host
@@ -43,7 +45,7 @@ services:
- CHECKSUM=SHA1
- COMPRESSION=GZ
- SPLIT_DB=FALSE
- CONTAINER_ENABLE_MONITORING=FALSE
restart: always
networks:
- example-db-network

View File

@@ -137,6 +137,7 @@ backup_couch() {
check_exit_code $target
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup ${DB_NAME}
}
@@ -167,6 +168,7 @@ backup_influx() {
ltarget=influx_${db}_${DB_HOST#*//}
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup $db
done
;;
@@ -187,6 +189,7 @@ backup_influx() {
ltarget=influx2_${db}_${DB_HOST#*//}
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup $db
done
;;
@@ -216,6 +219,7 @@ backup_mongo() {
check_exit_code $target
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup "${DB_NAME}"
}
@@ -231,6 +235,7 @@ backup_mssql() {
check_exit_code $target
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup $DB_NAME
}
@@ -271,6 +276,7 @@ backup_mysql() {
check_exit_code $target
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup $db
done
else
@@ -286,6 +292,7 @@ backup_mysql() {
check_exit_code $target
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup all
fi
}
@@ -322,6 +329,7 @@ backup_pgsql() {
check_exit_code $target
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup $db
done
else
@@ -345,6 +353,7 @@ backup_pgsql() {
check_exit_code $target
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup all
fi
}
@@ -376,6 +385,7 @@ backup_redis() {
check_exit_code $target
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup all
}
@@ -394,6 +404,7 @@ backup_sqlite3() {
cat "${TEMP_LOCATION}"/backup.sqlite3 | ${dir_compress_cmd} > "${TEMP_LOCATION}/${target}"
generate_checksum
move_dbbackup
check_exit_code "move backup file"
post_dbbackup $db
}
@@ -558,11 +569,12 @@ compression() {
PARALLEL_COMPRESSION_THREADS=1
fi
case "${COMPRESSION,,}" in
gz* )
if var_true "${GZ_RSYNCABLE}" ; then
gz_rsyncable=--rsyncable
fi
case "${COMPRESSION,,}" in
gz* )
compress_cmd="pigz -q -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS} ${gz_rsyncable}"
compression_type="gzip"
extension=".gz"
@@ -587,7 +599,7 @@ compression() {
target=${target}.xz
;;
zst* )
compress_cmd="zstd -q -q --rm -${COMPRESSION_LEVEL} -T${PARALLEL_COMPRESSION_THREADS} "
compress_cmd="zstd -q -q --rm -${COMPRESSION_LEVEL} -T${PARALLEL_COMPRESSION_THREADS} ${gz_rsyncable}"
compression_type="zstd"
dir_compress_cmd=${compress_cmd}
extension=".zst"
@@ -711,6 +723,7 @@ move_dbbackup() {
[[ ( -n "${S3_HOST}" ) ]] && PARAM_AWS_ENDPOINT_URL=" --endpoint-url ${S3_PROTOCOL}://${S3_HOST}"
silent aws ${PARAM_AWS_ENDPOINT_URL} s3 cp ${TEMP_LOCATION}/${target} s3://${S3_BUCKET}/${S3_PATH}/${target} ${s3_ssl} ${s3_ca_cert} ${S3_EXTRA_OPTS}
exit_code=$?
if var_true "${ENABLE_CHECKSUM}" ; then
silent aws ${PARAM_AWS_ENDPOINT_URL} s3 cp ${TEMP_LOCATION}/*.${checksum_extension} s3://${S3_BUCKET}/${S3_PATH}/ ${s3_ssl} ${s3_ca_cert} ${S3_EXTRA_OPTS}
fi
@@ -726,6 +739,7 @@ move_dbbackup() {
mv "${TEMP_LOCATION}"/"${target}" "${DB_DUMP_TARGET}"/"${target}"
silent blobxfer upload --mode file --remote-path ${BLOBXFER_REMOTE_PATH} --local-path ${DB_DUMP_TARGET}
exit_code=$?
rm -rf "${TEMP_LOCATION}"/*."${checksum_extension}"
rm -rf "${TEMP_LOCATION}"/"${target}"