Drupal Association members fund grants that make connections all over the world.
What is restore?
Restore is a module aimed at making deployment of sites and modules easier and painless. Restore uses restore scripts to provide operation details, which can be stored as a script text file (containing a PHP array), using a hook within your own module (using arrays) or stored in the database.
Why use restore?
There are a few other modules that provide similar if not the same functionality as restore, such as Features. The current features provided by restore are as follows:
- Text/script based restore files, to allow adding and swapping of restore scripts with modules.
- Hooks to allow for programmatically adding and manipulating restore scripts.
- Restore scripts can be stored in the database.
- An admin UI to display the restore scripts and operations with the status of each element of the script(s).
- An admin UI showing any conflicts with other scripts.
- An admin UI to compare the the scripts values to the live values.
- An admin UI to generate, and edit restore scripts.
- Uses ctools to provide the operation classes.
- The operation classes are easily built, and an example skeleton operation is provided.
- The scripts WILL NOT break if an operation module is not available, rather it just highlights the modules not available and skips it.
- Whole scripts can be restored/uninstalled, or individual operations and elements can be restored/uninstalled.
- The idea is not to use IDs (UID, NID, etc) where possible.
- Optionally automatically restore and/or uninstall scripts when a module is installed or uninstalled.
- Because the restore scripts are file based and only called when needed, theres a smaller memory and performance hit.
Restore can be used as a deployment tool, for example if your building a Drupal site with several variables, fields, roles and permissions, these can be stored in a restore script(s) and when deployed to another server simply restore the script(s), and if there are any changes, just upload the new restore script and restore it again.
Or it can be simply used as a part of your new module, if your module provides several new fields, roles and rules they can be stored in the module using a hook (or restore script file) and when the module is installed all the fields, roles and rules get installed along with it.
The difference between restore and other modules like Features is that restore uses simple script files which contain the data, and operations do the work, also you can restore/remove specific parts of a script at anytime rather than the whole lot just at installation/uninstallation.