Windows Previous versions with BTRFS snapshots not working

  • Hello, I need Your help.

    I just started using btrfs on new disk connected to OMV and I'm testing a lot of things.

    Now wanted to start using snapshots and previous version but it still doesn't work.

    I'm using the UI to make snapshots, where name of the snapshot folder is made by automatic and looks like:

    Code
    WD18_20230922T221250


    What should I paste into SMB config to make it work?

    I tried with:

    Code
    vfs objects = shadow_copy2
    shadow:format = @WD18_%Y%m%dT%H%M%S
    shadow:sort = desc
    shadow:snapdir = .snapshots
    shadow:localtime = no

    But it doesn't work

  • I recently checked previous versions tab in windows explorer and it is empty.


    I tried to make a new test folder (on BTRFS), setup snapshots, checked smb.conf... everything seems OK, but I don't see any previous versions of the files. I can see the snaphots that are made periodicaly.


    Any tips what should I check/change?


    Thanks.

  • Here are some more infos and screenshots for anyone willing to look at this...


    etc/samba/smb.conf



    # This file is auto-generated by openmediavault (https://www.openmediavault.org)

    # WARNING: Do not edit this file, your changes will get lost.

    #======================= Global Settings =======================

    [global]

    workgroup = WORKGROUP

    server string = %h server

    dns proxy = no

    log level = 0

    log file = /var/log/samba/log.%m

    max log size = 1000

    logging = syslog

    panic action = /usr/share/samba/panic-action %d

    passdb backend = tdbsam

    obey pam restrictions = no

    unix password sync = no

    passwd program = /usr/bin/passwd %u

    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

    pam password change = yes

    socket options = TCP_NODELAY IPTOS_LOWDELAY

    guest account = nobody

    load printers = no

    disable spoolss = yes

    printing = bsd

    printcap name = /dev/null

    unix extensions = yes

    wide links = no

    create mask = 0777

    directory mask = 0777

    use sendfile = yes

    aio read size = 1

    aio write size = 1

    time server = no

    wins support = no

    disable netbios = yes

    multicast dns register = no

    server min protocol = SMB2_02

    # Special configuration for Apple's Time Machine

    fruit:aapl = yes

    fruit:copyfile = yes

    fruit:nfs_aces = no

    #======================= Share Definitions =======================

    ......

    ......

    [test]

    path = /srv/dev-disk-by-label-BTRFS14TB/test/

    guest ok = no

    guest only = no

    read only = no

    browseable = yes

    inherit acls = no

    inherit permissions = no

    ea support = no

    store dos attributes = no

    recycle:repository = .recycle/%U

    recycle:keeptree = yes

    recycle:versions = yes

    recycle:touch = yes

    recycle:touch_mtime = no

    recycle:directory_mode = 0777

    recycle:subdir_mode = 0700

    recycle:exclude =

    recycle:exclude_dir =

    recycle:maxsize = 0

    shadow:mountpoint = /srv/dev-disk-by-label-BTRFS14TB/

    shadow:snapdir = /srv/dev-disk-by-label-BTRFS14TB/.snapshots/

    shadow:basedir = /srv/dev-disk-by-label-BTRFS14TB/test/

    shadow:sort = desc

    shadow:format = _%Y%m%dT%H%M%S

    shadow:delimiter = _

    shadow:snapprefix = ^test\(@hourly\)\{0,1\}\(@daily\)\{0,1\}\(@weekly\)\{0,1\}\(@monthly\)\{0,1\}\(@yearly\)\{0,1\}$

    shadow:localtime = no

    dfree command = /usr/sbin/omv-btrfs-dfree

    dfree cache time = 30

    vfs objects = recycle btrfs shadow_copy2

    printable = no

    create mask = 0664

    force create mode = 0664

    directory mask = 0775

    force directory mode = 0775

    hide special files = yes

    follow symlinks = yes

    hide dot files = yes

    valid users =

    invalid users =

    read list =

    write list =


    Are there some other settings in windows ?


    Thanks.

  • Hi folks,


    We have also been bumping into this problem for the last two days.


    Snapshots were created, but displayed in Windows with the wrong time with shadow:localtime=no and are not shown with shadow:localtime=yes


    The problem here was that Windows expects UTC for Snapshots and adds its own time zone.

    If we set shadow:localtime=yes the samba_shadow2 module now also delivers Localtime so it couldnt be found by the client.


    The solution for us was to create the snapshots with UTC-Timestamp(@hourly_$(TZ=GMT date +%Y%m%dT%H%M%S) and then send them to the Windows machines with shadow:localtime=no. Clients now add their time zone to the UTC-Time.


    Now The OMV is running on the correct Timezone and the clients show the Snapshots with the right Time and they can be opened..

    Just the Snapshots are stored with UTC Timestamp.


    Perhaps this will help some of you.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!