Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize documentation #15

Open
jwillmer opened this issue Sep 4, 2018 · 1 comment
Open

Optimize documentation #15

jwillmer opened this issue Sep 4, 2018 · 1 comment

Comments

@jwillmer
Copy link
Contributor

jwillmer commented Sep 4, 2018

I have difficulties following the documentation. Questions I have:

  • How do I set the restore/backup command on the command line? The examples seam to be identical.
  • Is <CONTAINER>_ENV_MYSQL_DATABASE the same as MYSQL_DATABASE in my docker-compose or do I need to define a variable called exactly like this?

My docker-compose.yml

db:
    image: mysql/mysql-server
    container_name: database
    restart: always     
    environment:
        MYSQL_ROOT_PASSWORD: ${MYSQLROOTPW}
        MYSQL_DATABASE: ${MYSQLDB}
        MYSQL_USER: ${MYSQLUSER}
        MYSQL_PASSWORD: ${MYSQLPW}

backup:
    image: confirm/mysql-backup
    volumes:
        - ./data/backup:/backup
    links:
        - db
    restart: "no"
@domibarton
Copy link
Member

The environment variables for the mysql/mysql-server container are defined by the official MySQL image on docker hub. These are required to get the mysql container up and running. The backup container will (or should) pickup these env vars automatically when linked to the MySQL container.

Regarding the CLI, you should be able to run this docker command:

docker run --name my-backup --link my-mysql -v /var/mysql_backups:/backup confirm/mysql-backup

At least that worked for "older" Docker versions. Need to check out the other issues if there's a problem with this command today :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants