Restoring from previous version (shadow copy) not working

Status
Not open for further replies.

karsayor

Cadet
Joined
Jul 26, 2018
Messages
3
Hi there,

I did a setup of freenas and all is good except that I configured snapshots (like this or like this) and I can browse previous versions, but I am unable to restore files or copy them to other location, it says file is invalid or filename too long, but the length should not be the issue since I tried with mapped drive and it's less than 255 car.

My setup is as is :

1 : is the volumes setup
2 : is the snapshot setup
3-4 : is share setup

Any idea about what is wrong ?
 

Attachments

  • 1.PNG
    1.PNG
    16.8 KB · Views: 473
  • 2.PNG
    2.PNG
    19.5 KB · Views: 434
  • 3.PNG
    3.PNG
    14.1 KB · Views: 403
  • 4.PNG
    4.PNG
    25.3 KB · Views: 433

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Check the files to see if they contain alternate datastreams. From the FreeNAS cli cd /mnt/<pool>/path/to/share then lsextattr user *. If you see xattrs with the prefix "DosStream", then those files won't be able to be restored via previous versions over SMB2. The samba project is looking at a possible ABI change to make this work (not an easy fix). https://bugzilla.samba.org/show_bug.cgi?id=13455

One workaround I do is to expose the zfs snapdir over SMB. Add the share auxiliary parameter zfsacl:expose_snapdir=true, and the share auxiliary parameter veto files = /.windows/.mac/

Once you add those parameters, restart samba, log out and log back in on your windows client, then navigate to
\\server\share\.zfs\snapshot\
You have to paste the full path into explorer unless you choose to set the zfs dataset property "snapdir=visible" from the CLI.

This is working properly in 11.1-U5, but possibly not earlier versions.
 

karsayor

Cadet
Joined
Jul 26, 2018
Messages
3
hi anodos,

Thanks, it was exactly what you said. I could make it work as you said by adding these auxiliary parameters to the share

Code:
zfsacl:expose_snapdir=true
veto files = /.windows/.mac/


and access the .zfs\snapshot folder.

I have 2 questions though :
  • Are the permissions of this snapshot folder the same as the folder itself ? It seems yes but can you confirm please.
  • Will this continue to work with future versions of Freenas or is it only a temporary workaround ?
Thanks for your help !
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
hi anodos,

Thanks, it was exactly what you said. I could make it work as you said by adding these auxiliary parameters to the share

Code:
zfsacl:expose_snapdir=true
veto files = /.windows/.mac/


and access the .zfs\snapshot folder.

I have 2 questions though :
  • Are the permissions of this snapshot folder the same as the folder itself ? It seems yes but can you confirm please.
  • Will this continue to work with future versions of Freenas or is it only a temporary workaround ?
Thanks for your help !

The permissions will be the same as when the snapshot was taken. This feature will continue to work in future versions of freenas and will also be in upstream Samba eventually.
 
Status
Not open for further replies.
Top