This commit is contained in:
p4u1 2024-04-17 14:59:24 +02:00
parent e7f979c6fa
commit 1d054aa2e8
1 changed files with 9 additions and 2 deletions

View File

@ -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