[Samba] Solution to archive bit problem
Aaron Kincer
kincera at gmail.com
Fri Sep 15 15:44:23 GMT 2006
For all of you out there using Google (or whatever your favorite search
engine) to try to find a solution to archive bit madness with Samba, I
have a workaround for you. Call it a solution if you want to, because it
will solve the problem regardless of whether it is an application or
Samba issue.
Prerequisites:
1) You must have the the acl packages installed
2) user_xattr and acl must be set on the volume where your Samba shares
reside in fstab
3) The time stamp for file modification must be updated when modified
even when the archive bit is not being set (verify this by using stat
-c %y foo.txt)
Resolution:
Add this command to a nightly cron to run BEFORE your backups (run as root):
find /share/ -name '*' -mtime 0 -exec setfattr --name=user.DOSATTRIB
--value=0x30783230 {} \;
Replace /share/ with whatever the path to the root of your Samba share
directory where all of your shares are located. This SHOULD set the
archive bit properly for files modified within the past 24 hours. Make
sure that the user account your backup software uses has full access to
all files and folders.
If you are having trouble as I was with the archive bit, I hope you find
this and it solves your problem.
Thanks to all that helped me with this issue. If anyone sees an error in
the above, please follow up with a correction.
Thanks,
Aaron Kincer
More information about the samba
mailing list