WP-DB Backup 1.5 feed icon

wp-db-backup-1.5.zip

This version of WP-DB Backup should be better for everyone. The foreach warnings if you have no data should be gone -- if they're not, please let me know.

This version also better handles large databases. The database backup is spooled, 10 rows at a time, to the server's hard disk. If the final backup file is greater than 2 megabytes in size, gzip compress will not be used, even if you ask for it. A friendly message will inform you that the database was too big to gzip, and that the file remains uncompressed.

Finally, this version should fully support internationalization. If you translate the included wp-db-backup.pot file, please send it to me so that I can make it make it available to others!

Many thanks to Owen, Lorelle, and Stefano for their contributions!


  • Trae
    I'm having better luck with version 1.4, but... Something you might consider, is a way to let it be run by a real Cron job. If you already have this setup let me know.
  • July 22nd, 2005
  • July 22nd, 2005
  • Big Dog
    This is a great plug in. I have 1.4. Is there anything special I need to do to install 1.5? I tried replacing the file but I get an error message. Thanks, BD
  • Jack
    The plugin works ok, but I receive the following warnings on top of my adminpages when I click the backup button: Warning: Invalid argument supplied for foreach() in /srv/jackdaw/www/www.spoenk.nl/wordpress/wp-content/plugins/wp-db-backup.php on line 177 Warning: Cannot modify header information - headers already sent by (output started at /srv/jackdaw/www/www.spoenk.nl/wordpress/wp-content/plugins/wp-db-backup.php:177) in /srv/jackdaw/www/www.spoenk.nl/wordpress/wp-admin/admin.php on line 10 etc. etc. for line 11 - 13 Any idea what can be causing this? I'm using version 1.5.1 of wordpress and the latest version of this plugin.
  • July 24th, 2005
  • July 25th, 2005
  • July 25th, 2005
  • D'Arcy Norman
    Love the plugin. It's the only way I can automate my MySQL backups for my blog since moving to GoDaddy. Excellent work. When I set it to automatically backup and email the database, is there a way to have it include all tables, rather than just the core wp_ tables? I can do that manually, but it doesn't seem to "stick" for the automated backups...
  • André
    I got the same errormsg. as Jack.
  • Frank
    German Language File for DB-Backup, very nice Plugin: http://www.bueltge.de/datenbank-sichern/9/ http://www.bueltge.de/wp-content/plugins/wp-db-backup-de_DE.po http://www.bueltge.de/wp-content/plugins/wp-db-backup-de_DE.mo
  • skippy
    D’Arcy Norman: I'm not going to provide automated backup of non-core tables, and I say exactly why in the wp-db-backup.txt file. The core tables should almost always be able to be backed up, but plugins and other tables can vary wildly in size, and as such might break the backups. For every person helped with automatic backup of all table, someone else will send me an email saying that their backups never work because they're trying to include some stats table in their backups. Jack and André: the "headers already sent" message is a spill-over error from the real problem: the foreach command fails because one of your tables doesn't contain any data. So far, this has almost always been caused because there were no comments.
  • July 27th, 2005
  • André
    I get that error when i try to include any other table in the backup. And i have chedked that they are not empty. I don't get any errors when i only backup the core tables.
  • jack
    Hello Skippy, That must be it. I'm not using comments on my site. Does it 'hurt' my backups? I'm using your plugin now, together with wpcron. I haven't tested the backup yet, but with wpcron it works fantastic. Everyday I get the backup delivered in my postbox. How convenient! And safe! I just have to remember to save those attachments :D. Thanks! Jac
  • Nick
    Jack, This is a great use for a Gmail account. ;-)
  • July 27th, 2005
  • ck
    Hi Skippy, I am trying to use your plug-in and get this message:WARNING: Your backup directory is NOT writable! /home/content/c/h/e/cherylkemp/html/blog/wp-content/backup/ Before I do anything stupid, I just want to make sure this is no big deal. It sounds as if I download it to my computer or email it that everything should be fine? Currently have godaddy hosting and I would like to get this backed up properly before I make the switch. Thanks!
  • skippy
    ck: http://wordpress.org/support/topic/39017#post-229609 As long as your database is comparatively small (under, say, 2 megs) you should be okay. Version 1.5 of wp-db-backup keeps the whole backup in memory. A new version (due very very soon) will spool the backup table by table to a file in the /wp-content/backup directory. This file will be deleted after it is mailed to you. It's probably best to grant write permission to your backup directory now, so that you're ready for the new version.
  • August 3rd, 2005
  • kaufman
    Hi Skippy, thanks for all of your hard work on this. I just installed 1.5, and I'm getting a ton of these type of errors: Warning: fwrite(): supplied argument is not a valid stream resource in /home/terrik/www/www/wordpress/wp-content/plugins/wp-db-backup.php on line 122 I'd finally gotten the directory permissions set right, as I DID get rid of one error at the beginning (regarding fopen), but the rest are still coming up. Down further in the list of errors are a couple regarding invalid SQL. According to my host, they run MySQL 4.0.25 and PHP 4.3.11 . Do you think that it's at all possible that this is a MySQL and/or PHP version error? thanks! kaufman
  • Victor Bracco
    Hi Skippy. Look at please: Warning: Missing argument 3 for wp_db_backup() in ...wp-content/plugins/wp-db-backup.php on line 200 Warning: Invalid argument supplied for foreach() in ...wp-content/plugins/wp-db-backup.php on line 177 Warning: Invalid argument supplied for foreach() in ...wp-content/plugins/wp-db-backup.php on line 177 All warning at the same time, at the first time I'm in the site. If I reload the web, the warning disapear.
  • kaufman
    I figured out part of my problem - I only get the errors when I try to include any non-core tables. Setting this up with WP-Cron was actually a breeze, and works great - Just wish that I could get the non-core tables to backup manually. thanks! kaufman
  • August 5th, 2005
  • August 8th, 2005
  • Jack
    hey, I have made a backup but when ever I try to load it through PHPMyAdmin is gives me this error: Error SQL query: # # Table structure of table `wp_categories` # CREATE TABLE `wp_categories` ( `cat_ID` bigint( 20 ) NOT NULL AUTO_INCREMENT , `cat_name` varchar( 55 ) NOT NULL default '', `category_nicename` varchar( 200 ) NOT NULL default '', `category_description` longtext NOT NULL , `category_parent` bigint( 20 ) NOT NULL default '0', `category_count` bigint( 20 ) NOT NULL default '0', PRIMARY KEY ( `cat_ID` ) , KEY `category_nicename` ( `category_nicename` ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1; MySQL said: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 10 Any help would be appreciated
  • Martin
    I got it loaded and activated the plugin. Something hapned and now the page can't be viewed and I can't access the admin page. Not sure what I did. Any suggestions?
  • Martin
    I was able to back into the site and deactivate. Everything is now back. Still not sure what happened.

About | Policies | skippy.net