Skip to content

Up and running in 4 steps

  1. Install cv4pve-autosnap
  2. Create an API token
  3. Run cv4pve-autosnap status
  4. Take the first snapshots
Step by step in Getting Started →

Snapshots of your Proxmox VE guests, on a schedule

Runs outside the nodes, API only. One command takes a snapshot of the VMs and containers you choose and removes the oldest ones, so every label keeps exactly the number of snapshots you set.

By sysadmins, for sysadmins.

Built by Corsinvest, official Proxmox partner.

arch=$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/;s/armv7l/arm/')
wget https://github.com/Corsinvest/cv4pve-autosnap/releases/latest/download/cv4pve-autosnap-linux-$arch.zip
unzip cv4pve-autosnap-linux-$arch.zip
chmod +x cv4pve-autosnap
./cv4pve-autosnap --host=pve01 --api-token='autosnap@pve!snap=…' --vmid=@all status

Part of the real output on a test cluster: a job runs every two hours with the label 2hourly and --keep=10, so each guest has its last ten snapshots.

cv4pve-autosnap --host=pve01 --api-token='autosnap@pve!snap=…' --vmid=@all status
NODEVMTIMEPARENTNAMEDESCRIPTIONVM STATUS
pve0110526/09/28 07:00:02before-upgradeauto2hourly260928070002cv4pve-autosnap
pve0110526/09/28 09:00:04auto2hourly260928070002auto2hourly260928090004cv4pve-autosnap
pve0110526/09/28 11:00:07auto2hourly260928090004auto2hourly260928110007cv4pve-autosnap
pve01100026/09/28 07:00:03no-parentauto2hourly260928070002cv4pve-autosnap
pve01100026/09/28 09:00:06auto2hourly260928070002auto2hourly260928090004cv4pve-autosnap
pve0220326/09/28 07:00:57no-parentauto2hourly260928070002cv4pve-autosnap
The name is auto + label + timestamp; both the timestamp and TIME are in the local time of the machine that runs the tool. VM STATUS is X when the snapshot includes the RAM (--state).

A snapshot is the quickest way back when something goes wrong inside a guest: a package upgrade that breaks the boot, a bad configuration change, a script that deletes the wrong folder. Proxmox VE takes a snapshot in one click, but only when someone remembers to click, and it never removes the old ones. Snapshots that nobody removes pile up and fill the storage.

cv4pve-autosnap does both halves of the job: it takes the snapshot of every guest you select and removes the oldest ones of the same label, so a schedule of every two hours, keep 10 stays at ten snapshots per guest, forever. Run it from cron or the Windows Task Scheduler at fixed times, or from your own scripts right before an upgrade: no hand-written loop over the API to maintain.

Snapshot (cv4pve-autosnap) Backup (vzdump, Proxmox Backup Server)
Where it is On the storage of the guest disks On a separate storage
Survives the loss of that storage No Yes
Going back Rollback in place, the guest returns to that moment Restore, as the same or a new guest
Cost Each snapshot keeps the blocks changed since it was taken: keep a few, for a short time Space on the backup storage
Needs A storage that supports snapshots: see the storage table Any storage for the guest; a backup target

The cv4pve suite follows the Unix philosophy: each tool does one thing and does it well. cv4pve-autosnap keeps recent restore points of the guests. Its companion in continuous protection, cv4pve-node-protect, saves the configuration of the nodes, the part that guest backups do not cover.

Want the schedules, the history of the runs and HTTP webhooks from a web interface? cv4pve-admin runs the same engine as its AutoSnap module.

cv4pve-autosnap runs outside the cluster (on your workstation, a management VM or a scheduled job) and talks only to the Proxmox VE REST API. Nothing is installed on the nodes and no SSH or root shell is needed: an API token with the four privileges in Permissions is enough. Give it more than one node and it connects to the first one that answers, so the snapshots still run while a node is down.

hourly, daily, weekly, or any name you choose. Each label keeps its own number of snapshots; the oldest are removed right after the new one is taken.

By ID, name, range, node, pool or tag, with exclusions. The selection is read at every run, so a migrated or newly tagged guest is picked up with no change.

Before a snapshot, the usage of the storages holding the disks is checked: above 95% (or your threshold) the guest is skipped.

Your script runs at every phase (job start, before and after each snapshot and removal) with the guest, label and result in environment variables.

Warns when a VM has the QEMU guest agent off. With the agent, Proxmox VE freezes the guest filesystems during a snapshot without RAM; --state saves the RAM too.

Part of the cv4pve suite →

Take your first snapshots

Download the binary, try it with --dry-run, then schedule it.

ProxmoxMade by Corsinvest,
official Proxmox partner