Ir para o conteúdo
NimbusNexus

Backups agendados

Os backups sob demanda cobrem o caso "quero um snapshot deste volume agora". Os backups agendados fazem cópias de um volume em um cronograma e mantêm as mais recentes.

Um agendamento tem uma frequency e uma backup_quantity, o número de cópias a manter (padrão 5). Um agendamento daily roda todo dia; weekly roda a cada 7 dias e monthly a cada 30 dias, contados a partir do dia em que o agendamento foi criado. Crie um com POST /api/v1/backup_restore/backup_scheduler/; ele pertence ao seu workspace. Depois, vincule-o a cada volume com POST /api/v1/backup_restore/volume_scheduler/, informando o volume_id, o schedule_id e o type de cópia, snapshot ou backup. A vinculação retorna 409 se as cópias não couberem na sua cota de backup.

Para enviar as cópias backup também para um armazenamento externo, defina use_outside_storage na vinculação e associe o armazenamento com POST /api/v1/backup_restore/volume_scheduler/config-storage (config_id, storage_id, priority). O outside_backup_quantity do agendamento (padrão 1) define quantas cópias manter lá.

O agendador roda em segundo plano. Uma execução que falha é tentada de novo, e uma que continua falhando envia uma notificação. Para manter uma cópia além da rotação, como uma cópia de fim de ano, defina permanent: true nela com PATCH /api/v1/backup_restore/volume_backups/{volume_backup_id}.

Próximos passos

  • Backups — a contraparte sob demanda e o tipo de recurso que os agendamentos produzem.
  • Armazenamento em blocos — os volumes que os agendamentos copiam.

Reference

POST/api/v1/backup_restore/backup_scheduler/

Create Backup Schedule

Creates a recurring backup schedule for block storage volumes after validating the project's backup quota.

Request body

FieldTypeDescription
frequencyobject—
backup_quantityinteger | null—
outside_backup_quantityinteger | null—
enabledboolean | null—
domain_idstring | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 409Conflict
  • 422Validation error
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/backup_restore/backup_scheduler/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
GET/api/v1/backup_restore/backup_scheduler/list

Get Backup Schedule List

Lists block storage backup schedules in the current domain with pagination, sorting and frequency filtering.

Parameters

NameInTypeDescription
offsetqueryinteger | null—
limitqueryinteger | null—
sort_byquerystring | null—
sort_descqueryboolean—
frequencyquerystring | null—

Responses

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

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/backup_restore/backup_scheduler/list" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PATCH/api/v1/backup_restore/backup_scheduler/{backup_schedule_id}

Update Backup Schedule

Updates an existing block storage backup schedule and revalidates quota when the retention is increased.

Parameters

NameInTypeDescription
backup_schedule_id*pathstring—

Request body

FieldTypeDescription
frequencyBackupFrequencyEnum | null—
backup_quantityinteger | null—
outside_backup_quantityinteger | null—
enabledboolean | null—
domain_idstring | 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/backup_scheduler/<backup_schedule_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/backup_restore/backup_scheduler/{backup_schedule_id}

Delete Backup Schedule

Deletes a block storage backup schedule by its ID.

Parameters

NameInTypeDescription
backup_schedule_id*pathstring—

Responses

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

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/backup_restore/backup_scheduler/<backup_schedule_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/backup_restore/volume_scheduler/

Create Volume Scheduler Conf

Creates a per-volume backup scheduler configuration that links a volume to a backup schedule.

Request body

FieldTypeDescription
prefix_location_urlstring | null—
use_outside_storageOutsideStorageEnum | null—
enabledboolean | null—
volume_id*string—
schedule_id*string—
type*website__model__website__volume_backup__volume_backup__BackupTypeEnum—

Responses

  • 201Successful 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_scheduler/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "volume_id": "<volume_id>",
    "schedule_id": "<schedule_id>",
    "type": "snapshot"
  }'
POST/api/v1/backup_restore/volume_scheduler/config-storage

Create Config Storage

Attaches an external backup storage destination to a per-volume scheduler configuration.

Request body

FieldTypeDescription
config_id*string—
storage_id*string—
priority*integer—

Responses

  • 201Successful 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_scheduler/config-storage" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "config_id": "<config_id>",
    "storage_id": "<storage_id>",
    "priority": 1
  }'
PATCH/api/v1/backup_restore/volume_scheduler/config-storage/{config_storage_id}

Update Config Storage

Updates the external backup storage attachment of a per-volume scheduler configuration.

Parameters

NameInTypeDescription
config_storage_id*pathstring—

Request body

FieldTypeDescription
priorityinteger | 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_scheduler/config-storage/<config_storage_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/backup_restore/volume_scheduler/config-storage/{config_storage_id}

Delete Config Storage

Removes an external backup storage attachment from a per-volume scheduler configuration.

Parameters

NameInTypeDescription
config_storage_id*pathstring—

Responses

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

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/backup_restore/volume_scheduler/config-storage/<config_storage_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/backup_restore/volume_scheduler/detail/{config_id}

Get Volume Scheduler Conf Detail

Returns the detailed view of a per-volume backup scheduler configuration including its related entities.

Parameters

NameInTypeDescription
config_id*pathstring—

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_scheduler/detail/<config_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/backup_restore/volume_scheduler/list

Get Volume Scheduler Conf List

Lists per-volume backup scheduler configurations for the volumes in the current project with pagination.

Parameters

NameInTypeDescription
limitqueryinteger | null—
offsetqueryinteger | null—

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_scheduler/list" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PATCH/api/v1/backup_restore/volume_scheduler/{volume_scheduler_conf_id}

Update Volume Scheduler Conf

Updates an existing per-volume backup scheduler configuration by its ID.

Parameters

NameInTypeDescription
volume_scheduler_conf_id*pathstring—

Request body

FieldTypeDescription
prefix_location_urlstring | null—
use_outside_storageOutsideStorageEnum | null—
enabledboolean | null—
volume_idstring | null—
schedule_idstring | null—
typewebsite__model__website__volume_backup__volume_backup__BackupTypeEnum | 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_scheduler/<volume_scheduler_conf_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/backup_restore/volume_scheduler/{volume_scheduler_conf_id}

Delete Volume Scheduler Conf

Requests asynchronous deletion of a per-volume backup scheduler configuration.

Parameters

NameInTypeDescription
volume_scheduler_conf_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_scheduler/<volume_scheduler_conf_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"

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