Current best practice for database backups?

starkos - February 28, 2008 - 21:57

In posts such as Survey: Whats your backup strategy? it is indicated that there are certain files that probably should not be included in database backups. Is there a current list of such tables for Drupal 6?

And would it be possible to add a backup script to the Drupal `scripts` directory, if only as a place to document the current best practice for the version?

Thanks!

Excellent question

laceiba - February 29, 2008 - 00:15

This is an excellent question that should probably be part of the documentation somewhere. I will be interested to hear what people are doing.

Re: Current best practice

starkos - February 29, 2008 - 18:14

I guess I can start the conversation. Currently I dump the entire database except for these tables (this is for D6):

  • access
  • access_log
  • cache
  • cache_block
  • cache_filter
  • cache_form
  • cache_menu
  • cache_page
  • cache_update
  • search_index
  • statistics
  • watchdog

Did I miss anything here? Now when I restore from one of these dumps, I do not destroy any of these tables, preferring to keep my history intact. If I am rolling back to a previous version of the content I will clear the cache; if I'm moving up new content (from my staging server) I leave the cache alone. Does that sound okay?

This site is going to be my food-on-the-table when it goes live, so I want to make sure I get this right. Many thanks!

 
 

Drupal is a registered trademark of Dries Buytaert.