[Samba] Backup of shared data-files

Robert Marcano robert at marcanoonline.com
Mon Mar 11 14:04:16 UTC 2019


On 3/7/19 5:27 PM, Gregory Sloop via samba wrote:
> Backup is currently a pretty hot topic - but most of the discussion I've seen has been around backup of the AD and not about files on a share.
> 
> However, if I'm backing up the files in a Samba share [and lets assume it's a Windows share, with the Windows ACLs] what's a good way to capture the files, AND the ACL data so I could drop that data back on another samba share, if disaster strikes and maintain the ACL data, as best possible. Having the files alone is nice, but if it takes me 6 additional hours [or a couple of days] to go through things and set/reset all the ACL's so people have the right access, well that's a problem. [Or at least a problem I need to plan for...]
> 
> [And yes, I understand that the AD back-end-data has to stay consistent for the ACLs to apply properly, but lets assume we're going to end up restoring the files to another share on a different AD server in the same domain.]
> 
> Does rsync work?
> Duplicati? [my favorite]


When using tar/rsync tools you should tell those that you want to backup 
extended attributes (and Podix ACLs), for example with a tar:

   --xattrs --xattrs-include=security.NTACL --acls

This works for me for small backups. For larger ones with deduplication 
I use borg. rsync should work too (as root) and you should read rsync 
man page of the --xattrs option if backup is run as non root.

You should try your options with a test restore, and I recommend having 
some kind of filesystem snapshot ability if your backups run when users 
are using the shares.
> 
> Thoughts or suggestions?
> [A search didn't return much.]
> 
> TIA
> -Greg
> 




More information about the samba mailing list