Consider the following scenario: you have only one, but otherwise unlimited database (unlimited storage, unlimited number of tables, etc.) You are running several instances of Drupal, possibly with different core versions, where the instances have their own table name prefix. You are developing some tests, and you always forget to clean up the mess afterwards. One of your instances needs to be deployed to its final place (eg. on a customer's server). You leap for backup_migrate.module, but you're facing with a list that takes half a week to even scroll down to the end, and several hundred tables should be excluded from your backup, with different table prefixes. Now what?

Now apply this patch, enter a regexp ((d5_|d7_simpletest).*) that matches the table names you want to exclude (and/or enter another regexp that matches the table names you don't want their data), click that button, and voilá: you won't have that pesky d5_..., d7_simpletest..., d6foo_... and alike tables.

(I'm attaching two patches, one for backup_migrate-6.x-1.2 and one for 6.x-2.2: I was working offline on the holidays and I've noticed the 2.2 version only when I've finished with the 1.2 patch. Take the one you're using.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ronan’s picture

I think regex might be a little too technical for the intended audience of this module and executing raw regex entered by the user doesn't seem like the safest thing in the world but I do like the idea so I'll find a way to do something like this.

Thanks

Boobaa’s picture

OK, let's move those fields to the Advanced Options fieldset. If you still not yet satisfied with this, what about a new permission for those "advanced" settings?

andybrace’s picture

I've ported the above patch to apply against the latest 7.x-3.x-dev branch.

couturier’s picture

Version: 6.x-2.2 » 7.x-3.x-dev
Issue summary: View changes

Drupal 6 and Backup and Migrate 6 are no longer supported. I am moving to 7.x-3.x-dev based on Comment #3.

DamienMcKenna’s picture

Status: Needs review » Needs work

I think the patch needs a little more work to clarify that the exclusions are in addition to the values listed in the other selector.

DamienMcKenna’s picture

Status: Needs work » Needs review

The last submitted patch, 2: backup_migrate-762412-2.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 3: backup_migrate-regex-d7-762412-3.patch, failed testing. View results

The last submitted patch, backup_migrate-6.x-2.2-exclude_regex.patch, failed testing. View results

The last submitted patch, backup_migrate-6.x-1.2-exclude_regex.patch, failed testing. View results