Config dump and show do not include environment vars

What is the problem you are having with rclone?

config dump and config show do not include config that is in environment variables like RCLONE_CONFIG_<REMOTE_NAME>_<OPTION>.

But I'm not sure if that's by design or not. The docs do specifically mention "from the config file". In which case this is not a bug but a feature to discuss.

Use case is a container setup in which an unknown rclone remote config will be made with env vars (by someone else) which I want to "parse" and use it for another executable.

Run the command 'rclone version' and share the full output of the command.

1.60

Which cloud storage system are you using? (eg Google Drive)

local, http, azureblob, e.a.

The command you were trying to run (eg rclone copy /tmp remote:tmp)

export RCLONE_CONFIG_TEST_URL=https://somesite.com/
export RCLONE_CONFIG_TEST_TYPE=http
rclone config dump
rclone config show test

The rclone config contents with secrets removed.

n/a

A log from the command with the -vv flag

$ rclone config dump -vv
2022/11/16 16:27:46 DEBUG : rclone: Version "v1.60.0" starting with parameters ["rclone" "config" "dump" "-vv"]
2022/11/16 16:27:46 DEBUG : Using config file from "/home/me/.config/rclone/rclone.conf"
{
    /* other config */
}
2022/11/16 16:27:46 DEBUG : rclone: Version "v1.60.0" finishing with parameters ["rclone" "config" "dump" "-vv"]

that is correct.

I think it's a new change as the config dump is meant to dump the file.

That dumps the file and that's it.

If you want to see the running config then you can use the rc with rclone rc --loopback options/get

$ rclone rc --loopback options/get | grep UserAgent
		"UserAgent": "rclone/v1.61.0-beta.6567.4660f5f15.fix-dropbox-cross-account-move"
$ RCLONE_USER_AGENT=spud rclone rc --loopback options/get | grep UserAgent
		"UserAgent": "spud"

This won't show you backend configuration, but if you are wondering whether you've set your env var properly it might help.

Thanks. That's not what I need but handy anyway. In my use case I have a container in which I do some copy operations with rclone. But also I need to do something with gdal with the same backend rclone uses. I'd need backend config for that. But it's not a big issue, I can workaround with just reading the env vars directly or something. Also I tried to abstract away by using the rclone mount which is very cool. But I couldn't get that to work in kubernetes (mounting /dev/fuse).

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