Read config from database or FIFO

Hi there,

I would like to propose a feature for rclone to read config from a database instead of flat file or environment variables.

My use case is that I run rclone as rcd, and add/remove remotes through rc, and operations can be done in parallel, so two or more clients can update the config at the same time.

While I can put the operations in a rclone's job queue (or my own), I think it's be easier if rclone can read and/or write config directly from database and let the database handles the concurrency.

postgresql is a popular one, so we can start with that. Or even smaller one like redis.

This will allow more flexibility.

My preference here would for rclone to invoke an external binary for reading and writing the config.

The config options are something like this

  • list sections
  • list keys within a section
  • add key to section
  • remove key from section
  • remove section

The first thing to do would be to abstract this in the rclone source into a go interface.

It might also be possible to implement this in a plugin.

That's a good idea. Somebody can alway provide a binary to talk to DB if needed to.