[TUTORIAL] FabU: What’s in a snapshot?

UdoB

Distinguished Member
Nov 1, 2016
3,748
2,468
273
Germany
My only point here is that the term “snapshot” has different meanings, heavily depending on the contextual point-of-view:

  • PVE VM snapshot
This is the native Proxmox function. It freezes the current status of a VM. This state can be “unfrozen” later to restore this very status via “rollback”. They can be “taken”, “rolled back” and “removed” in the Web GUI under <vm> --> Snapshots and/or on the command line by “qm” command and/or by third party tools like “cv4pve”.
There are multiple software areas involved: the KVM/QEMU part needs to freeze the RAM and the CPU state and the underlying storage device needs to do the same with the virtual disks. This is where the confusion starts: not all storage types (filesystems or block devices, local or remote) can do this. Look at the column “Snapshots” in this table --> https://pve.proxmox.com/pve-docs/chapter-pvesm.html#_storage_types
  • PVE Container snapshot
I am not a Container user..., what should be mentioned here? Some hints --> https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pct_container_storage
  • PVE backup in “Snapshot Mode”
The snapshot mode works with the core capabilities of QEMU. The filesystem is “snapshotted” virtually, inside QEMU. This is completely ignoring the features of the underlying storage - it works filesystem agnostic! --> https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_backup_modes
  • PBS itself
“A Snapshot is the collection of manifest, blobs and indexes that represent a backup.” --> https://pbs.proxmox.com/docs/technical-overview.html#snapshots
  • ZFS Snapshot of a ZVOL/Dataset
Each ZVOL (usually used for virtual disks) / Dataset (usually used for “files” and “Directory Storages”) in a ZFS Pool can have one or multiple snapshots. This feature is also used to implement replication (https://pve.proxmox.com/pve-docs/pve-admin-guide.html#chapter_pvesr) which is the reason for ZFS being required for this.
  • LVM Snapshot
I am not an LVM user. What I see in https://pve.proxmox.com/pve-docs/pve-admin-guide.html#storage_lvmthin is that LVM-thin can do snapshots natively while LVM (thick, https://pve.proxmox.com/pve-docs/pve-admin-guide.html#storage_lvm) needs some help to implement this.
  • QCOW2
When an actual filesystem is used to provide a "Directory Storage" and the "qcow2" format is used for the virtual disk then snapshots can be created. --> https://pve.proxmox.com/pve-docs/chapter-pvesm.html#_storage_features


Corrections and additions welcome :-)




I put this under my “FabU”-label although it was not really “frequently answered” - just because... I like it this way ;-)
Please reply if I made something wrong or missed some important details; please “Like” it if you find this post interesting and want to give positive feedback.