An option to specify the tables in the database that should be skipped (only the table structure should be backed up, not the data) would be nice. This would enable the admin to skip tables related to search, sessions and cache which need not be backed up since their data is not critical or can be recreated.

This would reduce the size of the backups significantly since the data for tables search_total and search_index contribute about 75% (in my blog) to the backup size.

I use this module to automatically backup the database at specified intervals of time. The module works like a charm and has relieved me from at least 1 administrative task. Thanks.

Comments

dww’s picture

Status: Active » Needs review
StatusFileSize
new3.26 KB

here's a patch to the current version of the 4.6 dba.module file (revision 1.21.2.10) that does exactly this. it adds a new text field on the admin/settings/dba page for the admin to input a list of table names to skip. then, in the underlying code that dumps out the tables, if a table is in this list, it only dumps the schema (table definition) not the data. the patch only touches 12 lines of code (including comments), so hopefully it can get applied to the main 4.6 distribution of DBA.
even if not, you're welcome to use the patch on your site's local copy of DBA...

enjoy,
-derek

jeremy’s picture

Looks good. I'll test it out when I return from Vancouver, and apply it then.

dww’s picture

StatusFileSize
new4.13 KB

and here's an (untested) patch that applies cleanly to the current version of dba.module in the cvs HEAD (i.e. the 4.7 version), revision 1.35. the only problem with the 4.6 patch i posted before is the dba_settings() hook uses the new forms API, so that part of the previous patch failed. otherwise, it's the same code.

enjoy,
-derek

p.s. my whole site is running 4.6, and i don't have a 4.7 test site running (yet). so, i haven't verified that this patch works. someone with a 4.7 site that cares about this functionality should probably give it a try to make sure the settings page looks/works ok. if anyone tries it, please follow-up to this thread so i know if what i did is the right way to get a form working in 4.7. ;) thanks.

jeremy’s picture

Version: 4.6.x-1.x-dev » 5.x-1.x-dev
Assigned: Unassigned » jeremy
Status: Needs review » Fixed

I comitted a slightly modified version to HEAD. I won't commit new features to 4.6, sorry. Thanks for the patch!

dww’s picture

Priority: Normal » Minor
Status: Fixed » Reviewed & tested by the community
StatusFileSize
new2.47 KB

thanks for applying that. i just noticed a (minor) typo in my original patch. :( sorry about that. here's a patch against 1.38 that fixes it.

-derek

dww’s picture

Status: Reviewed & tested by the community » Fixed

applied to HEAD (as revision 1.40).

Anonymous’s picture

Status: Fixed » Closed (fixed)