Jeremiah's picture

I ran into the same problem.  I have a TurnKey LAMP 11.1 server running on VMware and I have been using TKLBAM to back it up to an in-house backup server.  The backups work great but when I tested the restore on a new TurnKey LAMP 11.1 vm the restore crashed with the same "Got a packet bigger than 'max_allowed_packet' bytes" error mentioned above.

If you don't want to permanently reconfigure your mysql server to do the restore you can login to your TKL server as root and run the following commands before running tklbam-restore.

# the following will set max_allowed_packet to 100MB
mysql -p -e 'SET GLOBAL max_allowed_packet=100*1024*1024;'

the following will verify the mysql server accepted the new setting
mysql -p -e 'SELECT @@global.max_allowed_packet;'

This setting will only last until the mysql server is restarted.

Liraz, I wonder if this can be incorporated into TKLBAM mysql.py somehow so this can be done without the end user knowing about it?  Thanks for looking into it.