You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -205,7 +205,9 @@ Env variables for credentials will take precedence over configuration file optio
205
205
**For object storage authentication**, find the relevant sections further down in their respective sections.
206
206
207
207
### Configuration
208
-
_Ensure [Authentication](#authentication-and-permissions) has been set up beforehand for required credentials._ For a simple example to run quickly, refer to the one in the [Using This Application](#using-this-application) section. A full example is also shown below with descriptions. Optionally, look at `examples/` folder of the github repo for more examples.
208
+
_Ensure [Authentication](#authentication-and-permissions) has been set up beforehand for required credentials._ For a simple example to run quickly, refer to the one in the [Using This Application](#using-this-application) section.
209
+
210
+
A full example is also shown below. Optionally, look at `examples/` folder of the github repo for more examples with long descriptions.
209
211
210
212
For object storage configuration, find more information in their respective sections
211
213
- [Minio](#minio-backups)
@@ -218,17 +220,21 @@ Below is an example configuration that shows example values for all possible opt
218
220
```yaml
219
221
host: "https://bookstack.yourdomain.com"
220
222
credentials:
221
-
token_id: ""
222
-
token_secret: ""
223
-
additional_headers:
224
-
test: "test"
225
-
test2: "test2"
226
-
User-Agent: "test-agent"
223
+
token_id: ""
224
+
token_secret: ""
227
225
formats:
228
226
- markdown
229
227
- html
230
228
- pdf
231
229
- plaintext
230
+
http_config:
231
+
verify_ssl: false
232
+
timeout: 30
233
+
backoff_factor: 2.5
234
+
retry_codes: [413, 429, 500, 502, 503, 504]
235
+
retry_count: 5
236
+
additional_headers:
237
+
User-Agent: "test-agent"
232
238
minio:
233
239
host: "minio.yourdomain.com"
234
240
access_key: ""
@@ -243,7 +249,6 @@ assets:
243
249
export_attachments: true
244
250
modify_markdown: false
245
251
export_meta: false
246
-
verify_ssl: true
247
252
keep_last: 5
248
253
run_interval: 0
249
254
```
@@ -253,20 +258,25 @@ More descriptions can be found for each section below:
253
258
254
259
| Configuration Item | Type | Required | Description |
| `host` | `str` | `true` | If `http/https` not specified in the url, defaults to `https`. Use `assets.verify_ssl` to disable certificate checking. |
261
+
| `host` | `str` | `true` | If `http/https` not specified in the url, defaults to `https`. Use `http_config.verify_ssl` to disable certificate checking. |
257
262
| `credentials` | `object` | `false` | Optional section where Bookstack tokenId and tokenSecret can be specified. Env variable for credentials may be supplied instead. See [Authentication](#authentication) for more details. |
258
-
| `credentials.token_id` | `str`| `true` if `credentials` | If `credentials` section is given, this should be a valid tokenId |
259
-
| `credentials.token_secret` | `str` | `true` if `credentials`| If `credentials` section is given, this should be a valid tokenSecret |
260
-
| `additional_headers` | `object` | `false` | Optional section where key/value for pairs can be specified to use in Bookstack http request headers.
263
+
| `credentials.token_id` | `str`| `false` if specified through env var instead, otherwise `true` | A valid Bookstack tokenId. |
264
+
| `credentials.token_secret` | `str` | `false` if specified through env var instead, otherwise `true` | A valid Bookstack tokenSecret. |
261
265
| `formats` | `list<str>` | `true` | Which export formats to use for Bookstack page content. Valid options are: `["markdown", "html", "pdf", "plaintext"]`|
262
266
| `output_path` | `str` | `false` | Optional (default: `cwd`) which directory (relative or full path) to place exports. User who runs the command should have access to read/write to this directory. This directory and any parent directories will be attempted to be created if they do not exist. If not provided, will use current run directory by default. If using docker, this option can be omitted. |
263
267
| `assets` | `object` | `false` | Optional section to export additional assets from pages. |
264
268
| `assets.export_images` | `bool` | `false` | Optional (default: `false`), export all images for a page to an `image` directory within page directory. See [Backup Behavior](#backup-behavior) for more information on layout |
265
269
| `assets.export_attachments` | `bool` | `false` | Optional (default: `false`), export all attachments for a page to an `attachments` directory within page directory. See [Backup Behavior](#backup-behavior) for more information on layout |
266
-
| `assets.modify_markdown` | `bool` | `false` | Optional (default: `false`), modify markdown files to replace image links with local exported image paths. This requires `assets.export_images` to be `true` in order to work. See [Modify Markdown Files](#modify-markdown-files) for more information.
267
-
| `assets.export_meta` | `bool` | `false` | Optional (default: `false`), export of metadata about the page in a json file |
268
-
| `assets.verify_ssl` | `bool` | `false` | Optional (default: `true`), whether or not to check ssl certificates when requesting content from Bookstack host |
269
-
| `keep_last` | `int` | `false` | Optional (default: `None`), if exporter can delete older archives. valid values are:<br>- set to `-1` if you want to delete all archives after each run (useful if you only want to upload to object storage)<br>- set to `1+` if you want to retain a certain number of archives<br>- `0` will result in no action done |
270
+
| `assets.modify_markdown` | `bool` | `false` | Optional (default: `false`), modify markdown files to replace image links with local exported image paths. This requires `assets.export_images` to be `true` in order to work. See [Modify Markdown Files](#modify-markdown-files) for more information. |
271
+
| `assets.export_meta` | `bool` | `false` | Optional (default: `false`), export of metadata about the page in a json file. |
| `http_config.verify_ssl` | `bool` | `false` | Optional (default: `false`), whether or not to verify ssl certificates if using https. |
274
+
| `http_config.timeout` | `int` | `false` | Optional (default: `30`), set the timeout, in seconds, for http requests. |
275
+
| `http_config.retry_count` | `int` | `false` | Optional (default: `5`), the number of http retries after initial failure. |
276
+
| `http_config.retry_codes` | `List[int]` | `false` | Optional (default: `[413, 429, 500, 502, 503, 504]`), which http response status codes trigger a retry. |
277
+
| `http_config.backoff_factor` | `float` | `false` | Optional (default: `2.5`), set the backoff_factor for http request retries. Default backoff_factor `2.5` means we wait 5, 10, 20, and then 40 seconds (with default `http_config.retry_count: 5`) before our last retry. This should allow for per minute rate limits to be refreshed. |
278
+
| `http_config.additional_headers` | `object` | `false` | Optional (default: `{}`), specify key/value pairs that will be added as additional headers to http requests. |
279
+
| `keep_last` | `int` | `false` | Optional (default: `0`), if exporter can delete older archives. valid values are:<br>- set to `-1` if you want to delete all archives after each run (useful if you only want to upload to object storage)<br>- set to `1+` if you want to retain a certain number of archives<br>- `0` will result in no action done. |
270
280
| `run_interval` | `int` | `false` | Optional (default: `0`). If specified, exporter will run as an application and pause for `{run_interval}` seconds before subsequent runs. Example: `86400` seconds = `24` hours or run once a day. Setting this property to `0` will invoke a single run and exit. Used for basic scheduling of backups. |
|`access_key`|`str`|`false` if specified through env var instead, otherwise `true`| Access key for the minio instance |
469
479
|`secret_key`|`str`|`false` if specified through env var, otherwise `true`| Secret key for the minio instance |
470
480
|`path`|`str`|`false`| Optional, path of the backup to use. Will use root bucket path if not set. `<bucket_name>:/<path>/bookstack-<timestamp>.tgz`|
471
-
|`keep_last`|`int`|`false`| Optional (default: `None`), if exporter can delete older archives in minio.<br>- set to `1+` if you want to retain a certain number of archives<br>- `0` will result in no action done |
481
+
|`keep_last`|`int`|`false`| Optional (default: `0`), if exporter can delete older archives in minio.<br>- set to `1+` if you want to retain a certain number of archives<br>- `0` will result in no action done |
482
+
483
+
## Potential Breaking Upgrades
484
+
Below are versions that have major changes to the way configuration or exporter runs.
485
+
486
+
| Start Version | Target Version | Description |
487
+
| ------------- | -------------- | ----------- |
488
+
|`< 1.4.X`|`1.5.0`|`assets.verify_ssl` has been moved to `http_config.verify_ssl` and the default value has been updated to `false`. `additional_headers` has been moved to `http_config.additional_headers`|
472
489
473
490
## Future Items
474
491
1.~~Be able to pull images locally and place in their respective page folders for a more complete file level backup.~~
0 commit comments