vm_backup_snapshot_history
Measure snapshot-open durations from vCenter task history for a chosen VM, identifying backup windows and snapshots left behind. Helps validate backup jobs without backup server credentials.
Instructions
[READ] How long backups held a snapshot open on one VM, from task history.
Image-level backup products (Veeam, Commvault, Rubrik, NetBackup) snapshot the VM, copy the frozen disks, then delete the snapshot. vCenter records both ends, so the backup window is recoverable without credentials for the backup server.
This is a LOWER BOUND on the job, not its duration: work the product does
before the snapshot is taken and after it is removed is invisible to
vCenter. The returned basis says so — quote it alongside any figure.
Returns a rollup, not the list envelope: counts, four hour statistics
(backup_active / snapshot_present / total_window / snapshot_removal),
latest_cycle, longest_cycle, and unmatched rows for creations with no
removal (a backup that left its snapshot behind) or removals whose creation
predates the window.
Read two fields before reporting all-clear. history_unavailable non-null
means the history could not be read at all — that is not "no backups".
coverage_note non-null means vCenter has already expired part of the
requested window (vpxd.task.maxAge, 30 days by default), so the counts
describe a shorter period than days asked for.
Duplicate VM names raise rather than resolve to one, because a duration attributed to the wrong same-named VM looks exactly like a correct answer. For snapshots that exist right now use vm_list_snapshots or snapshot_aging.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | How far back to look, 1 to 365 (default 30). | |
| limit | No | Max cycle rows when include_cycles is set (capped at 200). | |
| target | No | vCenter/ESXi target from config (default if omitted). | |
| vm_name | Yes | Exact VM name; duplicates are refused, not guessed. | |
| include_cycles | No | Also return the individual cycles, newest kept on cap. |