From 1d054aa2e812e0ccf1679377134859cbb434e1e5 Mon Sep 17 00:00:00 2001 From: p4u1 Date: Wed, 17 Apr 2024 14:59:24 +0200 Subject: [PATCH] . --- Specification.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Specification.md b/Specification.md index 7888df4..1be0160 100644 --- a/Specification.md +++ b/Specification.md @@ -10,7 +10,7 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S ## Backup -To enable backups for a docker stack, the `backupbot.backup=true` label MUST be on any of its services. It SHOULD be declared on the first service. +To enable backups for a docker stack, the `backupbot.backup=true` label MUST be on any of its services. It SHOULD be declared on the first service. The label MUST be only set once. When the label is set multiple times, the implementation SHOULD show an error. ### Volumes and paths @@ -22,6 +22,8 @@ By default all files MUST be backed up on a volume. `backupbot.backup.volumes.{v A `backupbot.backup.pre-hook` and `backupbot.backup.post-hook` MAY be set on a service. When set the command MUST be executed inside the running container of the service before/after backing up files. There is no guaranteed order in which different hooks MUST be executed. +TODO: escaping + ### Output A backup implementation SHOULD provide the backup of one or multiple stacks in a `.tar.gz` format. In that case each volume MUST be in `/var/lib/docker/volumes/{volume_name}`, where `{volume_name}` is the name of each volume that got backed up. @@ -69,12 +71,17 @@ backupbot.backup.volumes.{volume_name}: false **Description:** A comma seperated list of paths. When one or more paths are set, it only backs up those on the given volume instead of the whole volume. -**Example:** +**Example 1:** ``` backupbot.backup.volumes.{volume_name}.path: '/var/lib/mariadb/dump.sql.gz' ``` +**Example 2:** +``` +backupbot.backup.volumes.{volume_name}.path: '/var/lib/myapp/foo,/var/lib/myapp/bar' +``` + ### `backupbot.backup.pre-hook` **Type:** string