Mounting zfs backups

zBrain

Active Member
Apr 27, 2013
37
0
26
I have some VMs running with disks on zvol in Proxmox. I am using sanoid/syncoid to push zfs snapshots to a FreeNAS box as backup - but I'm curious if I can mount the snapshot read only and extract single files. The filesystem on the VM is ext4 if that matters.

Purely educational at this point, I'd like to know what is possible before I need it in a hurry.
 
Yes, that's possible:
Just clone the desired snapshot to a new name. We need a clone, because some filesystems write to it while opening (resetting journal and such). The newly cloned dataset will have a zvol entry in /dev/zvol/<poolname>/<dataset> and the partitions can be exposed by running kpartx. Afterwards you can just mount the partition and do your recovery.
 

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!