rsync; how to preserve Windows permissions

Hi There, Thank you very much for all your comments and help with “rsync with multiple threads”. It was very helpful. I have found out that in my case, rsync with multiple threads did speed up a bit of file transfer process. This is the command I was using (run it with while loop, and define TARGET and THREADS in the script): find dir-name -maxdepth 1 -mindepth 1 -type d -print0 | xargs -n1 -0 -P$THREADS -I% rsync -a %/ $TARGET/% I now have another issue. Some of the files/directories I transferred from source storage server (Red Hat) are Windows files/directories (Those Windows files were backed up using a backup software). rsync didn’t preserve Windows permissions/ACLs when those files were transferred onto the target storage server (FreeBSD). Is there any way to instruct rsync to preserve Windows permissions/ACLs? Any suggestions would be appreciated. Thanks and Cheers, Bill

On Fri, Mar 03, 2017 at 02:48:56PM +1100, Bill Yang wrote:
I now have another issue. Some of the files/directories I transferred from source storage server (Red Hat) are Windows files/directories (Those Windows files were backed up using a backup software). rsync didn’t preserve Windows permissions/ACLs when those files were transferred onto the target storage server (FreeBSD). Is there any way to instruct rsync to preserve Windows permissions/ACLs? Any suggestions would be appreciated.
I have no idea if this will work for windows ACLs or not (or from linux to freebsd filesystems), but did you try rsync's -A (aka --acls) option? Note that ACL support is very much dependant on filesystem capabilities, and different filesystems may have completely different and incompatible ACL support. AFAICT, you have at least two problems: 1. your windows backup software backs up ACLs in some undefined way. You need to research how and what it is doing. Can your windows backup software store the ACLs in a separate file and restore the correct permissions from that? 2. you are rsyncing from a linux filesystem to freebsd. it may not even be possible to get this to work, especially considering that the Windows ACLs are, at best, a translation from real windows ACLs to the best fit on a linux filesystem, and then (with luck) translated again by the rsync transfer to the best match on a freebsd filesystem. craig -- craig sanders <cas@taz.net.au>
participants (2)
-
Bill Yang
-
Craig Sanders