2018-02-06 19:23:47 +01:00
|
|
|
---
|
|
|
|
title: "Alias"
|
|
|
|
description: "Remote Aliases"
|
|
|
|
---
|
|
|
|
|
2021-07-20 20:45:41 +02:00
|
|
|
# {{< icon "fa fa-link" >}} Alias
|
2018-02-06 19:23:47 +01:00
|
|
|
|
|
|
|
The `alias` remote provides a new name for another remote.
|
|
|
|
|
|
|
|
Paths may be as deep as required or a local path,
|
2020-10-13 23:49:58 +02:00
|
|
|
e.g. `remote:directory/subdirectory` or `/directory/subdirectory`.
|
2018-02-06 19:23:47 +01:00
|
|
|
|
|
|
|
During the initial setup with `rclone config` you will specify the target
|
|
|
|
remote. The target remote can either be a local path or another remote.
|
|
|
|
|
2020-05-19 13:02:44 +02:00
|
|
|
Subfolders can be used in target remote. Assume an alias remote named `backup`
|
2018-02-06 19:23:47 +01:00
|
|
|
with the target `mydrive:private/backup`. Invoking `rclone mkdir backup:desktop`
|
|
|
|
is exactly the same as invoking `rclone mkdir mydrive:private/backup/desktop`.
|
|
|
|
|
|
|
|
There will be no special handling of paths containing `..` segments.
|
|
|
|
Invoking `rclone mkdir backup:../desktop` is exactly the same as invoking
|
|
|
|
`rclone mkdir mydrive:private/backup/../desktop`.
|
|
|
|
The empty path is not allowed as a remote. To alias the current directory
|
|
|
|
use `.` instead.
|
|
|
|
|
2020-05-19 13:02:44 +02:00
|
|
|
Here is an example of how to make an alias called `remote` for local folder.
|
2018-02-06 19:23:47 +01:00
|
|
|
First run:
|
|
|
|
|
|
|
|
rclone config
|
|
|
|
|
|
|
|
This will guide you through an interactive setup process:
|
|
|
|
|
|
|
|
```
|
|
|
|
No remotes found - make a new one
|
|
|
|
n) New remote
|
|
|
|
s) Set configuration password
|
|
|
|
q) Quit config
|
|
|
|
n/s/q> n
|
|
|
|
name> remote
|
|
|
|
Type of storage to configure.
|
|
|
|
Choose a number from below, or type in your own value
|
2019-08-26 11:47:17 +02:00
|
|
|
[snip]
|
|
|
|
XX / Alias for an existing remote
|
2018-02-06 19:23:47 +01:00
|
|
|
\ "alias"
|
2019-08-26 11:47:17 +02:00
|
|
|
[snip]
|
|
|
|
Storage> alias
|
2018-02-06 19:23:47 +01:00
|
|
|
Remote or path to alias.
|
|
|
|
Can be "myremote:path/to/dir", "myremote:bucket", "myremote:" or "/local/path".
|
|
|
|
remote> /mnt/storage/backup
|
|
|
|
Remote config
|
|
|
|
--------------------
|
|
|
|
[remote]
|
|
|
|
remote = /mnt/storage/backup
|
|
|
|
--------------------
|
|
|
|
y) Yes this is OK
|
|
|
|
e) Edit this remote
|
|
|
|
d) Delete this remote
|
|
|
|
y/e/d> y
|
|
|
|
Current remotes:
|
|
|
|
|
|
|
|
Name Type
|
|
|
|
==== ====
|
|
|
|
remote alias
|
|
|
|
|
|
|
|
e) Edit existing remote
|
|
|
|
n) New remote
|
|
|
|
d) Delete remote
|
|
|
|
r) Rename remote
|
|
|
|
c) Copy remote
|
|
|
|
s) Set configuration password
|
|
|
|
q) Quit config
|
|
|
|
e/n/d/r/c/s/q> q
|
|
|
|
```
|
|
|
|
|
|
|
|
Once configured you can then use `rclone` like this,
|
|
|
|
|
|
|
|
List directories in top level in `/mnt/storage/backup`
|
|
|
|
|
|
|
|
rclone lsd remote:
|
|
|
|
|
|
|
|
List all the files in `/mnt/storage/backup`
|
|
|
|
|
|
|
|
rclone ls remote:
|
|
|
|
|
|
|
|
Copy another local directory to the alias directory called source
|
|
|
|
|
|
|
|
rclone copy /home/source remote:source
|
|
|
|
|
2020-05-22 13:22:52 +02:00
|
|
|
{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/alias/alias.go then run make backenddocs" >}}
|
2018-10-01 21:48:54 +02:00
|
|
|
### Standard Options
|
|
|
|
|
2019-04-25 13:32:36 +02:00
|
|
|
Here are the standard options specific to alias (Alias for an existing remote).
|
2018-10-01 21:48:54 +02:00
|
|
|
|
|
|
|
#### --alias-remote
|
|
|
|
|
|
|
|
Remote or path to alias.
|
|
|
|
Can be "myremote:path/to/dir", "myremote:bucket", "myremote:" or "/local/path".
|
|
|
|
|
|
|
|
- Config: remote
|
|
|
|
- Env Var: RCLONE_ALIAS_REMOTE
|
|
|
|
- Type: string
|
|
|
|
- Default: ""
|
|
|
|
|
2020-05-22 13:22:52 +02:00
|
|
|
{{< rem autogenerated options stop >}}
|