-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate BACKUP_FROM_SNAPSHOT (#81)
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ It handles __recurring or one-off backups of Docker volumes__ to a __local direc | |
- [Using with Docker Swarm](#using-with-docker-swarm) | ||
- [Manually triggering a backup](#manually-triggering-a-backup) | ||
- [Update deprecated email configuration](#update-deprecated-email-configuration) | ||
- [Replace deprecated `BACKUP_FROM_SNAPSHOT` usage](#replace-deprecated-backup_from_snapshot-usage) | ||
- [Using a custom Docker host](#using-a-custom-docker-host) | ||
- [Run multiple backup schedules in the same container](#run-multiple-backup-schedules-in-the-same-container) | ||
- [Recipes](#recipes) | ||
|
@@ -149,6 +150,11 @@ You can populate below template according to your requirements and use it as you | |
|
||
# BACKUP_LATEST_SYMLINK="backup.latest.tar.gz" | ||
|
||
# ************************************************************************ | ||
# The BACKUP_FROM_SNAPSHOT option has been deprecated and will be removed | ||
# in the next major version. Please use exec-pre and exec-post | ||
# as documented below instead. | ||
# ************************************************************************ | ||
# Whether to copy the content of backup folder before creating the tar archive. | ||
# In the rare scenario where the content of the source backup volume is continously | ||
# updating, but we do not wish to stop the container while performing the backup, | ||
|
@@ -660,6 +666,37 @@ After: | |
NOTIFICATION_URLS=smtp://me:[email protected]:587/[email protected]&[email protected] | ||
``` | ||
|
||
### Replace deprecated `BACKUP_FROM_SNAPSHOT` usage | ||
|
||
Starting with version 2.15.0, the `BACKUP_FROM_SNAPSHOT` feature has been deprecated. | ||
If you need to prepare your sources before the backup is taken, use `exec-pre`, `exec-post` and an intermediate volume: | ||
|
||
```yml | ||
version: '3' | ||
services: | ||
my_app: | ||
build: . | ||
volumes: | ||
- data:/var/my_app | ||
- backup:/tmp/backup | ||
labels: | ||
- docker-volume-backup.exec-pre=cp -r /var/my_app /tmp/backup/my-app | ||
- docker-volume-backup.exec-post=rm -rf /tmp/backup/my-app | ||
backup: | ||
image: offen/docker-volume-backup:latest | ||
environment: | ||
BACKUP_SOURCES: /tmp/backup | ||
volumes: | ||
- backup:/backup:ro | ||
- /var/run/docker.sock:/var/run/docker.sock:ro | ||
volumes: | ||
data: | ||
backup: | ||
``` | ||
|
||
### Using a custom Docker host | ||
|
||
If you are interfacing with Docker via TCP, set `DOCKER_HOST` to the correct URL. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters