Backupbot Specification #258
@ -10,7 +10,7 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
|
||||
|
||||
## Backup
|
||||
p4u1 marked this conversation as resolved
|
||||
|
||||
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
|
||||
decentral1se marked this conversation as resolved
moritz
commented
I think I think `{volume_name}` can be confusing in this case. Because in `backupbot.backup.volumes.{volume_name}.path` the `{volume_name}` would be for example `assets`, while in the path `/var/lib/docker/volumes/{volume_name}` it would be `appname_example_com_assets`.
Maybe writing `/var/lib/docker/volumes/{stack_name}_{volume_name}` would clearer.
|
||||
|
||||
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'
|
||||
moritz
commented
Writing in this example and the one above absolute paths can be confusing. > The value MUST be a valid path **relative** to the volume root.
Writing in this example and the one above absolute paths can be confusing.
|
||||
```
|
||||
|
||||
### `backupbot.backup.pre-hook`
|
||||
|
||||
**Type:** string
|
||||
|
Reference in New Issue
Block a user
Maybe remove this, seems the same as line 15 "To enable backups"