Snapshot errors
Why the platform refuses to take or restore a snapshot of a PostgreSQL cluster, SQL Server instance or container instance, and what to do about each refusal.
PostgreSQL clusters, SQL Server instances and container instances can be snapshotted and restored
through these routes under
/boundaries/{boundaryId}/resourcegroups/{resourceGroupName}/resources/{type}, where {type} is
postgresclusters, sqlserverclusters or containerinstances:
| Route | What it does |
|---|---|
POST /{name}/snapshots |
Takes a snapshot |
POST /{name}/snapshots/{snapshotId}/restore |
Restores a snapshot, optionally to a point in time with {"targetTime": "…"} |
PUT /{name}/backup-policy |
Sets the snapshot schedule — container instances only |
How to do the same in the portal and with the CLI is described for PostgreSQL, SQL Server and container instances.
The refusal
When the resource cannot be snapshotted or restored as it stands, the route answers 422 in the
problem format, and nothing is started:
{
"type": "…",
"title": "nothing-to-back-up",
"status": 422,
"detail": "Container instance 'web' declares no persistent volume, so there is nothing to snapshot.",
"code": "nothing-to-back-up",
"remediation": "Add a persistent volume to a component to make the instance backupable.",
"module": "containerinstances",
"correlationId": "3f2b9c1e-6d4a-4e0b-9a51-2c7d8e0f4b6a"
}title and code both hold the code, detail says what is wrong with this resource, and
remediation says what to do. module is db-postgres, db-sqlserver or containerinstances,
whichever serves the route; the codes are documented here, under the platform's core, because the
resource types share them. A snapshot id that does not exist answers 404 with
NOT_FOUND instead.
backups-not-configured
Status 422. PostgreSQL clusters only, on the snapshot and restore routes.
Backups are turned off on the cluster, so it has no archive to take a snapshot into or to restore from.
What to do: turn backups on for the cluster — see Turn on backups — wait for the first archive, and try again.
archiving-failing
Status 422. PostgreSQL clusters only, on the snapshot and restore routes.
Backups are on, but the cluster reports that it cannot write its archive; detail includes the
cluster's reason. Until the archive works, a snapshot would never complete. While a cluster has not
reported on its archive yet, a snapshot is accepted and stays in progress.
What to do: the backup store is usually the cause, and the platform's operators are the ones to fix it — see When archiving fails. Try again once archiving works.
bootstrap-pending
Status 422. SQL Server instances only, on the snapshot route.
The instance has not finished creating its initial database, so a snapshot would not hold it. An instance created without an initial database, which the API and the CLI allow, keeps answering this code — see Take a snapshot.
What to do: wait until the instance reports Running with its database created, and try again.
nothing-to-back-up
Status 422. Container instances only, on the snapshot and backup policy routes.
The instance has no persistent volume, so there is nothing to snapshot or to schedule.
What to do: add a persistent volume to one of the instance's components if its data should be backed up.
snapshot-not-usable
Status 422, on the restore route of all three resource types.
The restore cannot be carried out from this snapshot, or to the time asked for. detail and
remediation say which:
| Resource type | Cause | Remediation |
|---|---|---|
| SQL Server, container instances | The snapshot has not completed yet | "Wait for the snapshot to complete." |
| SQL Server, container instances | The snapshot failed or only partly succeeded | "Take a new snapshot." |
| SQL Server, container instances | targetTime was sent; these types cannot be restored to a point in time |
"Restore from a snapshot instead." |
| PostgreSQL | The snapshot has not completed | "Wait for the snapshot to complete, or take a new one." |
| PostgreSQL | targetTime is before the start of the cluster's archive, or in the future |
"Pick a time inside the recovery window." |
What to do: follow remediation. A snapshot whose status does not move on to Completed
will not become usable; take a new one. For a PostgreSQL cluster,
GET /{name}/snapshots/pitr-window gives the times you can restore to — see
Restore to a point in time.