rsync to SMB share

We can totally use rsync to write to an SMB (Windows) share mounted under Linux. However, mapping file owner and permission meta data might not be directly possible: it’s expected to get errors such as Operation not permitted during chown). In that case, we can use the rsync arguments --no-perms --no-owner --no-group:

$ rsync -a --no-perms --no-owner --no-group --info=progress2 --stats \
    * /run/user/1000/gvfs/smb-share:server=ubernas.local,share=sharename/dir1/
142,632,841,229  99%   19.84MB/s    1:54:15 (xfr#47707, to-chk=0/52365)   

Number of files: 52,365 (reg: 47,712, dir: 4,653)
Number of created files: 52,287 (reg: 47,707, dir: 4,580)
Number of deleted files: 0
Number of regular files transferred: 47,707
Total file size: 142,877,892,266 bytes
Total transferred file size: 142,632,841,229 bytes
Literal data: 142,632,841,229 bytes
Matched data: 0 bytes
File list size: 1,572,683
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 142,671,262,831
Total bytes received: 935,054

sent 142,671,262,831 bytes  received 935,054 bytes  20,805,278.58 bytes/sec
total size is 142,877,892,266  speedup is 1.00

This is a lossy process; in my case, I was totally OK with losing the unixy file owner/group/permission information and to instead just inherit the windowsy default file permission/owner on the target file system.

Leave a Reply

Your email address will not be published. Required fields are marked *

Human? Please fill this out: * Time limit is exhausted. Please reload CAPTCHA.