Rclone config features

Hi, I use rclone in my scripts for mounting a Google Drive in Linux os. What I want to achieve: 1) establish a connection and mount a Google Drive 2) delete a config file (it helps me due to some file changes during backup...) 3) backup some files 4) disconnect from drive 5) let the script follow some rules and cp the config file back for the next time. Would it make any problems with established connection if I remove the config file after running the "rclone mount..." command?

(If I understand it right, the purpose of the config file is to provide password hash and connection setting - but when the connection is established, it's basically no longer needed - with exeption of reconnecting next time after a disconnection.)

Thank you for your confirmation, of it works as I expect, it may save me some time while scripting.

Big thanks for rclone to all devs. It is a scripting & backuping dream :slight_smile:

Google Drive is a token based remote unless you use a service account.

For a token based remote, you need a config file:

https://rclone.org/docs/#config-config-file

If you want to setup a service account and use that instead, I'd imagine you can use no config file as you can script all that stuff without a config file. I personally haven't done it so I can't comment for sure if it works with Google Drive.

Why do you not want a config file? What's your use case?

hello and welcome to the forum,

not sure what would happen if the token expires while the rclone mount is active.
rclone would try to save the new token in the, now deleted, config file....

might try using --exclude=/path/to/rclone.conf

Hi all, thank you for your replies and sorry for my confusing description :confused: I am ok with using the ordinary config file, but would like to delete it after establishing a connection.

The use case: I use virtual machine for a common sw testing and presentation of my outputs and rclone for mounting remote backup directory. I want to make sure, that the config file with my token can not be simply stolen in case of remote access eg. from the client (well I believe I work with realible partners and I do not work with a sensitive data, but bether safe than sorry...) ... so I came with the simple idea to delete it after establishing the connection to the remote and before access e. g. from the client. If I am right, the connection should continue to work during the session and there is nothing with any form of credentials/tokens to stole. The session could of course expire, but I hope that in common conditions it will last for a few hours and thats basically all I need. (And after that I revert whole virtual machine back or copy back config file from a separated source with a special script.)

Maybe it's a nonsense, I am open to any ideas. But this sound quite bulletproof + there no need to use another password like with encrypted config file + it can't be bruteforced.

at this point, why not test your idea?

Google Drive tokens need to be refreshed hourly so in one hour, you'd break.

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