yesterday snapshot exposed as RO

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
Hi,

I have hourly snapshots of a NFS v3 share for VMware. The NFS store holds ISO images. I want a Yesterday NFS share that is read only so that if someone deletes an ISO they can go to the yesterday one and copy it back to the RWXD NFS share.

Are there any example scripts for snapshots?

*) un-share old NFS clone
*) delete stale clone
*) create new clone from yesterday snapshot(fnvol253/vmware70/nfs-rw/3@auto-2022-04-11_12-00)
*) share new NFS clone ad RO

Is there a simpler way to do this?

Thanks,
Joe
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
There is a hidden feature to reach snapshots over a share. If you browse to the root of the share, and go into the hidden ".zfs/" sub-directory, you should get a listing of all the snapshots within there, and can pull out the RO copies of files.
 

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
There is a hidden feature to reach snapshots over a share. If you browse to the root of the share, and go into the hidden ".zfs/" sub-directory, you should get a listing of all the snapshots within there, and can pull out the RO copies of files.

I will test with a symlink to the area and then share that, so I update the synmlink daily to the new snapshot.
 

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
I could not make a ln -s or ln to the snapshot folder even with the property "snapdir=visible"

Am i missing something? I can browse into the .zfs folder via ssh but not export any folder as I get the error "The path does not exist". This is with TrueNAS 12.0-U8.

ls /mnt/fnvol253/vmware70/nfs-rw/3/.zfs/snapshot/auto-2022-04-13_07-00
 
Top