I use Js, Python, ajax, jQuery for Rclone. I'm stuck in a small place.
rclone copy local/path remote_name: -P
Python runs this command on the command line (with the "subprocess" class) and outputs it.
There is a problem, the output is constantly changing as a percentage. So think of an upload percentage and it's constantly being updated.
Thank you in advance for your help.
Could you use the RC API to get that data rather than attempting to parse the standard out?
Unfortunately I don't understand how to use it exactly.
You add these to the command line of your sync:
--rc-no-auth (if you dont need authentication and you're not exposing this outside)
That will start a api on http://127.0.0.1:5572/. While that is syncing, you can execute posts to the API to gather information about the sync.
rclone rc core/stats
as an example.
You can also pass parameters and other things.
You could also run the 'actual sync' from rc and then use that same rc to monitor it. For that, you'd start a rc daemon ( --rc-serve) first without syncing, issue the rc commands to sync, and then core_stats to monitor it.
root@xxxx:/data/bin# rclone rc --url=http://xxxx:email@example.com:6444 core/stats
I don't really know enough about API. At the same time, the system I use is a minimal system, so I will not be able to open a browser. Unfortunately it won't work if you need to open a browser. For now, I will try to create a conf file and write the percentages there, I hope I can. If I can't do it with this method, I think I will write to the forum again. Because my only option will be API and I'm troubled about it. Thank you for your interest
there is no need for a web browser, just command line.
- start the copy command
rclone copy local/path remote_name: -P --rc --rc-no-auth
look at the output and you should see
NOTICE: Serving remote control on http://localhost:5572/
- get the stats
rclone rc core/stats
Yes. I tried what you said. But I guess it doesn't give the total percentage. It gives you what percentage of the files were discarded one by one. A calculation can be made from here, but it can make it quite complicated.
Is there a command where I can get the total percentage of the transfer?
@ncw I would really appreciate it if you are interested. I've been working on rclone for weeks.
And finally when I tried to do it with config file, it queued other processes. What I want to do is to make a backup so that it does not interfere with any other operation.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.