Is it possible to upload a file to a machine where Rclone running in RC mode?

Hello Experts,

I have two machines(computers) A and B.
Rclone is running in machine A with RC mode.

I am accessing rclone api's from machine B to create remotes and transfer files across clouds.

Now to create GCS remote I need to use service account json file which contains creds.
So I am looking for a way to upload this service account json file to Rclone local disk (machine A) from machine B and then create GCS remote (where I can mention the json path in remote)

So I am looking for a way to upload the file from machine B to machine A's local disk.

Here - Google drive I see that " rclone copy /home/source remote:backup
can be used to copy local file to remote, but how do I do this with RCD mode ? which api to use and what is the source remote name I need to mention?

Any suggestion is much appreciated, thank you in advance.

Thanks
Mahendra

I think this is what you are looking for

1 Like

Thanks for the quick response @ncw .

You are right , I tried using " operations/uploadfile" but did not get it working, could you please share any example for this request ? like what should go in body of http post or parameters?

Tried an alternative approach, writing content to local file and uploading that using "/sync/copy", this works.
{
"srcFs": "/home/ubuntu/mongodbconnect/dest",
"dstFs": "RcloneLocalFs:/home/ubuntu/mongodbconnect/dest/target",
"_config": {
"CheckSum": true
},
"_async": true
}

But it would be good if "operations/uploadfile" works for me.

Thanks

I tried using " operations/uploadfile" with multipart, getting below response -

url : http://localhost:5572/operations/uploadfile?fs=localFS&remote=/

Response code : 200
Response body:
{}

So not sure where am I missing.

Looks like it succeeded.

What do you see in the debug log of the RC server/daemon (machine A), if starting the rclone RC daemon with -vv (and --log-file=debuglog.txt)?

1 Like

@Ole @ncw

Thanks a lot, it worked.
Location it was writing was different, as I tested in windows it was bit confusing.

Wish you a very happy new year 2023 !
Thank you very much for supporting us all the time :slight_smile:
You guys are amazing, keep it up !

Thanks,
Mahendra

2 Likes

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