Snapshots, templates, clones, backups: how do they all compare?

johnnyutahh

Member
Sep 19, 2020
31
6
8
39
PVE newbie here.

1. How does the following wiki page apply to LXC Containers?
https://pve.proxmox.com/wiki/VM_Templates_and_Clones

2. There's no mention of "snapshots" in the above wiki page, even though PVE 6.2-11 seems to feature snapshot feature prominently over "template." Is this above wiki page still pertinent?

3. Is there some place where I can read about snapshots/templates/backups/clones, which things are pertinent and recommended today and which things/concepts are obsolete, etc?

4. Are there clearly-canonical/authoritative PVE docs (including for these concepts) in one place, docs that are kept current with currently software revision(s)? My initial experience is that the PVE docs are a tad bit chaotic. Many different sources, many references to obsolete points, etc. man pages might be current, but I have yet to find a man page which presents conceptual things (like the above) well from a "summarized, top-down" perspective.

(Point #4 might later deserve a separate post.)
 
2.) PVE has no own snapshotting but you can use a filesystem with snapshotting capabilities (zfs, qcow2 and lvm) for snapshotting. The PVE GUI has no automatic snapshotting build in but there are thirdparty scripts available like cv4pve to do that.
I think a mix of snapshots and backups is a good idea.

Look here the see which filesystem supports snapshots: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_storage_types
Look here for Backups: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#chapter_vzdump
 
2.) PVE has no own snapshotting...

PVE has no snapshot capability "built in," is this what I'm reading from @Dunuin 's note?

If so, how does one explain the following?

Code:
$ qm snapshot 199 mytestsnapshot1
Qemu Guest Agent is not running - VM 199 qmp command 'guest-ping' failed - got timeout
  Logical volume "snap_vm-199-disk-1_mytestsnapshot1" created.
$
$ qm listsnapshot 199
`-> node199_u_20_04_1__2020_09_20 2020-09-20 21:37:02     no-description
    `-> mytestsnapshot1         2020-09-21 09:33:01     no-description
        `-> current                                     You are here!
$
$ pveversion; date
pve-manager/6.2-11/22fb4983 (running kernel: 5.4.60-1-pve)
Mon 21 Sep 2020 09:34:06 AM CDT
$


macOS-Screenshot 2020-09-21 at 9.36.35 AM.png
 

Attachments

  • macOS-Screenshot 2020-09-21 at 9.36.35 AM.png
    macOS-Screenshot 2020-09-21 at 9.36.35 AM.png
    243.3 KB · Views: 7
You can manually create snapshots using the Proxmox Webinterface or cli but you can only do that If the VM is using qcow2 or is stored on zfs/lvm/ceph. If you use the wrong filesystem you can't snapshot at all. And there is no simple auto snapshotting and auto clean up build in the GUI. But atleast if using ZFS that isn't a big problem because there are 3rd party scripts like cv4pve which can do that.
 
Got it. So @Dunuin - why say "PVE has no own snapshotting"? Like you say, PVE "has" snapshotting under the conditions below, even if the features are not as rich as other software/systems. I'm not trying to be argumentative; rather, I'm just trying to understand what I'm missing.

In any case, I appreciate your thoroughness here, it's very helpful.

You can manually create snapshots using the Proxmox Webinterface or cli but you can only do that If the VM is using qcow2 or is stored on zfs/lvm/ceph. If you use the wrong filesystem you can't snapshot at all. And there is no simple auto snapshotting and auto clean up build in the GUI. But atleast if using ZFS that isn't a big problem because there are 3rd party scripts like cv4pve which can do that.
 
The problem is that manual snapshotting is quite useless in most cases. The good thing is that taking snapshots can be really fast and they don't need much space as long as they are fairly fresh. You can create one snapshot every 15 Minutes for 7 Days and they still might take less space than a single Backup. But snapshots grow and grow with each day and after some months a single snapshot can be much bigger than a years old backup.
So snapshots are only useful if you create alot of them at fixed intervalls and if they auto delete after some days or weeks, so you can't forget to delete them.
Also snapshots can never replace a real backup and because snapshots are always stored on the same drive as the data you are snapshotting you also loose all your snapshots if the drive fails. Of cause, you can use "zfs send | zfs receive" to incrementally sync snapshots to another server but that creates a 1:1 copy of all files and they are then just a tool to create full backups.

So snapshots are fine but you should combine them with real backups created by proxmox's vzdump. And to be really usefull you need to add some snapshot scripts so they can be automated.

I doesn't want to badmouth proxmox. Proxmox is able to do everything you need to snapshot, backup or replicate but it isn't easy and you need to configure or script alot by yourself or search for scripts other people already have written.

For example I'm missing a way to create monthly backups for long term storage. Or incremental backups. They just launched the Proxmox Backup server Beta so I hope they will be improving snapshots and backups in the future.
 
Last edited:
  • Like
Reactions: johnnyutahh
Ah, and with backups you can "travel" back and forth in time. If you got a backup from today, from 1 week ago and 1 month ago you can switch between these 3 dates als you like. Snapshots are a one-way ticket back in time. If you got snapshots from the same days and you restore a snapshot from 1 week ago (for example if you deleted a file yesterday and want it back) you loose everything that changed the whole week. you can't get back to the point where you came from. Atleast with zfs snapshots there is a feature to prevent this by creating clones based on a snapshot. You could create a clone based on the snapshots, browse that clone, restore the file you want, delete the clone and you loose nothing but only because you never really "restored" to a past snapshot. And I think Proxmox can't do that. You could ignore the proxmox gui/cli and just use the zfs commands to manipulate snapshots, but without gui thats not simple and you could easily delete something you don't want.
For such advanced features you should take a look at the documentations of the underlaying filesystem you are using. So KVM, LVM and ZFS documentation might be worth a look if you can't find information in the proxmox documentation.

So for best results use backups as the backbone of your backup strategy, snapshots to restore short term changes + raid to prevent downtime and extra work. And if you want to do it professional and got alot of money you could also build up a HA cluster and use it to "clone" the complete server so if one server fails there are always identical servers so you won't notice that there was a complete server crash.
 
Last edited:
  • Like
Reactions: johnnyutahh

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!