Snapshots in the info screen: list, take, roll back, delete #8

Closed
opened 2026-11-02 22:55:41 +01:00 by Duckboot · 0 comments
Owner

Why

A snapshot is the cheapest safety net before an upgrade or a change inside a guest: it is quicker than a backup and can be rolled back in seconds. Today the TUI has no way to see or take snapshots.

Proposal

Add a "Snapshots" section to the info screen:

  • Lists the snapshots with name, date and description.
  • p takes a snapshot. The default name is tui-<YYYYMMDD-HHMM>, the description is optional, and for VMs you can choose whether to include RAM.
  • Roll back to a snapshot. This needs a strong confirmation, because it discards everything changed since the snapshot.
  • Delete a snapshot, with confirmation.

cv4pve-cli (2.4.0)

  • get guest snapshots <node> <vmtype> <vmid>
  • create ct snapshot <node> <vmid> <snapname> <descr> (VMs: create vm snapshot)
  • do rollback (check the exact syntax with --help)
  • Delete: check the delete subcommands.

Done when

  • All four operations work for both LXC and VM.
  • Tests are written first, with cv4pve-cli mocked.
  • A live test runs on CT 104: take, roll back, delete. The CT is restored afterwards.

Risks

  • A rollback loses data written after the snapshot, so the confirmation must name the snapshot and its date.
  • A VM snapshot with RAM can be large.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

## Why A snapshot is the cheapest safety net before an upgrade or a change inside a guest: it is quicker than a backup and can be rolled back in seconds. Today the TUI has no way to see or take snapshots. ## Proposal Add a "Snapshots" section to the info screen: - Lists the snapshots with name, date and description. - `p` takes a snapshot. The default name is `tui-<YYYYMMDD-HHMM>`, the description is optional, and for VMs you can choose whether to include RAM. - Roll back to a snapshot. This needs a strong confirmation, because it discards everything changed since the snapshot. - Delete a snapshot, with confirmation. ## cv4pve-cli (2.4.0) - `get guest snapshots <node> <vmtype> <vmid>` - `create ct snapshot <node> <vmid> <snapname> <descr>` (VMs: `create vm snapshot`) - `do rollback` (check the exact syntax with `--help`) - Delete: check the `delete` subcommands. ## Done when - All four operations work for both LXC and VM. - Tests are written first, with `cv4pve-cli` mocked. - A live test runs on CT 104: take, roll back, delete. The CT is restored afterwards. ## Risks - A rollback loses data written after the snapshot, so the confirmation must name the snapshot and its date. - A VM snapshot with RAM can be large. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Duckboot added the
priority
1-high
label 2026-11-02 22:55:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Duckboot/cv4pve-cli-tui#8