How to use Parent Commands?

Hi there, rclone is great, and allows me to backup files from my linux based NAS to my Onedrive account for offsite backup, but I can’t work out how “Parent Commands” are supposed to work?

I have a simple script file with 4 rclone sync statements, all of which have the same options like --bwlimit. In the documentation for sync, there is a big list of options that can be inherited from “parent commands”, which includes --bwlimit so I assume I should be able to set --bwlimit once, and then have all 4 sync statements inherit that option? If so, I can’t work out how to do this. I tried adding it to the config file, with the leading “–”, and without, but neither works. I have searched for examples, but not found any, searched the documentation for parent commands, but google lists every single rclone command page as “parent commands” appears on each page of documentation for each command.

Can anyone explain how parents commands work, and maybe I am misunderstanding what they are supposed to do?

Many Thanks

The parent command of rclone sync is rclone so that phrase means that rclone sync inherited these long options from rclone,not that there is a parent command you can configure or run.

If you want to set persistent options for rclone, then the easiest way is to set environment variables, so

export RCLONE_BWLIMIT=100k

Will set --bwlimit 100k for all subsequent rclone commands.

I knew I was missing something simple, but couldn’t see it :wink:
Thanks for the rapid response, and for developing and sharing rclone for free.

Donation is on it’s way.

Thank you - much appreciated :smiley: