databacker/mysql-backup

Unknown flag: --config-file

sgpublic opened this issue · 6 comments

First of all, thank you for your great work on mysql-backup, but I have some questions.

I deployed mysql-backup using docker-compose according to the description in the readme:

version: "3"
services:
  mysql-backup:
    image: databack/mysql-backup:1.0.0-rc1
    user: 1000:1000
    volumes:
      - /mnt/drive/OneDrive/Backups/MariaDB:/data
      - /mnt/core/var/tmp/mysql-backup:/var/tmp/mysql-backup
      - /mnt/drive/OneDrive/Backups/MySQL-Backup:/config
    networks:
      - mariadb-network
    restart: always
    entrypoint: ["/mysql-backup", "--config-file=/config/config.yaml"]

networks:
  mariadb-network:
    name: mariadb-network

And my config file:

database:
  server: mariadb
  port: 3306
  credentials:
    username: user
    password: xxxx
dump:
  targets: /data
  scripts:
    post-backup: /config/post-backup
tmp: /var/tmp/mysql-backup
logging: debug

But I got these error logs:

time="2023-11-20T07:06:44Z" level=fatal msg="unknown flag: --config-file"

So how should I configure it to use 1.0.0-rc1? Thank you!

deitch commented

Ah, yes. The README is updated for the most recent commit on the main branch, which is go-based, but the container image tags follow the naming convention:

  • <commit> - for a specific commit
  • master - for the most recent commit on the master branch
  • latest - for the most recent full semver (i.e. vX.Y.Z, and not release candidates or the like)

You would need to specifically choose the rc image, so:

    image: databack/mysql-backup:1.0.0-rc1

But you are doing that and still getting an error?

deitch commented

Ah, yes, I see something. PR coming soon. I will comment here on how to use it.

In the meantime, your yaml has an error in it; run it through http://yamllint.com

Ah, yes, I see something. PR coming soon. I will comment here on how to use it.

In the meantime, your yaml has an error in it; run it through http://yamllint.com

Indeed, this was my mistake. Thank you for pointing it out.

deitch commented

Try the latest image; it will get an -rc2 tag when I cut a new release candidate. In the meantime, use databack/mysql-backup:624330f6fd386315788d096915da4f5033186e0b and report back?

With commit 624330f6fd386315788d096915da4f5033186e0b, I got this logs:

DEBU[0000] starting dump                                
INFO[0000] beginning dump 2023-11-20T20:23:05+08:00     
Error: error backing up: failed to dump database: failed to dump database fireflyiii: sql: Scan error on column index 1, name "created_at": unsupported Scan, storing driver.Value type []uint8 into type *time.Time

I‘m using MariaDB v10.7.8, the type of column created_at is timestamp.

deitch commented

Any chance you can create an identical database (without fake data, of course)? I would like to try it manually. You can slack it to me.