Page 1 of 1

Backup plugin fails with large SQL table

Posted: Wed Jun 27, 2007 3:18 pm
by gwilsonmail
I've been using the backup plugin and all has been well for some time.

I updated to the latest s9y 1.2-beta2 via svn and checked to see if the backups were occurring locally. According to the logs the html backup is working regularly but the sql table backup is not.

When i use the "Start Backup ..." button (to backup the sql tables) from the s9y admin home page -> backup interface ->

I get
Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/.domani/xxxxx/pixelgadgets.com/blog/include/db/mysql.inc.php on line 84

Fatal error: Cannot use string offset as an array in /home/.domani/xxxxx/pixelgadgets.com/blog/plugins/serendipity_event_backup/serendipity_event_backup.php on line 400
Also the backup is set for every 6 hrs, but i only get one backup file per day.

Re: Backup plugin fails

Posted: Wed Jun 27, 2007 4:34 pm
by garvinhicking
Hi!

That SQL error message seems to say that the result set is too large to be transfered to PHP. Seems your database size has exceeded the magic boundary and can no longer be fetched within the PHP mechanism of the backup plugin... :-/

Regards,
Garvin

Posted: Wed Jun 27, 2007 4:40 pm
by gwilsonmail
Thanks gavin. suspect that limit is around 12 MB on my server.

Any option to save the database in sections?

Posted: Wed Jun 27, 2007 4:40 pm
by garvinhicking
Hi!

That would mean a rework of the backup plugin, but it currently has no maintainer (also because it's butt-ugly).

I really recommend using crontab-scheduled mysqldump commands, or using phpmYAdmin to export dumps. :-/

Regards,
Garvin

Posted: Wed Jun 27, 2007 6:15 pm
by gwilsonmail
what would teh command syntax look like for a cron job?

i can set these up easily using my hosting control panel.

thanks,

Posted: Thu Jun 28, 2007 9:54 am
by garvinhicking
Hi!

simply

Code: Select all

mysqldump --add-drop-table --add-drop-database --add-locks --complete-insert --create-options --host=[your host] --password=[your password] --user=[your username] [your serendipity database name] > your_dumpfile.sql
You need to enter your DB details there, and you might need to enter the complete path to mysqldump. And you will need to indicate your cronjob how often it should run. I don't know your control panel, but in an /etc/crontab file it would look like:

Code: Select all

30 2 * * * root /usr/local/mysql/bin/mysqldump > mydumpfile.sql

HTH,
Garvin