Skip to content

Adding command line options to config file #661

Closed

Description

@chepurko

When filing an issue, please include the following information if
possible as well as a description of the problem. Make sure you are
using the latest version of rclone.

What is your rclone version (eg output from rclone -V)
rclone v1.32

Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu 16.04 64-bit

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

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

A log from the command with the -v flag (eg output from rclone -v copy /tmp remote:tmp)

Does rclone support adding command line options into the .rclone.conf file? For example, I'd like rclone to always use --drive-formats ods,odt instead of typing it in every time. So does the configuration file work just like a regular key/value list with the command-line options as well?

Activity

  1. chepurko commented on Sep 14, 2016

    @chepurko
    Author

    Any word on this? Or is the .rclone.conf file only for the initial setup configurations (type, token, etc.)?

  2. ncw commented on Sep 16, 2016

    @ncw
    Member

    It doesn't support it yet, but it is a great idea.

    What I want to do is make any of the command line options for a remote work in the config file too. Thus would need a little bit of reorganisation but isn't too tricky.

  3. added this to the Soon milestone on Sep 19, 2016
  4. modified the milestones: v1.35, Soon on Nov 7, 2016
  5. modified the milestones: v1.35, v1.36 on Dec 14, 2016
  6. modified the milestones: v1.36, v1.37 on Feb 14, 2017
  7. ncw commented on Jul 6, 2017

    @ncw
    Member

    Note to self: an alternative would be to have an :env: section with environment variables to set in - that might work quite well.

    Would need to make an option to edit it in rclone config.

    Maybe have the same section in each remote too.

    Make some machinery that remotes can use which load the options from there in preference.

    Ideally you would be able to set the up while configuring the remote.

  8. 11 remaining items

  9. modified the milestones: v1.41, v1.42 on Apr 28, 2018
  10. cal2195 commented on Jun 2, 2018

    @cal2195

    Allowing all config options to be present in the one file would make life a lot easier when switching system and reducing the lenght of commands! 😄

  11. modified the milestones: v1.42, v1.43 on Jun 17, 2018
  12. cjnaz commented on Jul 14, 2018

    @cjnaz
    Contributor

    Bump.

    Note that the current documentation "You can set defaults for values in the config file on an individual remote basis." kinda suggests that this is supported now (in 1.42). It is suggested to run through rclone config "to discover the name of the config items that you want." I'm wanting to set/change the --drive-formats default for docs to .otd, which I gather is not (currently) supported in the config file, and I wont discover the correct config string by running through rclone config.

    The documentation could be clarified. Is it concise to say that the config file may be edited (only) for the items listed for the given remote, as created by rclone config?

    I've tried several invalid items in the config file, with no error messages. A feature/bug may be to output error messages for invalid lines in the config file.

  13. ncw commented on Jul 15, 2018

    @ncw
    Member

    @cjnaz I'm currently working on unifying the backend config so you will be able to configure everything about each backend via command line flag, environment variable or config file.

    If you want to see the definitive list of what goes in the config file then you can use

    rclone config providers
    

    I've tried several invalid items in the config file, with no error messages. A feature/bug may be to output error messages for invalid lines in the config file.

    It is difficult to provide warnings and maintain both forward and backwards compatibility, but not impossible.

  14. jikamens commented on Jul 15, 2018

    @jikamens

    Thanks @ncw!

  15. cjnaz commented on Jul 15, 2018

    @cjnaz
    Contributor

    Perhaps a default quiet behavior when unsupported config switches are found, and a --config-lint switch to output invalid lines for debug/validation?

  16. ncw commented on Sep 2, 2018

    @ncw
    Member

    All the backend config items are now addable to the config file. You can use rclone config then see the advanced config to see them.

    There is more work to do to add the non-backend config, but this issue is clearly about the backend config, so I'm going to close it now.

  17. modified the milestones: v1.43, Soon on Sep 2, 2018
  18. YenForYang commented on Oct 23, 2018

    @YenForYang
    Contributor

    Any possibility of supporting options globally?

    Like --fast-list (which could be considered a missing option for drive file config) or --suffix.

    Or even on a "remote" level -- like setting chunk_size and upload_cutoff for all drive type remotes.

  19. ncw commented on Oct 25, 2018

    @ncw
    Member

    Any possibility of supporting options globally?

    Like --fast-list (which could be considered a missing option for drive file config) or --suffix.

    I'm planning to do that in this issue #2697

    Or even on a "remote" level -- like setting chunk_size and upload_cutoff for all drive type remotes.

    You can do this with environment variables RCLONE_DRIVE_CHUNK_SIZE but you can't set those in the config. However I see no reason why those options couldn't be set in the "global config"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions