Skip to content

Commit a97ed17

Browse files
authored
Merge pull request #444 from databacker/fix-examples
update docs and examples to match API
2 parents 461c3d7 + d006378 commit a97ed17

File tree

4 files changed

+50
-46
lines changed

4 files changed

+50
-46
lines changed

docs/configuration.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -125,55 +125,55 @@ For local configuration, the `spec` is composed of the following. See the [Confi
125125
for details of each.
126126

127127
* `dump`: the dump configuration
128-
* `include`: list of tables to include
129-
* `exclude`: list of tables to exclude
130-
* `safechars`: safe characters in filename
131-
* `noDatabaseName`: remove `USE <database>` from dumpfile
128+
* `exclude`: strings, list of tables to exclude
129+
* `include`: strings, list of tables to include
130+
* `safechars`: boolean, enable safe characters in filename
131+
* `noDatabaseName`: boolean, remove `USE <database>` from dumpfile
132132
* `schedule`: the schedule configuration
133-
* `frequency`: the frequency of the schedule
134-
* `begin`: the time to begin the schedule
135-
* `cron`: the cron schedule
136-
* `once`: run once and exit
137-
* `compression`: the compression to use
138-
* `compact`: compact the dump
139-
* `triggersAndFunctions`: include triggers and functions and procedures in the dump
140-
* `maxAllowedPacket`: max packet size
141-
* `filenamePattern`: the filename pattern
133+
* `frequency`: int, the frequency of the schedule in minutes
134+
* `begin`: int, the time to begin the schedule in minutes from start of process
135+
* `cron`: string, the cron schedule
136+
* `once`: boolean, run once and exit
137+
* `compression`: string, the compression to use
138+
* `compact`: boolean, compact the dump
139+
* `triggersAndFunctions`: boolean, include triggers and functions and procedures in the dump
140+
* `maxAllowedPacket`: int, max packet size
141+
* `filenamePattern`: string, the filename pattern
142142
* `scripts`:
143-
* `preBackup`: path to directory with pre-backup scripts
144-
* `postBackup`: path to directory with post-backup scripts
145-
* `targets`: list of names of known targets, defined in the `targets` section, where to save the backup
143+
* `preBackup`: string, path to directory with pre-backup scripts
144+
* `postBackup`: string, path to directory with post-backup scripts
145+
* `targets`: strings, list of names of known targets, defined in the `targets` section, where to save the backup
146146
* `restore`: the restore configuration
147147
* `scripts`:
148-
* `preRestore`: path to directory with pre-restore scripts
149-
* `postRestore`: path to directory with post-restore scripts
148+
* `preRestore`: string, path to directory with pre-restore scripts
149+
* `postRestore`: string, path to directory with post-restore scripts
150150
* `database`: the database configuration
151-
* `server`: host:port
151+
* `server`: string, host:port
152152
* `port`: port (deprecated)
153153
* `credentials`: access credentials for the database
154-
* `username`: user
155-
* `password`: password
154+
* `username`: string, user
155+
* `password`: string, password
156156
* `prune`: the prune configuration
157-
* `retention`: retention policy
157+
* `retention`: string, retention policy
158158
* `targets`: target configurations, each of which can be reference by other sections. Key is the name of the target that is referenced elsewhere. Each one has the following structure:
159-
* `type`: the type of target, one of: file, s3, smb
160-
* `url`: the URL of the target
159+
* `type`: string, the type of target, one of: file, s3, smb
160+
* `url`: string, the URL of the target
161161
* `spec`: access details for the target, depends on target type:
162162
* Type s3:
163-
* `region`: the region
164-
* `endpoint`: the endpoint
165-
* `pathStyle` (boolean): use path-style bucket addressing instead of virtual-host style bucket addressing, see [AWS docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html)
166-
* `accessKeyID`: the access key ID
167-
* `secretAccessKey`: the secret access key
163+
* `region`: string, the region
164+
* `endpoint`: string, the endpoint
165+
* `pathStyle` boolean, use path-style bucket addressing instead of virtual-host style bucket addressing, see [AWS docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html)
166+
* `accessKeyID`: string, the access key ID
167+
* `secretAccessKey`: string, the secret access key
168168
* Type smb:
169-
* `domain`: the domain
170-
* `username`: the username
171-
* `password`: the password
172-
* `logging`: the log level, one of: error,warning,info,debug,trace; default is info
169+
* `domain`: string, the domain
170+
* `username`: string, the username
171+
* `password`: string, the password
172+
* `logging`: string, the log level, one of: error,warning,info,debug,trace; default is info
173173
* `telemetry`: configuration for sending telemetry data (optional)
174-
* `url`: URL to telemetry service
175-
* `certificate`: the certificate for the telemetry server or a CA that signed the server's TLS certificate. Not required if telemetry server does not use TLS, or if the system's certificate store already contains the server's cert or CA.
176-
* `credentials`: unique token provided by the remote service as credentials, base64-encoded
174+
* `url`: string, URL to telemetry service
175+
* `certificate`: string, the certificate for the telemetry server or a CA that signed the server's TLS certificate. Not required if telemetry server does not use TLS, or if the system's certificate store already contains the server's cert or CA.
176+
* `credentials`: string, unique token provided by the remote service as credentials, base64-encoded
177177

178178
#### Remote Configuration
179179

docs/scheduling.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ You can set it to run just once via:
2929
* Config file:
3030
```yaml
3131
dump:
32-
run-once: true
32+
schedule:
33+
once: true
3334
```
3435
3536
If you set it to run just once, the backup will run once and then exit.
@@ -49,7 +50,8 @@ You can set a cron schedule via:
4950
* Config file:
5051
```yaml
5152
dump:
52-
cron: 0 * * * *
53+
schedule:
54+
cron: 0 * * * *
5355
```
5456

5557
The cron dump schedule option uses standard [crontab syntax](https://en.wikipedia.org/wiki/Cron), a
@@ -71,7 +73,8 @@ You can set the frequency start via:
7173
* Config file:
7274
```yaml
7375
dump:
74-
frequency: 60
76+
schedule:
77+
frequency: 60
7578
```
7679

7780
You can set the delayed start via:
@@ -81,5 +84,6 @@ You can set the delayed start via:
8184
* Config file:
8285
```yaml
8386
dump:
84-
delay: 120
87+
schedule:
88+
delay: 120
8589
```

examples/configs/local.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ spec:
5858
s3:
5959
type: s3
6060
url: s3://bucket.us-west.amazonaws.com/databackup
61-
details:
61+
spec:
6262
region: us-west-1
6363
endpoint: https://s3.us-west-1.amazonaws.com
6464
accessKeyId: access_key_id
@@ -72,7 +72,7 @@ spec:
7272
smbshare:
7373
type: smb
7474
url: smb://cifshost:2125/databackup
75-
details:
75+
spec:
7676
domain: mydomain
7777
username: user
7878
password: password

examples/configs/telemetry.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ spec:
7272
s3:
7373
type: s3
7474
url: s3://bucket.us-west.amazonaws.com/databackup
75-
region: us-west-1
76-
endpoint: https://s3.us-west-1.amazonaws.com
77-
credentials:
75+
spec:
76+
region: us-west-1
77+
endpoint: https://s3.us-west-1.amazonaws.com
7878
accessKeyId: access_key_id
7979
secretAccessKey: secret_access_key
8080
file:
@@ -86,7 +86,7 @@ spec:
8686
smbshare:
8787
type: smb
8888
url: smb://cifshost:2125/databackup
89-
credentials:
89+
spec:
9090
domain: mydomain
9191
username: user
9292
password: password

0 commit comments

Comments
 (0)