Binding rclone and routing table

What is the problem you are having with rclone?

--bind option doesnt go through

Run the command 'rclone version' and share the full output of the command.

1.61.1

yeah

Which cloud storage system are you using? (eg Google Drive)

google drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone move --verbose --bind 192.168.0.101 --transfers 3 --checkers 6 --bwlimit 1G --contimeout 60s --timeout 300s --retries 3 --low-level-retries 10 --buffer-size 128M --drive-chunk-size 128M --stats 1s /media/rclone up:

The rclone config contents with secrets removed.

rclone move --verbose --bind 192.168.0.101 --transfers 3 --checkers 6 --bwlimit 1G --contimeout 60s --timeout 300s --retries 3 --low-level-retries 10 --buffer-size 128M --drive-chunk-size 128M --stats 1s /media/rclone up:

A log from the command with the -vv flag

2023/03/08 20:57:06 INFO  : Starting bandwidth limiter at 1Gi Byte/s
2023/03/08 20:57:07 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         1.1s

I want to bind rclone to upload via second network interface and found a tutorial which has the exact same problem with me on this link

Blockquote Binding Rclone To Second NIC - #25 by brando56894

but unfortunately the /etc/network/interfaces of Ubuntu is now obsolete cause they change to use netplan instead so I cant use that. Now I don't know how to set that routing table correctly with the new netplan tool. I spent some time google and tried implementing it without success. Is there any other way around to bind or could anyone help but with the iproute2 that being used in the tutorial?

bind is a flag.

You need to use something else with it as by itself that would do nothing.

felix@gemini:/tmp$ rclone about GD: --bind 192.168.1.30
Total:   16 GiB
Used:    1.863 GiB
Free:    10.666 GiB
Trashed: 329 B
Other:   3.472 GiB

sorry I posted it wrong. full line is

rclone move --verbose --bind 192.168.0.101 --transfers 3 --checkers 6 --bwlimit 1G --contimeout 60s --timeout 300s --retries 3 --low-level-retries 10 --buffer-size 128M --drive-chunk-size 128M --stats 1s /media/rclone up:

So what isn't working? The option seems to work fine. Can you share a debug log / something what the issue is ?

rclone about GD: --bind 192.168.1.30 -vvv
2023/03/08 09:02:57 DEBUG : Setting --config "/opt/rclone/rclone.conf" from environment variable RCLONE_CONFIG="/opt/rclone/rclone.conf"
2023/03/08 09:02:57 DEBUG : rclone: Version "v1.61.1" starting with parameters ["rclone" "about" "GD:" "--bind" "192.168.1.30" "-vvv"]
2023/03/08 09:02:57 DEBUG : Creating backend with remote "GD:"
2023/03/08 09:02:57 DEBUG : Using config file from "/opt/rclone/rclone.conf"
Total:   16 GiB
Used:    1.863 GiB
Free:    10.666 GiB
Trashed: 329 B
Other:   3.472 GiB
2023/03/08 09:02:58 DEBUG : 4 go routines active

the problem is that it doesnt upload at all

2023/03/08 21:10:34 INFO  : Starting bandwidth limiter at 1Gi Byte/s
2023/03/08 21:10:34 DEBUG : rclone: Version "v1.61.1" starting with parameters ["rclone" "move" "-vvv" "--bind" "192.168.0.101" "--transfers" "3" "--checkers" "6" "--bwlimit" "1G" "--contimeout" "60s" "--timeout" "300s" "--retries" "3" "--low-level-retries" "10" "--buffer-size" "128M" "--drive-chunk-size" "128M" "--stats" "1s" "/media/rclone" "up:"]
2023/03/08 21:10:34 DEBUG : Creating backend with remote "/media/rclone"
2023/03/08 21:10:34 DEBUG : Using config file from "/home/money/.config/rclone/rclone.conf"
2023/03/08 21:10:34 DEBUG : Creating backend with remote "up:"
2023/03/08 21:10:34 DEBUG : up: detected overridden config - adding "{OgfZc}" suffix to name
2023/03/08 21:10:34 DEBUG : fs cache: renaming cache item "up:" to be canonical "up{OgfZc}:"
2023/03/08 21:10:34 DEBUG : up{OgfZc}: Loaded invalid token from config file - ignoring
2023/03/08 21:10:35 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         1.1s

2023/03/08 21:10:36 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         2.1s

2023/03/08 21:10:37 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         3.1s

2023/03/08 21:10:38 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         4.1s

2023/03/08 21:10:39 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         5.1s

2023/03/08 21:10:40 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         6.1s

2023/03/08 21:10:41 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         7.1s

2023/03/08 21:10:42 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         8.1s

2023/03/08 21:10:43 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         9.1s

2023/03/08 21:10:44 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:        10.1s

but when I remove the --bind option it just uploads normally.

Bad networking? That would some routing/networking issue in your setup.

other programs dont have this problem. tried curl --interface enp7s0 ifconfig.me and got the second interface ip address as a result

I dunno as I can't see any of your config nor what other programs nor what the interface enp7s0 ties back to the IP given.

That curl command would return your external IP and not a 192.168 as that's a private IP.

yeah it returned external ip

u used to provide solution here

but /etc/network/interfaces does not exist in ubuntu anymore so i cant apply it

Sure - That was for an older version of Debian/Ubuntu.

I'm not sure what your setup is as I can't see inside your machine :slight_smile:

So it's legit impossible to guess what your config is and what changes may or may not be needed.

Problem was really with the routing.
I eventually fixed it with

sudo ip route add 192.168.0.0/24 dev enp7s0 src 192.168.0.101 table rt2
sudo ip route add default via 192.168.0.1 dev enp7s0 table rt2
sudo ip rule add from 192.168.0.101/32 table rt2
sudo ip rule add to 192.168.0.101/32 table rt2

but this has to be done periodically though so I have to put em on crontab

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