Closed (outdated)
Project:
Backup and Migrate
Version:
7.x-3.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2012 at 13:19 UTC
Updated:
26 Nov 2025 at 13:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alexweber commentedPatch attached! :)
Comment #2
brian_c commentedBackup & Migrate already provides a means to provide custom filters, it's reasonably straightforward to write your own filter which can take actions before/during/after backup and restore operations. So while not quite as easy as regular hooks, it's entirely doable to accomplish what you need without patching Backup and Migrate.
Here is a sample filter module (called "FOOBAR") with stubs for all the available filter operations:
FOOBAR.module:
filters.FOOBAR.inc:
See backup_migrate.module and includes/filters.inc for more details.
I am using this approach to enable the Environment Modules module after a Restore has completed. In this way I can automatically enable whatever modules I like after I have overwritten my dev DB with a backup from Production.
Comment #3
damienmckennaFor completeness sake, an updated patch with a backup_migrate.api.php file that lists the two hooks, and adds comments before the module_invoke() statements to indicate what's happening.
Comment #4
damienmckennaThis version turns brian_c's example code into a note for the README.txt file.
Comment #5
damienmckennaA slight improvement to the example code.
Comment #6
alexweber commented@brian_c & good point, thanks for sharing the example and clearing this one up! :)
Comment #7
damienmckennaComment #8
damienmckennaComment #9
couturier commentedThis issue has been filed against the 2.x branch which according to @DamienMcKenna should be deprecated. See this issue: Verify 7.x-2.x -to- 7.x-3.x upgrade path, mark 7.x-2.x as unsupported
Comment #10
damienmckennaFeature requests we can bump to the current branch.
Comment #11
damienmckennaThe documentation needs to be updated to match the latest Drupal coding standards. Also, at this point it is a documentation request.
Comment #12
brankoc commentedJust a reroll of the 7.x-2.x patch.
The tasks from #11 still need to be done.
Comment #13
ivnishDrupal 7 is EOL. This issue will be closed.