You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Refactor label command mechanism to be more flexible
* Run all steps wrapped in labeled commands
* Rename methods to be in line with lifecycle
* Deprecate exec-pre and exec-post labels
* Add documentation
* Use type alias for lifecycle phases
* Fix bad imports
* Fix command lookup for deprecated labels
* Use more generic naming for lifecycle phase
* Fail on erroneous post command
* Update documentation
For a full list of available variables and functions, see [this page](https://github.com/offen/docker-volume-backup/blob/master/docs/NOTIFICATION-TEMPLATES.md).
545
546
546
-
### Run custom commands before / after backup
547
+
### Run custom commands during the backup lifecycle
547
548
548
549
In certain scenarios it can be required to run specific commands before and after a backup is taken (e.g. dumping a database).
549
-
When mounting the Docker socket into the `docker-volume-backup` container, you can define pre- and post-commands that will be run in the context of the target container.
550
-
Such commands are defined by specifying the command in a `docker-volume-backup.exec-[pre|post]` label.
550
+
When mounting the Docker socket into the `docker-volume-backup` container, you can define pre- and post-commands that will be run in the context of the target container (it is also possible to run commands inside the `docker-volume-backup` container itself using this feature).
551
+
Such commands are defined by specifying the command in a `docker-volume-backup.[step]-[pre|post]` label where `step` can be any of the following phases of a backup lifecyle:
552
+
553
+
-`archive` (the tar archive is created)
554
+
-`process` (the tar archive is processed, e.g. encrypted - optional)
555
+
-`copy` (the tar archive is copied to all configured storages)
556
+
-`prune` (existing backups are pruned based on the defined ruleset - optional)
551
557
552
558
Taking a database dump using `mysqldump` would look like this:
"Using `docker-volume-backup.exec-pre` and `docker-volume-backup.exec-post` labels has been deprecated and will be removed in the next major version.",
140
+
)
141
+
s.logger.Warn(
142
+
"Please use other `-pre` and `-post` labels instead. Refer to the README for an upgrade guide.",
0 commit comments