[SOLVED] Modify Backup/Restore options

Status
Not open for further replies.

SilkBC

Joined
Dec 2, 2011
Messages
9
Reaction score
0
Hello,

I need to modify the "mysqldump" (for backup) and "mysql" (for restore) options of the backup script. I just imported a very large amount of data into the "pinsets" table (the database increased in size by about 45MB). When I try to perform a backup, it fails to dump the database saying that it exceeded "max_allowed"packet", so I need to add "--max_allowed_packet=100M" to the "mysqldump" and "mysql" options (I know for a fact that this option results in successful dump and restore of the DB, as I have done it from the command line)

I found the 'backupengine' script and on the "mysqldump" lines, I added '--max_allowed_packet=100M' just before the '-h localhost' part. I then went and performed a backup, but it resulted in the following error for each database (I am just posting the one for the asterisk database):

Code:
INFO: backing up component asterisk/as_db...
INFO: backing up component asterisk/as_db/mysqldb_asterisk...
Unknown suffix '-' used for variable 'max_allowed_packet' (value '-h')
Warning: option 'max_allowed_packet': unsigned value 0 adjusted to 4096
mysqldump: Error while setting value '-h' to 'max_allowed_packet'
ERR: asterisk/as_db/mysqldb_asterisk: failed to dump data for database asterisk

It appears as though even though the mysqldump argeument is specifying '-h localhost', it is expecting the very first argument to be the host parameter?

Any ideas on how to edit the backupengine script to add my extra argument to it?

Thanks! :-)

-SilkBC
 
Re:Modify Backup/Restore options

OK, no need to worry about this. I added a section called [mysqldump] into '/etc/my.cnf' and added 'max_allowed_packet=100M' to it. I have been able to perform a successful full backup.

I added the same thing to my [mysqld] section, and presume it will work; unfortuneately I can;t really test that :-(

-SilkBC
 
why don't you post that over at bugs

not actually a bug as in broken, but I think that is the best way to offer the idea that a change is needed to work correctly with large sized implementations
 
Status
Not open for further replies.

Forum statistics

Threads
111,859
Messages
589,431
Members
164,699
Latest member
CLTedu