databacker/mysql-backup

How to create a backup copy of not only data and tables, but also functions and procedures?

GMELUM opened this issue · 1 comments

  mysql-master-backup:
    image: databack/mysql-backup
    container_name: mysql-backup
    restart: always
    environment:
      SINGLE_DATABASE: true
      DB_SERVER: mysql
      DB_PORT: 3306
      DB_USER: root
      DB_PASS: $MYSQL_PASSWORD
      DB_NAMES: $MYSQL_DATABASE
      DB_DUMP_FREQ: $INTERVAL
      DB_DUMP_TARGET:  "s3://$AWS_BUCKET/dumps/$MYSQL_DATABASE"
      AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
      AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
      AWS_REGION: $AWS_REGION
      AWS_ENDPOINT_URL: $AWS_ENDPOINT
      COMPRESSION: bzip2
    command: dump

Honestly, had not thought about it until now, mainly because no one asked. But it is a good thing to add. The legacy version did mysqldump without --routines. The more modern version would need the right templates added, but that shouldn't be too radically difficult.

Are you interesting in trying your hand at a PR?