9.5 Instant recovery
With instant recovery, an image or Hyper-V backup runs as a virtual machine before it is restored. The agent on the hypervisor serves the disks straight from the repository: reads go through a cache, writes go into a local overlay, and the repository is never changed. A failed machine is thus reachable as a VM within minutes while the actual restore is still pending.
The web interface has no page for this. Sessions are driven through the REST API (POST /instant). Every session appears as a run of kind "instant" under Runs, with log and progress, and does not count against the limits for concurrent jobs per agent or repository.
Modes
Mode | Requirement | Result |
|---|---|---|
| agent on a Proxmox VE node | The agent creates a VM and starts it on the NBD disks. "Migrate" moves the disks to a PVE storage while the VM runs (drive-mirror). |
| any agent | Only the disks are served (NBD, or iSCSI with |
| Windows agent on a Hyper-V host (feature | The disks are attached over iSCSI (loopback, CHAP) and the agent creates a VM with pass-through disks. "Migrate" copies them into new VHDX files (short downtime). |
The source is a snapshot of an image or hyperv workload. Proxmox vzdump backups cannot be started instantly because the archive has no random access; restore them instead. Read speed is that of the repository through the server: practical from local disks or a NAS, slow from S3.
Procedure
Find the snapshot ID of the image or Hyper-V backup (Restore or Runs, copy the snapshot ID).
Start the session:
POST /instantwithsnapshot_id,agent_id(agent on the hypervisor; default: the agent that made the backup) andmode. The answer containsidandrun_id; the session ID is the run ID.Query the state:
GET /instant/<id>(withlive=truethe server asks the agent directly). Phases:starting,serving(NBD ready),running(VM started),migrating,migrated,stopping,stopped,failed.When the VM works as expected, move the disks to real storage with
POST /instant/<id>/migrate("migrate back"). The NBD server then stops and the overlays are deleted.Or discard the session with
POST /instant/<id>/stop: the temporary VM and all writes are deleted.
Roles: starting and stopping need the right to restore (restore); reading needs readonly. migrate in mode export needs the Administrator role. Users restricted to their own machines may start instant recovery only from and to those machines.
Example: Proxmox
S=https://backup-server:8443/api/v1
H="Authorization: Bearer pdc_..."
# Boot the latest image of a machine as VM 9100 on a PVE node
curl -H "$H" -X POST $S/instant -d '{"snapshot_id":"<id>","agent_id":"<pve agent>","mode":"proxmox",
"proxmox":{"vmid":9100,"memory_mb":4096,"cores":2,"net0":"virtio,bridge=vmbr0","ostype":"win11"}}'
curl -H "$H" $S/instant/<id> # phase, NBD exports, overlay usage
curl -H "$H" -X POST $S/instant/<id>/migrate -d '{"storage":"local-lvm"}' # live move to real storage
curl -H "$H" -X POST $S/instant/<id>/stop # or: discard the VM and its writes
Live updates come from GET /events?run_id=<session ID> (server-sent events). After migrating, PVE keeps the new disk configuration as a pending change until the VM has been stopped and started once.
Endpoints
Endpoint | Role | Purpose |
|---|---|---|
| restore | Start a session; answer 201 with |
| readonly | List sessions ( |
| readonly | Query a session; |
| restore ( | Move the disks to real storage; 202, 409 if not running, already migrating or ended. |
| restore | End and discard the session; 409 if it already ended. |
Fields of POST /instant
Field | Meaning | Default |
|---|---|---|
| Required. Full ID or unique prefix (at least 8 hex characters). Workload | β |
| Agent on the hypervisor host; for | agent of the backup |
| Disk directories in the snapshot ( | all |
|
|
|
| Absolute folder for the overlays. Overlays are sparse files of the disk size; guest writes use space there. |
|
| Read cache per disk, 8 to 8192 MiB. | 256 |
| Mode | Unix socket |
| Mode | β |
| Serve the disks over the agent's iSCSI target instead of NBD. Needs the agent feature | β |
| Mode | β |
Migrate bodies
Mode | Body |
|---|---|
|
|
|
|
|
|
On stop in mode proxmox the agent destroys the temporary VM (qm stop, qm destroy), closes the NBD server and deletes the overlays; the run ends as "cancelled". In mode hyperv it turns the VM off, removes it and disconnects the iSCSI targets.