1
0
mirror of https://github.com/offen/docker-volume-backup.git synced 2025-06-20 06:25:36 +02:00
Files
.github
cmd
docs
_sass
how-tos
automatically-prune-old-backups.md
define-different-retention-schedules.md
encrypt-backups-using-gpg.md
encrypt-backups.md
handle-file-uploads-using-third-party-tools.md
index.md
manual-trigger.md
replace-deprecated-backup-from-snapshot.md
replace-deprecated-backup-stop-container-label.md
replace-deprecated-exec-labels.md
restore-volumes-from-backup.md
run-custom-commands.md
run-multiple-schedules.md
set-container-timezone.md
set-up-dropbox.md
set-up-notifications.md
stop-containers-during-backup.md
update-deprecated-email-config.md
use-as-non-root.md
use-custom-docker-host.md
use-rootless-docker.md
use-with-docker-swarm.md
recipes
reference
.gitignore
Gemfile
Gemfile.lock
README.md
_config.yml
index.md
internal
test
.dockerignore
.editorconfig
.golangci.yml
Dockerfile
LICENSE
README.md
go.mod
go.sum
docker-volume-backup/docs/how-tos/replace-deprecated-exec-labels.md

24 lines
1.1 KiB
Markdown
Raw Normal View History

---
title: Replace deprecated exec-pre and exec-post labels
layout: default
parent: How Tos
nav_order: 18
---
# Replace deprecated `exec-pre` and `exec-post` labels
Version 2.19.0 introduced the option to run labeled commands at multiple points in time during the backup lifecycle.
In order to be able to use more obvious terminology in the new labels, the existing `exec-pre` and `exec-post` labels have been deprecated.
If you want to emulate the existing behavior, all you need to do is change `exec-pre` to `archive-pre` and `exec-post` to `archive-post`:
```diff
labels:
- - docker-volume-backup.exec-pre=cp -r /var/my_app /tmp/backup/my-app
+ - docker-volume-backup.archive-pre=cp -r /var/my_app /tmp/backup/my-app
- - docker-volume-backup.exec-post=rm -rf /tmp/backup/my-app
+ - docker-volume-backup.archive-post=rm -rf /tmp/backup/my-app
```
The `EXEC_LABEL` setting and the `docker-volume-backup.exec-label` label stay as is.
Check the additional documentation on running commands during the backup lifecycle to find out about further possibilities.