Is it possible to do a transfer between different remotes created with --auth-proxy on 'rclone serve webdav' ? Yes I can create 1 remote, as per rclone serve webdav startup, but I can't figure out if it is possible to have multiple remotes on such a running server. Is that even possible? And how would a transfer then look like? Any help much appreciated.
The --auth-proxy
enables you to choose a different remote per user login with a simple script.
So if user one
logged in they might get onedrive:one
and if user two
logged in then they might get drive:two
.
If you wanted to copy between them then you'd set up two webdav remotes one for each user and copy between them.
Does that help?
If I setup two webdav remotes that way I would have two 'rclone serve webdav' servers each on a different port. Is that correct?
So how would an 'rclone rc operations/copyfile' operation between them look like then? What --rc-addr would I use? Each rclone server would only know about 1 remote.
No you can run them both from the same webdav server - you just switch the backend out in the auth-proxy
First, thanks for your fast replies!
How do I do that? Actually I guess I'm having trouble understanding how to apply this to my use case so allow me to explain:
Consider 2 sites, s1 and s2 (in reality there are many), each with a file storage system and I want to transfer (webdav) a file between 2 users on them.
Now I can do the following:
-
have both sites specified as remotes (each with user) in the rclone config
-
start an rclone server referring to the config:
rclone rcd --config config.conf --rc-serve
-
do the transfer:
rclone rc operations/copyfile srcFs=s1: srcRemote=/webdav/home/file.txt destFs=s2: destRemote=/webdav/home/file.txt
Works just fine.
But now I want to switch users (per transfer) without need to 'rewrite' the config for each transfer or, worse, have to have remotes defined for each user. I actually would like to have remotes/users only exist per transfer.
So how does auth-proxy
and rclone serve webdav
help in this scenario?
I see!
Hmm, there isn't an easy way to do this at the moment unfortunately without defining a new remote.
However you can define a temporary remote via the API very easily and then remove it again afterwards.
Yes I was already considering doing that, that would probably work for us.
Would being able to pass the full remotes' definitions (like in config/create
) with operations/copyfile
instead of only the refs pass as a legit feature request? I would then assume these remotes to exist only for the duration of the job.
Something like:
rclone rc operations/copyfile --json '{"srcRemoteConfig": {"name":"site1", "type":"webdav","parameters":{"vendor":"owncloud", "url": "https://site1.org/webdav","user":"jim","pass":"secret"}, "srcFs":"/folder", "destRemoteConfig": { ... site2 }, "destFs": "/folder"}
That would be really cool.
I was thinking of extending the remote syntax for this so you could use
:webdav,vendor=owncloud,url=http...,user=xxx,pass=xxx:
Not sure how I'd deal with embedded ,
or :
though
That makes perfect sense!
So can you do this?
Not yet... I have it on my todo list though!
That is great!
And is that long term, or upcoming release?
It isn't planned for the next release.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.