Restoring large MySql DB’s with BigDump

So, I recently blew up my Drupal installation and was caught with my pants down and no DB backup…

Well, as you can tell, I've re-installed and configured it again. Now I needed to back it up. Well I need to create an automated backup strategy, but that starts with a single backup. The concept it straightforward, and certainly the path is well laid out. Step 1: Export the MySql database using the MySql PHPAdmin site my host provides. Step 2: Zip up the site files while I'm at it. Easy peezy lemon squeezy!

Now, did it work? How do I restore this stuff? File-system, no problem, I can just unzip from my site archive directory on the server. But what about this database? Well MySql PHPAdmin absolutely let's you upload sql files to execute so I created a temp database for testing purposes and uploaded my gzipped sql files (1.5 MB in size) [the limit, at least at my hosts, is 2 MB]. I got some variety of error after it churned for a while. Hmm, very disappointing.

At this point, I extracted the sql from the gzip and decided to just try it that way, perhaps the de-compressor for the MySql PHPAdmin tool was having some issues. Well at this point I noticed the DB sql is 15 MB, and it's a pretty lite install of Drupal, most content is my imported years worth of blog entries. And it's well above the 2 MB upload limit for the admin tool.

My first inclination is to search for some mysql using script that I can run from the command line. I then stumbled on BigBump ( It's a batch updating php script that can be invoked from the browser. You simply place it on your site, upload your sql script and point it at the DB (sadly the DB config is in the PHP script so it must be pre-configured for each DB you want to use it on) then hit it with a web browser and tell it to go. Leave your browser open and it works, like a charm!

Give it a shot if you find yourself in a similar situation!

Trackback URL for this post:

Oooops, I blew up Drupal

Well, everything was going very well with my Drupal installation. I've got TinyMCE working as my WYSIWYG editor, and added a bunch of other modules to do this, that, and the other. And all was well, I had encoutered a module or two that didn't work correctly and it was simple enough to remove them so I was pretty pleased. And apparently lulled into a false sense of security.

I ended up having to install about 5 modules to allow a 6th to work and I turned them all on at once and… *KA-BOOM* a module load error occurred and blew out parts of my database… The site still functioned but all permissions were wiped. 

Very disappointing… Of course I should have backed up the database before doing this sort of thing, but… I hadn't and that's exactly what I get. I've cautioned clients to back up frequently and religiously and here I am not listening, I know better. I got swept up in the ease of installation and configuration in my very first test run that I got complacent. I didn't feel that the site was in it's initial “1.0” state and so didn't need a back-up just yet. It went so well, I switched over the blog features of my site to it. That switch to production should have made me back it up at that point… Alas.

However, the whole incident did afford me the opportunity to re-install Drupal. I should say, reconfigure, the file-system portion of Drupal was completely intact. Again it went relatively painlessly, and having had some experience on administering the system, it was a lot easier to do! Easily took me 1/2 the time. Which in real terms put's it at about 4 hours for a fresh install and config of a small Drupal site using a WordPress Blog as a data source for content. Not too bad, not too bad at all!

The irony is, I was installing the “Chaos Tools” module and it's dependencies so that I could investigate the “Bulk Export” utilities that CTools adds. Primarily for back-up plans…

All in all I'm grateful for the experience, I just wish I had planned it!

Trackback URL for this post:

Restoring large MySql DB's with BigDump

So, I recently blew up my Drupal installation and was caught with my pants down and no DB backup… Well, as you can tell, I've re-installed and configured it again. Now I needed to back it up. Well I need to create an automated backup strategy, but that

One day with Drupal

A couple of days ago I stumbled across the reporting on the announcement of the White House switching over to an OpenSource content management system, Drupal. I've hosted or setup a number of sites over the years using various CMS platforms, for example: PHPNuke, PHPNuke Evolution, Xoops, Joomla, WordPress. All of which are good depending on what you're trying to do. Since all of these we run at my host which uses a typical LAMP stack (Linux, Apache, MySql, PHP), my requirements are something along the lines of:

  1. 1.  Free
  2. 2. Configurable
  3. 3 . Runs on Linux
  4. 4. Can run on Windows (home systems use Windows currently, not a deal breaker though)
  5. 5. Does NOT require any actions from my host (no phone calls, nothing)
    6.Should support the concept of Blogs, Forums, Users, Wikis as a nice-to-have

All of those met my needs (well with the exception of WordPress being specifically for blogs….

I have heard of Drupal but never had the opportunity to try it. The White House moving to Drupal was enough to pique my interests. It was definitely on the list of software to evaluate when the chance presented itself, and like most, I figure that this lends some serious legitimacy to the OpenSource movement, and to the Drupal platform specifically. I know I am late to the party and that there are already a number of books on Installing/Configuring/Maintaining it, but I consider this taking the time to vet out the development, and I think now it's prime time for it!

So yesterday afternoon, I downloaded the latest release of Drupal and set up a spot on my host and a new database and went to installing. Relatively pain free install, I just uploaded it to the server and navigated to the install page and it did the rest. Though I did have to do a few tweaks to my php.ini and .htaccess files. The information was easy to find, as the installer presented links to tracking down the solutions. Which in my case where setting PHP5 as the default PHP handler for the site, and disabling a php global resources restriction. I did create a few directories manually prior to the install, but it may have done that during the process had they not been there.

Drupal is set up to handle multiple sites and enhancements are typically provided in the form of add-on modules that install simply by copying them to your host and dropping them in the correct directory (themes in themes, libraries in libraries, modules in modules sort of thing). So I grabbed a few that sounded helpful (WordPress Import, WYSIWYG editor, Trackback's). And in the first 30 minutes I had my entire WordPress blog from a year and a half of blogging all converted over to the blog in Drupal. And it has a better tag and taxonomy categorization for blogs to boot!

It handles traditional pages, blogs, forums, navigation linking very nicely, arguably a super custom navigation system might require converting your existing code to a Drupal module but for 90% of the navigation tasks, the built in system is grand. Off the bat, the administration can seem daunting, many configuration settings broken up and categorized, but they do make sense, it's just in a CMS system, you need all these features. I found I got used to their placement in about a day's worth of using it. Not too terrible, all things considered, relatively intuitive.

I have to investigate a Wiki module and get the WYSIWYG editor fully working. I am using it right now, but I just noticed the mark-up seems to be using a BBCode-like system, though I believe I saw the option to change that, Hmm, now where did I see that setting again

Overall, a great CMS platform, and you can not beat the price. The community is very alive and there are books on the topic. Now is a great time to hop in and learn! 


Trackback URL for this post:

My doings with Drupal and my new blog site

 Well, it took a while but I finally decided on a domain name that satisfied me and created this blog site. My friend and partner in crime, MonkK suggested I set up my blog site with the Drupal content management system. I have to say after following