database

There's a place for Backup and Migrate module in Drupal developers toolbox. In fact it should be in the top 10 modules to install when developing a site list. However there are situations where it's not the most efficient way to do things. I am lazy and I do forget to create backups. I could schedule them but that means I should have cron running regularly on my local copy which I normally don't. Here's where Navicat comes to the rescue.

Let's face it - sometimes you need a copy of a site running Domain Access on your local machine. It does require some tweaking to get it up and running since you need at minimum to change your hostnames. I keep a query around for each local site db to do this for me (automation is your best friend after all). It's plain and simple if you are using subdomains but it can easily be adjusted to full domain names:

UPDATE domain set subdomain = replace(subdomain,'thebeehive.org', 'beehive.trunk');

This query will replace all thebeehive.org occurrances in domain table with beehive.trunk.

And for the heck of it make sure sessions and watchdog tables are empty before you start:
TRUNCATE sessions;
TRUNCATE watchdog;