v1.40

Alias

The alias remote provides a new name for another remote.

Paths may be as deep as required or a local path, e.g. remote:directory/subdirectory or /directory/subdirectory.

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.

Subfolders can be used in target remote. Assume an alias remote named backup 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.

The target remote can also be a connection string. This can be used to modify the config of a remote for different uses, e.g. the alias myDriveTrash with the target remote myDrive,trashed_only: can be used to only show the trashed files in myDrive.

Configuration

Here is an example of how to make an alias called remote for local folder. First run:

  1. rclone config

This will guide you through an interactive setup process:

  1. No remotes found, make a new one?
  2. n) New remote
  3. s) Set configuration password
  4. q) Quit config
  5. n/s/q> n
  6. name> remote
  7. Type of storage to configure.
  8. Choose a number from below, or type in your own value
  9. [snip]
  10. XX / Alias for an existing remote
  11. \ "alias"
  12. [snip]
  13. Storage> alias
  14. Remote or path to alias.
  15. Can be "myremote:path/to/dir", "myremote:bucket", "myremote:" or "/local/path".
  16. remote> /mnt/storage/backup
  17. Remote config
  18. Configuration complete.
  19. Options:
  20. - type: alias
  21. - remote: /mnt/storage/backup
  22. Keep this "remote" remote?
  23. y) Yes this is OK
  24. e) Edit this remote
  25. d) Delete this remote
  26. y/e/d> y
  27. Current remotes:
  28. Name Type
  29. ==== ====
  30. remote alias
  31. e) Edit existing remote
  32. n) New remote
  33. d) Delete remote
  34. r) Rename remote
  35. c) Copy remote
  36. s) Set configuration password
  37. q) Quit config
  38. 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

  1. rclone lsd remote:

List all the files in /mnt/storage/backup

  1. rclone ls remote:

Copy another local directory to the alias directory called source

  1. rclone copy /home/source remote:source

Standard options

Here are the Standard options specific to alias (Alias for an existing remote).

--alias-remote

Remote or path to alias.

Can be “myremote:path/to/dir”, “myremote:bucket”, “myremote:” or “/local/path”.

Properties:

  • Config: remote
  • Env Var: RCLONE_ALIAS_REMOTE
  • Type: string
  • Required: true

Advanced options

Here are the Advanced options specific to alias (Alias for an existing remote).

--alias-description

Description of the remote.

Properties:

  • Config: description
  • Env Var: RCLONE_ALIAS_DESCRIPTION
  • Type: string
  • Required: false