Change a backup destination's enabled flag or retention
PATCH/backup/destinations/:destinationId
Required role: admin. Only an account or token with the admin role can call this operation.
curl --request PATCH \
--header "Authorization: Bearer $HOSERVA_TOKEN" \
--header "Content-Type: application/json" \
--data @body.json \
"https://$HOSERVA_HOST:8008/api/v1/backup/destinations/{destinationId}"
Changes enabled and retention in place; a field left out is left as it is. Its type, path, options and credentials cannot be changed — remove the destination and add it again. Disabling never removes an archive or the credentials, and the next backup run uses the new values without a restart. Retention is bounded as in createBackupDestination (each count 0 to 1000, at least one archive kept) and, as always, applies only to archives this installation wrote. Switching a disabled destination back on restarts its staleness clock, so it is not reported stale until two days after that. 404 backup_destination_not_found for an unknown id; 400 backup_destination_invalid for a retention out of bounds.
Request
Responses
- 200
- default
The destination as it is now.
An error response.