Remove Zfs Snapshot - Best Practise

yena

Renowned Member
Nov 18, 2011
378
5
83
Hello,
what is the best practice to remove old zfs snapshot ?
Can i remove only strating from newer or can i start olso from older ?
Can i remove a random snapshot without corrupt others ?
Can i remove all VM snapshot using one commant line ?

Thanks!
 
Hello,
what is the best practice to remove old zfs snapshot ?
Can i remove only strating from newer or can i start olso from older ?
No matter.
Can i remove a random snapshot without corrupt others ?
Please explain briefly.
Can i remove all VM snapshot using one commant line ?
Yes, but not tested:
Code:
zfs list -H -o name -t snapshot | xargs -n1 zfs destroy
 
Can i remove a random snapshot without corrupt others ?

Yes, a snapshot is (simplified) only a reference to all used blocks, destroying one will only free the space that is only referenced once in this snapshot. Predicting how much space is freed by destroying a snapshot is not as easy as it sounds, it's quite the opposite.
 
Oh ... one remark:

If you created the snapshots via the GUI and not directly with zfs snapshot, please use qm delsnapshot for this.
 
  • Like
Reactions: fireon

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!