Backup and Policy APIs
Last validated: 2026-05-11
Use these APIs for backup lifecycle automation when CLI coverage is not available.
Method Inventory
| gRPC method | HTTP annotation | Main use case |
|---|---|---|
CreateBackup | POST /v1/vbase/{service_id}/backup | Trigger backup job for service/db collections. |
ListBackups | GET /v1/vbase/{service_id}/backup | List jobs for one service. |
ListBackupByOrg | POST /v1/vbase/backup/org/{organization_id} | List jobs for an organization across services. |
RestoreBackup | POST /v1/vbase/{service_id}/backup/restore | Trigger restore job by backup name. |
DeleteBackup | DELETE /v1/vbase/{service_id}/backup/{backup_name} | Delete backup artifact by backup name. |
CreateBackupPolicy | POST /v1/vbase/{service_id}/backup/policy | Create recurring backup policy. |
UpdateBackupPolicy | POST /v1/vbase/{service_id}/backup/policy/{policy_id} | Modify schedule/retention/active status. |
DeleteBackupPolicy | DELETE /v1/vbase/{service_id}/backup/policy/{policy_id} | Remove policy. |
Core Request Arguments
CreateBackupRequest
| Field | Type | Required | Description |
|---|---|---|---|
service_id | string | Yes | Service to back up. |
organization_id | string | Yes | Organization UUID for ownership validation. |
db_name | string | Yes | Database name in tenant endpoint. |
collection_names | repeated string | Yes | One or more collections. |
backup_name | optional string | No | User-defined backup label. |
RestoreBackupRequest
| Field | Type | Required | Description |
|---|---|---|---|
service_id | string | Yes | Target service for restore. |
organization_id | string | Yes | Tenant org UUID. |
backup_name | string | Yes | Existing backup artifact name. |
db_name | string | Yes | Target DB name. |
collection_names | repeated string | Yes | Collections to restore. |
CreateBackupPolicyRequest and UpdateBackupPolicyRequest
| Field | Type | Required | Description |
|---|---|---|---|
service_id | string | Yes | Service governed by this policy. |
organization_id | string | Yes on create | Tenant organization ID. |
policy_id | string | Yes on update/delete | Existing policy UUID. |
schedule_cron | string | Yes | Cron expression for schedule. |
retention_count | int32 | Yes | Number of backups to retain. |
is_active | bool | Optional on update | Active/inactive toggle. |
End-to-End Examples
Create backup
gRPC:
grpcurl -insecure \
-H "authorization: Bearer $TOKEN" \
-d '{
"service_id":"<service_id>",
"organization_id":"'"$ORG_ID"'",
"db_name":"<db_name>",
"collection_names":["docs"],
"backup_name":"docs-backup-001"
}' \
"rpc.dev.dodil.io:443" dodil.vbase.v1.VBaseService/CreateBackupHTTP:
curl -sS -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
"https://api.dev.dodil.io:443/v1/vbase/<service_id>/backup" \
-d '{
"service_id":"<service_id>",
"organization_id":"'"$ORG_ID"'",
"db_name":"<db_name>",
"collection_names":["docs"],
"backup_name":"docs-backup-001"
}'List backups for service
gRPC:
grpcurl -insecure \
-H "authorization: Bearer $TOKEN" \
-d '{"service_id":"<service_id>"}' \
"rpc.dev.dodil.io:443" dodil.vbase.v1.VBaseService/ListBackupsHTTP:
curl -sS \
-H "Authorization: Bearer $TOKEN" \
"https://api.dev.dodil.io:443/v1/vbase/<service_id>/backup"Restore backup
gRPC:
grpcurl -insecure \
-H "authorization: Bearer $TOKEN" \
-d '{
"service_id":"<service_id>",
"organization_id":"'"$ORG_ID"'",
"backup_name":"docs-backup-001",
"db_name":"<db_name>",
"collection_names":["docs"]
}' \
"rpc.dev.dodil.io:443" dodil.vbase.v1.VBaseService/RestoreBackupHTTP:
curl -sS -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
"https://api.dev.dodil.io:443/v1/vbase/<service_id>/backup/restore" \
-d '{
"service_id":"<service_id>",
"organization_id":"'"$ORG_ID"'",
"backup_name":"docs-backup-001",
"db_name":"<db_name>",
"collection_names":["docs"]
}'Create daily backup policy
gRPC:
grpcurl -insecure \
-H "authorization: Bearer $TOKEN" \
-d '{
"service_id":"<service_id>",
"organization_id":"'"$ORG_ID"'",
"schedule_cron":"0 0 * * *",
"retention_count":7
}' \
"rpc.dev.dodil.io:443" dodil.vbase.v1.VBaseService/CreateBackupPolicyHTTP:
curl -sS -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
"https://api.dev.dodil.io:443/v1/vbase/<service_id>/backup/policy" \
-d '{
"service_id":"<service_id>",
"organization_id":"'"$ORG_ID"'",
"schedule_cron":"0 0 * * *",
"retention_count":7
}'Operational Notes
- Backup deletion resolves job by
backup_namefor the given service; ensure names are unique enough for your organization conventions. - Keep
db_nameandcollection_namesaligned with current tenant state before restore. - Policy update/delete requires a valid UUID
policy_id.