Zum Inhalt springen
NimbusNexus

Backups

Ein Backup ist eine Point-in-Time-Kopie eines Block-Volumes, in einem von zwei Typen: ein snapshot, den der Blockspeicher-Dienst neben dem Volume aufbewahrt, oder ein backup, eine separate vollständige Kopie. Sie erstellen sie on demand, oder ein Zeitplan erstellt sie für Sie.

Backups vs. Snapshots

Beide sind Point-in-Time-Kopien; sie unterscheiden sich im Betrieb:

type: snapshottype: backup
Was es istEin Snapshot, der beim Volume bleibtEine separate vollständige Kopie, die auch in Ihren eigenen Speicher gehen kann
Erstellt durchEinen direkten Aufruf oder einen ZeitplanEinen direkten Aufruf oder einen Zeitplan
Wiederhergestellt mitPOST /api/v1/backup_restore/volume_backups/snapshot_restorePOST /api/v1/backup_restore/volume_backups/backup_restore

Ein Snapshot gehört zu seinem Volume: Wenn Sie das Volume mit cascade: true löschen (DELETE /api/v1/storage/), werden auch seine Snapshots gelöscht.

Eine Kopie erstellen

POST /api/v1/backup_restore/volume_backups/create_backup kopiert ein Volume sofort. Geben Sie die volume_id und den type an, snapshot oder backup, dazu optional name, description und permanent. Bei einem backup sendet storage_ids die Kopie zusätzlich an externe Speicherverbindungen, die Sie mit POST /api/v1/external/connections/ eingerichtet haben.

Der Aufruf stellt die Arbeit in die Warteschlange und antwortet sofort, oder er antwortet mit 409, wenn die Kopie nicht in Ihr Backup-Kontingent passen würde. GET /api/v1/backup_restore/volume_backups/ listet Ihre Kopien auf, gefiltert nach backup_types und statuses, mit limit (Standard 10) und offset. Der status einer Kopie ist pending, in_progress, completed oder failed.

Geplante Kopien

Ein Zeitplan erstellt Kopien für Sie. Legen Sie einen mit POST /api/v1/backup_restore/backup_scheduler/ an und geben Sie dabei eine frequency und eine backup_quantity an; binden Sie ihn dann mit POST /api/v1/backup_restore/volume_scheduler/ an jedes Volume und geben Sie dabei die volume_id, die schedule_id und den type an. Die Details stehen unter Geplante Backups.

Aufbewahrung

Ein Zeitplan behält von jedem daran gebundenen Volume die neuesten backup_quantity Kopien (Standard 5) und löscht ältere, sobald neue Kopien hinzukommen; outside_backup_quantity (Standard 1) tut dasselbe für die Kopien in jedem externen Speicher. Kopien, die Sie on demand erstellen, bleiben, bis Sie sie löschen.

Um eine Kopie aus dieser Rotation herauszuhalten, setzen Sie bei ihr permanent: true, beim Erstellen oder später mit PATCH /api/v1/backup_restore/volume_backups/{volume_backup_id}.

Löschen Sie eine Kopie mit DELETE /api/v1/backup_restore/volume_backups/single/{volume_backup_id} oder mehrere mit DELETE /api/v1/backup_restore/volume_backups/bulk und ihren IDs im Query-Parameter backup_ids.

Wiederherstellen

Stellen Sie einen Snapshot mit POST /api/v1/backup_restore/volume_backups/snapshot_restore wieder her und ein Backup mit POST /api/v1/backup_restore/volume_backups/backup_restore. Beide nehmen {"backup_id": "…"} entgegen, stellen die Arbeit in die Warteschlange und antworten sofort. Die Kopie muss completed sein und den Typ des Endpoints haben; sonst antwortet der Aufruf mit 409.

Ein Restore wirkt an Ort und Stelle. Er erstellt aus der Kopie ein neues Volume, in derselben Größe und in derselben Availability Zone wie das Original, und setzt es an die Stelle des Originals:

  • Ein Daten-Volume wird von seiner VM getrennt, und das wiederhergestellte Volume wird an seiner Stelle angehängt.
  • Beim Boot-Volume einer VM wird die VM auf der wiederhergestellten Disk neu aufgebaut. Die neue VM übernimmt die Ports und Floating-IPs der alten, und die alte VM wird gelöscht. Die VM erhält eine neue id; die wiederhergestellte Disk behält die SSH-Keys, die sie hatte.

