Skip to content

Restore fails with bufio.Scanner: token too long when importing large dump files #469

@JiangMing-GitHub

Description

@JiangMing-GitHub

Describe the bug

When restoring a MySQL backup using this image, the process fails with the following error:
time="2025-08-27T09:47:41+08:00" level=info msg="beginning restore" run=f7eafacc-4fbf-48a1-8555-02106e1a7d73 Error: error restoring: failed to restore database: failed to restore database: bufio.Scanner: token too long time="2025-08-27T09:48:28+08:00" level=fatal msg="error restoring: failed to restore database: failed to restore database: bufio.Scanner: token too long"

To Reproduce

Steps to reproduce:

  1. Backup a database using mysqldump with --extended-insert enabled (default).
  2. Try to restore using this image:
    docker run --rm \
      -v /usr/backups/mysql-backup:/usr/backups/mysql-backup \
      -e DB_USER=root \
      -e DB_PASS=xxxx \
      -e DB_SERVER=10.233.81.191 \
      -e DB_PORT=3306 \
      -e DB_RESTORE_TARGET=/usr/backups/mysql-backup \
      databack/mysql-backup:master \
      restore db_backup_xxx.tgz
    

🙏 Would it be possible to address this in a future release?
This tool is really helpful in our workflow, and resolving this limitation would make it even more reliable.
Thanks a lot for your great work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions