Robocopy on Linux
Robocopy on Linux
Looking for a Linux alternative to sync network folders on a USB drive. Robocopy works well in Windows, but I found Rysnc doesn’t support Samba or preserve file attributes. You might need to use `rsync` with appropriate options or write a custom script in Bash or Python to achieve similar results.
Set up the Samba share. After that, you can manage it as a local folder, eliminating the need for rsync concerns. To keep permissions and attributes intact, use --archive (-a). I'm not entirely sure this applies to Windows attributes though.
Alternative method needed for copying attributes. Works around local SMB setup, but rsync struggles with hidden and read-only files on NTFS, even when using --xattrs(-X). Same issue encountered with cp command.
This problem involves transferring access rights across various file systems instead of using rsync or cp directly. For details, consider alternative methods like leveraging ntfs-3g.secaudit to capture permissions recursively from the source, store them, then reapply with rsync. When moving to a different filesystem, define an equivalent setting to match the original configuration.