Snapshots

Maher Khalil

Member
Jul 11, 2021
113
5
18
40
I have created several snapshots for VM
when I want to restore the first one. it says that it is not the most recent one.
Is there anyway to make proxmox restore any snapshot I want?
 

bbgeek17

Active Member
Nov 20, 2020
182
34
28
www.blockbridge.com
The ability to restore from any snapshot is fully storage dependent. If the backing storage allows it, which very few do, then you will be able to do so.

Think of it this way - each snapshot builds on top of the next one. By restoring something in the middle you are invalidating anything that was snapshotted since. Otherwise it would require a very expensive recalculation and re-arranging of storage.

Simply remove any subsequent snapshots for your desired result. Or you can make a full clone from any snapshot to a new VM, that will preserve your original stuff.


Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

bbgeek17

Active Member
Nov 20, 2020
182
34
28
www.blockbridge.com
Perhaps you can research it and report back here for the future readers.

Here is an example:
https://www.google.com/search?q=zfs...+restore&oq=zfs+out+of+order+snapshot+restore

First link:
Code:
You can use the zfs rollback command to discard all changes made to a file system since a specific snapshot was created. The file system reverts to its state at the time the snapshot was taken. By default, the command cannot roll back to a snapshot other than the most recent snapshot.

To roll back to an earlier snapshot, all intermediate snapshots must be destroyed. You can destroy earlier snapshots by specifying the -r option.

If clones of any intermediate snapshots exist, the -R option must be specified to destroy the clones as well.

Take the storage list from here https://pve.proxmox.com/wiki/Storage#_storage_types and check it one by one. I suspect none in that list.


Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

Dunuin

Famous Member
Jun 30, 2020
4,293
934
143
Germany
I heard qcow2 would allow you to restore to any snapshot.

ZFS will allow it but will destroy all following snapshots doing that. So it is possible to rollback to any snapshot but the PVE team forbid that using the CLI/GUI so that people don'T wonder why all the snapshots are deleted. But there was a script in some thread in this forum which will automatically delete all snapshots newer than the snapshot you want to rollback to and then rollback to that snapshot so you don't need to delete all the newer snapshots by hand first.

If you only need daily snapshots I would recommend switching from snapshots to PBS backups. These are deduplicated so if you want to store your backups for a long time it should consume less space than using snapshots because nothing needs to be stored more than once. And because the backups are incremental they are quite fast to do for backups as long as you don'T reboot your VMs so the dirty bitmaps are working.
Big benefit of this is, that these are real backups and not just snapshots so if you got 100 daily backups you can switch freely back and forth between these 100 days without loosing anything. And if this VM didn't changed much the 100 backups won't be much bigger than a single backup because only the differences between the backups needs to be stored (so like with snapshots). And in contrast to snapshots you won't loose your VM if the VM storage dies.
 
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!