mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-23 14:13:43 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c81d8e2713 | ||
|
|
b808b35624 | ||
|
|
e060aeb0e5 | ||
|
|
03c16cc582 | ||
|
|
e45d916b00 |
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,3 +1,25 @@
|
||||
## 2.8.1 2021-09-01 <dave at tiredofit dot ca>
|
||||
|
||||
### Changed
|
||||
- Modernize image with updated environment varialbes from upstream
|
||||
|
||||
|
||||
## 2.8.0 2021-08-27 <dave at tiredofit dot ca>
|
||||
|
||||
### Added
|
||||
- Alpine 3.14 Base
|
||||
|
||||
### Changed
|
||||
- Fix for syntax error in 2.7.0 Release (Credit the1ts@github)
|
||||
- Cleanup image and leftover cache with AWS CLI installation
|
||||
|
||||
|
||||
## 2.7.0 2021-06-17 <dave at tiredofit dot ca>
|
||||
|
||||
### Added
|
||||
- MongoDB Authentication Database support (DB_AUTH)
|
||||
|
||||
|
||||
## 2.6.1 2021-06-08 <jwillmer@github>
|
||||
|
||||
### Changed
|
||||
|
||||
26
Dockerfile
26
Dockerfile
@@ -2,10 +2,10 @@ FROM tiredofit/alpine:3.14
|
||||
|
||||
### Set Environment Variables
|
||||
ENV MSSQL_VERSION=17.5.2.1-1 \
|
||||
ENABLE_CRON=FALSE \
|
||||
ENABLE_SMTP=FALSE \
|
||||
ENABLE_ZABBIX=TRUE \
|
||||
ZABBIX_HOSTNAME=db-backup
|
||||
CONTAINER_ENABLE_SCHEDULING=FALSE \
|
||||
CONTAINER_ENABLE_MESSAGING=FALSE \
|
||||
CONTAINER_ENABLE_MONITORING=TRUE \
|
||||
CONTAINER_NAME=db-backup
|
||||
|
||||
### Dependencies
|
||||
RUN set -ex && \
|
||||
@@ -16,6 +16,7 @@ RUN set -ex && \
|
||||
bzip2-dev \
|
||||
git \
|
||||
libarchive-dev \
|
||||
py3-pip \
|
||||
xz-dev \
|
||||
&& \
|
||||
\
|
||||
@@ -29,6 +30,7 @@ RUN set -ex && \
|
||||
pigz \
|
||||
postgresql \
|
||||
postgresql-client \
|
||||
python3 \
|
||||
redis \
|
||||
sqlite \
|
||||
xz \
|
||||
@@ -55,19 +57,15 @@ RUN set -ex && \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
&& \
|
||||
make && \
|
||||
make install && \
|
||||
\
|
||||
make && \
|
||||
make install && \
|
||||
pip3 install --upgrade pip && \
|
||||
pip3 install awscli && \
|
||||
\
|
||||
### Cleanup
|
||||
apk del .db-backup-build-deps && \
|
||||
rm -rf /usr/src/* && \
|
||||
rm -rf /tmp/* /var/cache/apk/*
|
||||
|
||||
RUN apk add --no-cache \
|
||||
python3 \
|
||||
py3-pip \
|
||||
&& pip3 install --upgrade pip \
|
||||
&& pip3 install awscli
|
||||
rm -rf /root/.cache /tmp/* /var/cache/apk/*
|
||||
|
||||
### S6 Setup
|
||||
ADD install /
|
||||
|
||||
@@ -35,6 +35,7 @@ case "$dbtype" in
|
||||
dbport=${DB_PORT:-27017}
|
||||
[[ ( -n "${DB_USER}" ) || ( -n "${DB_USER_FILE}" ) ]] && file_env 'DB_USER'
|
||||
[[ ( -n "${DB_PASS}" ) || ( -n "${DB_PASS_FILE}" ) ]] && file_env 'DB_PASS'
|
||||
;;
|
||||
"mysql" | "MYSQL" | "mariadb" | "MARIADB")
|
||||
dbtype=mysql
|
||||
dbport=${DB_PORT:-3306}
|
||||
@@ -496,7 +497,7 @@ print_debug "Backup routines Initialized on $(date)"
|
||||
esac
|
||||
|
||||
### Zabbix
|
||||
if var_true "$ENABLE_ZABBIX" ; then
|
||||
if var_true "$CONTAINER_ENABLE_MONITORING}" ; then
|
||||
print_notice "Sending Backup Statistics to Zabbix"
|
||||
silent zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.size -o "$(stat -c%s "${DB_DUMP_TARGET}"/"${target}")"
|
||||
silent zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.datetime -o "$(date -r "${DB_DUMP_TARGET}"/"${target}" +'%s')"
|
||||
|
||||
Reference in New Issue
Block a user