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

Shadow Copy Localtime error? #50

Closed
killmasta93 opened this issue Jan 5, 2020 · 5 comments
Closed

Shadow Copy Localtime error? #50

killmasta93 opened this issue Jan 5, 2020 · 5 comments

Comments

@killmasta93
Copy link

Hi,
I was looking at the #41
as it helped me configure shadow copies on samba which workes great the only issue is the localtime is incorrect. on the snapshot i get this

  Taking snapshot data@pyznap_2020-01-05_11:46:16_frequent...

and on the windows before version shows date correct but the time is 6:46am there is 5 hours difference, maybe did i miss something?

This is my samba conf

[test]
    path = /data
    browseable = yes
    force create mode = 0660
    force directory mode = 0660
    valid users = @"Domain Users"
    read list =
    write list = @"Domain Users"
    admin users =
    vfs objects = acl_xattr full_audit recycle shadow_copy2
#    full_audit:failure = connect opendir disconnect unlink mkdir rmdir open rename
full_audit:prefix = %u|%I|%S
full_audit:failure = connect
full_audit:success = mkdir rename unlink rmdir pwrite pread connect disconnect
full_audit:facility = local5
full_audit:priority = notice
    recycle: inherit_nt_acl = Yes
    recycle: versions = Yes
    recycle: excludedir = /tmp|/var/tmp
    recycle: keeptree = Yes
    recycle: repository = RecycleBin
    recycle: directory_mode = 0700
shadow: snapdir = .zfs/snapshot
shadow: sort = desc
# Specify snapshot name: frequent, hourly, daily... as desired
shadow: format = _%Y-%m-%d_%H:%M:%S
shadow: snapprefix = ^pyznap
shadow: delimiter = _
shadow:localtime = no

Thank you

@yboetz
Copy link
Owner

yboetz commented Jan 6, 2020

This is a samba problem, not a pyznap one. I don't use samba so I cannot help you here. Only thing I can think of is incorrect timezone setting either on the ZFS or windows machine.

@killmasta93
Copy link
Author

killmasta93 commented Jan 6, 2020

Thank you for the reply, quick question as for your pyznap would it be possible to clean snapshots after certain amount of space? saying that only snapshots 30% of the storage more then that would start cleaning?
and also would it be possible after taking the snapshot opening the snapshot within the machine to take out files?
edit: figure out the second part its in /data/.zfs/snapshots

@killmasta93
Copy link
Author

I was checking the logs found something particular when i set localtime to yes on the smb conf

[2020/01/06 23:52:00.467126,  3] ../source3/smbd/filename.c:1644(filename_convert_internal)
  filename_convert_internal: check_name failed for name @GMT-2020.01.06-23.10.01 with NT_STATUS_ACCESS_DENIED

its as if cannot convert it?

@yboetz
Copy link
Owner

yboetz commented Jan 7, 2020

It's not possible to clean snapshots after they take up a certain amount of space with pyznap. This is also not desirable: Say you are hit with a cryptolocker, then very quickly your snapshots will take up a lot of space and it would be disastrous to start deleting them at that point. Better to have a policy where you have control over how far back you can go, and if space is a problem then you have to overthink that policy.

Snapshots are not mutable, you cannot delete files after you take a snapshots. Deleting files in the .zfs/snapshots folder will have no effect. Only way to delete data in a snapshot is to delete the whole snapshot.

As for your logs, again I don't know anything about samba, so I don't really know what this error message is.

@killmasta93
Copy link
Author

Thank you again and yes you do make a good point

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

No branches or pull requests

2 participants