Windows Previous Versions and Samba

  • Hi,
    i'm following the guide but after finishing all the passages (without errors), i can't see any previous version of the file.
    I have tried with OMV 1.19 and with the Testing 2.0.13 with no success.I have also tried with protected storage (user with password) and unprotected storage (guest allowed).
    All the test are done in a virtual machine with 2 drives, 1 is the system drive e 1 is the storage drive.
    Any ideas?

  • I have alredy do that. Here there is what i have done:


    I have created a txt file



    then i writed something and i saved it



    after that i created a new snapshot



    reopened the file and changed something



    then i saved it



    i made another snapshot




    after that i open the previous version and i don't see anyting


  • I haven't any option in general samba extra options. Have I to add any?
    But in the samba share extra options there are the options of your guide:

    Code
    vfs objects = shadow_copy2
    shadow:format = @GMT_%Y.%m.%d-%H.%M.%S
    shadow:sort = desc
    shadow:snapdir = .snapshots
  • There is an inconsistency in the guide, the snapshot generation line is


    btrfs subvolume snapshot –r /media/uuid/@Documents /media/uuid/@Documents/.snapshots/@GMT-`date +%Y.%m.%d-%H.%M.%S`


    it should be like


    btrfs subvolume snapshot –r /media/uuid/@Documents /media/uuid/@Documents/.snapshots/@GMT_`date +%Y.%m.%d-%H.%M.%S`


    changed GMT- to GMT_ to match the extra options in samba


    Already changed that in the guide, it should work now, if you rename your snapshots using the underscore

  • Should this still work with Windows 10?
    I just tried a quick test and I am not seeing any previous versions. In the UI in Windows, it says previous versions come from File History or system restore points.


    I created a subvolume, shared it, put a file in it, snapped it, changed it.
    I did have the extra options in my smb.conf for the share, but I used a custom format, not the default, and I used the snapdir and basedir options with absolute paths to keep the snapshots outside of the subvolume.
    E.g.

    Code
    basedir /media/data/test
    snapdir /media/data/.snapshots/test


    This should work from the docs, as far as I can see...


    How long before previous versions show up, is it instant?


    Just realised, /media/data is a symlink to /media/<UUID> - maybe that is a problem? Has anyone experienced that? Will test it later if not.

  • yep, Ive created a Filesystem (ZFS) for each user, enabled the home directorys and also tried to edit the "30homes" in the mkconf folder. After Ive added the lines, mentioned in your How-To, the users cant access their home folder.


    EDIT: Sorry, Ive not added the lines from your How-To....
    I used lines from here: https://forums.freebsd.org/threads/32282/


    Code
    vfs objects = shadow_copy2
    shadow: snapdir = .zfs/snapshot
    shadow: sort = desc
    shadow: format = AutoH-%Y-%m-%dT%H:%M


    Oh... and it is working when I set it for each normal share, but not for the home shares.

  • Hi!


    Thanks a lot for this,


    is this also possible for a union filesystem of btrfs?


    I have 4 drives, 2 TB, 2 TB, 3 TB, 3 TB,
    all are with btrfs formatted and added to a snapraid. (for the parity and data recovery if one drive is broken)


    i like to have one great pool of 7 TB, and in this pool i like to have several shared folders for:
    users,
    music,
    movies,
    pictures


    e.g.
    /storagepool/music
    /storagepool/user1


    and i like for each of this share a snapshot possibility for samba...
    is this possible? how should i configurate? i tried your guid for anpshots only with a pool of mkfs-btrfs /dev/sda /dev/sdb
    but in omv3 it was not possible to add this for acl / shared folders. :(



    I am using omv3, and backport kernel 4.0.0.7

  • The problem is
    i can't add via omv webinterace a shared folder which is on a disk created by mkfs.btrfs /dev/sda /dev/sdb /dev/sdc


    :(




    I tried the last days a lot of btrfs, omv shared folders and snapshots,
    and in no configuration it worked. :(
    my linux knowledge also is very very bad. :(


    maybe, it could work by manually add the device via the /etc/openmediavault/config.xml in the mnt section,
    but I don't know how to add this here. :(

  • I have 1 TB + 1 TB + 2 TB + 2 TB



    Using:
    mkfs.btrfs -d single /dev/disk/by-id/ata-ST31000524AS_6VPGPJ9W /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_56JUEJ1MS /dev/disk/by-id/ata-WDC_WD20EADS-22R6B0_WD-WCAVY5199117



    Every drives are now in /dev/sdc 3,7T 17M 3,7T 1% /media/0c445189-73fb-4eb2-9d3f-d498224a0d25
    1 TB + 1 TB + 2 TB



    After: Going to the path in media and using btrfs subvolume create /media/0c445189-73fb-4eb2-9d3f-d498224a0d25/storagepool and btrfs subvolume create /media/0c445189-73fb-4eb2-9d3f-d498224a0d25/storagepool/.snapshots



    Trying to test snapshots with btrfs: btrfs subvolume snapshot –r /media/0c445189-73fb-4eb2-9d3f-d498224a0d25/storagepool /media/0c445189-73fb-4eb2-9d3f-d498224a0d25/storagepool/.snapshots/@GMT_`date +%Y.%m.%d-%H.%M.%S`



    Result:

    Bash
    btrfs subvolume snapshot: too many arguments
    usage: btrfs subvolume snapshot [-r] <source> <dest>|[<dest>/]<name>
    btrfs subvolume snapshot [-r] [-i <qgroupid>] <source> <dest>|[<dest>/]<name>
    Create a snapshot of the subvolume
    Create a writable/readonly snapshot of the subvolume <source> with
    the name <name> in the <dest> directory. If only <dest> is given,
    the subvolume will be named the basename of <source>.
    -r create a readonly snapshot
    -i <qgroupid> add the newly created snapshot to a qgroup. This
    option can be given multiple times.


    btrfs subvolume list /media/0c445189-73fb-4eb2-9d3f-d498224a0d25 returns:

    Bash
    ID 261 gen 19 top level 5 path storagepool
    ID 262 gen 19 top level 261 path storagepool/.snapshots


    I don't know, what the problem is... maybe it does not work with a union drive, even if its done with mkfs.btrfs -single

  • Ok



    maybe, I have a solutions now, for the snapshot working... :)



    I've made a mkfs.btrfs -L MyStorage -d single /dev/sda /dev/sdc /dev/sdd
    (sdb is my system, usb hdd, don't know why, but OMV did it as /dev/sdb)



    So I have a /dev/sda 3,7T 17M 3,7T




    Now, using OMV Webinterface for mounting it via Filesystem, and setting ACL, like in the guide...



    Then via shell, navigating into:
    cd /media/xxxxxxx-xxx-xxx-xxx-xxx-xxxxxxxxxxx




    Here I can create subvolumes, e.g.:
    btrfs subvolume create Movies
    and
    btrfs subvolume create Movies/.snapshots



    With
    btrfs subvolume snapshot -r Movies/ Movies/.snapshots/@GMT_`date +%Y.%m.%d-%H.%M.%S`
    (again, in the folder via ssh)



    it works,
    now I can set via OMV Webinterface Samba Shares on Movies, und with the guide, i see my volume shadow copies



    btrfs subvolume list ./ (again via ssh in de /media/xxxxx/ folder)


    Code
    ID 262 gen 22 top level 5 path Movies
    ID 263 gen 22 top level 262 path Movies/.snapshots
    ID 264 gen 21 top level 263 path Movies/.snapshots/@GMT_2016.11.08-21.30.18

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!