# 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
# install $ brew install corsinvest/tap/cv4pve-autosnap # run against any node $ cv4pve-autosnap --host=pve01 \ --api-token='autosnap@pve!snap=…' \ --vmid=@all \ snap --label=daily --keep=7
# install PS> winget install Corsinvest.cv4pve.autosnap # run against any node PS> cv4pve-autosnap --host=pve01 ` --api-token='autosnap@pve!snap=…' ` --vmid=@all ` snap --label=daily --keep=7
Create snapshot: autodaily260929020000Snapshots of your Proxmox VE guests, on a schedule
cv4pve-autosnap --host=pve01 --api-token='autosnap@pve!snap=…' --vmid=@all statusPart 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.
| NODE | VM | TIME | PARENT | NAME | DESCRIPTION | VM STATUS |
|---|---|---|---|---|---|---|
| pve01 | 105 | 26/09/28 07:00:02 | before-upgrade | auto2hourly260928070002 | cv4pve-autosnap | |
| pve01 | 105 | 26/09/28 09:00:04 | auto2hourly260928070002 | auto2hourly260928090004 | cv4pve-autosnap | |
| pve01 | 105 | 26/09/28 11:00:07 | auto2hourly260928090004 | auto2hourly260928110007 | cv4pve-autosnap | |
| pve01 | 1000 | 26/09/28 07:00:03 | no-parent | auto2hourly260928070002 | cv4pve-autosnap | |
| pve01 | 1000 | 26/09/28 09:00:06 | auto2hourly260928070002 | auto2hourly260928090004 | cv4pve-autosnap | |
| pve02 | 203 | 26/09/28 07:00:57 | no-parent | auto2hourly260928070002 | cv4pve-autosnap |
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.
A snapshot is not a backup
Section titled “A snapshot is not a backup”| 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 |
Where it fits
Section titled “Where it fits”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.
Outside the nodes, API only
Section titled “Outside the nodes, API only”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.
What it does for you
Section titled “What it does for you”Retention per label
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.
02Choose the guests
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.
03Storage guard
Before a snapshot, the usage of the storages holding the disks is checked: above 95% (or your threshold) the guest is skipped.
04Hook scripts
Your script runs at every phase (job start, before and after each snapshot and removal) with the guest, label and result in environment variables.
05Consistent snapshots
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.
06Try before you change
--dry-run prints what would be created and removed, without touching the cluster.
Take your first snapshots
Download the binary, try it with --dry-run, then schedule it.
official Proxmox partner