New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request - make it possible to include another config file in rclone.conf #4125
Comments
This sounds like a nice idea. Tho there are different ways of approaching this.
I think I would prefer option 1. |
Of those I'd probably prefer option 1 too. The rclone config is in Is there a standard for includes in This isn't straight forward alas, remember rclone writes tokens etc back to the config file so it would have to have the concept of multiple config files. Or maybe it should only write back to the last config file and merge the keys from the other config files (this is a request I've had before). Giving rclone the concept of multiple config files would make all 3 options reasonably easy. |
@dragetd @ncw
|
I guess option 3 or 4 would make more sence? |
@onedr0p However I'm biased against URLs in config. It will make startup long and fragile. Detecting inclusion loops becomes a headache. Let alone security implications. Just including an external file can solve your case. You will run a helper that templates out a snippet before running rclone and add @ncw ? |
Idea: the include directive syntax could be extended to allow for patterns, like The behavior can be tuned too: if a single file is absent then abort, but if pattern returns empty set then continue silently. To avoid injections, rclone must check permissions and ownership of included files, especially via pattern! |
Another syntax idea stolen from sshd: replace |
I'd really appreciate this; personally, I don't have the need for includes, but I do have the need to split config into that which is checked into source control and that which is not; it's also a common need to be able to provide different Linux perms to different files (eg a backup admins groups vs a local admins group, where backup admins are a superset group). I need to be able to accomplish two scenarios:-
I wrapper rclone with a shell wrapper in most setups, so the ability to pass multiple Include syntax is a way into madness, with checks for closed loops, recursion depth, how to manage relative paths (relative to file's parent folder, relative to pwd, relative to first config file's parent folder), etc. It's doable, of course, and it's powerful, but most scenarios can be simply solved by other means. If we're going down the includes root, I would prefer something simpler than INI - it's not particularly friendly to generation and manipulation using standard POSIX tooling. I suspect that ship's sailed, though. |
Just a +1. I would like to github part of my rclone.conf but not all - it would include the non githubbed "sensitive" eg gdrive section with secrets. |
What is your current rclone version (output from
rclone version
)?What problem are you are trying to solve?
I want to share part of the config file between my 2 machines, and I guess it would be really helpful if I could just add this line
include path/to/shared/config
inrclone.conf
.The text was updated successfully, but these errors were encountered: