mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-27 07:31:39 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
425383639a | ||
|
|
1e46996812 | ||
|
|
e71334564f |
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -8,8 +8,8 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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.yml@main
|
||||||
#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_arm64.yml@main
|
uses: tiredofit/github_actions/.github/workflows/default_amd64_arm64.yml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
4
.github/workflows/manual.yml
vendored
4
.github/workflows/manual.yml
vendored
@@ -9,8 +9,8 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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.yml@main
|
||||||
#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_arm64.yml@main
|
uses: tiredofit/github_actions/.github/workflows/default_amd64_arm64.yml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
|||||||
|
## 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>
|
## 3.9.3 2023-06-05 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
10
Dockerfile
10
Dockerfile
@@ -5,7 +5,8 @@ FROM docker.io/tiredofit/${DISTRO}:${DISTRO_VARIANT}
|
|||||||
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
|
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
|
||||||
|
|
||||||
### Set Environment Variables
|
### 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 \
|
MSSQL_VERSION=18.0.1.1-1 \
|
||||||
CONTAINER_ENABLE_MESSAGING=FALSE \
|
CONTAINER_ENABLE_MESSAGING=FALSE \
|
||||||
CONTAINER_ENABLE_MONITORING=TRUE \
|
CONTAINER_ENABLE_MONITORING=TRUE \
|
||||||
@@ -22,6 +23,7 @@ RUN source /assets/functions/00-container && \
|
|||||||
build-base \
|
build-base \
|
||||||
bzip2-dev \
|
bzip2-dev \
|
||||||
git \
|
git \
|
||||||
|
go \
|
||||||
libarchive-dev \
|
libarchive-dev \
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
@@ -33,7 +35,6 @@ RUN source /assets/functions/00-container && \
|
|||||||
package install .db-backup-run-deps \
|
package install .db-backup-run-deps \
|
||||||
aws-cli \
|
aws-cli \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
influxdb \
|
|
||||||
libarchive \
|
libarchive \
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
mariadb-connector-c \
|
mariadb-connector-c \
|
||||||
@@ -60,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 [ $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 ; \
|
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 && \
|
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 && \
|
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 && \
|
cd /usr/src/pbzip2 && \
|
||||||
@@ -85,6 +88,7 @@ RUN source /assets/functions/00-container && \
|
|||||||
/*.apk \
|
/*.apk \
|
||||||
/etc/logrotate.d/* \
|
/etc/logrotate.d/* \
|
||||||
/root/.cache \
|
/root/.cache \
|
||||||
|
/root/go \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/usr/src/*
|
/usr/src/*
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ services:
|
|||||||
- ./backups:/backup
|
- ./backups:/backup
|
||||||
#- ./post-script.sh:/assets/custom-scripts/post-script.sh
|
#- ./post-script.sh:/assets/custom-scripts/post-script.sh
|
||||||
environment:
|
environment:
|
||||||
|
- TIMEZONE=America/Vancouver
|
||||||
|
- CONTAINER_ENABLE_MONITORING=FALSE
|
||||||
# - DEBUG_MODE=TRUE
|
# - DEBUG_MODE=TRUE
|
||||||
- DB_TYPE=mariadb
|
- DB_TYPE=mariadb
|
||||||
- DB_HOST=example-db-host
|
- DB_HOST=example-db-host
|
||||||
@@ -43,7 +45,7 @@ services:
|
|||||||
- CHECKSUM=SHA1
|
- CHECKSUM=SHA1
|
||||||
- COMPRESSION=GZ
|
- COMPRESSION=GZ
|
||||||
- SPLIT_DB=FALSE
|
- SPLIT_DB=FALSE
|
||||||
- CONTAINER_ENABLE_MONITORING=FALSE
|
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- example-db-network
|
- example-db-network
|
||||||
|
|||||||
@@ -565,15 +565,16 @@ cleanup_old_data() {
|
|||||||
|
|
||||||
|
|
||||||
compression() {
|
compression() {
|
||||||
if var_false "${ENABLE_PARALLEL_COMPRESSION}" ; then
|
if var_false "${ENABLE_PARALLEL_COMPRESSION}" ; then
|
||||||
PARALLEL_COMPRESSION_THREADS=1
|
PARALLEL_COMPRESSION_THREADS=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "${COMPRESSION,,}" in
|
if var_true "${GZ_RSYNCABLE}" ; then
|
||||||
|
gz_rsyncable=--rsyncable
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "${COMPRESSION,,}" in
|
||||||
gz* )
|
gz* )
|
||||||
if var_true "${GZ_RSYNCABLE}" ; then
|
|
||||||
gz_rsyncable=--rsyncable
|
|
||||||
fi
|
|
||||||
compress_cmd="pigz -q -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS} ${gz_rsyncable}"
|
compress_cmd="pigz -q -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS} ${gz_rsyncable}"
|
||||||
compression_type="gzip"
|
compression_type="gzip"
|
||||||
extension=".gz"
|
extension=".gz"
|
||||||
@@ -598,7 +599,7 @@ compression() {
|
|||||||
target=${target}.xz
|
target=${target}.xz
|
||||||
;;
|
;;
|
||||||
zst* )
|
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"
|
compression_type="zstd"
|
||||||
dir_compress_cmd=${compress_cmd}
|
dir_compress_cmd=${compress_cmd}
|
||||||
extension=".zst"
|
extension=".zst"
|
||||||
|
|||||||
Reference in New Issue
Block a user