[idea] allow commands to run before and after snapshot creation
- Dominant language
- Perl
- Stars
- 2.1k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
To prevent data corruption, no data should be written to a subvolume when a snapshot is being created.
For example, data could be written to a database. A (docker) container could be writing data to a mapped volume etc.
A user can easily prevent this by using btrbk in a script that will simply stop all actions/apps/containers before running btrbk and then start them again.
However, this way, apps/containers could be unavailable/offline for a while, since the entire backup process could take long, sending snapshots to various local or remote locations, while actually creating snapshots only takes a second.
My suggestion would be to allow btrbk to run a command before actual snapshot happens. And run another command when the snapshot creation process has finished. This could even be limited to a specific subvolume in the .conf file.
For example, docker-compose users should run `docker-compose stop` and `docker-compose start` before and after snapshot creation.
Would be nice if such an option to "command to run before snapshot" and "command to run after snapshot" could be added to the .conf file.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.