[Plugin] Snapshots


Recommended Posts

@vmlinuz

 

You can manually create as a subvolume on a drive and it will be a share. You can then snapshot the files on that drive.

 

image.png.e9f627a52e3a382c25dc406cbd37cbf5.png

 

Then goto shares and export, select disks you have created subvol on or leave as all if you added to all 5.

 

image.thumb.png.df4e098cef5045902d79ad1b8f6309da.png

 

Now you can setup a snapshot for each drives folder, but this will only be a snapshot of the files on that disk not the sum of all disks.

 

Link to comment

Not perfect but you can try this.

 

Create subvol disk1->ecole-test

Create subvol disk2->ecole-test

 

file 1 and 2 on disk 1

file 3 and 4 on disk 2

 

snapshot disk1/ecole-test => disk1/ecole-back1 will have spans of 1 and 2.

snapshot disk2/ecole-test => disk2/ecole-back2 will jave snaps of 3 and 4.

 

Link to comment
  • 2 weeks later...
5 hours ago, Thomas K said:

Is that by design? Shouldn't there be any snapshots by default because there is no subvolume after a fresh format?

That view is correct, root of a drive was added to allow snap of whole drive. Snap shots will show under that I can look to hide if no snapshots.

 

 

image.thumb.png.3622974316bf3d6d82caa1cd76997c97.png

Edited by SimonF
  • Like 1
Link to comment
  • 2 weeks later...
On 2/23/2022 at 5:25 PM, Thomas K said:

I think would make sense to hide if there are no snapshots at the beginning to not confuse users.

I have made a change in the next release to not show if count < 0.

 

image.thumb.png.95fdd46cdb2b72551082549ea9e8ae79.png

 

Released in 2022.03.05 and included toggle to root path.

 

 

 

 

Edited by SimonF
  • Like 1
Link to comment
  • 4 weeks later...
43 minutes ago, tjb_altf4 said:

Small thing I noticed as a brand new user, "show root" was toggled by on default, but had to be untoggle/retoggle to get root to actually show

Thanks will look into that default should not show route paths, so likely the slider is incorrect for new installs.

  • Like 1
Link to comment
7 hours ago, mervincm said:

Are these snaps comatible with Windows previous versions when viewed via SMB share? I see snaps, and I can browse the share, but Windows doesnt see any previous versions.

There is no specific support for Windows Previous versions, this is just doing BTRFS snapshots. I dont know the requirements for WPV so if some can provide details of how it needs to be setup I can look to see if it can be added.

Edited by SimonF
Link to comment
1 hour ago, SimonF said:

There is no specific support for Windows Previous versions, there are just doing BTRFS snapshots. I dont know the requirements for WPV so if some can provide details of how it needs to be setup I can look to see if it can be added.

Seems to be mostly Samba config, other than some consistency around snapshot folder + naming

https://www.samba.org/samba/docs/current/man-html/vfs_btrfs.8.html

https://forum.openmediavault.org/index.php?thread/7331-guide-windows-previous-versions-and-samba-btrfs-atomic-cow-volume-shadow-copy/

 

and one with a ZFS flavour
https://forum.level1techs.com/t/zfs-on-unraid-lets-do-it-bonus-shadowcopy-setup-guide-project/148764

 

Edited by tjb_altf4
  • Thanks 1
Link to comment
23 hours ago, tjb_altf4 said:

Most of the setup seems straight forward. I think the issue will be setting SMB extras per share.

 

 

vfs objects = shadow_copy2 shadow:format = @GMT_%Y.%m.%d-%H.%M.%S shadow:sort = desc shadow:snapdir = .snapshots

  • Like 1
Link to comment

Thank you for the links

 

I was thinking that since the vast majority of desktops (admittedly less in this community) use Windows, and since "Previous Versions" functionality for SMB shares has been there by default for ~ 15 years it has to be considered the Industry standard when it comes to facilitating access to data in snapshots.

 

Snapshots are surely not an area of strength for unraid, so It's not fair to expect TrueNas or Synology type of experience, thus my investigation into what is actually required and my appreciation for community developers that make things 1 step more straight forward.

 

 

Link to comment
6 hours ago, Joly0 said:

Any option to hide Snapshots or Volumes from the list (idk what exactly). I have my docker not as an image, but as a folder and i see like 30 Snapshots/Volumes belonging to Docker which i would like to hide. Is that possible?

Not at present, I think you are using the fo!der options for docker? I was going to exclude those in a future re!ease.

Link to comment
  • 2 months later...
5 hours ago, Joly0 said:

Any news regarding my feature request? The snapshot page is barely usable as there are hundreds of docker btrfs snapshots which make it really hard to find anything

I have made the changes to omit the docker paths, but need to work out how to get the correct path to use.

 

How have you specified the path in the docker settings? i.e are you using /mnt/user/..... or /mnt/poolname/....

Link to comment
5 hours ago, SimonF said:

I have made the changes to omit the docker paths, but need to work out how to get the correct path to use.

 

How have you specified the path in the docker settings? i.e are you using /mnt/user/..... or /mnt/poolname/....

I have it setup as /mnt/user/system/docker for simplicity though system is cache only so /mnt/cache/system/docker would fit for me aswell

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.