Skip to content

fix: packet for query is too large error in restore#503

Merged
deitch merged 1 commit intodatabacker:masterfrom
akkuman:fix/restore-support-mpt
Mar 10, 2026
Merged

fix: packet for query is too large error in restore#503
deitch merged 1 commit intodatabacker:masterfrom
akkuman:fix/restore-support-mpt

Conversation

@akkuman
Copy link
Contributor

@akkuman akkuman commented Feb 26, 2026

environment:

root@9db45bba0a23:/# mariadb -uroot -p"${MARIADB_ROOT_PASSWORD}" --execute "SHOW VARIABLES LIKE 'max_allowed_packet';"
+--------------------+------------+
| Variable_name      | Value      |
+--------------------+------------+
| max_allowed_packet | 1073741824 |
+--------------------+------------+
mariadb --max-allowed-packet=1G -uroot -p"${MARIADB_ROOT_PASSWORD}" < data_2026-02-26T10\:19\:47+08\:00.sql

successful

but

./mysql-backup restore --server 127.0.0.1 --port 3307 --user root --pass 'password' --target "$(pwd)" db_backup.tgz
INFO[0000] beginning restore                             run=2e25518b-1aef-4aa8-846d-115ee757194d
Error: error restoring: failed to restore database: failed to restore database: packet for query is too large. Try adjusting the `Config.MaxAllowedPacket`
FATA[0388] error restoring: failed to restore database: failed to restore database: packet for query is too large. Try adjusting the `Config.MaxAllowedPacket`

after change

./mysql-backup restore --max-allowed-packet 1073741824 --server 127.0.0.1 --port 3307 --user root --pass 'password' --target "$(pwd)" db_backup.tgz
INFO[0000] beginning restore                             run=a803e093-77ce-49eb-9295-d5af606d2957
INFO[0486] Restore complete

@akkuman akkuman force-pushed the fix/restore-support-mpt branch from 272519b to 3615798 Compare February 27, 2026 01:23
Signed-off-by: Akkuman <akkumans@qq.com>
@deitch deitch force-pushed the fix/restore-support-mpt branch from 3615798 to e85baef Compare March 10, 2026 13:11
Copy link
Collaborator

@deitch deitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you. I rebased, waiting for CI to be green, and will merge.

@deitch
Copy link
Collaborator

deitch commented Mar 10, 2026

Hmm, CI failed. I reran it, but it would help if you can look and see if it is relevant to your changes or not.

@deitch deitch merged commit 7530a3a into databacker:master Mar 10, 2026
4 of 5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants