From bb14fc7d8eca3b4ba0b30df26b66e0873304e9a0 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Sun, 14 Apr 2019 00:57:38 +0200 Subject: [PATCH] exclude / incude label example --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 80a0269..1363cfc 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ services: - some_other_vars.env volumes: - /var/run/docker.sock:/tmp/docker.sock:ro - some_service: + example: image: some_image # Enable volume backup with label labels: @@ -48,4 +48,45 @@ services: volumes: media: -``` \ No newline at end of file +``` + +Include + +```yaml +example: + image: some_image + labels: + restic-volume-backup.enabled: true + restic-volume-backup.include: "files,data" + volumes: + # Source don't match include filter. No backup. + - media:/srv/media + # Matches include filter + - files:/srv/files + - /srv/data:/srv/data + +volumes: + media: + files: + +``` + +Exclude: + +```yaml +example: + image: some_image + labels: + restic-volume-backup.enabled: true + restic-volume-backup.exclude: "media" + volumes: + # Excluded by filter + - media:/srv/media + # Backed up + - files:/srv/files + - /srv/data:/srv/data + +volumes: + media: + files: +```