Easy Drupal Backups with Backup and Migrate Module
I'm approaching 20 blog articles and I haven't yet made a backup of my Drupal site. YIKES! It would suck if my hosting server crashed and I lost everything. So... I guess I should do it now.
The only backup module I've used is Backup and Migrate. I like it and it's easy to use, so let's set it up:
- Download backup and migrate module
- Unzip and put in sites/all/modules (or wherever your modules are)
- Turn on module at /admin/build/modules
- Go to /admin/content/backup_migrate (NOTE: users with admin menu installed will see a blank screen when navigating to Content Management > Backup and Migrate > [some sub menu item] though you can choose the top level menu item and see the page)
- Backup/Export DB - choose the tables to include/exclude and save away. You can save to your sites' files directory (e.g. /sites/default/files/backup_migrate/manual) or to your computer.
- Restore/Import DB - if you want to move data to another Drupal site or revert back to an earlier version you have saved, you can use this feature.
- Saved Backups - shows a list of backup files for download or to revert the site.
- Backup Schedule - if you want to automate backups, you can set that up here. Even if you automate backups, you should transfer copies off the web server somehow in case the server crashes.
Start making regular Drupal backups of your site right away! It's easy ;)
UPDATE (1/24/09) - I wrote this up before trying it on kristen.org and unfortunately it doesn't work on this site. I blame GoDaddy... ugh. I'm getting this error when I try to save my backup:
Warning: Lost connection to MySQL server during query query: INSERT INTO watchdog...
Warning: MySQL server has gone away query: INSERT INTO watchdog...
I guess I will have to go through GoDaddy's database tools to make a copy of it. Annoying!
Comments
about "Mysql has gone away..."
try to desactivate "Update status module" that seems to make the mysql queries too long for servers that have à MAX_EXECUTION_TIME too small.
You can also try the db_tweaks module to increase the timeout (doesn't work anymore with drupal 6.15 and my hosting).
Cheers
à french internet drupaler
Thanks for the tips!
I'll try them out ;)
Kristen
um sorry but everyone knows
um sorry but everyone knows how to click the backup and save the sql file, the problem NO one knows how to do is how to take that file and then install your drupal site on an ENTIRELY DIFFERENT HOST.
WHAT DO YOU DO?????
Migrating data
You actually have to have the site on the other server set up already with Drupal and with Backup & Migrate installed in order to use Backup & Migrate to install the original site tables over. You go to the new site and choose to install the file you have saved from your original site. The downside of this is that you actually need to have installed Drupal first.
The alternative would be to use whatever mysql tool you have available from your new hosting provider and do the following:
1) create database with name that you want (could be different name than original site if you want)
2) use mysql tool provided to import the tables in the sql file from the original site backup
3) copy all code over to new doc root
4) change settings.php at new site to point to new database
Then you are done. The latter method makes more sense when setting up a new site based on an old one.
Good luck,
Kristen
You can select specific
You can select specific databases to leave out and I believe "Watchdog" is one of them. There are a few databases that are huge and GoDaddy never cooperates so it may be timing out. Hope that works, cheers!
Post new comment - ALL COMMENTS ARE MODERATED - SPAM WILL BE DELETED!