2018-03-19 10:06:13 +00:00
|
|
|
---
|
|
|
|
title: "rclone rc"
|
2020-05-16 14:11:55 +00:00
|
|
|
description: "Run a command against a running rclone."
|
2018-03-19 10:06:13 +00:00
|
|
|
slug: rclone_rc
|
|
|
|
url: /commands/rclone_rc/
|
2022-12-20 17:16:14 +00:00
|
|
|
versionIntroduced: v1.40
|
2020-02-10 12:31:45 +00:00
|
|
|
# autogenerated - DO NOT EDIT, instead edit the source code in cmd/rc/ and as part of making a release run "make commanddocs"
|
2018-03-19 10:06:13 +00:00
|
|
|
---
|
2020-05-22 10:17:37 +00:00
|
|
|
# rclone rc
|
2018-03-19 10:06:13 +00:00
|
|
|
|
|
|
|
Run a command against a running rclone.
|
|
|
|
|
2020-05-22 10:17:37 +00:00
|
|
|
## Synopsis
|
2018-03-19 10:06:13 +00:00
|
|
|
|
|
|
|
|
2018-11-24 13:44:25 +00:00
|
|
|
|
2022-07-09 17:08:20 +00:00
|
|
|
This runs a command against a running rclone. Use the `--url` flag to
|
2018-11-24 13:44:25 +00:00
|
|
|
specify an non default URL to connect on. This can be either a
|
|
|
|
":port" which is taken to mean "http://localhost:port" or a
|
|
|
|
"host:port" which is taken to mean "http://host:port"
|
|
|
|
|
2022-07-09 17:08:20 +00:00
|
|
|
A username and password can be passed in with `--user` and `--pass`.
|
2018-11-24 13:44:25 +00:00
|
|
|
|
2022-07-09 17:08:20 +00:00
|
|
|
Note that `--rc-addr`, `--rc-user`, `--rc-pass` will be read also for
|
|
|
|
`--url`, `--user`, `--pass`.
|
2018-03-19 10:06:13 +00:00
|
|
|
|
|
|
|
Arguments should be passed in as parameter=value.
|
|
|
|
|
|
|
|
The result will be returned as a JSON object by default.
|
|
|
|
|
2022-07-09 17:08:20 +00:00
|
|
|
The `--json` parameter can be used to pass in a JSON blob as an input
|
2018-11-24 13:44:25 +00:00
|
|
|
instead of key=value arguments. This is the only way of passing in
|
|
|
|
more complicated values.
|
|
|
|
|
2022-07-09 17:08:20 +00:00
|
|
|
The `-o`/`--opt` option can be used to set a key "opt" with key, value
|
|
|
|
options in the form `-o key=value` or `-o key`. It can be repeated as
|
2020-05-16 14:11:55 +00:00
|
|
|
many times as required. This is useful for rc commands which take the
|
|
|
|
"opt" parameter which by convention is a dictionary of strings.
|
|
|
|
|
|
|
|
-o key=value -o key2
|
|
|
|
|
|
|
|
Will place this in the "opt" value
|
|
|
|
|
|
|
|
{"key":"value", "key2","")
|
|
|
|
|
|
|
|
|
2022-07-09 17:08:20 +00:00
|
|
|
The `-a`/`--arg` option can be used to set strings in the "arg" value. It
|
2020-05-16 14:11:55 +00:00
|
|
|
can be repeated as many times as required. This is useful for rc
|
|
|
|
commands which take the "arg" parameter which by convention is a list
|
|
|
|
of strings.
|
|
|
|
|
|
|
|
-a value -a value2
|
|
|
|
|
|
|
|
Will place this in the "arg" value
|
|
|
|
|
|
|
|
["value", "value2"]
|
|
|
|
|
2022-07-09 17:08:20 +00:00
|
|
|
Use `--loopback` to connect to the rclone instance running `rclone rc`.
|
2019-06-15 11:01:29 +00:00
|
|
|
This is very useful for testing commands without having to run an
|
2021-02-02 13:42:35 +00:00
|
|
|
rclone rc server, e.g.:
|
2019-06-15 11:01:29 +00:00
|
|
|
|
|
|
|
rclone rc --loopback operations/about fs=/
|
|
|
|
|
2022-07-09 17:08:20 +00:00
|
|
|
Use `rclone rc` to see a list of all possible commands.
|
2018-03-19 10:06:13 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
rclone rc commands parameter [flags]
|
|
|
|
```
|
|
|
|
|
2020-05-22 10:17:37 +00:00
|
|
|
## Options
|
2018-03-19 10:06:13 +00:00
|
|
|
|
|
|
|
```
|
2021-11-01 15:42:05 +00:00
|
|
|
-a, --arg stringArray Argument placed in the "arg" array
|
2020-05-16 14:11:55 +00:00
|
|
|
-h, --help help for rc
|
2021-11-01 15:42:05 +00:00
|
|
|
--json string Input JSON - use instead of key=value args
|
|
|
|
--loopback If set connect to this rclone instance not via HTTP
|
|
|
|
--no-output If set, don't output the JSON result
|
|
|
|
-o, --opt stringArray Option in the form name=value or name placed in the "opt" array
|
|
|
|
--pass string Password to use to connect to rclone remote control
|
|
|
|
--url string URL to connect to rclone remote control (default "http://localhost:5572/")
|
|
|
|
--user string Username to use to rclone remote control
|
2018-03-19 10:06:13 +00:00
|
|
|
```
|
|
|
|
|
2019-06-20 15:18:02 +00:00
|
|
|
See the [global flags page](/flags/) for global options not listed here.
|
|
|
|
|
2020-05-22 10:17:37 +00:00
|
|
|
## SEE ALSO
|
2018-03-19 10:06:13 +00:00
|
|
|
|
2018-10-15 10:03:08 +00:00
|
|
|
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
|
2018-03-19 10:06:13 +00:00
|
|
|
|