Backup and restore are working fine with the latest ruby versions, but sometimes we need to execute code in certain steps of the process. For example, you may need to send a message somewhere warning about a database restore before it happens, or after a dump is completed. Perhaps you use Elastic Search, Open Search, Algolia or even pg_search plugin, and need to reindex your data after a backup is restored.
The proposal on this pull request is to add hooks capabilities to the gem. By passing a class (or an instance of a class) in the configuration, you can execute custom code in any of these steps:
before/after restore
before/after dump
I am also modifying the documentation accordingly, so people can find information about the hooks on the README of the project.
Backup and restore are working fine with the latest ruby versions, but sometimes we need to execute code in certain steps of the process. For example, you may need to send a message somewhere warning about a database restore before it happens, or after a dump is completed. Perhaps you use Elastic Search, Open Search, Algolia or even pg_search plugin, and need to reindex your data after a backup is restored.
The proposal on this pull request is to add hooks capabilities to the gem. By passing a class (or an instance of a class) in the configuration, you can execute custom code in any of these steps:
I am also modifying the documentation accordingly, so people can find information about the hooks on the README of the project.