[SOLVED] Samba 4 can't copy from previous version in Windows

ukro

Member
May 16, 2021
125
13
23
39
HW:
HP server ML110G9

SW:
Fileserver VM - debian 11 - Samba version 4.13.13-Debian
UserPC - Windows 8 / Windows 11

ZFS:
data/subdata@GMT-2023.07.05-19.41.00

smb.conf:


Code:
vfs objects = shadow_copy2 acl_xattr
    acl_xattr:ignore system acls = yes
    shadow: format = GMT-%Y.%m.%d-%H.%M.%S
    shadow: sort = desc
    shadow: snapdir = .zfs/snapshot
    shadow: basedir = /data
    shadow: share_root = /data/subdata
    shadow: localtime = yes
    zfsacl:expose_snapdir=true
    veto files = /.windows/.mac/


Samba log:

Code:
root opened file PngItem_1468479.png {@GMT-2023.07.05-23.41.00} read=No write=No (numopen=3)
[2023/07/05 17:21:28.422995,  2] ../../source3/smbd/close.c:824(close_normal_file)
  root closed file PngItem_1468479.png {@GMT-2023.07.05-23.41.00} (numopen=2) NT_STATUS_OK
[2023/07/05 17:21:30.401392,  2] ../../source3/smbd/open.c:1524(open_file)
  root opened file PngItem_1468479.png {@GMT-2023.07.05-23.41.00} read=Yes write=No (numopen=4)
[2023/07/05 17:21:30.430323,  2] ../../source3/smbd/trans2.c:3646(smbd_do_qfsinfo)
  stat of . failed (No such file or directory)
[2023/07/05 17:21:30.432968,  2] ../../source3/smbd/trans2.c:3646(smbd_do_qfsinfo)
  stat of . failed (No such file or directory)
[2023/07/05 17:21:30.435970,  2] ../../source3/smbd/trans2.c:3646(smbd_do_qfsinfo)
  stat of . failed (No such file or directory)
Problem description:

1) When i delete a file and open previous version through the tab in windows, I am able to open png file, not vsd (for now this files i have tested)

2) I am not able to copy any files/folders from the snapshot that opened when i pres open from the properties/previous version tab to my local machine.

Code:
Popup error Title: Item Not Found


Popup error message: Could not find this item


This is no longer located in \\192.168.6.179\subdata\subdata(\\192.168.6.179). Verify the item's location and try again.

3) I am able to go to .zfs/snapshot folder through smb and copy the file successfully to User PC.

4) I would like to transfer away from windows to linux, which i really need the shadow copy to work.

- I have googled through the internet, i used ChatGPT for 2days straight and was not able to resolve this problem.
- When i tested Truenas VM with same conditions, it worked right away, i tryed to export smb.conf from truenas but was not able to find any mentions on shadow_copy2 in the conf files to be able copy/paste...

No answers on reddit and serverfault...
https://www.reddit.com/r/debian/comments/14xf78e/samba_4_cant_copy_from_previous_version_in_windows/
https://serverfault.com/questions/1136742/samba-4-cant-copy-from-previous-version-in-windows
Please help
 
This is the Proxmox VE installation and configuration forum.

I understand your pain with samba and windows, but both are not really Proxmox VE topics.
 
Thank you for understanding, i was hoping that many people must use some file server and have some response as i have migrated from truenas to proxmox and need to sort it out :(((
 
Just a remote pointer: the "zmb-ad" container, descibed and implemented in https://github.com/bashclub/zamba-lxc-toolbox, does work fine for me. Including those snapshots accessible through the property dialogue in the Windows File Explorer. Take a look into their "smb.conf".

Good luck.

Thank you very much! It is working through the zamba standalone, i have tried the same config in turn key file server and it's not working. So the problem must be somewhere else, maybe in packages as i am testing the same snapshots. I don't really care as i can use the zamba for the file server. You saved me !!! <3 <3 <3
 
  • Like
Reactions: UdoB

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!