Updating the url of http remote not applied on mounts

What is the problem you are having with rclone?

I've made a script that will auto-update the url of the HTTP remote directly from rclone.conf file. But the issue is it doesn't reflect the changes on the mounts, still using the old url. I need to restart the rclone mount in order to make the changes applied.

Script: GitHub - origamiofficial/rclone-http-updater: A Python script that updates rclone HTTP Remote configuration file (rclone.conf) with the latest URLs from specified website using XPath, and notifies via Telegram if changes are detected.

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

rclone v1.64.0

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 5.15.0-70-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.21.1
  • go/linking: static
  • go/tags: none

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

HTTP

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

N/A

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[English]
type = http
url = http://172.16.50.7/TEST-FTP-2/English%20Movies/

[English1080]
type = http
url = http://172.16.50.14/TEST-FTP-14/English%20Movies%20%281080p%29/

A log from the command that you were trying to run with the -vv flag

N/A

This is how it works... parameters from rclone config are read when you start you mount. So editing rclone config later (which is what your script is doing) does not have any effect on already running mount.

I would try to approach it with some sort of proxy redirecting traffic dynamically and your script changing redirection parameters. As you use HTTP it should not be so difficult.

Then rclone will always point to proxy fixed IP/path but traffic will flow to IP/path proxy decides.

Thanks for your suggestion but need another solution!

Good luck:)

But I think you have to explore options outside of rclone.

We don't have this at the moment.

This could be done with a backend command to redo the internal config of the http backend.

We have something very similar for the s3 backend and this would be reasonably simple to make for the http backend. You'd need to call it over the rc.

set

Set command for updating the config parameters.

rclone backend set remote: [options] [<arguments>+]

This set command can be used to update the config parameters
for a running s3 backend.

Usage Examples:

rclone backend set s3: [-o opt_name=opt_value] [-o opt_name2=opt_value2]
rclone rc backend/command command=set fs=s3: [-o opt_name=opt_value] [-o opt_name2=opt_value2]
rclone rc backend/command command=set fs=s3: -o session_token=X -o access_key_id=X -o secret_access_key=X

The option keys are named as they are in the config file.

This rebuilds the connection to the s3 backend when it is called with
the new parameters. Only new parameters need be passed as the values
will default to those currently in use.

It doesn't return anything.

Or we could make an rclone remount remote control either for the VFS or for the mount.

2 Likes

Thank's for pointing. Any ETA for this feature in the HTTP backend? I would do that if I knew!

Have a go with this

v1.65.0-beta.7469.616419c3b.fix-http-set on branch fix-http-set (uploaded in 15-30 mins)

You'll need to run your mount with --rc and be able to comunicate with it with rclone rc.

Something like this (thought don't use --rc-no-auth!)

rclone -vv mount myhttpremote: /mnt/tmp --rc --rc-no-auth

You then command the mount like this

rclone rc backend/command command=set fs=myhttpremote: -o 'url=https://beta.rclone.org/'

Note that you'll need to run this to forget the directory cache if the contents of the mount is difference

rclone rc vfs/forget

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