From 405bd4af1585bc696f893de889528a15c9670563 Mon Sep 17 00:00:00 2001 From: einarf Date: Fri, 10 Nov 2023 22:24:29 +0100 Subject: [PATCH] Various tweaks * Use --no-tablespaces in mysqldump * Dump to 0.7.0 * pin docker version * Include missing packages in setup.py --- docker-compose.yaml | 21 +++++++++++++++++---- src/restic_compose_backup/containers_db.py | 2 ++ src/setup.py | 9 ++++++--- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 1edf6f8..63bdf45 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,7 +4,7 @@ services: build: ./src env_file: - restic_compose_backup.env - - alerts.env + # - alerts.env labels: restic-compose-backup.volumes: true restic-compose-backup.volumes.include: 'src' @@ -32,7 +32,7 @@ services: - SOME_VALUE=test - ANOTHER_VALUE=1 - mysql: + mysql5: image: mysql:5 labels: restic-compose-backup.mysql: true @@ -42,7 +42,19 @@ services: - MYSQL_USER=myuser - MYSQL_PASSWORD=mypassword volumes: - - mysqldata:/var/lib/mysql + - mysqldata5:/var/lib/mysql + + mysql8: + image: mysql:8 + labels: + restic-compose-backup.mysql: true + environment: + - MYSQL_ROOT_PASSWORD=my-secret-pw + - MYSQL_DATABASE=mydb + - MYSQL_USER=myuser + - MYSQL_PASSWORD=mypassword + volumes: + - mysqldata8:/var/lib/mysql mariadb: image: mariadb:10 @@ -68,7 +80,8 @@ services: - pgdata:/var/lib/postgresql/data volumes: - mysqldata: + mysqldata5: + mysqldata8: mariadbdata: pgdata: diff --git a/src/restic_compose_backup/containers_db.py b/src/restic_compose_backup/containers_db.py index ea9c66e..52f77c3 100644 --- a/src/restic_compose_backup/containers_db.py +++ b/src/restic_compose_backup/containers_db.py @@ -41,6 +41,7 @@ class MariadbContainer(Container): f"--port={creds['port']}", f"--user={creds['username']}", "--all-databases", + "--no-tablespaces", ] def backup(self): @@ -100,6 +101,7 @@ class MysqlContainer(Container): f"--port={creds['port']}", f"--user={creds['username']}", "--all-databases", + "--no-tablespaces", ] def backup(self): diff --git a/src/setup.py b/src/setup.py index 47cd5e1..1375b36 100644 --- a/src/setup.py +++ b/src/setup.py @@ -3,12 +3,15 @@ from setuptools import setup, find_namespace_packages setup( name="restic-compose-backup", url="https://github.com/ZettaIO/restic-compose-backup", - version="0.6.3", + version="0.7.0", author="Einar Forselv", author_email="eforselv@gmail.com", - packages=find_namespace_packages(include=['restic_compose_backup']), + packages=find_namespace_packages(include=[ + 'restic_compose_backup', + 'restic_compose_backup.*', + ]), install_requires=[ - 'docker==6.1.*', + 'docker~=6.1.3', ], entry_points={'console_scripts': [ 'restic-compose-backup = restic_compose_backup.cli:main',