Skip to content
Prefer a web interface with scheduled runs? cv4pve-autosnap also runs inside cv4pve-admin →
# install (x64; arm64 on the Releases page)
$ wget https://github.com/Corsinvest/\
cv4pve-autosnap/releases/latest/download/\
cv4pve-autosnap-linux-x64.zip
$ unzip cv4pve-autosnap-linux-x64.zip
$ chmod +x cv4pve-autosnap

# run against any node
$ ./cv4pve-autosnap --host=pve01 \
    --api-token='autosnap@pve!snap=…' \
    --vmid=@all \
    snap --label=daily --keep=7
Create snapshot: autodaily260929020000

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.
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.

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