Backup of snapshots?

petemcdonnell

New Member
Oct 23, 2021
10
0
1
47
I've done lots of searching and haven't seen this question answered, but I apologize in advance if I missed something.

Does Proxmox Backup Server backup manually created snapshots of a VM? Can the snapshots be restored without restoring the entire VM?

Thanks in advance!
 

Dunuin

Famous Member
Jun 30, 2020
6,811
1,585
149
Germany
What are you meaning with snapshots? Backup snapshots (PBS also calls each single backup of a VM a snapshot) or do you mean the snapshots you create with the filesystem itself (like ZFS/qcow2/LVM snapshots)? As far as I understand PBS will just create backups of the files/block devices as they are right now when you back them up. It won't include any older states of the VM that were created using ZFS/LVM/qcow2 snapshots.
 

petemcdonnell

New Member
Oct 23, 2021
10
0
1
47
What are you meaning with snapshots? Backup snapshots (PBS also calls each single backup of a VM a snapshot) or do you mean the snapshots you create with the filesystem itself (like ZFS/qcow2/LVM snapshots)? As far as I understand PBS will just create backups of the files/block devices as they are right now when you back them up. It won't include any older states of the VM that were created using ZFS/LVM/qcow2 snapshots.
Sorry to not be clear - I'm talking about snapshots created in the PVE web gui. For example, if I make a PVE snapshot before a major change and that VM is included in a PBS backup job, does the snapshot get included in the backup? Can it be restored?

Thanks
 

fiona

Proxmox Staff Member
Staff member
Aug 1, 2019
2,017
362
88
Hi,
Sorry to not be clear - I'm talking about snapshots created in the PVE web gui. For example, if I make a PVE snapshot before a major change and that VM is included in a PBS backup job, does the snapshot get included in the backup? Can it be restored?
no, as @Dunuin already said, snapshots are not included. But if you create a backup before the major change, the backup contains the state from before the change. You can add a note to the backup so you can identify it later.
 

booradlly

New Member
Apr 1, 2022
8
0
1
Hi,

no, as @Dunuin already said, snapshots are not included. But if you create a backup before the major change, the backup contains the state from before the change. You can add a note to the backup so you can identify it later.


Just to be clear, it is impossible to backup a VM's snapshots made through the gui with regular proxmox?
"INFO: snapshots found (not included into backup)"

And the new proxmox backup server does not add this functionality either ? Really ?

From everything I am reading, the only way to backup VM PVE snapshots, is by rsyncing the entire lvm pool, to another remote lvm pool, or by using zfs send on a zfs system.

Is this really true ?

Where is the snapshot information stored, that isnt being backed up? Like if LVM rsync works, then shouldn't I be able to go in, and backup the snapshot information manually or something ?

To give some context, I've been using ESXI forever, and now switching to Proxmox. In ESXI, if I wanted to backup a VM, I simply copied that VM's folder to a new server, and registered the VM, and everything, including the snapshot information would be there on the new server.

If my proxmox lvm pool hard drive dies, I want to replace said harddrive, and push a button to restore the data from backup. I don't see a way to do that here. I might have to reregister the VMs, but I could do that in ESXI.
 
Last edited:

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
8,062
993
163
34
Vienna
the difference is in the disk format, on esxi (i assume) you use vmdk files. these can contain the snapshots themselves, so when you copy them, they contain the snapshots. on pve, there are many storages available, and for most, the disks are not actual files, but block devices (e.g. ceph rbd, zfs zvols, lvm, etc.) and on those, the snapshots are not contained in the images, but (often) seperately (e.g. lvmthin snapshots are only loosely connected to the actual disk images)

so there is no feasible way to backup those snapshots. if you'd use only qcow2 images (those contain the snapshots like vmdks) you can copy them somewhere else (turn off the vm first though, else you'll get data corruption)
 

booradlly

New Member
Apr 1, 2022
8
0
1
the difference is in the disk format, on esxi (i assume) you use vmdk files. these can contain the snapshots themselves, so when you copy them, they contain the snapshots. on pve, there are many storages available, and for most, the disks are not actual files, but block devices (e.g. ceph rbd, zfs zvols, lvm, etc.) and on those, the snapshots are not contained in the images, but (often) seperately (e.g. lvmthin snapshots are only loosely connected to the actual disk images)

so there is no feasible way to backup those snapshots. if you'd use only qcow2 images (those contain the snapshots like vmdks) you can copy them somewhere else (turn off the vm first though, else you'll get data corruption)

Wait, so if I use qcow2, then I could rsync those files somewhere else?
Would I still be able to use LVM, or would I need to use something else, to rsync the individual qcow2 files instead the whole lvm volume ?
Lets say I have a backed up qcow2 on external nfs storage, then I create a new proxmox server, would I be able to connect that nfs storage to the new proxmox server, somehow regsiter my vm, and see the snapshots ?

How does clustering effect this ?
Like if I have a regular cluster, and I migrate a VM from one node to the other, do the snapshots go with it ?
If I have a High availaibilty cluster, do snapshots created on one host, automatically appear on the other host ?
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
8,062
993
163
34
Vienna
Wait, so if I use qcow2, then I could rsync those files somewhere else?
yes, you can simply rsync qcow2 files since they are normal files (note that you must not do that while the vms are running, or you'll get data corruption)
Would I still be able to use LVM, or would I need to use something else, to rsync the individual qcow2 files instead the whole lvm volume ?
i don't get the question, lvm and qcow2 has nothing to do with each other. qcow2 files are files, lvm is a block level storage (no files)


Lets say I have a backed up qcow2 on external nfs storage, then I create a new proxmox server, would I be able to connect that nfs storage to the new proxmox server, somehow regsiter my vm, and see the snapshots ?
not completetly, in addition to the storage level snapshots, we save the snapshots in the config file too ( e.g. /etc/pve/nodes/NODENAME/qemu-server/ID.conf) these
config snapshots are the authority for showing snapshots in pve (and the names correspond with the snapshots on the storage layer)
this is done since the hardware config of the vm can change between snapshots and to correctly rollback the snapshot it must be the same as when taking the snapshot (when ram is included)
that's another thing, if you take snapshots with ram, for each snapshot there is a volume on the storage for that (which you must also copy)

How does clustering effect this ?
Like if I have a regular cluster, and I migrate a VM from one node to the other, do the snapshots go with it ?
If I have a High availaibilty cluster, do snapshots created on one host, automatically appear on the other host ?
this depends:

if the vm disks are on shared storage, there is nothing to migrate so it works.
if the disks are on local storage, we should always be able to do that for offline migration, but for live migration it depends on the storage (won't work for qcow2, but for zfs AFAIR)

EDIT: to clarify, HA will only work for shared storage (or for zfs replicated vms) HA with local storage cannot work, since if the node is down, you cannot recover it from the other ones
 
Last edited:

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 your own in 60 seconds.

Buy now!