Restore a volume from one of its snapshots (see listVolumeSnapshots), replacing its data. Owners and admins.
Its service stops while the restore runs and starts again afterwards, even when it fails. The snapshot is restored next to the data and swapped in only once complete, so a failed restore leaves the data as it was. The volume needs room for the snapshot while this runs.
The volume shows restore while it runs, then restoredAt, or restoreError with why it failed.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonRestore a volume from one of its snapshots (see listVolumeSnapshots), replacing its data. Owners and admins.
Its service stops while the restore runs and starts again afterwards, even when it fails. The snapshot is restored next to the data and swapped in only once complete, so a failed restore leaves the data as it was. The volume needs room for the snapshot while this runs.
The volume shows restore while it runs, then restoredAt, or restoreError with why it failed.
API key access: full.
op*"restoreVolume""restoreVolume"id*stringsnapshotId*stringThe snapshot's id (or its first 8 or more characters).
Done. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"id": "vol_8kq2x7ad",
"op": "restoreVolume",
"snapshotId": "example"
}'{}