Compare commits

..

6 Commits

Author SHA1 Message Date
6c0832c0f0 mariadb base images are doomed
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (amd64, 10.11) (push) Successful in 16s
Container Publish / build-image (amd64, 11.4) (push) Successful in 1m35s
Container Publish / build-image (amd64, 10.6) (push) Successful in 2m30s
Container Publish / build-image (amd64, 11.8) (push) Successful in 3m7s
Container Publish / build-image (arm64, 10.11) (push) Successful in 14s
Container Publish / build-image (arm64, 10.6) (push) Successful in 13s
Container Publish / build-image (arm64, 11.4) (push) Successful in 13s
Container Publish / build-image (arm64, 11.8) (push) Successful in 12s
Container Publish / update docker manifest (10.11) (push) Successful in 10s
Container Publish / update docker manifest (10.6) (push) Successful in 10s
Container Publish / update docker manifest (11.4) (push) Successful in 10s
Container Publish / update docker manifest (11.8) (push) Successful in 10s
2025-09-29 23:51:41 +02:00
72680745ba reorg
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (arm64, 10.11) (push) Successful in 23s
Container Publish / build-image (arm64, 10.6) (push) Successful in 21s
Container Publish / build-image (amd64, 10.11) (push) Successful in 1m16s
Container Publish / build-image (arm64, 11.4) (push) Successful in 1m41s
Container Publish / build-image (amd64, 10.6) (push) Successful in 1m16s
Container Publish / build-image (arm64, 11.8) (push) Successful in 1m36s
Container Publish / build-image (amd64, 11.4) (push) Successful in 1m40s
Container Publish / build-image (amd64, 11.8) (push) Successful in 1m31s
Container Publish / update docker manifest (10.11) (push) Successful in 10s
Container Publish / update docker manifest (11.4) (push) Successful in 10s
Container Publish / update docker manifest (10.6) (push) Successful in 10s
Container Publish / update docker manifest (11.8) (push) Successful in 10s
2025-09-29 21:24:46 +02:00
fe1dd2c711 build on wednesday 2025-09-29 21:15:40 +02:00
411aaa7418 build all push 2025-09-29 21:15:28 +02:00
be9f7133a8 docs
Some checks failed
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (arm64, 10.11) (push) Successful in 1m34s
Container Publish / build-image (arm64, 10.6) (push) Successful in 1m23s
Container Publish / build-image (arm64, 11.4) (push) Successful in 1m35s
Container Publish / build-image (arm64, 11.8) (push) Successful in 1m32s
Container Publish / build-image (amd64, 10.11) (push) Successful in 2m48s
Container Publish / build-image (amd64, 10.6) (push) Successful in 3m17s
Container Publish / build-image (amd64, 11.4) (push) Successful in 3m16s
Container Publish / build-image (amd64, 11.8) (push) Successful in 2m46s
Container Publish / update docker manifest (10.11) (push) Successful in 10s
Container Publish / update docker manifest (10.6) (push) Successful in 8s
Container Publish / update docker manifest (11.4) (push) Successful in 9s
Container Publish / update docker manifest (11.8) (push) Successful in 9s
Vulnerability Scan / Daily Vulnerability Scan (amd64, 10.11) (push) Failing after 7s
Vulnerability Scan / Daily Vulnerability Scan (arm64, 10.11) (push) Failing after 6s
Vulnerability Scan / Daily Vulnerability Scan (amd64, 10.6) (push) Failing after 6s
Vulnerability Scan / Daily Vulnerability Scan (arm64, 10.6) (push) Failing after 6s
Vulnerability Scan / Daily Vulnerability Scan (amd64, 11.8) (push) Failing after 6s
Vulnerability Scan / Daily Vulnerability Scan (arm64, 11.4) (push) Failing after 6s
Vulnerability Scan / Daily Vulnerability Scan (arm64, 11.8) (push) Failing after 6s
Vulnerability Scan / Daily Vulnerability Scan (amd64, 11.4) (push) Failing after 47s
2025-06-19 07:18:19 +02:00
4a784721dd added upgrades 2025-06-18 23:58:47 +02:00
11 changed files with 10 additions and 16 deletions

View File

@@ -7,10 +7,8 @@ env:
on:
push:
tags:
- '*'
schedule:
- cron: "0 12 3 * *"
- cron: "0 12 * * 3"
workflow_dispatch:
workflow_call:
workflow_run:

View File

@@ -6,8 +6,8 @@ env:
REPOSITORY: paspo/mariadb-backup-slave
on:
schedule:
- cron: "0 14 * * *"
# schedule:
# - cron: "0 14 * * *"
workflow_dispatch:
workflow_call:
workflow_run:

View File

@@ -2,16 +2,12 @@ ARG MARIA_VERSION
FROM mariadb:${MARIA_VERSION}
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -q -y cron sudo automysqlbackup
COPY mysql.cnf /etc/mysql/mariadb.conf.d/settings.cnf
COPY maria-include.cnf /etc/mysql/conf.d/maria-include.cnf
COPY custom.cnf /etc/mysql/mariadb.conf.d/custom.cnf
COPY rootfs /
RUN chown mysql:mysql /etc/mysql/mariadb.conf.d/custom.cnf
COPY docker-entrypoint-new.sh /usr/local/bin/
COPY healthcheck.sh /usr/local/bin/
COPY automysqlbackup /etc/default
COPY sudoers /etc/sudoers.d/mysudoers
HEALTHCHECK --interval=30s --start-period=30s --timeout=3s \
CMD /usr/local/bin/healthcheck.sh

View File

@@ -79,7 +79,7 @@ docker-compose up -d
Create the database:
```bash
docker exec my-container sh -c 'echo "create database aWordpressDatabase;" | exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD"'
docker-compose exec backup-slave sh -c 'echo "create database aWordpressDatabase;" | exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD"'
```
### Freeze the master
@@ -109,7 +109,7 @@ The classic way is preferred when you have a big database because it locks the d
Now, we need to import the backup from the master, so as we started the slave as readwrite, we can now do this on the slave:
```bash
docker exec my-container sh -c 'mysqldump -C --lock-tables=false --quick -u repluser -h master.host --password="aRandomPassword" aWordpressDatabase | mysql -u root -p"$MYSQL_ROOT_PASSWORD" aWordpressDatabase'
docker-compose exec backup-slave sh -c 'mysqldump -C --lock-tables=false --quick -u repluser -h master.host --password="aRandomPassword" aWordpressDatabase | mysql -u root -p"$MYSQL_ROOT_PASSWORD" aWordpressDatabase'
```
Replace **my-container**, **repluser**, **master.host**, **aRandomPassword**, **aWordpressDatabase** with the correct values.
@@ -144,7 +144,7 @@ docker cp thedump.sql.gz my-container:/thedump.sql.gz
Then we import it:
```bash
docker exec my-container sh -c 'zcat /thedump.sql.gz | mysql -u root -p"$MYSQL_ROOT_PASSWORD" aWordpressDatabase'
docker-compose exec backup-slave sh -c 'zcat /thedump.sql.gz | mysql -u root -p"$MYSQL_ROOT_PASSWORD" aWordpressDatabase'
docker exec my-container sh -c 'rm /thedump.sql.gz'
```