1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-15 15:53:41 +00:00

fs: Allow on the fly remotes with :backend: syntax - fixes #2449

This change allows remotes to be created on the fly without a config
file by using the remote type prefixed with a : as the remote name, Eg
:s3: to make an s3 remote.

This assumes the user is supplying the backend config via command line
flags or environment variables.
This commit is contained in:
Nick Craig-Wood
2018-08-07 22:51:06 +01:00
parent 174ca22936
commit 8656bd2bb0
5 changed files with 64 additions and 18 deletions

View File

@@ -133,6 +133,48 @@ It is recommended to use `copy` when copying individual files, not `sync`.
They have pretty much the same effect but `copy` will use a lot less
memory.
Syntax of remote paths
----------------------
The syntax of the paths passed to the rclone command are as follows.
### /path/to/dir
This refers to the local file system.
On Windows only `\` may be used instead of `/` in local paths
**only**, non local paths must use `/`.
These paths needn't start with a leading `/` - if they don't then they
will be relative to the current directory.
### remote:path/to/dir
This refers to a directory `path/to/dir` on `remote:` as defined in
the config file (configured with `rclone config`).
### remote:/path/to/dir
On most backends this is refers to the same directory as
`remote:path/to/dir` and that format should be preferred. On a very
small number of remotes (FTP, SFTP, Dropbox for business) this will
refer to a different directory. On these, paths without a leading `/`
will refer to your "home" directory and paths with a leading `/` will
refer to the root.
### :backend:path/to/dir
This is an advanced form for creating remotes on the fly. `backend`
should be the name or prefix of a backend (the `type` in the config
file) and all the configuration for the backend should be provided on
the command line (or in environment variables).
Eg
rclone lsd --http-url https://pub.rclone.org :http:
Which lists all the directories in `pub.rclone.org`.
Quoting and the shell
---------------------