[README,config] db backup

This commit is contained in:
whatdoineed2do/Ray 2020-07-31 09:16:31 +01:00 committed by ejurgensen
parent 76d35f5abc
commit 3a0d4edc21
2 changed files with 27 additions and 0 deletions

View File

@ -778,6 +778,7 @@ curl -X PUT "http://localhost:3689/api/queue/items/2"
| POST | [/api/library/add](#add-an-item-to-the-library) | Add an item to the library |
| PUT | [/api/update](#trigger-rescan) | Trigger a library rescan |
| PUT | [/api/rescan](#trigger-meta-rescan) | Trigger a library metadata rescan |
| PUT | [/api/library/backup](#backup-db) | Request library backup db |
@ -1940,6 +1941,27 @@ On success returns the HTTP `204 No Content` success status response code.
curl -X PUT "http://localhost:3689/api/rescan"
```
### Backup DB
Request a library backup - configuration must be enabled and point to a valid writable path. Maintenance method.
**Endpoint**
```http
PUT /api/library/backup
```
**Response**
On success returns the HTTP `200 OK` success status response code.
If backups are not enabled returns HTTP `503 Service Unavailable` response code.
Otherwise a HTTP `500 Internal Server Error` response is returned.
**Example**
```shell
curl -X PUT "http://localhost:3689/api/library/backup"
```
## Search

View File

@ -16,6 +16,11 @@ general {
# Database location
# db_path = "@localstatedir@/cache/@PACKAGE@/songs3.db"
# Database backup location
# Uncomment and specify a full path to enable abilty to use REST endpoint
# to initiate backup of songs3.db
# db_backup_path = "@localstatedir@/cache/@PACKAGE@/songs3.bak"
# Log file and level
# Available levels: fatal, log, warning, info, debug, spam
logfile = "@localstatedir@/log/@PACKAGE@.log"