Reference
View as MarkdownVolume backups API
14 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes
/retired-volumes/{retiredId}Delete a retired Docker volume
Enqueues the removal on the server; the row disappears once the agent confirmed. 409 server_offline while the server is offline.
| Parameter | In | Type | Description |
|---|---|---|---|
retiredIdrequired | path | string |
Response 202 · Accepted
No body.
401Unauthorized403Forbidden404Not Found409Conflictserver_offline422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/retired-volumesList the Docker volumes a restore swapped out
Retired volumes are unmounted but kept on the server (their data is the rollback path of a restore) until deleted.
| Parameter | In | Type | Description |
|---|---|---|---|
serviceIdrequired | path | string |
Response 200 · OK · application/json
- RetiredVolumeView[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/volume-backupA service's volume backup configuration
Always 200: configured: false with the defaults when none is saved. eligible: false (with ineligibleReason) for services that cannot use volume backups: managed databases (use database backups), route services and services without volumes.
| Parameter | In | Type | Description |
|---|---|---|---|
serviceIdrequired | path | string |
Response 200 · OK · application/json
- configuredbooleanrequired
- cronstringrequired
- destinationIdstring
- destinationKindenum: s3 | local
- destinationNamestring
- eligiblebooleanrequired
- enabledbooleanrequired
- excludesstring[] | nullrequired
- freezeBudgetSecondsinteger (int64)required
- ineligibleReasonstring
- keepDailyinteger (int64)required
- keepMonthlyinteger (int64)required
- keepWeeklyinteger (int64)required
- lastRunAtstring (date-time)
- modeenum: freeze | stop | liverequired
- nextRunAtstring (date-time)
- VolumeBackupHook
- VolumeBackupHook
- repoReadybooleanrequiredA repository password exists for this destination.
- serviceIdstringrequired
- timezonestringrequired
- VolumeBackupVolumeRef[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/volume-backupSave a service's volume backup configuration
Destination, mode, hooks, excludes, retention and the optional schedule. 422 volume_backup_unavailable for ineligible services, invalid_cron for a bad schedule. The first backup creates the repository.
| Parameter | In | Type | Description |
|---|---|---|---|
serviceIdrequired | path | string |
Request body · application/json · required
- cronstring5-field cron expression or @hourly/@daily/@weekly/@monthly/@yearly; empty = manual backups only. At most one run every 5 minutes.
- destinationIdstringrequired
- enabledbooleanRun on the schedule (needs a cron).
- excludesstring[] | nullrestic --exclude patterns relative to /vol, e.g. data/cache/**.
- freezeBudgetSecondsinteger (int64)Longest pause of mode freeze (default 5). Over budget the copy is abandoned and the container thawed.
- keepDailyinteger (int64)Keep the newest backup of each of the last N days (default 7, 0 = no limit).
- keepMonthlyinteger (int64)Default 6, 0 = no limit. With all three at 0 nothing is ever removed.
- keepWeeklyinteger (int64)Default 4, 0 = no limit.
- modeenum: freeze | stop | livefreeze pauses the container while the local copy is taken (default); stop stops it; live copies nothing and may be inconsistent.
- VolumeBackupHook
- VolumeBackupHook
- timezonestringIANA zone, default UTC.
Response 200 · OK · application/json
- configuredbooleanrequired
- cronstringrequired
- destinationIdstring
- destinationKindenum: s3 | local
- destinationNamestring
- eligiblebooleanrequired
- enabledbooleanrequired
- excludesstring[] | nullrequired
- freezeBudgetSecondsinteger (int64)required
- ineligibleReasonstring
- keepDailyinteger (int64)required
- keepMonthlyinteger (int64)required
- keepWeeklyinteger (int64)required
- lastRunAtstring (date-time)
- modeenum: freeze | stop | liverequired
- nextRunAtstring (date-time)
- VolumeBackupHook
- VolumeBackupHook
- repoReadybooleanrequiredA repository password exists for this destination.
- serviceIdstringrequired
- timezonestringrequired
- VolumeBackupVolumeRef[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entityvolume_backup_unavailable500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/volume-backupRemove a service's volume backup configuration
Turns the schedule off. Existing backups and the repository are kept.
| Parameter | In | Type | Description |
|---|---|---|---|
serviceIdrequired | path | string |
Response 204 · No Content
No body.
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/volume-backup/recovery-keyReveal the repository password
The restic repository and password, so a backup can be restored without NebulaCtrl. Requires the admin scope; audited as volume_backup.recovery_key.reveal. 422 volume_backup_unavailable until the first backup created the repository.
| Parameter | In | Type | Description |
|---|---|---|---|
serviceIdrequired | path | string |
Request body · application/json · required
Response 200 · OK · application/json
- notestringrequired
- passwordstringrequired
- repositorystringrequiredThe restic repository URL or path as the agent uses it.
401Unauthorized403Forbidden404Not Found422Unprocessable Entityvolume_backup_unavailable500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/volume-backupsList a service's volume backups
| Parameter | In | Type | Description |
|---|---|---|---|
serviceIdrequired | path | string | |
limit | query | integer (int64) |
Response 200 · OK · application/json
- VolumeBackupView[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/volume-backupsBack up a service's volumes now
Needs a saved configuration and an online server. Returns 202 with a queued backup; poll it or listen for backup.updated events. 409 server_offline when it can not start; 422 volume_backup_unavailable for ineligible services or without a configuration.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours. |
serviceIdrequired | path | string |
Request body · application/json · required
Response 202 · Accepted · application/json
- actorstring
- bytesAddedinteger (int64)required
- consistencystringThe mode the agent actually used (a stopped service is backed up without a freeze).
- createdAtstring (date-time)required
- destinationIdstringrequired
- destinationKindstring
- destinationNamestring
- errorstring
- filesinteger (int64)required
- finishedAtstring (date-time)
- freezeMsinteger (int64)requiredHow long the container was paused or stopped.
- hookOutcomestring
- idstringrequired
- lockedbooleanrequired
- modestringrequiredThe requested mode.
- objectDeletedbooleanrequiredTrue once retention or a user removed the snapshot; the row stays as history.
- restorablebooleanrequired
- serverIdstring
- serviceIdstringrequired
- sizeBytesinteger (int64)required
- snapshotIdstring
- stageMethodenum: reflink | copy | none
- stageMsinteger (int64)requiredHow long the local copy took.
- startedAtstring (date-time)
- statusenum: queued | running | succeeded | failed | skipped | expiredrequired
- triggerenum: manual | schedule | pre_restorerequired
- volumesstring[] | nullrequired
- warningsstring[] | nullrequired
401Unauthorized403Forbidden404Not Found409Conflictserver_offline422Unprocessable Entityvolume_backup_unavailable500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/services/{serviceId}/volume-restoresList a service's volume restores
| Parameter | In | Type | Description |
|---|---|---|---|
serviceIdrequired | path | string |
Response 200 · OK · application/json
- VolumeRestoreView[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/volume-backups/{backupId}Get a volume backup
| Parameter | In | Type | Description |
|---|---|---|---|
backupIdrequired | path | string |
Response 200 · OK · application/json
- actorstring
- bytesAddedinteger (int64)required
- consistencystringThe mode the agent actually used (a stopped service is backed up without a freeze).
- createdAtstring (date-time)required
- destinationIdstringrequired
- destinationKindstring
- destinationNamestring
- errorstring
- filesinteger (int64)required
- finishedAtstring (date-time)
- freezeMsinteger (int64)requiredHow long the container was paused or stopped.
- hookOutcomestring
- idstringrequired
- lockedbooleanrequired
- modestringrequiredThe requested mode.
- objectDeletedbooleanrequiredTrue once retention or a user removed the snapshot; the row stays as history.
- restorablebooleanrequired
- serverIdstring
- serviceIdstringrequired
- sizeBytesinteger (int64)required
- snapshotIdstring
- stageMethodenum: reflink | copy | none
- stageMsinteger (int64)requiredHow long the local copy took.
- startedAtstring (date-time)
- statusenum: queued | running | succeeded | failed | skipped | expiredrequired
- triggerenum: manual | schedule | pre_restorerequired
- volumesstring[] | nullrequired
- warningsstring[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/volume-backups/{backupId}Delete a volume backup
Removes the snapshot through the agent. 409 backup_locked, backup_in_progress or server_offline.
| Parameter | In | Type | Description |
|---|---|---|---|
backupIdrequired | path | string |
Response 204 · No Content
No body.
401Unauthorized403Forbidden404Not Found409Conflictbackup_locked422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/volume-backups/{backupId}/filesBrowse the files of a volume backup
Lists one directory of one volume inside the snapshot (at most 5000 entries). The agent reads the repository, so the server must be online (409 server_offline). Requires the deployments:write scope: backups can contain secrets.
**Download.** GET /volume-backups/{backupId}/files/content?volume=&path=&archive= streams a file (Content-Disposition: attachment); a directory is downloaded as a .zip with archive=true. Audited as volume_backup.file.download.
| Parameter | In | Type | Description |
|---|---|---|---|
backupIdrequired | path | string | |
volume | query | string | The volume's name in the service. |
path | query | string | Absolute directory path inside the volume. |
Response 200 · OK · application/json
- backupIdstringrequired
- VolumeFileEntry[] | nullrequired
- pathstringrequired
- truncatedbooleanrequired
- volumestringrequired
401Unauthorized403Forbidden404Not Found409Conflictserver_offline422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/volume-backups/{backupId}/lockLock or unlock a volume backup
Locked backups are never removed by retention or deleted.
| Parameter | In | Type | Description |
|---|---|---|---|
backupIdrequired | path | string |
Request body · application/json · required
- lockedbooleanrequired
Response 200 · OK · application/json
- actorstring
- bytesAddedinteger (int64)required
- consistencystringThe mode the agent actually used (a stopped service is backed up without a freeze).
- createdAtstring (date-time)required
- destinationIdstringrequired
- destinationKindstring
- destinationNamestring
- errorstring
- filesinteger (int64)required
- finishedAtstring (date-time)
- freezeMsinteger (int64)requiredHow long the container was paused or stopped.
- hookOutcomestring
- idstringrequired
- lockedbooleanrequired
- modestringrequiredThe requested mode.
- objectDeletedbooleanrequiredTrue once retention or a user removed the snapshot; the row stays as history.
- restorablebooleanrequired
- serverIdstring
- serviceIdstringrequired
- sizeBytesinteger (int64)required
- snapshotIdstring
- stageMethodenum: reflink | copy | none
- stageMsinteger (int64)requiredHow long the local copy took.
- startedAtstring (date-time)
- statusenum: queued | running | succeeded | failed | skipped | expiredrequired
- triggerenum: manual | schedule | pre_restorerequired
- volumesstring[] | nullrequired
- warningsstring[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/volume-backups/{backupId}/restoreRestore a volume of a backup
mode new_volume (default) restores into a new Docker volume and stages the swap on the service: apply it with Deploy; the current volume is kept as a retired volume. mode in_place first takes a safety backup, then stops the service, overwrites the volume and starts it again; it needs confirmSlug. 409 backup_not_restorable, server_offline, backup_in_progress; 422 confirmation_required.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours. |
backupIdrequired | path | string |
Request body · application/json · required
- confirmSlugstringIn-place restores: the service's slug.
- modeenum: new_volume | in_placenew_volume restores into a new Docker volume and stages the swap (apply it with Deploy); the current volume is kept. in_place stops the service, overwrites the volume after a safety backup and starts it again.
- volumestringrequiredThe volume's name in the service.
Response 202 · Accepted · application/json
- actorstring
- backupIdstringrequired
- createdAtstring (date-time)required
- dockerNamestring
- errorstring
- finishedAtstring (date-time)
- idstringrequired
- modeenum: new_volume | in_placerequired
- preBackupIdstring
- serviceIdstringrequired
- statusenum: pre_backup | restoring | succeeded | failedrequired
- swapStagedbooleanrequiredA restore into a new volume succeeded and the swap is staged: apply it with Deploy.
- volumeNamestringrequired
401Unauthorized403Forbidden404Not Found409Conflictbackup_not_restorable422Unprocessable Entityconfirmation_required500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.