BTRFS Snapshots / Windows Previous Versions

    • Official Post

    So I got an interesting issue, and I couldn't find anyone else with the same problem after some searching.


    Long story short, I am trying to recover from a previous snapshot on a share. The volume is using btrfs, and the snapshot date is there. But when I try to recover it using Windows Previous Versions, I get "Item Not Found". It seems like is trying to recover from the original path, well since it was deleted of course it can't find it. It doesn't seem to be using the snapshots path to recover from, even though I can browse the data. See below:



    Eventually, I just used WinSCP to grab what I needed from the .snapshots folder. I replicated this issue on an external USB HDD that also has a backup of the same data with snapshots as well, and a 2nd OMV 7.6.0-1 server also with a btrfs volume and snapshots.


    As of note, if the data is actually not deleted from the share and you try to "recover" or open a file from within Previous Versions, it works but is not actually grabbing the data off the snapshots path but rather the actual live share.


    To replicate:

    1. Create a snapshot of the share

    2. Delete the original data

    3. Use Previous Versions on Explorer to recover

    4. Profit?


    I am not sure if this is a Samba Shadow Copy path issue or a misconfiguration on my end, but this is pretty bog standard stuff.


    Any input helps!


    Absolutely no support through PMs!!
    I work for the HPE R&D division. Have tech questions about ProLiant servers? Ask me!
    Learn more about HPE's iLO included in all ProLiant servers.

    Edited 2 times, last by Spy Alelo ().

    • Official Post

    And before anyone asks, browsing this data from a mapped share or URI yields the same result. Here it is doing it from the URI itself, same issue:



    I also thought this was a permission issue, but that's not the case. Whenever the snapshots are created, something's wrong with how the path is presented when trying to copy from them. I'm pulling my hair out trying to figure this out.

  • ryecoaaron

    Added the Label resolved
  • Spy Alelo

    Removed the Label resolved
    • Official Post

    Confirmed, the Previous Versions prompt is definitely serving the files off the SMB share when going through sub-directories, not the .snapshots directory:



    Files at the top level can be recovered. I can't figure out the why, the parameters seem correct for smb.conf and I've tried all types of combinations here. I can't really tell if this is a bug or a misconfiguration.

  • All I can say is things work as you might expect in his example:



    On OMV:


    Extract from smb.conf:



    I've not created a separate share of the snapshot itself. My smb conf does not contain all the additional MACOS params you have.

    • Official Post

    Can you try moving a sub-directory and recover from the snapshots?


    As long as my original data is intact, I can browse/read every sub-directory. The issue is when the sub-directory is missing from the original path.

  • A new day and a chance for further tests. But I've not been able to replicate your problem.


    My actions since yesterday:


    1. Modified my share config to include additional params and vfs objects to more closely match those of your "media" share.


    2. Explicitly "shared" one my "bfolder" snapshots.


    3. Used file explorer in Windows 10 and Windows 11 .


    The result is recovery from "previous versions" via Windows file explorer works as expected when deleting and moving data around from the orig folder. At no time does a snapshot path appear in the out put of "smbstatus" in OMV. Please note none of the data I shared used ACLs.


    Outputs:



Participate now!

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