Die Kopien und Zeitplan-Bindungen des ursprünglichen Volumes gehen auf das wiederhergestellte Volume über.

Nächste Schritte

Reference

GET/api/v1/backup_restore/volume_backups/

List Volume Backups

Lists volume backups for the project's volumes with filtering by status and type plus pagination and sorting.

Parameters

NameInTypeDescription
limitqueryinteger | null—
offsetqueryinteger | null—
statusesquerystring | null—
backup_typesquerystring | null—
sort_byquerystring | null—
sort_descqueryboolean—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 404Not Found
  • 422Validation error
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/backup_restore/volume_backups/backup_restore

Run Backup Restore Queue Job

Queues a job that restores a completed volume backup back into a block storage volume.

Request body

FieldTypeDescription
backup_id*string—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/backup_restore" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "backup_id": "<backup_id>"
  }'
DELETE/api/v1/backup_restore/volume_backups/bulk

Delete Volume Backup Bulk

Deletes multiple volume backups in one call, removing them from block storage and any external storage destinations.

Parameters

NameInTypeDescription
backup_ids*queryarray of string—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 404Not Found
  • 422Validation error
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/bulk?backup_ids=%3Cbackup_id%3E" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/backup_restore/volume_backups/create_backup

Create Volume Backup Run Trigger

Queues a job that creates a new backup of a block storage volume after validating the project's quota.

Request body

FieldTypeDescription
namestring | null—
descriptionstring | null—
schedule_idstring | null—
schedule_config_idstring | null—
location_urlstring | null—
external_idstring | null—
storage_typestring | null—
regionstring | null—
volume_id*string—
type*website__model__website__volume_backup__configuration__BackupTypeEnum—
storage_idsarray of string | null—
statusobject—
permanentboolean—

Responses

  • 200Successful Response
  • 422Validation Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/create_backup" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "volume_id": "<volume_id>",
    "type": "snapshot"
  }'
POST/api/v1/backup_restore/volume_backups/run_job_single

Volume Backup Run Trigger By Specific Conf

Request body

FieldTypeDescription
config_id*string—
name*string—
descriptionstring | null—
permanentboolean | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 422Validation error
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/run_job_single" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "config_id": "<config_id>",
    "name": "Example"
  }'
POST/api/v1/backup_restore/volume_backups/schedule_job

Volume Backup Run Trigger By Schedule

Triggers the volume backup scheduler job for the requested frequency to evaluate due schedules.

Request body

FieldTypeDescription
frequency*"daily" | "weekly" | "monthly"—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 422Validation error
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/schedule_job" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "frequency": "daily"
  }'
DELETE/api/v1/backup_restore/volume_backups/single/{volume_backup_id}

Delete Volume Backup

Deletes a single volume backup from block storage and any associated external storage destinations.

Parameters

NameInTypeDescription
volume_backup_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 404Not Found
  • 422Validation error
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/single/<volume_backup_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/backup_restore/volume_backups/snapshot_restore

Run Snapshot Restore Queue Job

Queues a job that restores a completed snapshot-type backup into a block storage volume.

Request body

FieldTypeDescription
backup_id*string—

Responses

  • 200Successful Response
  • 422Validation Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/snapshot_restore" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "backup_id": "<backup_id>"
  }'
POST/api/v1/backup_restore/volume_backups/upload_exist

Upload Existing Volume Backup To Outside Storage

Queues jobs to upload an existing completed volume backup into one or more external storage destinations.

Request body

FieldTypeDescription
backup_id*string—
storage_idsarray of string | null—

Responses

  • 200Successful Response
  • 422Validation Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/upload_exist" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "backup_id": "<backup_id>"
  }'
PATCH/api/v1/backup_restore/volume_backups/{volume_backup_id}

Update Volume Backup

Updates the editable attributes of an existing volume backup record.

Parameters

NameInTypeDescription
volume_backup_id*pathstring—

Request body

FieldTypeDescription
namestring | null—
descriptionstring | null—
permanentboolean | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 404Not Found
  • 422Validation error
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/backup_restore/volume_backups/<volume_backup_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Need to make a real call? Try these endpoints in the live Swagger UI →