Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Samba friendly snapshot name #698

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kimata
Copy link

@kimata kimata commented Nov 28, 2021

Renaming a snapshot to make it easier to handle with Samba's vfs_shadow_copy2.

After applying the above changes, the following settings in smb.conf should work.

     shadow:format       = _UTC_%Y-%m-%d_%H:%M:%S                                                                                                                                                          
     shadow:snapprefix   = ^autosnap_\(yearly\)\{0,1\}\(monthly\)\{0,1\}\(weekly\)\{0,1\}\(daily\)\{0,1\}\(hourly\)\{0,1\}\(frequently\)\{0,1\}                                                            
     shadow:delimiter    = _UTC_                                                                                                                                                                           
     shadow:localtime    = no

@stumpylog
Copy link

This would be great to have included in sanoid. I use ZFS and share out some datasets using Samba.

I wonder if there needs to be some sort of rename of existing snapshots? To facilitate the pruning of old named snapshots?

@sporkus
Copy link

sporkus commented Nov 11, 2022

This and removing the colons would help windows users. vfs_shadow_copy2 does not allow regex/wildcard after the time string.

@natankeddem
Copy link

What would it take to get this feature actually implemented? I am going to just spitball some ideas:

  • Make it enabled with an argument not a blanket change for everyone to preserve backward compatibility
  • remove colons from date since that seems to cause some people issues as well (although I haven't experienced this tbh)
  • ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants