How to copy file to smb/cifs dir?

What is the problem you are having with rclone?

I have a question when using rclone. I want to migrate files to a network shared directory, which uses the CIFS protocol for network sharing. Assuming the target server address is 10.222.333.444, the directory to be migrated is test1, and the CIFS account password is admin/admin, how should I build a config file?

Run rclone config and choose to create new SMB remote

with rclone, there are two ways to do that.

check out my wiki to see which way it best for your case.
https://forum.rclone.org/t/how-to-access-smb-samba-with-rclone

I tried using this method for transmission, but unfortunately, the server restricts the maximum SMB connections for a single host. Does rclone support reusing SMB connections instead of restarting a new SMB connection for each file transfer?

You can try to decrease value of --smb-idle-timeout but if it does not work you are out of luck I am afraid.

You might have much better and granular control/tuning SMB options when using OS native client.

Due to the limitation of the SMB server, which can only support up to 8 concurrent SMB connections per client, I have observed that Rclone uses more SMB connections when the transfer concurrency is set higher. Upon reviewing the source code, I found that a new SMB connection is established for each file transfer, without connection reuse; the connection is closed after the transfer. Have you considered optimizing this approach? For example, have you considered establishing an SMB connection pool at the beginning of the transfer, or mapping the SMB share as a local drive, and then directly copying files to the drive (similar to "rclone.go copy D:/test Z:/")? This would effectively use only one SMB connection for all operations.

This is true

Rclone should be pooling the connections and re-using them according to the code. This may not be working properly though!

So rclone should be using roughly --transfers + --checkers connections and it should keep these connections open and re-use them.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.