Wordpress Plugin: DBC Backup

Blog Stuff Add comments

So after last night’s terrible loss of data I decided something had to be done. My host has already arranged for binary backups to be made but I thought there must be some wordpress plugins that keep a copy of your wordpress tables so I began my search. There were a couple that caught my attention so I installed them and had a play and now I’ve made my choice, DBC Backup.

It can be found at http://wordpress.org/extend/plugins/dbc-backup/ I tried three in total one was BackUpWordPress but I had to abandon that because it wouldn’t let me save my backups outside the webroot. Another was WP-DB-Backup which required that I ‘temporarily’ changed the permissions of my
wp-content folder so it could create its own for backups. The hassle of installing that one put me off it. One of them although I don’t remember which had a paypal donation button on all the pages which I didn’t really like either. I think that’s the sort of thing that you put on your website not in a plugin but that’s just my opinion.

Finally I settled on DBC Backup because;

  • It’s nice and clean
  • It creates backups at set intervals or manually
  • It doesn’t handle restoration just the dump
  • It backs up all the tables in the database not just the wordpress ones
  • I can configure the backups to be stored outside the webroot

My only issue was that it decided to create its menu using add_menu_page(…) which creates a top-level page. I thought this was unnecessary considering the plugin only has one page to interact with and the wordpress codex recommends that you only add these for plugins which require many screens.

I much preffered the idea of it being a sub-menu of Manage (edit.php) so I decided to edit the plugin. The desired modification takes place in the dbcbackup.php file in the DBC plugin directory. I made the following changes;

  • On line 80
    • Change “if(function_exists(’add_menu_page))”
    • To “if(function_exists(’add_submenu_page))”
  • On line 82
    • Change “add_menu_page(xxx)”
    • To “add_submenu_page(’edit.php’, xxx)”
    • Where xxx represents the existing arguments to the function

The arguments to the function add_submenu_page are the same as for add_menu_page except that there is a new initial argument that specifies which page to add the sub-menu to. I also changed the ‘DB Cron Backup’ value to just ‘Backup’ because that’s all I wanted to see in the sub-menu.

That’s it, I think its a great plugin and now that I’ve got it set up how I like it I’m happy.

2 Responses to “Wordpress Plugin: DBC Backup”

  1. Joe Says:

    Nice review; but…

    When I install DBC version 1.1 and try to access the options, I get an error:

    Parse error: syntax error, unexpected $end in /wp-content/plugins/dbc-backup/dbcbackup-options.php on line 260

    Which version did you install?

  2. klkl Says:

    Hi Joe,

    I installed 1.1 too.

    I’m not sure how much you know about PHP but that error means that the PHP parser wasn’t expecting the end of the script and usually occurs when curly braces don’t match properly.

    Did you edit the dbcbackup-options.php file at all?
    If you like you can email me the file and I’ll have a look at it for you.

Leave a Reply

WP Theme & Icons by N.Design Studio | Akismet has gobbled 358 spam comments...Mmmm Tasty :-)
Entries RSS Comments RSS Log in