I'm using this command to change the settings of my remote:
rclone config update 2 service_account_file /opt/sa-json/21.json
It seems to work ok, but when I go my configuration file it didn't change!
I'm trying to update 3 remotes, but only 1 works everytime. I don't know if it's a race issue or something...
Is the name of your remote
2? If so that looks OK.
How are you doing them, 1 at a time? Or via the rc?
Yes my remotes are named 1,2,3
I'm doing one at time. But I fixed the issue. I think it was a race condition. I fixed this by adding a
sleep 1s before each command.
Seems sometimes it will still fail to update a remote but it's better now
I see what is happening - you've got 3 rclones each running off the same config file?
Yes there is definitely opportunity for updates to go missing if you do them very quickly
Yes, 3 rclone remotes running from the same configuration file and I'm trying to update the 3 of them via script.
Any recommendations in how to stop this from happening?
You need to leave enough time for the rclone's to write back their config before running the next one. Not ideal I know!
I should probably do some locking on the config file but that isn't easy to do in a cross platform way
I understand. I'll research what can be done using systemd (which I was using before). Thanks!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.