-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Description
Hi!
I have been using mysql-backup for several years on my docker swarm and this is an example of docker composer:
mysql:
image: mysql:8.0.22
command: --default-authentication-plugin=mysql_native_password --disable-log-bin
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${PWD}
- TZ=Europe/Rome
volumes:
- /var/lib/mysql:/var/lib/mysql
- /etc/mysql/conf.d:/etc/mysql/conf.d
networks:
- db-net
ports:
- target: 3306
protocol: tcp
deploy:
replicas: 1
backup-mysql:
image: databack/mysql-backup:master
restart: always
volumes:
- /var/mysqldump:/db
- /etc/localtime:/etc/localtime:ro
environment:
- DB_DUMP_TARGET=/db
- DB_SERVER=mysql
- DB_PORT=3306
- DB_USER=root
- DB_PASS=${PWD}
- DB_DUMP_FREQ=1440
- DB_DUMP_BEGIN=0936
networks:
- db-net
depends_on:
- mysql
deploy:
replicas: 1
the container starts but immediately terminates with a syntax error in the mysql-backup command:
Backup or restore one or more mysql-compatible databases.
In addition to the provided command-line flag options and environment variables,
when using s3-storage, supports the following AWS options:
AWS_ACCESS_KEY_ID: AWS Key ID
AWS_SECRET_ACCESS_KEY: AWS Secret Access Key
AWS_REGION: Region in which the bucket resides
AWS_ENDPOINT_URL: Endpoint URL to use instead of default s3.<region>.amazonaws.com
AWS_PATH_STYLE: Use path-style URLs for S3 requests instead of virtual-hosted-style URLs
Usage:
mysql-backup [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
dump backup a database
help Help about any command
prune prune older backups
restore restore a dump
Flags:
--aws-access-key-id string Access Key for s3 and s3 interoperable systems; ignored if not using s3.
--aws-endpoint-url string Specify an alternative endpoint for s3 interoperable systems e.g. Digitalocean; ignored if not using s3.
--aws-path-style Use path-style addressing of buckets instead of default virtual-host-style; ignored if not using s3.
--aws-region string Region for s3 and s3 interoperable systems; ignored if not using s3.
--aws-secret-access-key string Secret Access Key for s3 and s3 interoperable systems; ignored if not using s3.
--config-file string config file to use, if any; individual CLI flags override config file
--debug set log level to debug, equivalent of --verbose=1; if both set, --version always overrides
-h, --help help for mysql-backup
--pass string password for database server
--port int port for database server (default 3306)
--server string hostname for database server
--smb-domain string SMB domain
--smb-pass string SMB username
--smb-user string SMB username
--trace-stderr trace to stderr, in addition to any configured telemetry
--user string username for database server
-v, --verbose int set log level, 1 is debug, 2 is trace
Use "mysql-backup [command] --help" for more information about a command.
looking at the code I see that the backup command is launched with the environment variable $@ (${NICE_CMD} /mysql-backup $@) but I don't understand who passes the list of parameters because in the dockerfile the entrypoint is without parameters: ENTRYPOINT ["/entrypoint"]
if I use the databack/mysql-backup:v0.12.0 version instead everything works regularly.
Can you help me understand what I'm doing wrong?
Metadata
Metadata
Assignees
Labels
No labels