From 93e8a976ef686a4bd8e3afaf2016734c81881507 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 14 Jun 2024 16:04:51 +0100 Subject: [PATCH] Version v1.67.0 --- MANUAL.html | 24678 ++++++------ MANUAL.md | 1458 +- MANUAL.txt | 23817 +++++++----- Makefile | 2 +- backend/drive/drive.go | 4 +- docs/config.json | 3 +- docs/content/alias.md | 2 +- docs/content/azureblob.md | 2 +- docs/content/azurefiles.md | 2 +- docs/content/b2.md | 2 +- docs/content/box.md | 2 +- docs/content/cache.md | 2 +- docs/content/changelog.md | 153 + docs/content/chunker.md | 2 +- docs/content/combine.md | 2 +- docs/content/commands/rclone.md | 24 +- .../commands/rclone_completion_bash.md | 27 +- docs/content/commands/rclone_gitannex.md | 102 + docs/content/commands/rclone_lsjson.md | 4 +- docs/content/commands/rclone_mount.md | 7 +- docs/content/commands/rclone_ncdu.md | 3 +- docs/content/commands/rclone_nfsmount.md | 7 +- docs/content/commands/rclone_rcd.md | 5 +- docs/content/commands/rclone_serve_dlna.md | 2 +- docs/content/commands/rclone_serve_docker.md | 2 + docs/content/commands/rclone_serve_ftp.md | 2 +- docs/content/commands/rclone_serve_http.md | 3 +- docs/content/commands/rclone_serve_nfs.md | 1 + docs/content/commands/rclone_serve_restic.md | 3 +- docs/content/commands/rclone_serve_s3.md | 25 +- docs/content/commands/rclone_serve_sftp.md | 1 + docs/content/commands/rclone_serve_webdav.md | 6 +- docs/content/commands/rclone_test_info.md | 1 + docs/content/compress.md | 2 +- docs/content/crypt.md | 2 +- docs/content/drive.md | 55 +- docs/content/dropbox.md | 16 +- docs/content/fichier.md | 2 +- docs/content/filefabric.md | 2 +- docs/content/flags.md | 22 +- docs/content/ftp.md | 2 +- docs/content/googlecloudstorage.md | 2 +- docs/content/googlephotos.md | 2 +- docs/content/hasher.md | 2 +- docs/content/hdfs.md | 2 +- docs/content/hidrive.md | 2 +- docs/content/http.md | 13 +- docs/content/imagekit.md | 2 +- docs/content/internetarchive.md | 2 +- docs/content/jottacloud.md | 2 +- docs/content/koofr.md | 4 +- docs/content/linkbox.md | 2 +- docs/content/local.md | 40 +- docs/content/mailru.md | 2 +- docs/content/mega.md | 2 +- docs/content/memory.md | 2 +- docs/content/netstorage.md | 2 +- docs/content/onedrive.md | 84 +- docs/content/opendrive.md | 2 +- docs/content/oracleobjectstorage.md | 2 +- docs/content/pcloud.md | 2 +- docs/content/pikpak.md | 50 +- docs/content/premiumizeme.md | 2 +- docs/content/protondrive.md | 2 +- docs/content/putio.md | 2 +- docs/content/qingstor.md | 2 +- docs/content/quatrix.md | 2 +- docs/content/s3.md | 13 +- docs/content/seafile.md | 2 +- docs/content/sftp.md | 27 +- docs/content/sharefile.md | 2 +- docs/content/sia.md | 2 +- docs/content/smb.md | 2 +- docs/content/storj.md | 2 +- docs/content/sugarsync.md | 2 +- docs/content/swift.md | 74 +- docs/content/ulozto.md | 4 +- docs/content/union.md | 2 +- docs/content/uptobox.md | 2 +- docs/content/webdav.md | 13 +- docs/content/yandex.md | 2 +- docs/content/zoho.md | 2 +- docs/layouts/chrome/navbar.html | 2 +- go.sum | 4 - rclone.1 | 32175 ++++++++++------ 85 files changed, 46473 insertions(+), 36551 deletions(-) create mode 100644 docs/content/commands/rclone_gitannex.md diff --git a/MANUAL.html b/MANUAL.html index c53b0862a..6ab9d478d 100644 --- a/MANUAL.html +++ b/MANUAL.html @@ -81,7 +81,7 @@

rclone(1) User Manual

Nick Craig-Wood

-

Mar 10, 2024

+

Jun 14, 2024

Rclone syncs your files to cloud storage

rclone logo

@@ -173,6 +173,7 @@
  • Liara Object Storage
  • Linkbox
  • Linode Object Storage
  • +
  • Magalu
  • Mail.ru Cloud
  • Memset Memstore
  • Mega
  • @@ -212,6 +213,7 @@
  • Synology
  • SugarSync
  • Tencent Cloud Object Storage (COS)
  • +
  • Uloz.to
  • Uptobox
  • Wasabi
  • WebDAV
  • @@ -276,10 +278,10 @@ sudo mandb

    macOS installation

    Installation with brew

    brew install rclone
    -

    NOTE: This version of rclone will not support mount any more (see #5373). If mounting is wanted on macOS, either install a precompiled binary or enable the relevant option when installing from source.

    +

    NOTE: This version of rclone will not support mount any more (see #5373). If mounting is wanted on macOS, either install a precompiled binary or enable the relevant option when installing from source.

    Note that this is a third party installer not controlled by the rclone developers so it may be out of date. Its current version is as below.

    Homebrew package

    -

    Installation with MacPorts (#macos-macports)

    +

    Installation with MacPorts

    On macOS, rclone can also be installed via MacPorts:

    sudo port install rclone

    Note that this is a third party installer not controlled by the rclone developers so it may be out of date. Its current version is as below.

    @@ -543,6 +545,7 @@ go build
  • Storj
  • SugarSync
  • Union
  • +
  • Uloz.to
  • Uptobox
  • WebDAV
  • Yandex Disk
  • @@ -552,7 +555,11 @@ go build

    Basic syntax

    Rclone syncs a directory tree from one storage system to another.

    Its syntax is like this

    -
    Syntax: [options] subcommand <parameters> <parameters...>
    +
    rclone subcommand [options] <parameters> <parameters...>
    +

    A subcommand is a the rclone operation required, (e.g. sync, copy, ls).

    +

    An option is a single letter flag (e.g. -v) or a group of single letter flags (e.g. -Pv) or a long flag (e.g. --progress). No options are required. Options can come after the subcommand or in between parameters too or on the end, but only global options can be used before the subcommand. Anything after a -- option will not be interpreted as an option so if you need to add a parameter which starts with a - then put a -- on its own first, eg

    +
    rclone lsf -- -directory-starting-with-dash
    +

    A parameter is usually a file path or rclone remote, eg /path/to/file or remote:path/to/file but it can be other things - the subcommand help will tell you what.

    Source and destination paths are specified by the name you gave the storage system in the config file then the sub path, e.g. "drive:myfolder" to look at "myfolder" in Google drive.

    You can define as many storage paths as you like in the config file.

    Please use the --interactive/-i flag while learning rclone to avoid accidental data loss.

    @@ -1885,12 +1892,17 @@ rclone backend help <backendname>

    Output bash completion script for rclone.

    Synopsis

    Generates a bash shell autocompletion script for rclone.

    -

    This writes to /etc/bash_completion.d/rclone by default so will probably need to be run with sudo or as root, e.g.

    -
    sudo rclone genautocomplete bash
    -

    Logout and login again to use the autocompletion scripts, or source them directly

    -
    . /etc/bash_completion
    -

    If you supply a command line argument the script will be written there.

    +

    By default, when run without any arguments,

    +
    rclone genautocomplete bash
    +

    the generated script will be written to

    +
    /etc/bash_completion.d/rclone
    +

    and so rclone will probably need to be run as root, or with sudo.

    +

    If you supply a path to a file as the command line argument, then the generated script will be written to that file, in which case you should not need root privileges.

    If output_file is "-", then the output will be written to stdout.

    +

    If you have installed the script into the default location, you can logout and login again to use the autocompletion script.

    +

    Alternatively, you can source the script directly

    +
    . /path/to/my_bash_completion_scripts/rclone
    +

    and the autocompletion functionality will be added to your current shell.

    rclone completion bash [output_file] [flags]

    Options

      -h, --help   help for bash
    @@ -2557,9 +2569,51 @@ rclone cryptdecode --reverse encryptedremote: filename1 filename2 +

    rclone gitannex

    +

    Speaks with git-annex over stdin/stdout.

    +

    Synopsis

    +

    Rclone's gitannex subcommand enables git-annex to store and retrieve content from an rclone remote. It is meant to be run by git-annex, not directly by users.

    +

    Installation on Linux

    +
      +
    1. Skip this step if your version of git-annex is 10.20240430 or newer. Otherwise, you must create a symlink somewhere on your PATH with a particular name. This symlink helps git-annex tell rclone it wants to run the "gitannex" subcommand.

      +
      # Create the helper symlink in "$HOME/bin".
      +ln -s "$(realpath rclone)" "$HOME/bin/git-annex-remote-rclone-builtin"
      +
      +# Verify the new symlink is on your PATH.
      +which git-annex-remote-rclone-builtin
    2. +
    3. Add a new remote to your git-annex repo. This new remote will connect git-annex with the rclone gitannex subcommand.

      +

      Start by asking git-annex to describe the remote's available configuration parameters.

      +
      # If you skipped step 1:
      +git annex initremote MyRemote type=rclone --whatelse
      +
      +# If you created a symlink in step 1:
      +git annex initremote MyRemote type=external externaltype=rclone-builtin --whatelse
      +
      +

      NOTE: If you're porting an existing git-annex-remote-rclone remote to use rclone gitannex, you can probably reuse the configuration parameters verbatim without renaming them. Check parameter synonyms with --whatelse as shown above.

      +
      +

      The following example creates a new git-annex remote named "MyRemote" that will use the rclone remote named "SomeRcloneRemote". That rclone remote must be one configured in your rclone.conf file, which can be located with rclone config file.

      +
      git annex initremote MyRemote         \
      +    type=external                     \
      +    externaltype=rclone-builtin       \
      +    encryption=none                   \
      +    rcloneremotename=SomeRcloneRemote \
      +    rcloneprefix=git-annex-content    \
      +    rclonelayout=nodir
    4. +
    5. Before you trust this command with your precious data, be sure to test the remote. This command is very new and has not been tested on many rclone backends. Caveat emptor!

      +
      git annex testremote MyRemote
    6. +
    +

    Happy annexing!

    +
    rclone gitannex [flags]
    +

    Options

    +
      -h, --help   help for gitannex
    +

    See the global flags page for global options not listed here.

    +

    SEE ALSO

    +

    rclone hashsum

    Produces a hashsum file for all the objects in the path.

    -

    Synopsis

    +

    Synopsis

    Produces a hash file for all the objects in the path using the hash named. The output is in the same format as the standard md5sum/sha1sum tool.

    By default, the hash is requested from the remote. If the hash is not supported by the remote, no hash will be returned. With the download flag, the file will be downloaded from the remote and hashed locally enabling any hash for any remote.

    For the MD5 and SHA1 algorithms there are also dedicated commands, md5sum and sha1sum.

    @@ -2576,7 +2630,7 @@ Supported hashes are:
    $ rclone hashsum MD5 remote:path

    Note that hash names are case insensitive and values are output in lower case.

    rclone hashsum [<hash> remote:path] [flags]
    -

    Options

    +

    Options

          --base64               Output base64 encoded hashsum
       -C, --checkfile string     Validate hashes against a given SUM file instead of printing them
           --download             Download the file and hash it locally; if this flag is not specified, the hash is requested from the remote
    @@ -2611,13 +2665,13 @@ Supported hashes are:
     
          --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
           --fast-list           Use recursive list if available; uses more memory but fewer transactions

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    • rclone - Show help for rclone commands, flags and backends.

    rclone link

    Generate public link to file/folder.

    -

    Synopsis

    +

    Synopsis

    rclone link will create, retrieve or remove a public link to the given file or folder.

    rclone link remote:path/to/file
     rclone link remote:path/to/folder/
    @@ -2627,32 +2681,32 @@ rclone link --expire 1d remote:path/to/file

    Use the --unlink flag to remove existing public links to the file or folder. Note not all backends support "--unlink" flag - those that don't will just ignore it.

    If successful, the last line of the output will contain the link. Exact capabilities depend on the remote, but the link will always by default be created with the least constraints – e.g. no expiry, no password protection, accessible without account.

    rclone link remote:path [flags]
    -

    Options

    +

    Options

          --expire Duration   The amount of time that the link will be valid (default off)
       -h, --help              help for link
           --unlink            Remove existing public link to file/folder

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    -
      -
    • rclone - Show help for rclone commands, flags and backends.
    • -
    -

    rclone listremotes

    -

    List all the remotes in the config file and defined in environment variables.

    -

    Synopsis

    -

    rclone listremotes lists all the available remotes from the config file.

    -

    When used with the --long flag it lists the types and the descriptions too.

    -
    rclone listremotes [flags]
    -

    Options

    -
      -h, --help   help for listremotes
    -      --long   Show the type and the description as well as names
    -

    See the global flags page for global options not listed here.

    SEE ALSO

    • rclone - Show help for rclone commands, flags and backends.
    +

    rclone listremotes

    +

    List all the remotes in the config file and defined in environment variables.

    +

    Synopsis

    +

    rclone listremotes lists all the available remotes from the config file.

    +

    When used with the --long flag it lists the types and the descriptions too.

    +
    rclone listremotes [flags]
    +

    Options

    +
      -h, --help   help for listremotes
    +      --long   Show the type and the description as well as names
    +

    See the global flags page for global options not listed here.

    +

    SEE ALSO

    +
      +
    • rclone - Show help for rclone commands, flags and backends.
    • +

    rclone lsf

    List directories and objects in remote:path formatted for parsing.

    -

    Synopsis

    +

    Synopsis

    List the contents of the source path (directories and objects) to standard output in a form which is easy to parse by scripts. By default this will just be the names of the objects and directories, one per line. The directories will have a / suffix.

    Eg

    $ rclone lsf swift:bucket
    @@ -2731,7 +2785,7 @@ rclone lsf remote:path --format pt --time-format max

    The other list commands lsd,lsf,lsjson do not recurse by default - use -R to make them recurse.

    Listing a nonexistent directory will produce an error except for remotes which can't have empty directories (e.g. s3, swift, or gcs - the bucket-based remotes).

    rclone lsf remote:path [flags]
    -

    Options

    +

    Options

          --absolute             Put a leading / in front of path names
           --csv                  Output in CSV format
       -d, --dir-slash            Append a slash to directory names (default true)
    @@ -2772,13 +2826,13 @@ rclone lsf remote:path --format pt --time-format max
          --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
           --fast-list           Use recursive list if available; uses more memory but fewer transactions

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    • rclone - Show help for rclone commands, flags and backends.

    rclone lsjson

    List directories and objects in the path in JSON format.

    -

    Synopsis

    +

    Synopsis

    List directories and objects in the path in JSON format.

    The output is an array of Items, where each Item looks like this

    {
    @@ -2800,10 +2854,10 @@ rclone lsf remote:path --format pt --time-format max
    "Size" : 6, "Tier" : "hot", }
    -

    If --hash is not specified the Hashes property won't be emitted. The types of hash can be specified with the --hash-type parameter (which may be repeated). If --hash-type is set then it implies --hash.

    +

    If --hash is not specified, the Hashes property will be omitted. The types of hash can be specified with the --hash-type parameter (which may be repeated). If --hash-type is set then it implies --hash.

    If --no-modtime is specified then ModTime will be blank. This can speed things up on remotes where reading the ModTime takes an extra request (e.g. s3, swift).

    If --no-mimetype is specified then MimeType will be blank. This can speed things up on remotes where reading the MimeType takes an extra request (e.g. s3, swift).

    -

    If --encrypted is not specified the Encrypted won't be emitted.

    +

    If --encrypted is not specified the Encrypted will be omitted.

    If --dirs-only is not specified files in addition to directories are returned

    If --files-only is not specified directories in addition to the files will be returned.

    If --metadata is set then an additional Metadata key will be returned. This will have metadata in rclone standard format as a JSON object.

    @@ -2826,7 +2880,7 @@ rclone lsf remote:path --format pt --time-format max

    The other list commands lsd,lsf,lsjson do not recurse by default - use -R to make them recurse.

    Listing a nonexistent directory will produce an error except for remotes which can't have empty directories (e.g. s3, swift, or gcs - the bucket-based remotes).

    rclone lsjson remote:path [flags]
    -

    Options

    +

    Options

          --dirs-only               Show only directories in the listing
           --encrypted               Show the encrypted names
           --files-only              Show only files in the listing
    @@ -2868,14 +2922,14 @@ rclone lsf remote:path --format pt --time-format max
          --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
           --fast-list           Use recursive list if available; uses more memory but fewer transactions

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone mount

    Mount the remote as file system on a mountpoint.

    -

    Synopsis

    -

    rclone mount allows Linux, FreeBSD, macOS and Windows to mount any of Rclone's cloud storage systems as a file system with FUSE.

    +

    Synopsis

    +

    Rclone mount allows Linux, FreeBSD, macOS and Windows to mount any of Rclone's cloud storage systems as a file system with FUSE.

    First set up your remote using rclone config. Check it works with rclone ls etc.

    On Linux and macOS, you can run mount in either foreground or background (aka daemon) mode. Mount runs in foreground mode by default. Use the --daemon flag to force background mode. On Windows you can run mount in foreground only, the flag is ignored.

    In background mode rclone acts as a generic Unix mount program: the main program starts, spawns background rclone process to setup and maintain the mount, waits until success or timeout and exits with appropriate code (killing the child process if it fails).

    @@ -3009,8 +3063,9 @@ WantedBy=multi-user.target
  • command=cmount can be used to run cmount or any other rclone command rather than the default mount.
  • args2env will pass mount options to the mount helper running in background via environment variables instead of command line arguments. This allows to hide secrets from such commands as ps or pgrep.
  • vv... will be transformed into appropriate --verbose=N
  • -
  • standard mount options like x-systemd.automount, _netdev, nosuid and alike are intended only for Automountd and ignored by rclone. ## VFS - Virtual File System
  • +
  • standard mount options like x-systemd.automount, _netdev, nosuid and alike are intended only for Automountd and ignored by rclone.
  • +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -3130,7 +3185,7 @@ WantedBy=multi-user.target

    Some backends, most notably S3, do not report the amount of bytes used. If you need this information to be available when running df on the filesystem, then pass the flag --vfs-used-is-size to rclone. With this flag set, instead of relying on the backend to report this information, rclone will scan the whole remote similar to rclone size and compute the total used space itself.

    WARNING. Contrary to rclone size, this flag ignores filters so that the result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching.

    rclone mount remote:path /path/to/mountpoint [flags]
    -

    Options

    +

    Options

          --allow-non-empty                        Allow mounting over a non-empty directory (not supported on Windows)
           --allow-other                            Allow access to other users (not supported on Windows)
           --allow-root                             Allow access to root user (not supported on Windows)
    @@ -3144,6 +3199,7 @@ WantedBy=multi-user.target
    --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) @@ -3205,13 +3261,13 @@ WantedBy=multi-user.target --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone moveto

    Move file or directory from source to dest.

    -

    Synopsis

    +

    Synopsis

    If source:path is a file or directory then it moves it to a file or directory named dest:path.

    This can be used to rename files or upload single files to other than their existing name. If the source is a directory then it acts exactly like the move command.

    So

    @@ -3227,7 +3283,7 @@ if src is directory

    Important: Since this can cause data loss, test first with the --dry-run or the --interactive/-i flag.

    Note: Use the -P/--progress flag to view real-time transfer statistics.

    rclone moveto source:path dest:path [flags]
    -

    Options

    +

    Options

      -h, --help   help for moveto

    Copy Options

    Flags for anything which can Copy a file.

    @@ -3297,13 +3353,13 @@ if src is directory
          --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
           --fast-list           Use recursive list if available; uses more memory but fewer transactions

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone ncdu

    Explore a remote with a text based user interface.

    -

    Synopsis

    +

    Synopsis

    This displays a text based user interface allowing the navigation of a remote. It is most useful for answering the question - "What is using all my disk space?".

    To make the user interface it first scans the entire remote given and builds an in memory representation. rclone ncdu can be used during this scanning phase and you will see it building up the directory structure as it goes along.

    You can interact with the user interface using key presses, press '?' to toggle the help on and off. The supported keys are:

    @@ -3325,7 +3381,8 @@ if src is directory ^L refresh screen (fix screen corruption) r recalculate file sizes ? to toggle help on and off - q/ESC/^c to quit + ESC to close the menu box + q/^c to quit

    Listed files/directories may be prefixed by a one-character flag, some of them combined with a description in brackets at end of line. These flags have the following meaning:

    e means this is an empty directory, i.e. contains no files (but
       may contain empty subdirectories)
    @@ -3341,7 +3398,7 @@ if src is directory
     

    Note that it might take some time to delete big files/directories. The UI won't respond in the meantime since the deletion is done synchronously.

    For a non-interactive listing of the remote, see the tree command. To just get the total size of the remote you can also use the size command.

    rclone ncdu remote:path [flags]
    -

    Options

    +

    Options

      -h, --help   help for ncdu

    Filter Options

    Flags for filtering directory listings.

    @@ -3372,14 +3429,14 @@ if src is directory
          --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
           --fast-list           Use recursive list if available; uses more memory but fewer transactions

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    • rclone - Show help for rclone commands, flags and backends.

    rclone nfsmount

    Mount the remote as file system on a mountpoint.

    -

    Synopsis

    -

    rclone nfsmount allows Linux, FreeBSD, macOS and Windows to mount any of Rclone's cloud storage systems as a file system with FUSE.

    +

    Synopsis

    +

    Rclone nfsmount allows Linux, FreeBSD, macOS and Windows to mount any of Rclone's cloud storage systems as a file system with FUSE.

    First set up your remote using rclone config. Check it works with rclone ls etc.

    On Linux and macOS, you can run mount in either foreground or background (aka daemon) mode. Mount runs in foreground mode by default. Use the --daemon flag to force background mode. On Windows you can run mount in foreground only, the flag is ignored.

    In background mode rclone acts as a generic Unix mount program: the main program starts, spawns background rclone process to setup and maintain the mount, waits until success or timeout and exits with appropriate code (killing the child process if it fails).

    @@ -3513,8 +3570,9 @@ WantedBy=multi-user.target
  • command=cmount can be used to run cmount or any other rclone command rather than the default mount.
  • args2env will pass mount options to the mount helper running in background via environment variables instead of command line arguments. This allows to hide secrets from such commands as ps or pgrep.
  • vv... will be transformed into appropriate --verbose=N
  • -
  • standard mount options like x-systemd.automount, _netdev, nosuid and alike are intended only for Automountd and ignored by rclone. ## VFS - Virtual File System
  • +
  • standard mount options like x-systemd.automount, _netdev, nosuid and alike are intended only for Automountd and ignored by rclone.
  • +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -3634,7 +3692,7 @@ WantedBy=multi-user.target

    Some backends, most notably S3, do not report the amount of bytes used. If you need this information to be available when running df on the filesystem, then pass the flag --vfs-used-is-size to rclone. With this flag set, instead of relying on the backend to report this information, rclone will scan the whole remote similar to rclone size and compute the total used space itself.

    WARNING. Contrary to rclone size, this flag ignores filters so that the result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching.

    rclone nfsmount remote:path /path/to/mountpoint [flags]
    -

    Options

    +

    Options

          --addr string                            IPaddress:Port or :Port to bind server to
           --allow-non-empty                        Allow mounting over a non-empty directory (not supported on Windows)
           --allow-other                            Allow access to other users (not supported on Windows)
    @@ -3649,6 +3707,7 @@ WantedBy=multi-user.target
    --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) @@ -3712,13 +3771,13 @@ WantedBy=multi-user.target --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone obscure

    Obscure password for use in the rclone config file.

    -

    Synopsis

    +

    Synopsis

    In the rclone config file, human-readable passwords are obscured. Obscuring them is done by encrypting them and writing them out in base64. This is not a secure way of encrypting these passwords as rclone can decrypt them - it is to prevent "eyedropping" - namely someone seeing a password in the rclone config file by accident.

    Many equally important things (like access tokens) are not obscured in the config file. However it is very hard to shoulder surf a 64 character hex token.

    This command can also accept a password through STDIN instead of an argument by passing a hyphen as an argument. This will use the first line of STDIN as the password not including the trailing newline.

    @@ -3726,16 +3785,16 @@ WantedBy=multi-user.target

    If there is no data on STDIN to read, rclone obscure will default to obfuscating the hyphen itself.

    If you want to encrypt the config file then please use config file encryption - see rclone config for more info.

    rclone obscure password [flags]
    -

    Options

    +

    Options

      -h, --help   help for obscure

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone rc

    Run a command against a running rclone.

    -

    Synopsis

    +

    Synopsis

    This runs a command against a running rclone. Use the --url flag to 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"

    A username and password can be passed in with --user and --pass.

    Note that --rc-addr, --rc-user, --rc-pass will be read also for --url, --user, --pass.

    @@ -3754,7 +3813,7 @@ WantedBy=multi-user.target
    rclone rc --loopback operations/about fs=/

    Use rclone rc to see a list of all possible commands.

    rclone rc commands parameter [flags]
    -

    Options

    +

    Options

      -a, --arg stringArray   Argument placed in the "arg" array
       -h, --help              help for rc
           --json string       Input JSON - use instead of key=value args
    @@ -3765,13 +3824,13 @@ WantedBy=multi-user.target
    --url string URL to connect to rclone remote control (default "http://localhost:5572/") --user string Username to use to rclone remote control

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone rcat

    Copies standard input to file on remote.

    -

    Synopsis

    +

    Synopsis

    rclone rcat reads from standard input (stdin) and copies it to a single remote file.

    echo "hello world" | rclone rcat remote:path/to/file
     ffmpeg - | rclone rcat remote:path/to/file
    @@ -3781,7 +3840,7 @@ ffmpeg - | rclone rcat remote:path/to/file

    --size should be the exact size of the input stream in bytes. If the size of the stream is different in length to the --size passed in then the transfer will likely fail.

    Note that the upload cannot be retried because the data is not stored. If the backend supports multipart uploading then individual chunks can be retried. If you need to transfer a lot of data, you may be better off caching it locally and then rclone move it to the destination which can use retries.

    rclone rcat remote:path [flags]
    -

    Options

    +

    Options

      -h, --help       help for rcat
           --size int   File size hint to preallocate (default -1)

    Important Options

    @@ -3790,13 +3849,13 @@ ffmpeg - | rclone rcat remote:path/to/file -i, --interactive Enable interactive mode -v, --verbose count Print lots more stuff (repeat for more)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone rcd

    Run rclone listening to remote control commands only.

    -

    Synopsis

    +

    Synopsis

    This runs rclone so that it only listens to remote control commands.

    This is useful if you are controlling rclone via the rc API.

    If you pass in a path to a directory, rclone will serve that directory for GET requests on the URL passed in. It will also open the URL in the browser when rclone is run.

    @@ -3812,7 +3871,7 @@ ffmpeg - | rclone rcat remote:path/to/file

    TLS (SSL)

    By default this will serve over http. If you want you can serve over https. You will need to supply the --rc-cert and --rc-key flags. If you wish to do client side certificate validation then you will need to supply --rc-client-ca also.

    --rc-cert should be a either a PEM encoded certificate or a concatenation of that with the CA certificate. --krc-ey should be the PEM encoded private key and --rc-client-ca should be the PEM encoded client certificate authority certificate.

    -

    --rc-min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0").

    +

    --rc-min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0").

    Template

    --rc-template allows a user to specify a custom markup template for HTTP and WebDAV serve functions. The server exports the following markup to be used within the template to server pages:

    @@ -3937,7 +3996,7 @@ htpasswd -B htpasswd anotherUser

    Use --rc-realm to set the authentication realm.

    Use --rc-salt to change the password hashing salt from the default.

    rclone rcd <path to files to serve>* [flags]
    -

    Options

    +

    Options

      -h, --help   help for rcd

    RC Options

    Flags to control the Remote Control API.

    @@ -3960,6 +4019,7 @@ htpasswd -B htpasswd anotherUser --rc-realm string Realm for authentication --rc-salt string Password hashing salt (default "dlPL2MqE") --rc-serve Enable the serving of remote objects + --rc-serve-no-modtime Don't read the modification time (can speed things up) --rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s) --rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s) --rc-template string User-specified template @@ -3970,20 +4030,20 @@ htpasswd -B htpasswd anotherUser --rc-web-gui-no-open-browser Don't open the browser automatically --rc-web-gui-update Check and update to latest version of web gui

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone rmdirs

    Remove empty directories under the path.

    -

    Synopsis

    +

    Synopsis

    This recursively removes any empty directories (including directories that only contain empty directories), that it finds under the path. The root path itself will also be removed if it is empty, unless you supply the --leave-root flag.

    Use command rmdir to delete just the empty directory given by path, not recurse.

    This is useful for tidying up remotes that rclone has left a lot of empty directories in. For example the delete command will delete files but leave the directory structure (unless used with option --rmdirs).

    This will delete --checkers directories concurrently so if you have thousands of empty directories consider increasing this number.

    To delete a path and any objects in it, use the purge command.

    rclone rmdirs remote:path [flags]
    -

    Options

    +

    Options

      -h, --help         help for rmdirs
           --leave-root   Do not remove root directory if empty

    Important Options

    @@ -3992,13 +4052,13 @@ htpasswd -B htpasswd anotherUser -i, --interactive Enable interactive mode -v, --verbose count Print lots more stuff (repeat for more)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone selfupdate

    Update the rclone binary.

    -

    Synopsis

    +

    Synopsis

    This command downloads the latest release of rclone and replaces the currently running binary. The download is verified with a hashsum and cryptographically signed signature; see the release signing docs for details.

    If used without flags (or with implied --stable flag), this command will install the latest stable release. However, some issues may be fixed (or features added) only in the latest beta release. In such cases you should run the command with the --beta flag, i.e. rclone selfupdate --beta. You can check in advance what version would be installed by adding the --check flag, then repeat the command without it when you are satisfied.

    Sometimes the rclone team may recommend you a concrete beta or stable rclone release to troubleshoot your issue or add a bleeding edge feature. The --version VER flag, if given, will update to the concrete version instead of the latest one. If you omit micro version from VER (for example 1.53), the latest matching micro version will be used.

    @@ -4008,7 +4068,7 @@ htpasswd -B htpasswd anotherUser

    Note: Windows forbids deletion of a currently running executable so this command will rename the old executable to 'rclone.old.exe' upon success.

    Please note that this command was not available before rclone version 1.55. If it fails for you with the message unknown command "selfupdate" then you will need to update manually following the install instructions located at https://rclone.org/install/

    rclone selfupdate [flags]
    -

    Options

    +

    Options

          --beta             Install beta release
           --check            Check for latest release, do not download
       -h, --help             help for selfupdate
    @@ -4017,21 +4077,21 @@ htpasswd -B htpasswd anotherUser
    --stable Install stable release (this is the default) --version string Install the given rclone version (default: latest)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve

    Serve a remote over a protocol.

    -

    Synopsis

    +

    Synopsis

    Serve a remote over a given protocol. Requires the use of a subcommand to specify the protocol, e.g.

    rclone serve http remote:

    Each subcommand has its own options which you can see in their help.

    rclone serve <protocol> [opts] <remote> [flags]
    -

    Options

    +

    Options

      -h, --help   help for serve

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve dlna

    Serve remote:path over DLNA

    -

    Synopsis

    +

    Synopsis

    Run a DLNA media server for media stored in an rclone remote. Many devices, such as the Xbox and PlayStation, can automatically discover this server in the LAN and play audio/video from it. VLC is also supported. Service discovery uses UDP multicast packets (SSDP) and will thus only work on LANs.

    Rclone will list all files present in the remote, without filtering based on media formats or file extensions. Additionally, there is no media transcoding support. This means that some players might show files that they are not able to play back correctly.

    Server options

    Use --addr to specify which IP address and port the server should listen on, e.g. --addr 1.2.3.4:8000 or --addr :8080 to listen to all IPs.

    Use --name to choose the friendly server name, which is by default "rclone (hostname)".

    -

    Use --log-trace in conjunction with -vv to enable additional debug logging of all UPNP traffic. ## VFS - Virtual File System

    +

    Use --log-trace in conjunction with -vv to enable additional debug logging of all UPNP traffic.

    +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -4172,7 +4233,7 @@ htpasswd -B htpasswd anotherUser

    Some backends, most notably S3, do not report the amount of bytes used. If you need this information to be available when running df on the filesystem, then pass the flag --vfs-used-is-size to rclone. With this flag set, instead of relying on the backend to report this information, rclone will scan the whole remote similar to rclone size and compute the total used space itself.

    WARNING. Contrary to rclone size, this flag ignores filters so that the result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching.

    rclone serve dlna remote:path [flags]
    -

    Options

    +

    Options

          --addr string                            The ip:port or :port to bind the DLNA http server to (default ":7879")
           --announce-interval Duration             The interval between SSDP announcements (default 12m0s)
           --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
    @@ -4232,20 +4293,21 @@ htpasswd -B htpasswd anotherUser
    --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve docker

    Serve any remote on docker's volume plugin API.

    -

    Synopsis

    +

    Synopsis

    This command implements the Docker volume plugin API allowing docker to use rclone as a data storage mechanism for various cloud providers. rclone provides docker volume plugin based on it.

    To create a docker plugin, one must create a Unix or TCP socket that Docker will look for when you use the plugin and then it listens for commands from docker daemon and runs the corresponding code when necessary. Docker plugins can run as a managed plugin under control of the docker daemon or as an independent native service. For testing, you can just run it directly from the command line, for example:

    sudo rclone serve docker --base-dir /tmp/rclone-volumes --socket-addr localhost:8787 -vv

    Running rclone serve docker will create the said socket, listening for commands from Docker to create the necessary Volumes. Normally you need not give the --socket-addr flag. The API will listen on the unix domain socket at /run/docker/plugins/rclone.sock. In the example above rclone will create a TCP socket and a small file /etc/docker/plugins/rclone.spec containing the socket address. We use sudo because both paths are writeable only by the root user.

    If you later decide to change listening socket, the docker daemon must be restarted to reconnect to /run/docker/plugins/rclone.sock or parse new /etc/docker/plugins/rclone.spec. Until you restart, any volume related docker commands will timeout trying to access the old socket. Running directly is supported on Linux only, not on Windows or MacOS. This is not a problem with managed plugin mode described in details in the full documentation.

    The command will create volume mounts under the path given by --base-dir (by default /var/lib/docker-volumes/rclone available only to root) and maintain the JSON formatted file docker-plugin.state in the rclone cache directory with book-keeping records of created and mounted volumes.

    -

    All mount and VFS options are submitted by the docker daemon via API, but you can also provide defaults on the command line as well as set path to the config file and cache directory or adjust logging verbosity. ## VFS - Virtual File System

    +

    All mount and VFS options are submitted by the docker daemon via API, but you can also provide defaults on the command line as well as set path to the config file and cache directory or adjust logging verbosity.

    +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -4365,7 +4427,7 @@ htpasswd -B htpasswd anotherUser

    Some backends, most notably S3, do not report the amount of bytes used. If you need this information to be available when running df on the filesystem, then pass the flag --vfs-used-is-size to rclone. With this flag set, instead of relying on the backend to report this information, rclone will scan the whole remote similar to rclone size and compute the total used space itself.

    WARNING. Contrary to rclone size, this flag ignores filters so that the result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching.

    rclone serve docker [flags]
    -

    Options

    +

    Options

          --allow-non-empty                        Allow mounting over a non-empty directory (not supported on Windows)
           --allow-other                            Allow access to other users (not supported on Windows)
           --allow-root                             Allow access to root user (not supported on Windows)
    @@ -4380,6 +4442,7 @@ htpasswd -B htpasswd anotherUser
    --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --forget-state Skip restoring previous state --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) @@ -4445,20 +4508,21 @@ htpasswd -B htpasswd anotherUser --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve ftp

    Serve remote:path over FTP.

    -

    Synopsis

    +

    Synopsis

    Run a basic FTP server to serve a remote over FTP protocol. This can be viewed with a FTP client or you can make a remote of type FTP to read and write it.

    Server options

    Use --addr to specify which IP address and port the server should listen on, e.g. --addr 1.2.3.4:8000 or --addr :8080 to listen to all IPs. By default it only listens on localhost. You can use port :0 to let the OS choose an available port.

    If you set --addr to listen on a public or LAN accessible IP address then using Authentication is advised - see the next section for info.

    Authentication

    By default this will serve files without needing a login.

    -

    You can set a single username and password with the --user and --pass flags. ## VFS - Virtual File System

    +

    You can set a single username and password with the --user and --pass flags.

    +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -4608,7 +4672,7 @@ htpasswd -B htpasswd anotherUser

    Note that an internal cache is keyed on user so only use that for configuration, don't use pass or public_key. This also means that if a user's password or public-key is changed the cache will need to expire (which takes 5 mins) before it takes effect.

    This can be used to build general purpose proxies to any kind of backend that rclone supports.

    rclone serve ftp remote:path [flags]
    -

    Options

    +

    Options

          --addr string                            IPaddress:Port or :Port to bind server to (default "localhost:2121")
           --auth-proxy string                      A program to use to create the backend from the auth
           --cert string                            TLS PEM key (concatenation of certificate and CA certificate)
    @@ -4671,13 +4735,13 @@ htpasswd -B htpasswd anotherUser
    --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve http

    Serve the remote over HTTP.

    -

    Synopsis

    +

    Synopsis

    Run a basic web server to serve a remote over HTTP. This can be viewed in a web browser or you can make a remote of type http read from it.

    You can use the filter flags (e.g. --include, --exclude) to control what is served.

    The server will log errors. Use -v to see access logs.

    @@ -4693,7 +4757,7 @@ htpasswd -B htpasswd anotherUser

    TLS (SSL)

    By default this will serve over http. If you want you can serve over https. You will need to supply the --cert and --key flags. If you wish to do client side certificate validation then you will need to supply --client-ca also.

    --cert should be a either a PEM encoded certificate or a concatenation of that with the CA certificate. --key should be the PEM encoded private key and --client-ca should be the PEM encoded client certificate authority certificate.

    -

    --min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0").

    +

    --min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0").

    Template

    --template allows a user to specify a custom markup template for HTTP and WebDAV serve functions. The server exports the following markup to be used within the template to server pages:

    @@ -4816,7 +4880,8 @@ htpasswd -B htpasswd user htpasswd -B htpasswd anotherUser

    The password file can be updated while rclone is running.

    Use --realm to set the authentication realm.

    -

    Use --salt to change the password hashing salt from the default. ## VFS - Virtual File System

    +

    Use --salt to change the password hashing salt from the default.

    +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -4966,7 +5031,7 @@ htpasswd -B htpasswd anotherUser

    Note that an internal cache is keyed on user so only use that for configuration, don't use pass or public_key. This also means that if a user's password or public-key is changed the cache will need to expire (which takes 5 mins) before it takes effect.

    This can be used to build general purpose proxies to any kind of backend that rclone supports.

    rclone serve http remote:path [flags]
    -

    Options

    +

    Options

          --addr stringArray                       IPaddress:Port or :Port to bind server to (default [127.0.0.1:8080])
           --allow-origin string                    Origin which cross-domain request (CORS) can be executed from
           --auth-proxy string                      A program to use to create the backend from the auth
    @@ -5038,13 +5103,13 @@ htpasswd -B htpasswd anotherUser
    --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve nfs

    Serve the remote as an NFS mount

    -

    Synopsis

    +

    Synopsis

    Create an NFS server that serves the given remote over the network.

    The primary purpose for this command is to enable mount command on recent macOS versions where installing FUSE is very cumbersome.

    Since this is running on NFSv3, no authentication method is available. Any client will be able to access the data. To limit access, you can use serve NFS on loopback address and rely on secure tunnels (such as SSH). For this reason, by default, a random TCP port is chosen and loopback interface is used for the listening address; meaning that it is only available to the local machine. If you want other machines to access the NFS mount over local network, you need to specify the listening address and port using --addr flag.

    @@ -5056,7 +5121,7 @@ htpasswd -B htpasswd anotherUser
    mount -oport=$PORT,mountport=$PORT $HOSTNAME: path/to/mountpoint

    Where $PORT is the same port number we used in the serve nfs command.

    This feature is only available on Unix platforms.

    -

    VFS - Virtual File System

    +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -5176,7 +5241,7 @@ htpasswd -B htpasswd anotherUser

    Some backends, most notably S3, do not report the amount of bytes used. If you need this information to be available when running df on the filesystem, then pass the flag --vfs-used-is-size to rclone. With this flag set, instead of relying on the backend to report this information, rclone will scan the whole remote similar to rclone size and compute the total used space itself.

    WARNING. Contrary to rclone size, this flag ignores filters so that the result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching.

    rclone serve nfs remote:path [flags]
    -

    Options

    +

    Options

          --addr string                            IPaddress:Port or :Port to bind server to
           --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
           --dir-perms FileMode                     Directory permissions (default 0777)
    @@ -5233,13 +5298,13 @@ htpasswd -B htpasswd anotherUser
    --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve restic

    Serve the remote for restic's REST API.

    -

    Synopsis

    +

    Synopsis

    Run a basic web server to serve a remote over restic's REST backend API over HTTP. This allows restic to use rclone as a data storage mechanism for cloud providers that restic does not support directly.

    Restic is a command-line program for doing backups.

    The server will log errors. Use -v to see access logs.

    @@ -5291,7 +5356,7 @@ $ export RESTIC_REPOSITORY=rest:http://localhost:8080/user2repo/

    TLS (SSL)

    By default this will serve over http. If you want you can serve over https. You will need to supply the --cert and --key flags. If you wish to do client side certificate validation then you will need to supply --client-ca also.

    --cert should be a either a PEM encoded certificate or a concatenation of that with the CA certificate. --key should be the PEM encoded private key and --client-ca should be the PEM encoded client certificate authority certificate.

    -

    --min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0").

    +

    --min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0").

    Authentication

    By default this will serve files without needing a login.

    You can either use an htpasswd file which can take lots of users, or set a single username and password with the --user and --pass flags.

    @@ -5305,7 +5370,7 @@ htpasswd -B htpasswd anotherUser

    Use --realm to set the authentication realm.

    Use --salt to change the password hashing salt from the default.

    rclone serve restic remote:path [flags]
    -

    Options

    +

    Options

          --addr stringArray                IPaddress:Port or :Port to bind server to (default [127.0.0.1:8080])
           --allow-origin string             Origin which cross-domain request (CORS) can be executed from
           --append-only                     Disallow deletion of repository data
    @@ -5327,13 +5392,13 @@ htpasswd -B htpasswd anotherUser
    --stdio Run an HTTP2 server on stdin/stdout --user string User name for authentication

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve s3

    Serve remote:path over s3.

    -

    Synopsis

    +

    Synopsis

    serve s3 implements a basic s3 server that serves a remote via s3. This can be viewed with an s3 client, or you can make an s3 type remote to read and write to it with rclone.

    serve s3 is considered Experimental so use with care.

    S3 server supports Signature Version 4 authentication. Just use --auth-key accessKey,secretKey and set the Authorization header correctly in the request. (See the AWS docs).

    @@ -5345,7 +5410,13 @@ htpasswd -B htpasswd anotherUser

    Quickstart

    For a simple set up, to serve remote:path over s3, run the server like this:

    rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY remote:path
    -

    This will be compatible with an rclone remote which is defined like this:

    +

    For example, to use a simple folder in the filesystem, run the server with a command like this:

    +
    rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY local:/path/to/folder
    +

    The rclone.conf for the server could look like this:

    +
    [local]
    +type = local
    +

    The local configuration is optional though. If you run the server with a remote:path like /path/to/folder (without the local: prefix and without an rclone.conf file), rclone will fall back to a default configuration, which will be visible as a warning in the logs. But it will run nonetheless.

    +

    This will be compatible with an rclone (client) remote configuration which is defined like this:

    [serves3]
     type = s3
     provider = Rclone
    @@ -5400,7 +5471,8 @@ use_multipart_uploads = false

    TLS (SSL)

    By default this will serve over http. If you want you can serve over https. You will need to supply the --cert and --key flags. If you wish to do client side certificate validation then you will need to supply --client-ca also.

    --cert should be a either a PEM encoded certificate or a concatenation of that with the CA certificate. --key should be the PEM encoded private key and --client-ca should be the PEM encoded client certificate authority certificate.

    -

    --min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). ## VFS - Virtual File System

    +

    --min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0").

    +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -5520,7 +5592,7 @@ use_multipart_uploads = false

    Some backends, most notably S3, do not report the amount of bytes used. If you need this information to be available when running df on the filesystem, then pass the flag --vfs-used-is-size to rclone. With this flag set, instead of relying on the backend to report this information, rclone will scan the whole remote similar to rclone size and compute the total used space itself.

    WARNING. Contrary to rclone size, this flag ignores filters so that the result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching.

    rclone serve s3 remote:path [flags]
    -

    Options

    +

    Options

          --addr stringArray                       IPaddress:Port or :Port to bind server to (default [127.0.0.1:8080])
           --allow-origin string                    Origin which cross-domain request (CORS) can be executed from
           --auth-key stringArray                   Set key pair for v4 authorization: access_key_id,secret_access_key
    @@ -5589,13 +5661,13 @@ use_multipart_uploads = false
    --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve sftp

    Serve the remote over SFTP.

    -

    Synopsis

    +

    Synopsis

    Run an SFTP server to serve a remote over SFTP. This can be used with an SFTP client or you can make a remote of type sftp to use with it.

    You can use the filter flags (e.g. --include, --exclude) to control what is served.

    The server will respond to a small number of shell commands, mainly md5sum, sha1sum and df, which enable it to provide support for checksums and the about feature when accessed from an sftp remote.

    @@ -5610,7 +5682,7 @@ use_multipart_uploads = false
    restrict,command="rclone serve sftp --stdio ./photos" ssh-rsa ...

    On the client you need to set --transfers 1 when using --stdio. Otherwise multiple instances of the rclone server are started by OpenSSH which can lead to "corrupted on transfer" errors. This is the case because the client chooses indiscriminately which server to send commands to while the servers all have different views of the state of the filing system.

    The "restrict" in authorized_keys prevents SHA1SUMs and MD5SUMs from being used. Omitting "restrict" and using --sftp-path-override to enable checksumming is possible but less secure and you could use the SFTP server provided by OpenSSH in this case.

    -

    VFS - Virtual File System

    +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -5760,7 +5832,7 @@ use_multipart_uploads = false

    Note that an internal cache is keyed on user so only use that for configuration, don't use pass or public_key. This also means that if a user's password or public-key is changed the cache will need to expire (which takes 5 mins) before it takes effect.

    This can be used to build general purpose proxies to any kind of backend that rclone supports.

    rclone serve sftp remote:path [flags]
    -

    Options

    +

    Options

          --addr string                            IPaddress:Port or :Port to bind server to (default "localhost:2022")
           --auth-proxy string                      A program to use to create the backend from the auth
           --authorized-keys string                 Authorized keys file (default "~/.ssh/authorized_keys")
    @@ -5823,13 +5895,13 @@ use_multipart_uploads = false
    --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone serve webdav

    Serve remote:path over WebDAV.

    -

    Synopsis

    +

    Synopsis

    Run a basic WebDAV server to serve a remote over HTTP via the WebDAV protocol. This can be viewed with a WebDAV client, through a web browser, or you can make a remote of type WebDAV to read and write it.

    WebDAV options

    --etag-hash

    @@ -5851,7 +5923,7 @@ use_multipart_uploads = false

    TLS (SSL)

    By default this will serve over http. If you want you can serve over https. You will need to supply the --cert and --key flags. If you wish to do client side certificate validation then you will need to supply --client-ca also.

    --cert should be a either a PEM encoded certificate or a concatenation of that with the CA certificate. --key should be the PEM encoded private key and --client-ca should be the PEM encoded client certificate authority certificate.

    -

    --min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0").

    +

    --min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0").

    Template

    --template allows a user to specify a custom markup template for HTTP and WebDAV serve functions. The server exports the following markup to be used within the template to server pages:

    @@ -5974,7 +6046,8 @@ htpasswd -B htpasswd user htpasswd -B htpasswd anotherUser

    The password file can be updated while rclone is running.

    Use --realm to set the authentication realm.

    -

    Use --salt to change the password hashing salt from the default. ## VFS - Virtual File System

    +

    Use --salt to change the password hashing salt from the default.

    +

    VFS - Virtual File System

    This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.

    Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.

    The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.

    @@ -6124,7 +6197,7 @@ htpasswd -B htpasswd anotherUser

    Note that an internal cache is keyed on user so only use that for configuration, don't use pass or public_key. This also means that if a user's password or public-key is changed the cache will need to expire (which takes 5 mins) before it takes effect.

    This can be used to build general purpose proxies to any kind of backend that rclone supports.

    rclone serve webdav remote:path [flags]
    -

    Options

    +

    Options

          --addr stringArray                       IPaddress:Port or :Port to bind server to (default [127.0.0.1:8080])
           --allow-origin string                    Origin which cross-domain request (CORS) can be executed from
           --auth-proxy string                      A program to use to create the backend from the auth
    @@ -6198,13 +6271,13 @@ htpasswd -B htpasswd anotherUser
    --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone settier

    Changes storage class/tier of objects in remote.

    -

    Synopsis

    +

    Synopsis

    rclone settier changes storage tier or class at remote if supported. Few cloud storage services provides different storage classes on objects, for example AWS S3 and Glacier, Azure Blob storage - Hot, Cool and Archive, Google Cloud Storage, Regional Storage, Nearline, Coldline etc.

    Note that, certain tier changes make objects not available to access immediately. For example tiering to archive in azure blob storage makes objects in frozen state, user can restore by setting tier to Hot/Cool, similarly S3 to Glacier makes object inaccessible.true

    You can use it to tier single object

    @@ -6214,25 +6287,25 @@ htpasswd -B htpasswd anotherUser

    Or just provide remote directory and all files in directory will be tiered

    rclone settier tier remote:path/dir
    rclone settier tier remote:path [flags]
    -

    Options

    +

    Options

      -h, --help   help for settier

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone test

    Run a test command

    -

    Synopsis

    +

    Synopsis

    Rclone test is used to run test commands.

    Select which test command you want with the subcommand, eg

    rclone test memory remote:

    Each subcommand has its own options which you can see in their help.

    NB Be careful running these commands, they may do strange things so reading their documentation first is recommended.

    -

    Options

    +

    Options

      -h, --help   help for test

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    Note that value of --timestamp is in UTC. If you want local time then add the --localtime flag.

    rclone touch remote:path [flags]
    -

    Options

    +

    Options

      -h, --help               help for touch
           --localtime          Use localtime for timestamp, not UTC
       -C, --no-create          Do not create the file if it does not exist (implied with --recursive)
    @@ -6390,13 +6464,13 @@ htpasswd -B htpasswd anotherUser
          --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
           --fast-list           Use recursive list if available; uses more memory but fewer transactions

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    rclone tree

    List the contents of the remote in a tree like fashion.

    -

    Synopsis

    +

    Synopsis

    rclone tree lists the contents of a remote in a similar way to the unix tree command.

    For example

    $ rclone tree remote:path
    @@ -6413,7 +6487,7 @@ htpasswd -B htpasswd anotherUser

    The tree command has many options for controlling the listing which are compatible with the tree command, for example you can include file sizes with --size. Note that not all of them have short options as they conflict with rclone's short options.

    For a more interactive navigation of the remote see the ncdu command.

    rclone tree remote:path [flags]
    -

    Options

    +

    Options

      -a, --all             All files are listed (list . files too)
       -d, --dirs-only       List directories only
           --dirsfirst       List directories before files (-U disables)
    @@ -6462,7 +6536,7 @@ htpasswd -B htpasswd anotherUser
          --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
           --fast-list           Use recursive list if available; uses more memory but fewer transactions

    See the global flags page for global options not listed here.

    -

    SEE ALSO

    +

    SEE ALSO

    @@ -6696,7 +6770,7 @@ rclone sync --interactive /path/to/files remote:current-backup

    The metadata keys mtime and content-type will take precedence if supplied in the metadata over reading the Content-Type or modification time of the source object.

    Hashes are not included in system metadata as there is a well defined way of reading those already.

    -

    Options

    +

    Options

    Rclone has a number of options to control its behaviour.

    Options that take parameters can have the values passed in two ways, --option=value or --option value. However boolean (true/false) options behave slightly differently to the other options in that --boolean sets the option to true and the absence of the flag sets it to false. It is also possible to specify --boolean=false or --boolean=true. Note that --boolean false is not valid - this is parsed as --boolean and the false is parsed as an extra command line argument for rclone.

    Time or duration options

    @@ -7051,55 +7125,55 @@ y/n/s/!/q> n
  • ID is the source ID of the object if known.
  • Metadata is the backend specific metadata as described in the backend docs.
  • -
    {
    -    "SrcFs": "gdrive:",
    -    "SrcFsType": "drive",
    -    "DstFs": "newdrive:user",
    -    "DstFsType": "onedrive",
    -    "Remote": "test.txt",
    -    "Size": 6,
    -    "MimeType": "text/plain; charset=utf-8",
    -    "ModTime": "2022-10-11T17:53:10.286745272+01:00",
    -    "IsDir": false,
    -    "ID": "xyz",
    -    "Metadata": {
    -        "btime": "2022-10-11T16:53:11Z",
    -        "content-type": "text/plain; charset=utf-8",
    -        "mtime": "2022-10-11T17:53:10.286745272+01:00",
    -        "owner": "user1@domain1.com",
    -        "permissions": "...",
    -        "description": "my nice file",
    -        "starred": "false"
    -    }
    -}
    +
    {
    +    "SrcFs": "gdrive:",
    +    "SrcFsType": "drive",
    +    "DstFs": "newdrive:user",
    +    "DstFsType": "onedrive",
    +    "Remote": "test.txt",
    +    "Size": 6,
    +    "MimeType": "text/plain; charset=utf-8",
    +    "ModTime": "2022-10-11T17:53:10.286745272+01:00",
    +    "IsDir": false,
    +    "ID": "xyz",
    +    "Metadata": {
    +        "btime": "2022-10-11T16:53:11Z",
    +        "content-type": "text/plain; charset=utf-8",
    +        "mtime": "2022-10-11T17:53:10.286745272+01:00",
    +        "owner": "user1@domain1.com",
    +        "permissions": "...",
    +        "description": "my nice file",
    +        "starred": "false"
    +    }
    +}

    The program should then modify the input as desired and send it to STDOUT. The returned Metadata field will be used in its entirety for the destination object. Any other fields will be ignored. Note in this example we translate user names and permissions and add something to the description:

    -
    {
    -    "Metadata": {
    -        "btime": "2022-10-11T16:53:11Z",
    -        "content-type": "text/plain; charset=utf-8",
    -        "mtime": "2022-10-11T17:53:10.286745272+01:00",
    -        "owner": "user1@domain2.com",
    -        "permissions": "...",
    -        "description": "my nice file [migrated from domain1]",
    -        "starred": "false"
    -    }
    -}
    +
    {
    +    "Metadata": {
    +        "btime": "2022-10-11T16:53:11Z",
    +        "content-type": "text/plain; charset=utf-8",
    +        "mtime": "2022-10-11T17:53:10.286745272+01:00",
    +        "owner": "user1@domain2.com",
    +        "permissions": "...",
    +        "description": "my nice file [migrated from domain1]",
    +        "starred": "false"
    +    }
    +}

    Metadata can be removed here too.

    An example python program might look something like this to implement the above transformations.

    -
    import sys, json
    -
    -i = json.load(sys.stdin)
    -metadata = i["Metadata"]
    -# Add tag to description
    -if "description" in metadata:
    -    metadata["description"] += " [migrated from domain1]"
    -else:
    -    metadata["description"] = "[migrated from domain1]"
    -# Modify owner
    -if "owner" in metadata:
    -    metadata["owner"] = metadata["owner"].replace("domain1.com", "domain2.com")
    -o = { "Metadata": metadata }
    -json.dump(o, sys.stdout, indent="\t")
    +
    import sys, json
    +
    +i = json.load(sys.stdin)
    +metadata = i["Metadata"]
    +# Add tag to description
    +if "description" in metadata:
    +    metadata["description"] += " [migrated from domain1]"
    +else:
    +    metadata["description"] = "[migrated from domain1]"
    +# Modify owner
    +if "owner" in metadata:
    +    metadata["owner"] = metadata["owner"].replace("domain1.com", "domain2.com")
    +o = { "Metadata": metadata }
    +json.dump(o, sys.stdout, indent="\t")

    You can find this example (slightly expanded) in the rclone source code at bin/test_metadata_mapper.py.

    If you want to see the input to the metadata mapper and the output returned from it in the log you can use -vv --dump mapper.

    See the metadata section for more info.

    @@ -7207,6 +7281,7 @@ y/n/s/!/q> n

    Any log messages will scroll above the static block. Log messages will push the static block down to the bottom of the terminal where it will stay.

    Normally this is updated every 500mS but this period can be overridden with the --stats flag.

    This can be used with the --stats-one-line flag for a simpler display.

    +

    To change the display length of filenames (for different terminal widths), see the --stats-file-name-length option. The default output is formatted for 80 character wide terminals.

    Note: On Windows until this bug is fixed all non-ASCII characters will be replaced with . when --progress is in use.

    --progress-terminal-title

    This flag, when used with -P/--progress, will print the string ETA: %s to the terminal title.

    @@ -7507,12 +7582,12 @@ export RCLONE_CONFIG_PASS
  • 6 - Less serious errors (like 461 errors from dropbox) (NoRetry errors)
  • 7 - Fatal error (one that more retries won't fix, like account suspended) (Fatal errors)
  • 8 - Transfer exceeded - limit set by --max-transfer reached
  • -
  • 9 - Operation successful, but no files transferred
  • +
  • 9 - Operation successful, but no files transferred (Requires --error-on-no-transfer)
  • 10 - Duration exceeded - limit set by --max-duration reached
  • Environment Variables

    Rclone can be configured entirely using environment variables. These can be used to set defaults for options or config file entries.

    -

    Options

    +

    Options

    Every option in rclone can have its default set by environment variable.

    To find the name of the environment variable, first, take the long option name, strip the leading --, change - to _, make upper case and prepend RCLONE_.

    For example, to always set --stats 5s, set the environment variable RCLONE_STATS=5s. If you set stats on the command line this will override the environment variable setting.

    @@ -7914,7 +7989,7 @@ ASCII character classes (e.g. [[:alnum:]], [[:alpha:]], [[:punct:]], [[:xdigit:]

    --exclude should not be used with --include, --include-from, --filter or --filter-from flags.

    --exclude has no effect when combined with --files-from or --files-from-raw flags.

    E.g. rclone ls remote: --exclude *.bak excludes all .bak files from listing.

    -

    E.g. rclone size remote: "--exclude /dir/**" returns the total size of all files on remote: excluding those in root directory dir and sub directories.

    +

    E.g. rclone size remote: --exclude "/dir/**" returns the total size of all files on remote: excluding those in root directory dir and sub directories.

    E.g. on Microsoft Windows rclone ls remote: --exclude "*\[{JP,KR,HK}\]*" lists the files in remote: without [JP] or [KR] or [HK] in their name. Quotes prevent the shell from interpreting the \ characters.\ characters escape the [ and ] so an rclone filter treats them literally rather than as a character-range. The { and } define an rclone pattern list. For other operating systems single quotes are required ie rclone ls remote: --exclude '*\[{JP,KR,HK}\]*'

    --exclude-from - Read exclude patterns from file

    Excludes path/file names from an rclone command based on rules in a named file. The file contains a list of remarks and pattern rules.

    @@ -8210,6 +8285,9 @@ dir1/dir2/dir3/.ignore

    --rc-serve

    Enable the serving of remote objects via the HTTP interface. This means objects will be accessible at http://127.0.0.1:5572/ by default, so you can browse to http://127.0.0.1:5572/ or http://127.0.0.1:5572/* to see a listing of the remotes. Objects may be requested from remotes using this syntax http://127.0.0.1:5572/[remote:path]/path/to/object

    Default Off.

    +

    --rc-serve-no-modtime

    +

    Set this flag to skip reading the modification time (can speed things up).

    +

    Default Off.

    --rc-files /path/to/directory

    Path to local files to serve on the HTTP server.

    If this is set then rclone will serve the files in that directory. It will also open the root in the web browser if specified. This is for implementing browser based GUIs for rclone functions.

    @@ -9954,6 +10032,15 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total - +Uloz.to +MD5, SHA256 ¹³ +- +No +Yes +- +- + + Uptobox - - @@ -9962,7 +10049,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total - - - + WebDAV MD5, SHA1 ³ R ⁴ @@ -9971,7 +10058,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total - - - + Yandex Disk MD5 R/W @@ -9980,7 +10067,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total R - - + Zoho WorkDrive - - @@ -9989,7 +10076,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total - - - + The local filesystem All DR/W @@ -10012,6 +10099,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total

    ¹⁰ FTP supports modtimes for the major FTP servers, and also others if they advertised required protocol extensions. See this for more details.

    ¹¹ Internet Archive requires option wait_archive to be set to a non-zero value for full modtime support.

    ¹² HiDrive supports its own custom hash. It combines SHA1 sums for each 4 KiB block hierarchically to a single top-level sum.

    +

    ¹³ Uloz.to provides server-calculated MD5 hash upon file upload. MD5 and SHA256 hashes are client-calculated and stored as metadata fields.

    Hash

    The cloud storage system supports various hash types of the objects. The hashes are used when transferring data as an integrity check and can be specifically used with the --checksum flag in syncs and in the check command.

    To use the verify checksums when transferring between cloud storage systems they must support a common hash type.

    @@ -11123,6 +11211,20 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total No +Uloz.to +No +No +Yes +Yes +No +No +No +No +No +No +Yes + + Uptobox No Yes @@ -11136,7 +11238,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total No No - + WebDAV Yes Yes @@ -11150,7 +11252,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total Yes Yes - + Yandex Disk Yes Yes @@ -11164,7 +11266,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total Yes Yes - + Zoho WorkDrive Yes Yes @@ -11178,7 +11280,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total Yes Yes - + The local filesystem No No @@ -11308,7 +11410,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total --tpslimit float Limit HTTP transactions per second to this --tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --use-cookies Enable session cookiejar - --user-agent string Set the user-agent to a specified string (default "rclone/v1.66.0") + --user-agent string Set the user-agent to a specified string (default "rclone/v1.67.0")

    Performance

    Flags helpful for increasing performance.

          --buffer-size SizeSuffix   In memory buffer size when reading files for each --transfer (default 16Mi)
    @@ -11427,6 +11529,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --rc-realm string                    Realm for authentication
           --rc-salt string                     Password hashing salt (default "dlPL2MqE")
           --rc-serve                           Enable the serving of remote objects
    +      --rc-serve-no-modtime                Don't read the modification time (can speed things up)
           --rc-server-read-timeout Duration    Timeout for server reading data (default 1h0m0s)
           --rc-server-write-timeout Duration   Timeout for server writing data (default 1h0m0s)
           --rc-template string                 User-specified template
    @@ -11639,6 +11742,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --dropbox-encoding Encoding                           The encoding for the backend (default Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot)
           --dropbox-impersonate string                          Impersonate this user when using a business account
           --dropbox-pacer-min-sleep Duration                    Minimum time to sleep between API calls (default 10ms)
    +      --dropbox-root-namespace string                       Specify a different Dropbox namespace ID to use as the root for all paths
           --dropbox-shared-files                                Instructs rclone to work on individual shared files
           --dropbox-shared-folders                              Instructs rclone to work on shared folders
           --dropbox-token string                                OAuth Access Token as a JSON blob
    @@ -11744,6 +11848,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --hidrive-upload-cutoff SizeSuffix                    Cutoff/Threshold for chunked uploads (default 96Mi)
           --http-description string                             Description of the remote
           --http-headers CommaSepList                           Set HTTP headers for all transactions
    +      --http-no-escape                                      Do not escape URL metacharacters in path names
           --http-no-head                                        Don't use HEAD requests
           --http-no-slash                                       Set this if the site doesn't end directories with /
           --http-url string                                     URL of HTTP host to connect to
    @@ -11779,7 +11884,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --koofr-encoding Encoding                             The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
           --koofr-endpoint string                               The Koofr API endpoint to use
           --koofr-mountid string                                Mount ID of the mount to use
    -      --koofr-password string                               Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password) (obscured)
    +      --koofr-password string                               Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password (obscured)
           --koofr-provider string                               Choose your storage provider
           --koofr-setmtime                                      Does the backend support setting modification time (default true)
           --koofr-user string                                   Your user name
    @@ -11795,6 +11900,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --local-no-set-modtime                                Disable setting modtime
           --local-no-sparse                                     Disable sparse files for multi-thread downloads
           --local-nounc                                         Disable UNC (long path names) conversion on Windows
    +      --local-time-type mtime|atime|btime|ctime             Set what kind of time is returned (default mtime)
           --local-unicode-normalization                         Apply unicode NFC normalization to paths and filenames
           --local-zero-size-links                               Assume the Stat size of links is zero (and read them instead) (deprecated)
           --mailru-auth-url string                              Auth server URL
    @@ -11837,6 +11943,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --onedrive-drive-type string                          The type of the drive (personal | business | documentLibrary)
           --onedrive-encoding Encoding                          The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot)
           --onedrive-expose-onenote-files                       Set to make OneNote files show up in directory listings
    +      --onedrive-hard-delete                                Permanently delete files on removal
           --onedrive-hash-type string                           Specify the hash in use for the backend (default "auto")
           --onedrive-link-password string                       Set the password for links created by the link command
           --onedrive-link-scope string                          Set the scope of the links created by the link command (default "anonymous")
    @@ -11891,6 +11998,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --pcloud-token-url string                             Token server url
           --pcloud-username string                              Your pcloud username
           --pikpak-auth-url string                              Auth server URL
    +      --pikpak-chunk-size SizeSuffix                        Chunk size for multipart uploads (default 5Mi)
           --pikpak-client-id string                             OAuth Client Id
           --pikpak-client-secret string                         OAuth Client Secret
           --pikpak-description string                           Description of the remote
    @@ -11901,6 +12009,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --pikpak-token string                                 OAuth Access Token as a JSON blob
           --pikpak-token-url string                             Token server url
           --pikpak-trashed-only                                 Only show files that are in the trash
    +      --pikpak-upload-concurrency int                       Concurrency for multipart uploads (default 5)
           --pikpak-use-trash                                    Send files to the trash instead of deleting permanently (default true)
           --pikpak-user string                                  Pikpak username
           --premiumizeme-auth-url string                        Auth server URL
    @@ -12014,6 +12123,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --sftp-chunk-size SizeSuffix                          Upload and download chunk size (default 32Ki)
           --sftp-ciphers SpaceSepList                           Space separated list of ciphers to be used for session encryption, ordered by preference
           --sftp-concurrency int                                The maximum number of outstanding requests for one file (default 64)
    +      --sftp-connections int                                Maximum number of SFTP simultaneous connections, 0 for unlimited
           --sftp-copy-is-hardlink                               Set to enable server side copies using hardlinks
           --sftp-description string                             Description of the remote
           --sftp-disable-concurrent-reads                       If set don't use concurrent reads
    @@ -12098,7 +12208,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --swift-auth string                                   Authentication URL for server (OS_AUTH_URL)
           --swift-auth-token string                             Auth Token from alternate authentication - optional (OS_AUTH_TOKEN)
           --swift-auth-version int                              AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION)
    -      --swift-chunk-size SizeSuffix                         Above this size files will be chunked into a _segments container (default 5Gi)
    +      --swift-chunk-size SizeSuffix                         Above this size files will be chunked (default 5Gi)
           --swift-description string                            Description of the remote
           --swift-domain string                                 User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME)
           --swift-encoding Encoding                             The encoding for the backend (default Slash,InvalidUtf8)
    @@ -12114,8 +12224,16 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --swift-tenant string                                 Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME)
           --swift-tenant-domain string                          Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME)
           --swift-tenant-id string                              Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID)
    +      --swift-use-segments-container Tristate               Choose destination for large object segments (default unset)
           --swift-user string                                   User name to log in (OS_USERNAME)
           --swift-user-id string                                User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID)
    +      --ulozto-app-token string                             The application token identifying the app. An app API key can be either found in the API
    +      --ulozto-description string                           Description of the remote
    +      --ulozto-encoding Encoding                            The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
    +      --ulozto-list-page-size int                           The size of a single page for list commands. 1-500 (default 500)
    +      --ulozto-password string                              The password for the user (obscured)
    +      --ulozto-root-folder-slug string                      If set, rclone will use this folder as the root folder for all operations. For example,
    +      --ulozto-username string                              The username of the principal to operate as
           --union-action-policy string                          Policy to choose upstream on ACTION category (default "epall")
           --union-cache-time int                                Cache time of usage and free space (in seconds) (default 120)
           --union-create-policy string                          Policy to choose upstream on CREATE category (default "epmfs")
    @@ -12133,6 +12251,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
           --webdav-encoding string                              The encoding for the backend
           --webdav-headers CommaSepList                         Set HTTP headers for all transactions
           --webdav-nextcloud-chunk-size SizeSuffix              Nextcloud upload chunk size (default 10Mi)
    +      --webdav-owncloud-exclude-mounts                      Exclude ownCloud mounted storages
           --webdav-owncloud-exclude-shares                      Exclude ownCloud shares
           --webdav-pacer-min-sleep Duration                     Minimum time to sleep between API calls (default 10ms)
           --webdav-pass string                                  Password (obscured)
    @@ -13446,7 +13565,7 @@ y/e/d> y
  • Default: Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot
  • --fichier-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    --opendrive-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    Note that OpenDrive is case insensitive so you can't have a file called "Hello.doc" and one called "hello.doc".

    There are quite a few characters that can't be in OpenDrive file names. These can't occur on Windows platforms, but on non-Windows platforms they are common. Rclone will map these names to and from an identical looking unicode equivalent. For example if a file has a ? in it will be mapped to instead.

    rclone about is not supported by the OpenDrive backend. Backends without this capability cannot determine free space for an rclone mount or use policy mfs (most free space) as a member of an rclone union remote.

    @@ -30926,7 +29200,7 @@ y/e/d> y

    Paths are specified as remote:bucket (or remote: for the lsd command.) You may put subdirectories in too, e.g. remote:bucket/path/to/dir.

    Sample command to transfer local artifacts to remote:bucket in oracle object storage:

    rclone -vvv --progress --stats-one-line --max-stats-groups 10 --log-format date,time,UTC,longfile --fast-list --buffer-size 256Mi --oos-no-check-bucket --oos-upload-cutoff 10Mi --multi-thread-cutoff 16Mi --multi-thread-streams 3000 --transfers 3000 --checkers 64 --retries 2 --oos-chunk-size 10Mi --oos-upload-concurrency 10000 --oos-attempt-resume-upload --oos-leave-parts-on-error sync ./artifacts remote:bucket -vv

    -

    Configuration

    +

    Configuration

    Here is an example of making an oracle object storage configuration. rclone config walks you through it.

    Here is an example of how to make a remote called remote. First run:

     rclone config
    @@ -31104,7 +29378,7 @@ namespace = id<redacted>34 compartment = ocid1.compartment.oc1..aa<redacted>ba region = us-ashburn-1 provider = no_auth -

    Modification times and hashes

    +

    Modification times and hashes

    The modification time is stored as metadata on the object as opc-meta-mtime as floating point since the epoch, accurate to 1 ns.

    If the modification time needs to be updated rclone will attempt to perform a server side copy to update the modification if the object can be copied in a single part. In the case the object is larger than 5Gb, the object will be uploaded rather than copied.

    Note that reading this from the object takes an additional HEAD request as the metadata isn't returned in object listings.

    @@ -31117,7 +29391,7 @@ provider = no_auth

    Multipart uploads will use --transfers * --oos-upload-concurrency * --oos-chunk-size extra memory. Single part uploads to not use extra memory.

    Single part transfers can be faster than multipart transfers or slower depending on your latency from oos - the more latency, the more likely single part transfers will be faster.

    Increasing --oos-upload-concurrency will increase throughput (8 would be a sensible value) and increasing --oos-chunk-size also increases throughput (16M would be sensible). Increasing either of these will use more memory. The default values are high enough to gain most of the possible performance without using too much memory.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to oracleobjectstorage (Oracle Cloud Infrastructure Object Storage).

    --oos-provider

    Choose your Auth Provider

    @@ -31232,7 +29506,7 @@ provider = no_auth -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to oracleobjectstorage (Oracle Cloud Infrastructure Object Storage).

    --oos-storage-tier

    The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm

    @@ -31465,7 +29739,7 @@ provider = no_auth

    --oos-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Backend commands

    +

    Backend commands

    Here are the commands specific to the oracleobjectstorage backend.

    Run them with

    rclone backend COMMAND remote:
    @@ -31504,7 +29778,7 @@ provider = no_auth "storageTier": "Standard" } ] -

    cleanup

    +

    cleanup

    Remove unfinished multipart uploads.

    rclone backend cleanup remote: [options] [<arguments>+]

    This command removes unfinished multipart uploads of age greater than max-age which defaults to 24 hours.

    @@ -31551,7 +29825,7 @@ if not.

    Mounting Buckets

    QingStor

    Paths are specified as remote:bucket (or remote: for the lsd command.) You may put subdirectories in too, e.g. remote:bucket/path/to/dir.

    -

    Configuration

    +

    Configuration

    Here is an example of making an QingStor configuration. First run

    rclone config

    This will guide you through an interactive setup process.

    @@ -31619,7 +29893,7 @@ y/e/d> y
    rclone ls remote:bucket

    Sync /home/local/directory to the remote bucket, deleting any excess files in the bucket.

    rclone sync --interactive /home/local/directory remote:bucket
    -

    --fast-list

    +

    --fast-list

    This remote supports --fast-list which allows you to use fewer transactions in exchange for more memory. See the rclone docs for more details.

    Multipart uploads

    rclone supports multipart uploads with QingStor which means that it can upload files bigger than 5 GiB. Note that files uploaded with multipart upload don't have an MD5SUM.

    @@ -31643,10 +29917,10 @@ y/e/d> y -

    Restricted filename characters

    +

    Restricted filename characters

    The control characters 0x00-0x1F and / are replaced as in the default restricted characters set. Note that 0x7F is not replaced.

    Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to qingstor (QingCloud Object Storage).

    --qingstor-env-auth

    Get QingStor credentials from runtime.

    @@ -31727,7 +30001,7 @@ y/e/d> y -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to qingstor (QingCloud Object Storage).

    --qingstor-connection-retries

    Number of connection retries.

    @@ -31783,7 +30057,7 @@ y/e/d> y
  • Default: Slash,Ctl,InvalidUtf8
  • --qingstor-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    rclone about is not supported by the qingstor backend. Backends without this capability cannot determine free space for an rclone mount or use policy mfs (most free space) as a member of an rclone union remote.

    See List of backends that do not support rclone about and rclone about

    Quatrix

    @@ -31800,7 +30074,7 @@ y/e/d> y

    Paths may be as deep as required, e.g., remote:directory/subdirectory.

    The initial setup for Quatrix involves getting an API Key from Quatrix. You can get the API key in the user's profile at https://<account>/profile/api-keys or with the help of the API - https://docs.maytech.net/quatrix/quatrix-api/api-explorer#/API-Key/post_api_key_create.

    See complete Swagger documentation for Quatrix - https://docs.maytech.net/quatrix/quatrix-api/api-explorer

    -

    Configuration

    +

    Configuration

    Here is an example of how to make a remote called remote. First run:

     rclone config

    This will guide you through an interactive setup process:

    @@ -31883,16 +30157,16 @@ y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y -

    Modification times and hashes

    +

    Modification times and hashes

    Quatrix allows modification times to be set on objects accurate to 1 microsecond. These will be used to detect whether objects need syncing or not.

    Quatrix does not support hashes, so you cannot use the --checksum flag.

    -

    Restricted filename characters

    +

    Restricted filename characters

    File names in Quatrix are case sensitive and have limitations like the maximum length of a filename is 255, and the minimum length is 1. A file name cannot be equal to . or .. nor contain / , \ or non-printable ascii.

    -

    Transfers

    +

    Transfers

    For files above 50 MiB rclone will use a chunked transfer. Rclone will upload up to --transfers chunks at the same time (shared among all multipart uploads). Chunks are buffered in memory, and the minimal chunk size is 10_000_000 bytes by default, and it can be changed in the advanced configuration, so increasing --transfers will increase the memory use. The chunk size has a maximum size limit, which is set to 100_000_000 bytes by default and can be changed in the advanced configuration. The size of the uploaded chunk will dynamically change depending on the upload speed. The total memory use equals the number of transfers multiplied by the minimal chunk size. In case there's free memory allocated for the upload (which equals the difference of maximal_summary_chunk_size and minimal_chunk_size * transfers), the chunk size may increase in case of high upload speed. As well as it can decrease in case of upload speed problems. If no free memory is available, all chunks will equal minimal_chunk_size.

    -

    Deleting files

    +

    Deleting files

    Files you delete with rclone will end up in Trash and be stored there for 30 days. Quatrix also provides an API to permanently delete files and an API to empty the Trash so that you can remove files permanently from your account.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to quatrix (Quatrix by Maytech).

    --quatrix-api-key

    API key for accessing Quatrix account

    @@ -31912,7 +30186,7 @@ y/e/d> y
  • Type: string
  • Required: true
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to quatrix (Quatrix by Maytech).

    --quatrix-encoding

    The encoding for the backend.

    @@ -31970,7 +30244,7 @@ y/e/d> y
  • Default: false
  • --quatrix-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    rclone copy /home/source mySia:backup
    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to sia (Sia Decentralized Cloud).

    --sia-api-url

    Sia daemon API URL, like http://sia.daemon.host:9980.

    @@ -32072,7 +30346,7 @@ y/e/d> y
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to sia (Sia Decentralized Cloud).

    --sia-user-agent

    Siad User Agent

    @@ -32095,7 +30369,7 @@ y/e/d> y
  • Default: Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot
  • --sia-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    Paths are specified as remote:container (or remote: for the lsd command.) You may put subdirectories in too, e.g. remote:container/path/to/dir.

    -

    Configuration

    +

    Configuration

    Here is an example of making a swift configuration. First run

    rclone config

    This will guide you through an interactive setup process.

    @@ -32256,16 +30530,16 @@ tenant = $OS_TENANT_NAME export RCLONE_CONFIG_MYREMOTE_TYPE=swift export RCLONE_CONFIG_MYREMOTE_ENV_AUTH=true rclone lsd myremote: -

    --fast-list

    +

    --fast-list

    This remote supports --fast-list which allows you to use fewer transactions in exchange for more memory. See the rclone docs for more details.

    --update and --use-server-modtime

    As noted below, the modified time is stored on metadata on the object. It is used by default for all operations that require checking the time a file was last updated. It allows rclone to treat the remote more like a true filesystem, but it is inefficient because it requires an extra API call to retrieve the metadata.

    For many operations, the time the object was last uploaded to the remote is sufficient to determine if it is "dirty". By using --update along with --use-server-modtime, you can avoid the extra API call and simply upload files whose local modtime is newer than the time it was last uploaded.

    -

    Modification times and hashes

    +

    Modification times and hashes

    The modified time is stored as metadata on the object as X-Object-Meta-Mtime as floating point since the epoch accurate to 1 ns.

    This is a de facto standard (used in the official python-swiftclient amongst others) for storing the modification time for an object.

    The MD5 hash algorithm is supported.

    -

    Restricted filename characters

    +

    Restricted filename characters

    @@ -32288,7 +30562,7 @@ rclone lsd myremote:

    Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to swift (OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)).

    --swift-env-auth

    Get swift credentials from environment variables in standard OpenStack form.

    @@ -32526,7 +30800,7 @@ rclone lsd myremote: -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to swift (OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)).

    --swift-leave-parts-on-error

    If true avoid calling abort upload on a failure.

    @@ -32539,8 +30813,9 @@ rclone lsd myremote:
  • Default: false
  • --swift-chunk-size

    -

    Above this size files will be chunked into a _segments container.

    -

    Above this size files will be chunked into a _segments container. The default for this is 5 GiB which is its maximum value.

    +

    Above this size files will be chunked.

    +

    Above this size files will be chunked into a a _segments container or a .file-segments directory. (See the use_segments_container option for more info). Default for this is 5 GiB which is its maximum value, which means only files above this size will be chunked.

    +

    Rclone uploads chunked files as dynamic large objects (DLO).

    Properties:

    --swift-no-chunk

    Don't chunk files during streaming upload.

    -

    When doing streaming uploads (e.g. using rcat or mount) setting this flag will cause the swift backend to not upload chunked files.

    -

    This will limit the maximum upload size to 5 GiB. However non chunked files are easier to deal with and have an MD5SUM.

    -

    Rclone will still chunk files bigger than chunk_size when doing normal copy operations.

    +

    When doing streaming uploads (e.g. using rcat or mount with --vfs-cache-mode off) setting this flag will cause the swift backend to not upload chunked files.

    +

    This will limit the maximum streamed upload size to 5 GiB. This is useful because non chunked files are easier to deal with and have an MD5SUM.

    +

    Rclone will still chunk files bigger than chunk_size when doing normal copy operations.

    Properties:

    --swift-no-large-objects

    Disable support for static and dynamic large objects

    -

    Swift cannot transparently store files bigger than 5 GiB. There are two schemes for doing that, static or dynamic large objects, and the API does not allow rclone to determine whether a file is a static or dynamic large object without doing a HEAD on the object. Since these need to be treated differently, this means rclone has to issue HEAD requests for objects for example when reading checksums.

    +

    Swift cannot transparently store files bigger than 5 GiB. There are two schemes for chunking large files, static large objects (SLO) or dynamic large objects (DLO), and the API does not allow rclone to determine whether a file is a static or dynamic large object without doing a HEAD on the object. Since these need to be treated differently, this means rclone has to issue HEAD requests for objects for example when reading checksums.

    When no_large_objects is set, rclone will assume that there are no static or dynamic large objects stored. This means it can stop doing the extra HEAD calls which in turn increases performance greatly especially when doing a swift to swift transfer with --checksum set.

    Setting this option implies no_chunk and also that no files will be uploaded in chunks, so files bigger than 5 GiB will just fail on upload.

    -

    If you set this option and there are static or dynamic large objects, then this will give incorrect hashes for them. Downloads will succeed, but other operations such as Remove and Copy will fail.

    +

    If you set this option and there are static or dynamic large objects, then this will give incorrect hashes for them. Downloads will succeed, but other operations such as Remove and Copy will fail.

    Properties:

    +

    --swift-use-segments-container

    +

    Choose destination for large object segments

    +

    Swift cannot transparently store files bigger than 5 GiB and rclone will chunk files larger than chunk_size (default 5 GiB) in order to upload them.

    +

    If this value is true the chunks will be stored in an additional container named the same as the destination container but with _segments appended. This means that there won't be any duplicated data in the original container but having another container may not be acceptable.

    +

    If this value is false the chunks will be stored in a .file-segments directory in the root of the container. This directory will be omitted when listing the container. Some providers (eg Blomp) require this mode as creating additional containers isn't allowed. If it is desired to see the .file-segments directory in the root then this flag must be set to true.

    +

    If this value is unset (the default), then rclone will choose the value to use. It will be false unless rclone detects any auth_urls that it knows need it to be true. In this case you'll see a message in the DEBUG log.

    +

    Properties:

    +

    --swift-encoding

    The encoding for the backend.

    See the encoding section in the overview for more info.

    @@ -32584,7 +30872,7 @@ rclone lsd myremote:
  • Default: Slash,InvalidUtf8
  • --swift-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    The Swift API doesn't return a correct MD5SUM for segmented files (Dynamic or Static Large Objects) so rclone won't check or use the MD5SUM for these.

    -

    Troubleshooting

    +

    Troubleshooting

    Rclone gives Failed to create file system for "remote:": Bad Request

    Due to an oddity of the underlying swift library, it gives a "Bad Request" error rather than a more sensible error when the authentication fails for Swift.

    So this most likely means your username / password is wrong. You can investigate further with the --dump-bodies flag.

    @@ -32612,7 +30900,7 @@ rclone lsd myremote:

    pCloud

    Paths are specified as remote:path

    Paths may be as deep as required, e.g. remote:directory/subdirectory.

    -

    Configuration

    +

    Configuration

    The initial setup for pCloud involves getting a token from pCloud which you need to do in your browser. rclone config walks you through it.

    Here is an example of how to make a remote called remote. First run:

     rclone config
    @@ -32665,10 +30953,10 @@ y/e/d> y
    rclone ls remote:

    To copy a local directory to a pCloud directory called backup

    rclone copy /home/source remote:backup
    -

    Modification times and hashes

    +

    Modification times and hashes

    pCloud allows modification times to be set on objects accurate to 1 second. These will be used to detect whether objects need syncing or not. In order to set a Modification time pCloud requires the object be re-uploaded.

    pCloud supports MD5 and SHA1 hashes in the US region, and SHA1 and SHA256 hashes in the EU region, so you can use the --checksum flag.

    -

    Restricted filename characters

    +

    Restricted filename characters

    In addition to the default restricted characters set the following characters are also replaced:

    @@ -32687,17 +30975,17 @@ y/e/d> y

    Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.

    -

    Deleting files

    +

    Deleting files

    Deleted files will be moved to the trash. Your subscription level will determine how long items stay in the trash. rclone cleanup can be used to empty the trash.

    Emptying the trash

    Due to an API limitation, the rclone cleanup command will only work if you set your username and password in the advanced options for this backend. Since we generally want to avoid storing user passwords in the rclone config file, we advise you to only set this up if you need the rclone cleanup command to work.

    -

    Root folder ID

    +

    Root folder ID

    You can set the root_folder_id for rclone. This is the directory (identified by its Folder ID) that rclone considers to be the root of your pCloud drive.

    Normally you will leave this blank and rclone will determine the correct root to use itself.

    However you can set this to restrict rclone to a specific folder hierarchy.

    In order to do this you will have to find the Folder ID of the directory you wish rclone to display. This will be the folder field of the URL when you open the relevant folder in the pCloud web interface.

    So if the folder you want rclone to use has a URL which looks like https://my.pcloud.com/#page=filemanager&folder=5xxxxxxxx8&tpl=foldergrid in the browser, then you use 5xxxxxxxx8 as the root_folder_id in the config.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to pcloud (Pcloud).

    --pcloud-client-id

    OAuth Client Id.

    @@ -32719,7 +31007,7 @@ y/e/d> y
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to pcloud (Pcloud).

    --pcloud-token

    OAuth Access Token as a JSON blob.

    @@ -32811,7 +31099,7 @@ y/e/d> y
  • Required: false
  • --pcloud-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to pikpak (PikPak).

    --pikpak-client-id

    OAuth Client Id.

    @@ -32989,6 +31277,32 @@ y/e/d> y
  • Type: SizeSuffix
  • Default: 10Mi
  • +

    --pikpak-chunk-size

    +

    Chunk size for multipart uploads.

    +

    Large files will be uploaded in chunks of this size.

    +

    Note that this is stored in memory and there may be up to "--transfers" * "--pikpak-upload-concurrency" chunks stored at once in memory.

    +

    If you are transferring large files over high-speed links and you have enough memory, then increasing this will speed up the transfers.

    +

    Rclone will automatically increase the chunk size when uploading a large file of known size to stay below the 10,000 chunks limit.

    +

    Increasing the chunk size decreases the accuracy of the progress statistics displayed with "-P" flag.

    +

    Properties:

    + +

    --pikpak-upload-concurrency

    +

    Concurrency for multipart uploads.

    +

    This is the number of chunks of the same file that are uploaded concurrently for multipart uploads.

    +

    Note that chunks are stored in memory and there may be up to "--transfers" * "--pikpak-upload-concurrency" chunks stored at once in memory.

    +

    If you are uploading small numbers of large files over high-speed links and these uploads do not fully utilize your bandwidth, then increasing this may help to speed up the transfers.

    +

    Properties:

    +

    --pikpak-encoding

    The encoding for the backend.

    See the encoding section in the overview for more info.

    @@ -33000,7 +31314,7 @@ y/e/d> y
  • Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot
  • --pikpak-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Backend commands

    +

    Backend commands

    Here are the commands specific to the pikpak backend.

    Run them with

    rclone backend COMMAND remote:
    @@ -33036,7 +31350,7 @@ rclone backend decompress pikpak:dirpath {filename} -o delete-src-file

    -

    Limitations

    +

    Limitations

    Hashes may be empty

    PikPak supports MD5 hash, but sometimes given empty especially for user-uploaded files.

    Deleted files still visible with trashed-only

    @@ -33044,7 +31358,7 @@ rclone backend decompress pikpak:dirpath {filename} -o delete-src-file

    premiumize.me

    Paths are specified as remote:path

    Paths may be as deep as required, e.g. remote:directory/subdirectory.

    -

    Configuration

    +

    Configuration

    The initial setup for premiumize.me involves getting a token from premiumize.me which you need to do in your browser. rclone config walks you through it.

    Here is an example of how to make a remote called remote. First run:

     rclone config
    @@ -33095,9 +31409,9 @@ y/e/d>
    rclone ls remote:

    To copy a local directory to an premiumize.me directory called backup

    rclone copy /home/source remote:backup
    -

    Modification times and hashes

    +

    Modification times and hashes

    premiumize.me does not support modification times or hashes, therefore syncing will default to --size-only checking. Note that using --update will work.

    -

    Restricted filename characters

    +

    Restricted filename characters

    In addition to the default restricted characters set the following characters are also replaced:

    @@ -33121,7 +31435,7 @@ y/e/d>

    Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to premiumizeme (premiumize.me).

    --premiumizeme-client-id

    OAuth Client Id.

    @@ -33153,7 +31467,7 @@ y/e/d>
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to premiumizeme (premiumize.me).

    --premiumizeme-token

    OAuth Access Token as a JSON blob.

    @@ -33195,7 +31509,7 @@ y/e/d>
  • Default: Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot
  • --premiumizeme-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    Note that premiumize.me is case insensitive so you can't have a file called "Hello.doc" and one called "hello.doc".

    premiumize.me file names can't have the \ or " characters in. rclone maps these to and from an identical looking unicode equivalents and

    premiumize.me only supports filenames up to 255 characters in length.

    @@ -33228,7 +31542,7 @@ Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / Proton Drive - \ "Proton Drive" + \ "protondrive" [snip] Storage> protondrive User name @@ -33265,18 +31579,18 @@ y/e/d> y
    rclone ls remote:

    To copy a local directory to an Proton Drive directory called backup

    rclone copy /home/source remote:backup
    -

    Modification times and hashes

    +

    Modification times and hashes

    Proton Drive Bridge does not support updating modification times yet.

    The SHA1 hash algorithm is supported.

    -

    Restricted filename characters

    +

    Restricted filename characters

    Invalid UTF-8 bytes will be replaced, also left and right spaces will be removed (code reference)

    -

    Duplicated files

    +

    Duplicated files

    Proton Drive can not have two files with exactly the same name and path. If the conflict occurs, depending on the advanced config, the file might or might not be overwritten.

    Mailbox password

    Please set your mailbox password in the advanced config section.

    Caching

    The cache is currently built for the case when the rclone is the only instance performing operations to the mount point. The event system, which is the proton API system that provides visibility of what has changed on the drive, is yet to be implemented, so updates from other clients won’t be reflected in the cache. Thus, if there are concurrent clients accessing the same mount point, then we might have a problem with caching the stale data.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to protondrive (Proton Drive).

    --protondrive-username

    The username of your proton account

    @@ -33308,7 +31622,7 @@ y/e/d> y
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to protondrive (Proton Drive).

    --protondrive-mailbox-password

    The mailbox password of your two-password proton account.

    @@ -33412,7 +31726,7 @@ y/e/d> y
  • Default: true
  • --protondrive-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    This backend uses the Proton-API-Bridge, which is based on go-proton-api, a fork of the official repo.

    There is no official API documentation available from Proton Drive. But, thanks to Proton open sourcing proton-go-api and the web, iOS, and Android client codebases, we don't need to completely reverse engineer the APIs by observing the web client traffic!

    proton-go-api provides the basic building blocks of API calls and error handling, such as 429 exponential back-off, but it is pretty much just a barebone interface to the Proton API. For example, the encryption and decryption of the Proton Drive file are not provided in this library.

    @@ -33428,7 +31742,7 @@ y/e/d> y

    put.io

    Paths are specified as remote:path

    put.io paths may be as deep as required, e.g. remote:directory/subdirectory.

    -

    Configuration

    +

    Configuration

    The initial setup for put.io involves getting a token from put.io which you need to do in your browser. rclone config walks you through it.

    Here is an example of how to make a remote called remote. First run:

     rclone config
    @@ -33493,7 +31807,7 @@ e/n/d/r/c/s/q> q
    rclone ls remote:

    To copy a local directory to a put.io directory called backup

    rclone copy /home/source remote:backup
    -

    Restricted filename characters

    +

    Restricted filename characters

    In addition to the default restricted characters set the following characters are also replaced:

    @@ -33512,7 +31826,7 @@ e/n/d/r/c/s/q> q

    Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to putio (Put.io).

    --putio-client-id

    OAuth Client Id.

    @@ -33534,7 +31848,7 @@ e/n/d/r/c/s/q> q
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to putio (Put.io).

    --putio-token

    OAuth Access Token as a JSON blob.

    @@ -33576,7 +31890,7 @@ e/n/d/r/c/s/q> q
  • Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
  • --putio-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    put.io has rate limiting. When you hit a limit, rclone automatically retries after waiting the amount of time requested by the server.

    If you want to avoid ever hitting these limits, you may use the --tpslimit flag with a low number. Note that the imposed limits may be different for different operations, and may change over time.

    Proton Drive

    @@ -33608,7 +31922,7 @@ Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / Proton Drive - \ "Proton Drive" + \ "protondrive" [snip] Storage> protondrive User name @@ -33645,18 +31959,18 @@ y/e/d> y
    rclone ls remote:

    To copy a local directory to an Proton Drive directory called backup

    rclone copy /home/source remote:backup
    -

    Modification times and hashes

    +

    Modification times and hashes

    Proton Drive Bridge does not support updating modification times yet.

    The SHA1 hash algorithm is supported.

    -

    Restricted filename characters

    +

    Restricted filename characters

    Invalid UTF-8 bytes will be replaced, also left and right spaces will be removed (code reference)

    -

    Duplicated files

    +

    Duplicated files

    Proton Drive can not have two files with exactly the same name and path. If the conflict occurs, depending on the advanced config, the file might or might not be overwritten.

    Mailbox password

    Please set your mailbox password in the advanced config section.

    Caching

    The cache is currently built for the case when the rclone is the only instance performing operations to the mount point. The event system, which is the proton API system that provides visibility of what has changed on the drive, is yet to be implemented, so updates from other clients won’t be reflected in the cache. Thus, if there are concurrent clients accessing the same mount point, then we might have a problem with caching the stale data.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to protondrive (Proton Drive).

    --protondrive-username

    The username of your proton account

    @@ -33688,7 +32002,7 @@ y/e/d> y
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to protondrive (Proton Drive).

    --protondrive-mailbox-password

    The mailbox password of your two-password proton account.

    @@ -33792,7 +32106,7 @@ y/e/d> y
  • Default: true
  • --protondrive-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    This backend uses the Proton-API-Bridge, which is based on go-proton-api, a fork of the official repo.

    There is no official API documentation available from Proton Drive. But, thanks to Proton open sourcing proton-go-api and the web, iOS, and Android client codebases, we don't need to completely reverse engineer the APIs by observing the web client traffic!

    proton-go-api provides the basic building blocks of API calls and error handling, such as 429 exponential back-off, but it is pretty much just a barebone interface to the Proton API. For example, the encryption and decryption of the Proton Drive file are not provided in this library.

    The Proton-API-Bridge, attempts to bridge the gap, so rclone can be built on top of this quickly. This codebase handles the intricate tasks before and after calling Proton APIs, particularly the complex encryption scheme, allowing developers to implement features for other software on top of this codebase. There are likely quite a few errors in this library, as there isn't official documentation available.

    Seafile

    This is a backend for the Seafile storage service: - It works with both the free community edition or the professional edition. - Seafile versions 6.x, 7.x, 8.x and 9.x are all supported. - Encrypted libraries are also supported. - It supports 2FA enabled users - Using a Library API Token is not supported

    -

    Configuration

    +

    Configuration

    There are two distinct modes you can setup your remote: - you point your remote to the root of the server, meaning you don't specify a library during the configuration: Paths are specified as remote:library. You may put subdirectories in too, e.g. remote:library/path/to/dir. - you point your remote to a specific library during the configuration: Paths are specified as remote:path/to/dir. This is the recommended mode when using encrypted libraries. (This mode is possibly slightly faster than the root mode)

    Configuration in root mode

    Here is an example of making a seafile configuration for a user with no two-factor authentication. First run

    @@ -33964,9 +32278,9 @@ y/e/d> y
    rclone ls seafile:directory

    Sync /home/local/directory to the remote library, deleting any excess files in the library.

    rclone sync --interactive /home/local/directory seafile:
    -

    --fast-list

    +

    --fast-list

    Seafile version 7+ supports --fast-list which allows you to use fewer transactions in exchange for more memory. See the rclone docs for more details. Please note this is not supported on seafile server version 6.x

    -

    Restricted filename characters

    +

    Restricted filename characters

    In addition to the default restricted characters set the following characters are also replaced:

    @@ -34008,7 +32322,7 @@ http://my.seafile.server/d/9ea2455f6f55478bbb0d/

    It has been actively developed using the seafile docker image of these versions: - 6.3.4 community edition - 7.0.5 community edition - 7.1.3 community edition - 9.0.10 community edition

    Versions below 6.0 are not supported. Versions between 6.0 and 6.3 haven't been tested and might not work properly.

    Each new version of rclone is automatically tested against the latest docker image of the seafile community server.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to seafile (seafile).

    --seafile-url

    URL of seafile host to connect to.

    @@ -34084,7 +32398,7 @@ http://my.seafile.server/d/9ea2455f6f55478bbb0d/
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to seafile (seafile).

    --seafile-create-library

    Should rclone create a library if it doesn't exist.

    @@ -34106,7 +32420,7 @@ http://my.seafile.server/d/9ea2455f6f55478bbb0d/
  • Default: Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8
  • --seafile-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to sftp (SSH/SFTP).

    --sftp-known-hosts-file

    Optional path to known_hosts file.

    @@ -34628,6 +32942,19 @@ server_command = sudo /usr/libexec/openssh/sftp-server
  • Type: int
  • Default: 64
  • +

    --sftp-connections

    +

    Maximum number of SFTP simultaneous connections, 0 for unlimited.

    +

    Note that setting this is very likely to cause deadlocks so it should be used with care.

    +

    If you are doing a sync or copy then make sure concurrency is one more than the sum of --transfers and --checkers.

    +

    If you use --check-first then it just needs to be one more than the maximum of --checkers and --transfers.

    +

    So for concurrency 3 you'd use --checkers 2 --transfers 2 --check-first or --checkers 1 --transfers 1.

    +

    Properties:

    +

    --sftp-set-env

    Environment variables to pass to sftp and commands

    Set environment variables in the form:

    @@ -34722,7 +33049,7 @@ server_command = sudo /usr/libexec/openssh/sftp-server
  • Default: false
  • --sftp-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    On some SFTP servers (e.g. Synology) the paths are different for SSH and SFTP so the hashes can't be calculated properly. For them using disable_hashcheck is a good idea.

    The only ssh agent supported under Windows is Putty's pageant.

    The Go SSH library disables the use of the aes128-cbc cipher by default, due to security concerns. This can be re-enabled on a per-connection basis by setting the use_insecure_cipher setting in the configuration file to true. Further details on the insecurity of this cipher can be found in this paper.

    @@ -34747,11 +33074,11 @@ server_command = sudo /usr/libexec/openssh/sftp-server

    SMB is a communication protocol to share files over network.

    This relies on go-smb2 library for communication with SMB protocol.

    Paths are specified as remote:sharename (or remote: for the lsd command.) You may put subdirectories in too, e.g. remote:item/path/to/dir.

    -

    Notes

    +

    Notes

    The first path segment must be the name of the share, which you entered when you started to share on Windows. On smbd, it's the section title in smb.conf (usually in /etc/samba/) file. You can find shares by querying the root if you're unsure (e.g. rclone lsd remote:).

    You can't access to the shared printers from rclone, obviously.

    You can't use Anonymous access for logging in. You have to use the guest user with an empty password instead. The rclone client tries to avoid 8.3 names when uploading files by encoding trailing spaces and periods. Alternatively, the local backend on Windows can access SMB servers using UNC paths, by \\server\share. This doesn't apply to non-Windows OSes, such as Linux and macOS.

    -

    Configuration

    +

    Configuration

    Here is an example of making a SMB configuration.

    First run

    rclone config
    @@ -34826,7 +33153,7 @@ y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> d -

    Standard options

    +

    Standard options

    Here are the Standard options specific to smb (SMB / CIFS).

    --smb-host

    SMB server hostname to connect to.

    @@ -34887,7 +33214,7 @@ y/e/d> d
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to smb (SMB / CIFS).

    --smb-idle-timeout

    Max time before closing idle connections.

    @@ -34930,7 +33257,7 @@ y/e/d> d
  • Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot
  • --smb-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    Storj

    -

    Storj is an encrypted, secure, and cost-effective object storage service that enables you to store, back up, and archive large amounts of data in a decentralized manner.

    +

    Storj is redefining the cloud to support the future of data—sustainably and economically. Storj leverages the vast global supply of underutilized resources to deliver better security, durability, and performance services. Experience up to 90% lower costs and carbon reduction with Storj.

    +

    Storj is an encrypted, secure, and cost-effective object storage service that enables you to store, back up, and archive large amounts of data in a decentralized manner.

    Backend options

    Storj can be used both with this native backend and with the s3 backend using the Storj S3 compatible gateway (shared or private).

    Use this backend to take advantage of client-side encryption as well as to achieve the best possible download performance. Uploads will be erasure-coded locally, thus a 1gb upload will result in 2.68gb of data being uploaded to storage nodes across the network.

    @@ -34997,7 +33325,7 @@ y/e/d> d
  • S3 backend: secret encryption key is shared with the gateway
  • -

    Configuration

    +

    Configuration

    To make a new Storj configuration you need one of the following: * Access Grant that someone else shared with you. * API Key of a Storj project you are a member of.

    Here is an example of how to make a remote called remote. First run:

     rclone config
    @@ -35094,7 +33422,7 @@ y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y -

    Standard options

    +

    Standard options

    Here are the Standard options specific to storj (Storj Decentralized Cloud Storage).

    --storj-provider

    Choose an authentication method.

    @@ -35173,10 +33501,10 @@ y/e/d> y
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to storj (Storj Decentralized Cloud Storage).

    --storj-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Usage

    +

    Usage

    Paths are specified as remote:bucket (or remote: for the lsf command.) You may put subdirectories in too, e.g. remote:bucket/path/to/dir.

    Once configured you can then use rclone like this.

    Create a new bucket

    @@ -35238,15 +33566,15 @@ y/e/d> y
    rclone sync --interactive --progress remote-us:bucket/path/to/dir/ remote-europe:bucket/path/to/dir/

    Or even between another cloud storage and Storj.

    rclone sync --interactive --progress s3:bucket/path/to/dir/ storj:bucket/path/to/dir/
    -

    Limitations

    +

    Limitations

    rclone about is not supported by the rclone Storj backend. Backends without this capability cannot determine free space for an rclone mount or use policy mfs (most free space) as a member of an rclone union remote.

    See List of backends that do not support rclone about and rclone about

    -

    Known issues

    +

    Known issues

    If you get errors like too many open files this usually happens when the default ulimit for system max open files is exceeded. Native Storj protocol opens a large number of TCP connections (each of which is counted as an open file). For a single upload stream you can expect 110 TCP connections to be opened. For a single download stream you can expect 35. This batch of connections will be opened for every 64 MiB segment and you should also expect TCP connections to be reused. If you do many transfers you eventually open a connection to most storage nodes (thousands of nodes).

    To fix these, please raise your system limits. You can do this issuing a ulimit -n 65536 just before you run rclone. To change the limits more permanently you can add this to your shell startup script, e.g. $HOME/.bashrc, or change the system-wide configuration, usually /etc/sysctl.conf and/or /etc/security/limits.conf, but please refer to your operating system manual.

    SugarSync

    SugarSync is a cloud service that enables active synchronization of files across computers and other devices for file backup, access, syncing, and sharing.

    -

    Configuration

    +

    Configuration

    The initial setup for SugarSync involves getting a token from SugarSync which you can do with rclone. rclone config walks you through it.

    Here is an example of how to make a remote called remote. First run:

     rclone config
    @@ -35311,15 +33639,15 @@ y/e/d> y

    Paths are specified as remote:path

    Paths may be as deep as required, e.g. remote:directory/subdirectory.

    NB you can't create files in the top level folder you have to create a folder, which rclone will create as a "Sync Folder" with SugarSync.

    -

    Modification times and hashes

    +

    Modification times and hashes

    SugarSync does not support modification times or hashes, therefore syncing will default to --size-only checking. Note that using --update will work as rclone can read the time files were uploaded.

    -

    Restricted filename characters

    +

    Restricted filename characters

    SugarSync replaces the default restricted characters set except for DEL.

    Invalid UTF-8 bytes will also be replaced, as they can't be used in XML strings.

    -

    Deleting files

    +

    Deleting files

    Deleted files will be moved to the "Deleted items" folder by default.

    However you can supply the flag --sugarsync-hard-delete or set the config parameter hard_delete = true if you would like files to be deleted straight away.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to sugarsync (Sugarsync).

    --sugarsync-app-id

    Sugarsync App ID.

    @@ -35360,7 +33688,7 @@ y/e/d> y
  • Type: bool
  • Default: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to sugarsync (Sugarsync).

    --sugarsync-refresh-token

    Sugarsync refresh token.

    @@ -35433,7 +33761,7 @@ y/e/d> y
  • Default: Slash,Ctl,InvalidUtf8,Dot
  • --sugarsync-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    rclone about is not supported by the SugarSync backend. Backends without this capability cannot determine free space for an rclone mount or use policy mfs (most free space) as a member of an rclone union remote.

    See List of backends that do not support rclone about and rclone about

    Tardigrade

    The Tardigrade backend has been renamed to be the Storj backend. Old configuration files will continue to work.

    +

    Uloz.to

    +

    Paths are specified as remote:path

    +

    Paths may be as deep as required, e.g. remote:directory/subdirectory.

    +

    The initial setup for Uloz.to involves filling in the user credentials. rclone config walks you through it.

    +

    Configuration

    +

    Here is an example of how to make a remote called remote. 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
    +[snip]
    +XX / Uloz.to
    +   \ "ulozto"
    +[snip]
    +Storage> ulozto
    +
    +Option app_token.
    +The application token identifying the app. An app API key can be either found in the API doc 
    +https://uloz.to/upload-resumable-api-beta or obtained from customer service.
    +Enter a value. Press Enter to leave empty.
    +app_token> token_value
    +
    +Option username.
    +The username of the principal to operate as.
    +Enter a value. Press Enter to leave empty.
    +username> user
    +
    +Option password.
    +The password for the user.
    +Choose an alternative below. Press Enter for the default (n).
    +y) Yes, type in my own password
    +g) Generate random password
    +n) No, leave this optional password blank (default)
    +y/g/n> y
    +Enter the password:
    +password:
    +Confirm the password:
    +password:
    +
    +Edit advanced config?
    +y) Yes
    +n) No (default)
    +y/n> n
    +
    +Keep this "remote" remote?
    +y) Yes this is OK (default)
    +e) Edit this remote
    +d) Delete this remote
    +y/e/d> y
    +

    Once configured you can then use rclone like this,

    +

    List folders in root level folder:

    +
    rclone lsd remote:
    +

    List all the files in your root folder:

    +
    rclone ls remote:
    +

    To copy a local folder to a Uloz.to folder called backup:

    +
    rclone copy /home/source remote:backup
    +

    User credentials

    +

    The only reliable method is to authenticate the user using username and password. Uloz.to offers an API key as well, but it's reserved for the use of Uloz.to's in-house application and using it in different circumstances is unreliable.

    +

    Modification times and hashes

    +

    Uloz.to doesn't allow the user to set a custom modification time, or retrieve the hashes after upload. As a result, the integration uses a free form field the API provides to encode client-provided timestamps and hashes. Timestamps are stored with microsecond precision.

    +

    A server calculated MD5 hash of the file is verified upon upload. Afterwards, the backend only serves the client-side calculated hashes. Hashes can also be retrieved upon creating a file download link, but it's impractical for list-like use cases.

    +

    Restricted filename characters

    +

    In addition to the default restricted characters set the following characters are also replaced:

    +
    + + + + + + + + + + + + + + +
    CharacterValueReplacement
    \0x5C
    +

    Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.

    +

    Transfers

    +

    All files are currently uploaded using a single HTTP request, so for uploading large files a stable connection is necessary. Rclone will upload up to --transfers chunks at the same time (shared among all uploads).

    +

    Deleting files

    +

    By default, files are moved to the recycle bin whereas folders are deleted immediately. Trashed files are permanently deleted after 30 days in the recycle bin.

    +

    Emptying the trash is currently not implemented in rclone.

    +

    Root folder ID

    +

    You can set the root_folder_slug for rclone. This is the folder (identified by its Folder slug) that rclone considers to be the root of your Uloz.to drive.

    +

    Normally you will leave this blank and rclone will determine the correct root to use itself. However you can set this to restrict rclone to a specific folder hierarchy.

    +

    In order to do this you will have to find the Folder slug of the folder you wish to use as root. This will be the last segment of the URL when you open the relevant folder in the Uloz.to web interface.

    +

    For example, for exploring a folder with URL https://uloz.to/fm/my-files/foobar, foobar should be used as the root slug.

    +

    root_folder_slug can be used alongside a specific path in the remote path. For example, if your remote's root_folder_slug corresponds to /foo/bar, remote:baz/qux will refer to ABSOLUTE_ULOZTO_ROOT/foo/bar/baz/qux.

    +

    Standard options

    +

    Here are the Standard options specific to ulozto (Uloz.to).

    +

    --ulozto-app-token

    +

    The application token identifying the app. An app API key can be either found in the API doc https://uloz.to/upload-resumable-api-beta or obtained from customer service.

    +

    Properties:

    + +

    --ulozto-username

    +

    The username of the principal to operate as.

    +

    Properties:

    + +

    --ulozto-password

    +

    The password for the user.

    +

    NB Input to this must be obscured - see rclone obscure.

    +

    Properties:

    + +

    Advanced options

    +

    Here are the Advanced options specific to ulozto (Uloz.to).

    +

    --ulozto-root-folder-slug

    +

    If set, rclone will use this folder as the root folder for all operations. For example, if the slug identifies 'foo/bar/', 'ulozto:baz' is equivalent to 'ulozto:foo/bar/baz' without any root slug set.

    +

    Properties:

    + +

    --ulozto-list-page-size

    +

    The size of a single page for list commands. 1-500

    +

    Properties:

    + +

    --ulozto-encoding

    +

    The encoding for the backend.

    +

    See the encoding section in the overview for more info.

    +

    Properties:

    + +

    --ulozto-description

    +

    Description of the remote.

    +

    Properties:

    + +

    Limitations

    +

    Uloz.to file names can't have the \ character in. rclone maps this to and from an identical looking unicode equivalent (U+FF3C Fullwidth Reverse Solidus).

    +

    Uloz.to only supports filenames up to 255 characters in length.

    +

    Uloz.to rate limits access to the API, but exact details are undisclosed. Practical testing reveals that hitting the rate limit during normal use is very rare, although not impossible with higher number of concurrently uploaded files.

    +

    rclone about is not supported by the Uloz.to backend. Although there's an endpoint to retrieve the information for the UI, it's not exposed in the API. Backends without this capability cannot determine free space for an rclone mount or use policy mfs (most free space) as a member of an rclone union remote.

    +

    See List of backends that do not support rclone about and rclone about

    Uptobox

    This is a Backend for Uptobox file storage service. Uptobox is closer to a one-click hoster than a traditional cloud storage provider and therefore not suitable for long term storage.

    Paths are specified as remote:path

    Paths may be as deep as required, e.g. remote:directory/subdirectory.

    -

    Configuration

    +

    Configuration

    To configure an Uptobox backend you'll need your personal api token. You'll find it in your account settings

    Here is an example of how to make a remote called remote with the default setup. First run:

    rclone config
    @@ -35504,9 +34004,9 @@ y/e/d>
    rclone ls remote:

    To copy a local directory to an Uptobox directory called backup

    rclone copy /home/source remote:backup
    -

    Modification times and hashes

    +

    Modification times and hashes

    Uptobox supports neither modified times nor checksums. All timestamps will read as that set by --default-time.

    -

    Restricted filename characters

    +

    Restricted filename characters

    In addition to the default restricted characters set the following characters are also replaced:

    @@ -35530,7 +34030,7 @@ y/e/d>

    Invalid UTF-8 bytes will also be replaced, as they can't be used in XML strings.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to uptobox (Uptobox).

    --uptobox-access-token

    Your access token.

    @@ -35542,7 +34042,7 @@ y/e/d>
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to uptobox (Uptobox).

    --uptobox-private

    Set to make uploaded files private

    @@ -35564,7 +34064,7 @@ y/e/d>
  • Default: Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot
  • --uptobox-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    Uptobox will delete inactive files that have not been accessed in 60 days.

    rclone about is not supported by this backend an overview of used space can however been seen in the uptobox web interface.

    Union

    @@ -35586,7 +34086,7 @@ y/e/d>

    Subfolders can be used in upstream remotes. Assume a union remote named backup with the remotes mydrive:private/backup. Invoking rclone mkdir backup:desktop is exactly the same as invoking rclone mkdir mydrive:private/backup/desktop.

    There is no special handling of paths containing .. segments. Invoking rclone mkdir backup:../desktop is exactly the same as invoking rclone mkdir mydrive:private/backup/../desktop.

    -

    Configuration

    +

    Configuration

    Here is an example of how to make a union called remote for local folders. First run:

     rclone config

    This will guide you through an interactive setup process:

    @@ -35819,7 +34319,7 @@ upstreams = /local:writeback remote:dir

    When files are written, they will be written to both remote:dir and /local.

    As many remotes as desired can be added to upstreams but there should only be one :writeback tag.

    Rclone does not manage the :writeback remote in any way other than writing files back to it. So if you need to expire old files or manage the size then you will have to do this yourself.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to union (Union merges the contents of several upstream fs).

    --union-upstreams

    List of space separated upstreams.

    @@ -35868,7 +34368,7 @@ upstreams = /local:writeback remote:dir
  • Type: int
  • Default: 120
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to union (Union merges the contents of several upstream fs).

    --union-min-free-space

    Minimum viable free space for lfs/eplfs policies.

    @@ -35881,7 +34381,7 @@ upstreams = /local:writeback remote:dir
  • Default: 1Gi
  • --union-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Metadata

    +

    Metadata

    Any metadata supported by the underlying remote is read and written.

    See the metadata docs for more info.

    WebDAV

    Paths are specified as remote:path

    Paths may be as deep as required, e.g. remote:directory/subdirectory.

    -

    Configuration

    +

    Configuration

    To configure the WebDAV remote you will need to have a URL for it, and a username and password. If you know what kind of system you are connecting to then rclone can enable extra features.

    Here is an example of how to make a remote called remote. First run:

     rclone config
    @@ -35969,10 +34469,10 @@ y/e/d> y
    rclone ls remote:

    To copy a local directory to an WebDAV directory called backup

    rclone copy /home/source remote:backup
    -

    Modification times and hashes

    +

    Modification times and hashes

    Plain WebDAV does not support modified times. However when used with Fastmail Files, Owncloud or Nextcloud rclone will support modified times.

    Likewise plain WebDAV does not support hashes, however when used with Fastmail Files, Owncloud or Nextcloud rclone will support SHA1 and MD5 hashes. Depending on the exact version of Owncloud or Nextcloud hashes may appear on all objects, or only on objects which had a hash uploaded with them.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to webdav (WebDAV).

    --webdav-url

    URL of http host to connect to.

    @@ -36053,7 +34553,7 @@ y/e/d> y
  • Type: string
  • Required: false
  • -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to webdav (WebDAV).

    --webdav-bearer-token-command

    Command to run to get a bearer token.

    @@ -36117,8 +34617,17 @@ y/e/d> y
  • Type: bool
  • Default: false
  • +

    --webdav-owncloud-exclude-mounts

    +

    Exclude ownCloud mounted storages

    +

    Properties:

    +

    --webdav-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to yandex (Yandex Disk).

    --yandex-token

    OAuth Access Token as a JSON blob.

    @@ -36341,7 +34850,7 @@ y/e/d> y
  • Default: Slash,Del,Ctl,InvalidUtf8,Dot
  • --yandex-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Limitations

    +

    Limitations

    When uploading very large files (bigger than about 5 GiB) you will need to increase the --timeout parameter. This is because Yandex pauses (perhaps to calculate the MD5SUM for the entire file) before returning confirmation that the file has been uploaded. The default handling of timeouts in rclone is to assume a 5 minute pause is an error and close the connection - you'll see net/http: timeout awaiting response headers errors in the logs if this is happening. Setting the timeout to twice the max size of file in GiB should be enough, so if you want to upload a 30 GiB file set a timeout of 2 * 30 = 60m, that is --timeout 60m.

    Having a Yandex Mail account is mandatory to use the Yandex.Disk subscription. Token generation will work without a mail account, but Rclone won't be able to complete any actions.

    [403 - DiskUnsupportedUserAccountTypeError] User account type is not supported.

    Zoho Workdrive

    Zoho WorkDrive is a cloud storage solution created by Zoho.

    -

    Configuration

    +

    Configuration

    Here is an example of making a zoho configuration. First run

    rclone config

    This will guide you through an interactive setup process:

    @@ -36428,14 +34937,14 @@ y/e/d>

    Sync /home/local/directory to the remote path, deleting any excess files in the path.

    rclone sync --interactive /home/local/directory remote:directory

    Zoho paths may be as deep as required, eg remote:directory/subdirectory.

    -

    Modification times and hashes

    +

    Modification times and hashes

    Modified times are currently not supported for Zoho Workdrive

    No hash algorithms are supported.

    -

    Usage information

    +

    Usage information

    To view your current quota you can use the rclone about remote: command which will display your current usage.

    -

    Restricted filename characters

    +

    Restricted filename characters

    Only control characters and invalid UTF-8 are replaced. In addition most Unicode full-width characters are not supported at all and will be removed from filenames during upload.

    -

    Standard options

    +

    Standard options

    Here are the Standard options specific to zoho (Zoho).

    --zoho-client-id

    OAuth Client Id.

    @@ -36494,7 +35003,7 @@ y/e/d> -

    Advanced options

    +

    Advanced options

    Here are the Advanced options specific to zoho (Zoho).

    --zoho-token

    OAuth Access Token as a JSON blob.

    @@ -36536,7 +35045,7 @@ y/e/d>
  • Default: Del,Ctl,InvalidUtf8
  • --zoho-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    +

    --local-time-type

    +

    Set what kind of time is returned.

    +

    Normally rclone does all operations on the mtime or Modification time.

    +

    If you set this flag then rclone will return the Modified time as whatever you set here. So if you use "rclone lsl --local-time-type ctime" then you will see ctimes in the listing.

    +

    If the OS doesn't support returning the time_type specified then rclone will silently replace it with the modification time which all OSes support.

    + +

    Note that setting the time will still set the modified time so this is only useful for reading.

    +

    Properties:

    +

    --local-encoding

    The encoding for the backend.

    See the encoding section in the overview for more info.

    @@ -37092,7 +35645,7 @@ $ tree /tmp/b
  • Default: Slash,Dot
  • --local-description

    -

    Description of the remote

    +

    Description of the remote.

    Properties:

    -

    Metadata

    +

    Metadata

    Depending on which OS is in use the local backend may return only some of the system metadata. Setting system metadata is supported on all OSes but setting user metadata is only supported on linux, freebsd, netbsd, macOS and Solaris. It is not supported on Windows yet (see pkg/attrs#47).

    User metadata is stored as extended attributes (which may not be supported by all file systems) under the "user.*" prefix.

    Metadata is supported on files and directories.

    @@ -37175,7 +35728,7 @@ $ tree /tmp/b

    See the metadata docs for more info.

    -

    Backend commands

    +

    Backend commands

    Here are the commands specific to the local backend.

    Run them with

    rclone backend COMMAND remote:
    @@ -37192,6 +35745,234 @@ $ tree /tmp/b
  • "error": return an error based on option value
  • Changelog

    +

    v1.67.0 - 2024-06-14

    +

    See commits

    +

    v1.66.0 - 2024-03-10

    See commits

    Bugs and Limitations

    -

    Limitations

    +

    Limitations

    Directory timestamps aren't preserved on some backends

    As of v1.66, rclone supports syncing directory modtimes, if the backend supports it. Some backends do not support it -- see overview for a complete list. Additionally, note that empty directories are not synced by default (this can be enabled with --create-empty-src-dirs.)

    Rclone struggles with millions of files in a directory/bucket

    @@ -44862,7 +43643,7 @@ Server B> rclone copy /tmp/whatever remote:Backup

    Why doesn't rclone support partial transfers / binary diffs like rsync?

    Rclone stores each file you transfer as a native object on the remote cloud storage system. This means that you can see the files you upload as expected using alternative access methods (e.g. using the Google Drive web interface). There is a 1:1 mapping between files on your hard disk and objects created in the cloud storage system.

    Cloud storage systems (at least none I've come across yet) don't support partially uploading an object. You can't take an existing object, and change some bytes in the middle of it.

    -

    It would be possible to make a sync system which stored binary diffs instead of whole objects like rclone does, but that would break the 1:1 mapping of files on your hard disk to objects in the remote cloud storage system.

    +

    It would be possible to make a sync system which stored binary diffs like rsync does, instead of whole objects, but that would break the 1:1 mapping of files on your hard disk to objects in the remote cloud storage system.

    All the cloud storage systems support partial downloads of content, so it would be possible to make partial downloads work. However to make this work efficiently this would require storing a significant amount of metadata, which breaks the desired 1:1 mapping of files to objects.

    Can rclone do bi-directional sync?

    Yes, since rclone v1.58.0, bidirectional cloud sync is available.

    @@ -45325,7 +44106,7 @@ THE SOFTWARE.
  • Roman Kredentser
  • Kamil Trzciński
  • Zac Rubin
  • -
  • Vincent Feltz
  • +
  • Vincent Feltz
  • Heiko Bornholdt
  • Matteo Pietro Dazzi
  • jtagcat
  • @@ -45765,6 +44546,45 @@ THE SOFTWARE.
  • Joe Cai
  • Anders Swanson
  • huajin tong
  • +
  • John-Paul Smith
  • +
  • racerole
  • +
  • Gachoud Philippe
  • +
  • YukiUnHappy
  • +
  • Kyle Reynolds
  • +
  • Lewis Hook
  • +
  • hoyho
  • +
  • Vitaly
  • +
  • iotmaestro
  • +
  • psychopatt
  • +
  • Alex Garel
  • +
  • Warrentheo
  • +
  • Alexandre Lavigne
  • +
  • yoelvini
  • +
  • Erisa A
  • +
  • Pieter van Oostrum
  • +
  • jakzoe
  • +
  • guangwu
  • +
  • static-moonlight
  • +
  • yudrywet
  • +
  • Butanediol
  • +
  • Dave Nicolson
  • +
  • Katia Esposito
  • +
  • pawsey-kbuckley
  • +
  • hidewrong
  • +
  • Michael Terry
  • +
  • Sunny
  • +
  • overallteach
  • +
  • JT Olio
  • +
  • Evan McBeth
  • +
  • Dominik Joe Pantůček
  • +
  • yumeiyin
  • +
  • Bruno Fernandes
  • +
  • Thomas Schneider
  • +
  • Charles Hamilton
  • +
  • Tomasz Melcer
  • +
  • Michał Dzienisiewicz
  • +
  • Florian Klink
  • +
  • Bill Fraser
  • Contact the rclone project

    Forum

    diff --git a/MANUAL.md b/MANUAL.md index 1570bb645..27e5b2153 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -1,6 +1,6 @@ % rclone(1) User Manual % Nick Craig-Wood -% Mar 10, 2024 +% Jun 14, 2024 # Rclone syncs your files to cloud storage @@ -138,6 +138,7 @@ WebDAV or S3, that work out of the box.) - Liara Object Storage - Linkbox - Linode Object Storage +- Magalu - Mail.ru Cloud - Memset Memstore - Mega @@ -177,6 +178,7 @@ WebDAV or S3, that work out of the box.) - Synology - SugarSync - Tencent Cloud Object Storage (COS) +- Uloz.to - Uptobox - Wasabi - WebDAV @@ -276,14 +278,14 @@ Run `rclone config` to setup. See [rclone config docs](https://rclone.org/docs/) NOTE: This version of rclone will not support `mount` any more (see [#5373](https://github.com/rclone/rclone/issues/5373)). If mounting is wanted on macOS, either install a precompiled binary or enable the relevant option -when [installing from source](#install-from-source). +when [installing from source](#source). Note that this is a third party installer not controlled by the rclone developers so it may be out of date. Its current version is as below. [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/rclone.svg)](https://repology.org/project/rclone/versions) -### Installation with MacPorts (#macos-macports) +### Installation with MacPorts {#macos-macports} On macOS, rclone can also be installed via [MacPorts](https://www.macports.org): @@ -509,6 +511,7 @@ docker run --rm \ ls ~/data/mount kill %1 ``` + ## Snap installation {#snap} [![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/rclone) @@ -904,6 +907,7 @@ See the following for detailed instructions for * [Storj](https://rclone.org/storj/) * [SugarSync](https://rclone.org/sugarsync/) * [Union](https://rclone.org/union/) + * [Uloz.to](https://rclone.org/ulozto/) * [Uptobox](https://rclone.org/uptobox/) * [WebDAV](https://rclone.org/webdav/) * [Yandex Disk](https://rclone.org/yandex/) @@ -917,7 +921,24 @@ Rclone syncs a directory tree from one storage system to another. Its syntax is like this - Syntax: [options] subcommand + rclone subcommand [options] + +A `subcommand` is a the rclone operation required, (e.g. `sync`, +`copy`, `ls`). + +An `option` is a single letter flag (e.g. `-v`) or a group of single +letter flags (e.g. `-Pv`) or a long flag (e.g. `--progress`). No +options are required. Options can come after the `subcommand` or in +between parameters too or on the end, but only global options can be +used before the `subcommand`. Anything after a `--` option will not be +interpreted as an option so if you need to add a parameter which +starts with a `-` then put a `--` on its own first, eg + + rclone lsf -- -directory-starting-with-dash + +A `parameter` is usually a file path or [rclone remote](#syntax-of-remote-paths), eg +`/path/to/file` or `remote:path/to/file` but it can be other things - +the `subcommand` help will tell you what. Source and destination paths are specified by the name you gave the storage system in the config file then the sub path, e.g. @@ -3237,21 +3258,32 @@ Output bash completion script for rclone. Generates a bash shell autocompletion script for rclone. -This writes to /etc/bash_completion.d/rclone by default so will -probably need to be run with sudo or as root, e.g. +By default, when run without any arguments, - sudo rclone genautocomplete bash + rclone genautocomplete bash -Logout and login again to use the autocompletion scripts, or source -them directly +the generated script will be written to - . /etc/bash_completion + /etc/bash_completion.d/rclone -If you supply a command line argument the script will be written -there. +and so rclone will probably need to be run as root, or with sudo. + +If you supply a path to a file as the command line argument, then +the generated script will be written to that file, in which case +you should not need root privileges. If output_file is "-", then the output will be written to stdout. +If you have installed the script into the default location, you +can logout and login again to use the autocompletion script. + +Alternatively, you can source the script directly + + . /path/to/my_bash_completion_scripts/rclone + +and the autocompletion functionality will be added to your +current shell. + ``` rclone completion bash [output_file] [flags] @@ -4578,6 +4610,100 @@ rclone gendocs output_directory [flags] ``` +See the [global flags page](https://rclone.org/flags/) for global options not listed here. + +# SEE ALSO + +* [rclone](https://rclone.org/commands/rclone/) - Show help for rclone commands, flags and backends. + +# rclone gitannex + +Speaks with git-annex over stdin/stdout. + +## Synopsis + +Rclone's `gitannex` subcommand enables [git-annex] to store and retrieve content +from an rclone remote. It is meant to be run by git-annex, not directly by +users. + +[git-annex]: https://git-annex.branchable.com/ + +Installation on Linux +--------------------- + +1. Skip this step if your version of git-annex is [10.20240430] or newer. + Otherwise, you must create a symlink somewhere on your PATH with a particular + name. This symlink helps git-annex tell rclone it wants to run the "gitannex" + subcommand. + + ```sh + # Create the helper symlink in "$HOME/bin". + ln -s "$(realpath rclone)" "$HOME/bin/git-annex-remote-rclone-builtin" + + # Verify the new symlink is on your PATH. + which git-annex-remote-rclone-builtin + ``` + + [10.20240430]: https://git-annex.branchable.com/news/version_10.20240430/ + +2. Add a new remote to your git-annex repo. This new remote will connect + git-annex with the `rclone gitannex` subcommand. + + Start by asking git-annex to describe the remote's available configuration + parameters. + + ```sh + # If you skipped step 1: + git annex initremote MyRemote type=rclone --whatelse + + # If you created a symlink in step 1: + git annex initremote MyRemote type=external externaltype=rclone-builtin --whatelse + ``` + + > **NOTE**: If you're porting an existing [git-annex-remote-rclone] remote to + > use `rclone gitannex`, you can probably reuse the configuration parameters + > verbatim without renaming them. Check parameter synonyms with `--whatelse` + > as shown above. + > + > [git-annex-remote-rclone]: https://github.com/git-annex-remote-rclone/git-annex-remote-rclone + + The following example creates a new git-annex remote named "MyRemote" that + will use the rclone remote named "SomeRcloneRemote". That rclone remote must + be one configured in your rclone.conf file, which can be located with `rclone + config file`. + + ```sh + git annex initremote MyRemote \ + type=external \ + externaltype=rclone-builtin \ + encryption=none \ + rcloneremotename=SomeRcloneRemote \ + rcloneprefix=git-annex-content \ + rclonelayout=nodir + ``` + +3. Before you trust this command with your precious data, be sure to **test the + remote**. This command is very new and has not been tested on many rclone + backends. Caveat emptor! + + ```sh + git annex testremote MyRemote + ``` + +Happy annexing! + + +``` +rclone gitannex [flags] +``` + +## Options + +``` + -h, --help help for gitannex +``` + + See the [global flags page](https://rclone.org/flags/) for global options not listed here. # SEE ALSO @@ -4996,7 +5122,7 @@ The output is an array of Items, where each Item looks like this "Tier" : "hot", } -If `--hash` is not specified the Hashes property won't be emitted. The +If `--hash` is not specified, the Hashes property will be omitted. The types of hash can be specified with the `--hash-type` parameter (which may be repeated). If `--hash-type` is set then it implies `--hash`. @@ -5008,7 +5134,7 @@ If `--no-mimetype` is specified then MimeType will be blank. This can speed things up on remotes where reading the MimeType takes an extra request (e.g. s3, swift). -If `--encrypted` is not specified the Encrypted won't be emitted. +If `--encrypted` is not specified the Encrypted will be omitted. If `--dirs-only` is not specified files in addition to directories are returned @@ -5140,9 +5266,8 @@ Mount the remote as file system on a mountpoint. ## Synopsis -rclone mount allows Linux, FreeBSD, macOS and Windows to -mount any of Rclone's cloud storage systems as a file system with -FUSE. +Rclone mount allows Linux, FreeBSD, macOS and Windows to +mount any of Rclone's cloud storage systems as a file system with FUSE. First set up your remote using `rclone config`. Check it works with `rclone ls` etc. @@ -5602,6 +5727,7 @@ Mount option syntax includes a few extra options treated specially: - `vv...` will be transformed into appropriate `--verbose=N` - standard mount options like `x-systemd.automount`, `_netdev`, `nosuid` and alike are intended only for Automountd and ignored by rclone. + ## VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects @@ -5956,6 +6082,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone mount remote:path /path/to/mountpoint [flags] ``` @@ -5976,6 +6103,7 @@ rclone mount remote:path /path/to/mountpoint [flags] --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) @@ -6232,7 +6360,8 @@ press '?' to toggle the help on and off. The supported keys are: ^L refresh screen (fix screen corruption) r recalculate file sizes ? to toggle help on and off - q/ESC/^c to quit + ESC to close the menu box + q/^c to quit Listed files/directories may be prefixed by a one-character flag, some of them combined with a description in brackets at end of line. @@ -6322,9 +6451,8 @@ Mount the remote as file system on a mountpoint. ## Synopsis -rclone nfsmount allows Linux, FreeBSD, macOS and Windows to -mount any of Rclone's cloud storage systems as a file system with -FUSE. +Rclone nfsmount allows Linux, FreeBSD, macOS and Windows to +mount any of Rclone's cloud storage systems as a file system with FUSE. First set up your remote using `rclone config`. Check it works with `rclone ls` etc. @@ -6784,6 +6912,7 @@ Mount option syntax includes a few extra options treated specially: - `vv...` will be transformed into appropriate `--verbose=N` - standard mount options like `x-systemd.automount`, `_netdev`, `nosuid` and alike are intended only for Automountd and ignored by rclone. + ## VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects @@ -7138,6 +7267,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone nfsmount remote:path /path/to/mountpoint [flags] ``` @@ -7159,6 +7289,7 @@ rclone nfsmount remote:path /path/to/mountpoint [flags] --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) @@ -7436,7 +7567,6 @@ Run rclone listening to remote control commands only. ## Synopsis - This runs rclone so that it only listens to remote control commands. This is useful if you are controlling rclone via the rc API. @@ -7490,7 +7620,7 @@ of that with the CA certificate. `--krc-ey` should be the PEM encoded private key and `--rc-client-ca` should be the PEM encoded client certificate authority certificate. ---rc-min-tls-version is minimum TLS version that is acceptable. Valid +`--rc-min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). @@ -7558,6 +7688,7 @@ Use `--rc-realm` to set the authentication realm. Use `--rc-salt` to change the password hashing salt from the default. + ``` rclone rcd * [flags] ``` @@ -7593,6 +7724,7 @@ Flags to control the Remote Control API. --rc-realm string Realm for authentication --rc-salt string Password hashing salt (default "dlPL2MqE") --rc-serve Enable the serving of remote objects + --rc-serve-no-modtime Don't read the modification time (can speed things up) --rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s) --rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s) --rc-template string User-specified template @@ -7800,7 +7932,6 @@ based on media formats or file extensions. Additionally, there is no media transcoding support. This means that some players might show files that they are not able to play back correctly. - ## Server options Use `--addr` to specify which IP address and port the server should @@ -7812,6 +7943,7 @@ default "rclone (hostname)". Use `--log-trace` in conjunction with `-vv` to enable additional debug logging of all UPNP traffic. + ## VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects @@ -8166,6 +8298,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone serve dlna remote:path [flags] ``` @@ -8289,6 +8422,7 @@ directory with book-keeping records of created and mounted volumes. All mount and VFS options are submitted by the docker daemon via API, but you can also provide defaults on the command line as well as set path to the config file and cache directory or adjust logging verbosity. + ## VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects @@ -8643,6 +8777,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone serve docker [flags] ``` @@ -8664,6 +8799,7 @@ rclone serve docker [flags] --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --forget-state Skip restoring previous state --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) @@ -8748,7 +8884,6 @@ Serve remote:path over FTP. ## Synopsis - Run a basic FTP server to serve a remote over FTP protocol. This can be viewed with a FTP client or you can make a remote of type FTP to read and write it. @@ -8768,6 +8903,7 @@ then using Authentication is advised - see the next section for info. By default this will serve files without needing a login. You can set a single username and password with the --user and --pass flags. + ## VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects @@ -9203,6 +9339,7 @@ This can be used to build general purpose proxies to any kind of backend that rclone supports. + ``` rclone serve ftp remote:path [flags] ``` @@ -9346,7 +9483,7 @@ of that with the CA certificate. `--key` should be the PEM encoded private key and `--client-ca` should be the PEM encoded client certificate authority certificate. ---min-tls-version is minimum TLS version that is acceptable. Valid +`--min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). @@ -9412,6 +9549,7 @@ The password file can be updated while rclone is running. Use `--realm` to set the authentication realm. Use `--salt` to change the password hashing salt from the default. + ## VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects @@ -9847,6 +9985,7 @@ This can be used to build general purpose proxies to any kind of backend that rclone supports. + ``` rclone serve http remote:path [flags] ``` @@ -10329,6 +10468,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone serve nfs remote:path [flags] ``` @@ -10536,7 +10676,7 @@ of that with the CA certificate. `--key` should be the PEM encoded private key and `--client-ca` should be the PEM encoded client certificate authority certificate. ---min-tls-version is minimum TLS version that is acceptable. Valid +`--min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). @@ -10568,6 +10708,7 @@ Use `--realm` to set the authentication realm. Use `--salt` to change the password hashing salt from the default. + ``` rclone serve restic remote:path [flags] ``` @@ -10649,7 +10790,27 @@ like this: rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY remote:path ``` -This will be compatible with an rclone remote which is defined like this: +For example, to use a simple folder in the filesystem, run the server +with a command like this: + +``` +rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY local:/path/to/folder +``` + +The `rclone.conf` for the server could look like this: + +``` +[local] +type = local +``` + +The `local` configuration is optional though. If you run the server with a +`remote:path` like `/path/to/folder` (without the `local:` prefix and without an +`rclone.conf` file), rclone will fall back to a default configuration, which +will be visible as a warning in the logs. But it will run nonetheless. + +This will be compatible with an rclone (client) remote configuration which +is defined like this: ``` [serves3] @@ -10769,9 +10930,10 @@ of that with the CA certificate. `--key` should be the PEM encoded private key and `--client-ca` should be the PEM encoded client certificate authority certificate. ---min-tls-version is minimum TLS version that is acceptable. Valid +`--min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). + ## VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects @@ -11126,6 +11288,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone serve s3 remote:path [flags] ``` @@ -11707,6 +11870,7 @@ This can be used to build general purpose proxies to any kind of backend that rclone supports. + ``` rclone serve sftp remote:path [flags] ``` @@ -11812,6 +11976,7 @@ supported hash on the backend or you can use a named hash such as to see the full list. ## Access WebDAV on Windows + WebDAV shared folder can be mapped as a drive on Windows, however the default settings prevent it. Windows will fail to connect to the server using insecure Basic authentication. It will not even display any login dialog. Windows requires SSL / HTTPS connection to be used with Basic. @@ -11827,6 +11992,7 @@ If required, increase the FileSizeLimitInBytes to a higher value. Navigate to the Services interface, then restart the WebClient service. ## Access Office applications on WebDAV + Navigate to following registry HKEY_CURRENT_USER\Software\Microsoft\Office\[14.0/15.0/16.0]\Common\Internet Create a new DWORD BasicAuthLevel with value 2. 0 - Basic authentication disabled @@ -11835,7 +12001,6 @@ Create a new DWORD BasicAuthLevel with value 2. https://learn.microsoft.com/en-us/office/troubleshoot/powerpoint/office-opens-blank-from-sharepoint - ## Server options Use `--addr` to specify which IP address and port the server should @@ -11879,7 +12044,7 @@ of that with the CA certificate. `--key` should be the PEM encoded private key and `--client-ca` should be the PEM encoded client certificate authority certificate. ---min-tls-version is minimum TLS version that is acceptable. Valid +`--min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). @@ -11945,6 +12110,7 @@ The password file can be updated while rclone is running. Use `--realm` to set the authentication realm. Use `--salt` to change the password hashing salt from the default. + ## VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects @@ -12380,6 +12546,7 @@ This can be used to build general purpose proxies to any kind of backend that rclone supports. + ``` rclone serve webdav remote:path [flags] ``` @@ -12637,6 +12804,7 @@ rclone test info [remote:path]+ [flags] --check-normalization Check UTF-8 Normalization --check-streaming Check uploads with indeterminate file size -h, --help help for info + --keep-test-files Keep test files after execution --upload-wait Duration Wait after writing a file (default 0s) --write-json string Write results to file ``` @@ -14715,6 +14883,10 @@ with the `--stats` flag. This can be used with the `--stats-one-line` flag for a simpler display. +To change the display length of filenames (for different terminal widths), +see the `--stats-file-name-length` option. The default output is formatted +for 80 character wide terminals. + Note: On Windows until [this bug](https://github.com/Azure/go-ansiterm/issues/26) is fixed all non-ASCII characters will be replaced with `.` when `--progress` is in use. @@ -15553,7 +15725,7 @@ it will log a high priority message if the retry was successful. * `6` - Less serious errors (like 461 errors from dropbox) (NoRetry errors) * `7` - Fatal error (one that more retries won't fix, like account suspended) (Fatal errors) * `8` - Transfer exceeded - limit set by --max-transfer reached - * `9` - Operation successful, but no files transferred + * `9` - Operation successful, but no files transferred (Requires [`--error-on-no-transfer`](#error-on-no-transfer)) * `10` - Duration exceeded - limit set by --max-duration reached Environment Variables @@ -16147,7 +16319,7 @@ processed in. E.g. `rclone ls remote: --exclude *.bak` excludes all .bak files from listing. -E.g. `rclone size remote: "--exclude /dir/**"` returns the total size of +E.g. `rclone size remote: --exclude "/dir/**"` returns the total size of all files on `remote:` excluding those in root directory `dir` and sub directories. @@ -16765,6 +16937,12 @@ remotes using this syntax http://127.0.0.1:5572/[remote:path]/path/to/object Default Off. +### --rc-serve-no-modtime + +Set this flag to skip reading the modification time (can speed things up). + +Default Off. + ### --rc-files /path/to/directory Path to local files to serve on the HTTP server. @@ -18951,6 +19129,7 @@ Here is an overview of the major features of each cloud storage system. | SMB | - | R/W | Yes | No | - | - | | SugarSync | - | - | No | No | - | - | | Storj | - | R | No | No | - | - | +| Uloz.to | MD5, SHA256 ¹³ | - | No | Yes | - | - | | Uptobox | - | - | No | Yes | - | - | | WebDAV | MD5, SHA1 ³ | R ⁴ | Depends | No | - | - | | Yandex Disk | MD5 | R/W | No | No | R | - | @@ -18994,6 +19173,9 @@ hash](https://static.hidrive.com/dev/0001). It combines SHA1 sums for each 4 KiB block hierarchically to a single top-level sum. +¹³ Uloz.to provides server-calculated MD5 hash upon file upload. MD5 and SHA256 +hashes are client-calculated and stored as metadata fields. + ### Hash ### The cloud storage system supports various hash types of the objects. @@ -19417,6 +19599,7 @@ upon backend-specific capabilities. | SMB | No | No | Yes | Yes | No | No | Yes | Yes | No | No | Yes | | SugarSync | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | No | Yes | | Storj | Yes ² | Yes | Yes | No | No | Yes | Yes | No | Yes | No | No | +| Uloz.to | No | No | Yes | Yes | No | No | No | No | No | No | Yes | | Uptobox | No | Yes | Yes | Yes | No | No | No | No | No | No | No | | WebDAV | Yes | Yes | Yes | Yes | No | No | Yes ³ | No | No | Yes | Yes | | Yandex Disk | Yes | Yes | Yes | Yes | Yes | No | Yes | No | Yes | Yes | Yes | @@ -19631,7 +19814,7 @@ General networking and HTTP stuff. --tpslimit float Limit HTTP transactions per second to this --tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --use-cookies Enable session cookiejar - --user-agent string Set the user-agent to a specified string (default "rclone/v1.66.0") + --user-agent string Set the user-agent to a specified string (default "rclone/v1.67.0") ``` @@ -19798,6 +19981,7 @@ Flags to control the Remote Control API. --rc-realm string Realm for authentication --rc-salt string Password hashing salt (default "dlPL2MqE") --rc-serve Enable the serving of remote objects + --rc-serve-no-modtime Don't read the modification time (can speed things up) --rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s) --rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s) --rc-template string User-specified template @@ -20016,6 +20200,7 @@ Backend only flags. These can be set in the config file also. --dropbox-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot) --dropbox-impersonate string Impersonate this user when using a business account --dropbox-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) + --dropbox-root-namespace string Specify a different Dropbox namespace ID to use as the root for all paths --dropbox-shared-files Instructs rclone to work on individual shared files --dropbox-shared-folders Instructs rclone to work on shared folders --dropbox-token string OAuth Access Token as a JSON blob @@ -20121,6 +20306,7 @@ Backend only flags. These can be set in the config file also. --hidrive-upload-cutoff SizeSuffix Cutoff/Threshold for chunked uploads (default 96Mi) --http-description string Description of the remote --http-headers CommaSepList Set HTTP headers for all transactions + --http-no-escape Do not escape URL metacharacters in path names --http-no-head Don't use HEAD requests --http-no-slash Set this if the site doesn't end directories with / --http-url string URL of HTTP host to connect to @@ -20156,7 +20342,7 @@ Backend only flags. These can be set in the config file also. --koofr-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) --koofr-endpoint string The Koofr API endpoint to use --koofr-mountid string Mount ID of the mount to use - --koofr-password string Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password) (obscured) + --koofr-password string Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password (obscured) --koofr-provider string Choose your storage provider --koofr-setmtime Does the backend support setting modification time (default true) --koofr-user string Your user name @@ -20172,6 +20358,7 @@ Backend only flags. These can be set in the config file also. --local-no-set-modtime Disable setting modtime --local-no-sparse Disable sparse files for multi-thread downloads --local-nounc Disable UNC (long path names) conversion on Windows + --local-time-type mtime|atime|btime|ctime Set what kind of time is returned (default mtime) --local-unicode-normalization Apply unicode NFC normalization to paths and filenames --local-zero-size-links Assume the Stat size of links is zero (and read them instead) (deprecated) --mailru-auth-url string Auth server URL @@ -20214,6 +20401,7 @@ Backend only flags. These can be set in the config file also. --onedrive-drive-type string The type of the drive (personal | business | documentLibrary) --onedrive-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot) --onedrive-expose-onenote-files Set to make OneNote files show up in directory listings + --onedrive-hard-delete Permanently delete files on removal --onedrive-hash-type string Specify the hash in use for the backend (default "auto") --onedrive-link-password string Set the password for links created by the link command --onedrive-link-scope string Set the scope of the links created by the link command (default "anonymous") @@ -20268,6 +20456,7 @@ Backend only flags. These can be set in the config file also. --pcloud-token-url string Token server url --pcloud-username string Your pcloud username --pikpak-auth-url string Auth server URL + --pikpak-chunk-size SizeSuffix Chunk size for multipart uploads (default 5Mi) --pikpak-client-id string OAuth Client Id --pikpak-client-secret string OAuth Client Secret --pikpak-description string Description of the remote @@ -20278,6 +20467,7 @@ Backend only flags. These can be set in the config file also. --pikpak-token string OAuth Access Token as a JSON blob --pikpak-token-url string Token server url --pikpak-trashed-only Only show files that are in the trash + --pikpak-upload-concurrency int Concurrency for multipart uploads (default 5) --pikpak-use-trash Send files to the trash instead of deleting permanently (default true) --pikpak-user string Pikpak username --premiumizeme-auth-url string Auth server URL @@ -20391,6 +20581,7 @@ Backend only flags. These can be set in the config file also. --sftp-chunk-size SizeSuffix Upload and download chunk size (default 32Ki) --sftp-ciphers SpaceSepList Space separated list of ciphers to be used for session encryption, ordered by preference --sftp-concurrency int The maximum number of outstanding requests for one file (default 64) + --sftp-connections int Maximum number of SFTP simultaneous connections, 0 for unlimited --sftp-copy-is-hardlink Set to enable server side copies using hardlinks --sftp-description string Description of the remote --sftp-disable-concurrent-reads If set don't use concurrent reads @@ -20475,7 +20666,7 @@ Backend only flags. These can be set in the config file also. --swift-auth string Authentication URL for server (OS_AUTH_URL) --swift-auth-token string Auth Token from alternate authentication - optional (OS_AUTH_TOKEN) --swift-auth-version int AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION) - --swift-chunk-size SizeSuffix Above this size files will be chunked into a _segments container (default 5Gi) + --swift-chunk-size SizeSuffix Above this size files will be chunked (default 5Gi) --swift-description string Description of the remote --swift-domain string User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) --swift-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8) @@ -20491,8 +20682,16 @@ Backend only flags. These can be set in the config file also. --swift-tenant string Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME) --swift-tenant-domain string Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME) --swift-tenant-id string Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID) + --swift-use-segments-container Tristate Choose destination for large object segments (default unset) --swift-user string User name to log in (OS_USERNAME) --swift-user-id string User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID) + --ulozto-app-token string The application token identifying the app. An app API key can be either found in the API + --ulozto-description string Description of the remote + --ulozto-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) + --ulozto-list-page-size int The size of a single page for list commands. 1-500 (default 500) + --ulozto-password string The password for the user (obscured) + --ulozto-root-folder-slug string If set, rclone will use this folder as the root folder for all operations. For example, + --ulozto-username string The username of the principal to operate as --union-action-policy string Policy to choose upstream on ACTION category (default "epall") --union-cache-time int Cache time of usage and free space (in seconds) (default 120) --union-create-policy string Policy to choose upstream on CREATE category (default "epmfs") @@ -20510,6 +20709,7 @@ Backend only flags. These can be set in the config file also. --webdav-encoding string The encoding for the backend --webdav-headers CommaSepList Set HTTP headers for all transactions --webdav-nextcloud-chunk-size SizeSuffix Nextcloud upload chunk size (default 10Mi) + --webdav-owncloud-exclude-mounts Exclude ownCloud mounted storages --webdav-owncloud-exclude-shares Exclude ownCloud shares --webdav-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) --webdav-pass string Password (obscured) @@ -23285,7 +23485,7 @@ Properties: #### --fichier-description -Description of the remote +Description of the remote. Properties: @@ -23419,7 +23619,7 @@ Here are the Advanced options specific to alias (Alias for an existing remote). #### --alias-description -Description of the remote +Description of the remote. Properties: @@ -23451,6 +23651,7 @@ The S3 backend can be used with a number of different providers: - Leviia Object Storage - Liara Object Storage - Linode Object Storage +- Magalu Object Storage - Minio - Petabox - Qiniu Cloud Object Storage (Kodo) @@ -24097,7 +24298,7 @@ A simple solution is to set the `--s3-upload-cutoff 0` and force all the files t ### Standard options -Here are the Standard options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others). +Here are the Standard options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others). #### --s3-provider @@ -24144,6 +24345,8 @@ Properties: - Liara Object Storage - "Linode" - Linode Object Storage + - "Magalu" + - Magalu Object Storage - "Minio" - Minio Object Storage - "Netease" @@ -24287,6 +24490,9 @@ Properties: - "sa-east-1" - South America (Sao Paulo) Region. - Needs location constraint sa-east-1. + - "il-central-1" + - Israel (Tel Aviv) Region. + - Needs location constraint il-central-1. - "me-south-1" - Middle East (Bahrain) Region. - Needs location constraint me-south-1. @@ -24372,6 +24578,8 @@ Properties: - Asia Pacific (Hong Kong) Region - "sa-east-1" - South America (Sao Paulo) Region + - "il-central-1" + - Israel (Tel Aviv) Region - "me-south-1" - Middle East (Bahrain) Region - "af-south-1" @@ -24518,7 +24726,7 @@ Properties: ### Advanced options -Here are the Advanced options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others). +Here are the Advanced options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others). #### --s3-bucket-acl @@ -25332,7 +25540,7 @@ Properties: #### --s3-description -Description of the remote +Description of the remote. Properties: @@ -25731,7 +25939,7 @@ Option Storage. Type of storage to configure. Choose a number from below, or type in your own value. ... -XX / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi +XX / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Lyve Cloud, Minio, Magalu, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi \ (s3) ... Storage> s3 @@ -25803,6 +26011,8 @@ acl = private Now run `rclone lsf r2:` to see your buckets and `rclone lsf r2:bucket` to look within a bucket. +For R2 tokens with the "Object Read & Write" permission, you may also need to add `no_check_bucket = true` for object uploads to work correctly. + ### Dreamhost Dreamhost [DreamObjects](https://www.dreamhost.com/cloud/storage/) is @@ -25893,6 +26103,7 @@ Once configured, you can create a new Space and begin copying files. For example rclone mkdir spaces:my-new-space rclone copy /path/to/files spaces:my-new-space ``` + ### Huawei OBS {#huawei-obs} Object Storage Service (OBS) provides stable, secure, efficient, and easy-to-use cloud storage that lets you store virtually any volume of unstructured data in any format and access it from anywhere. @@ -26785,10 +26996,11 @@ endpoint = s3.nl-ams.scw.cloud access_key_id = SCWXXXXXXXXXXXXXX secret_access_key = 1111111-2222-3333-44444-55555555555555 region = nl-ams -location_constraint = +location_constraint = nl-ams acl = private -server_side_encryption = -storage_class = +upload_cutoff = 5M +chunk_size = 5M +copy_cutoff = 5M ``` [C14 Cold Storage](https://www.online.net/en/storage/c14-cold-storage) is the low-cost S3 Glacier alternative from Scaleway and it works the same way as on S3 by accepting the "GLACIER" `storage_class`. @@ -27459,6 +27671,7 @@ e) Edit this remote d) Delete this remote y/e/d> y ``` + ### Leviia Cloud Object Storage {#leviia} [Leviia Object Storage](https://www.leviia.com/object-storage/), backup and secure your data in a 100% French cloud, independent of GAFAM.. @@ -27810,6 +28023,123 @@ secret_access_key = SECRET_ACCESS_KEY endpoint = eu-central-1.linodeobjects.com ``` +### Magalu {#magalu} + +Here is an example of making a [Magalu Object Storage](https://magalu.cloud/object-storage/) +configuration. 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 + +Enter name for new remote. +name> magalu + +Option Storage. +Type of storage to configure. +Choose a number from below, or type in your own value. +[snip] +XX / Amazon S3 Compliant Storage Providers including AWS, ...Magalu, ...and others + \ (s3) +[snip] +Storage> s3 + +Option provider. +Choose your S3 provider. +Choose a number from below, or type in your own value. +Press Enter to leave empty. +[snip] +XX / Magalu Object Storage + \ (Magalu) +[snip] +provider> Magalu + +Option env_auth. +Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). +Only applies if access_key_id and secret_access_key is blank. +Choose a number from below, or type in your own boolean value (true or false). +Press Enter for the default (false). + 1 / Enter AWS credentials in the next step. + \ (false) + 2 / Get AWS credentials from the environment (env vars or IAM). + \ (true) +env_auth> 1 + +Option access_key_id. +AWS Access Key ID. +Leave blank for anonymous access or runtime credentials. +Enter a value. Press Enter to leave empty. +access_key_id> ACCESS_KEY + +Option secret_access_key. +AWS Secret Access Key (password). +Leave blank for anonymous access or runtime credentials. +Enter a value. Press Enter to leave empty. +secret_access_key> SECRET_ACCESS_KEY + +Option endpoint. +Endpoint for Magalu Object Storage API. +Choose a number from below, or type in your own value. +Press Enter to leave empty. + 1 / São Paulo, SP (BR), br-se1 + \ (br-se1.magaluobjects.com) + 2 / Fortaleza, CE (BR), br-ne1 + \ (br-ne1.magaluobjects.com) +endpoint> 2 + +Option acl. +Canned ACL used when creating buckets and storing or copying objects. +This ACL is used for creating objects and if bucket_acl isn't set, for creating buckets too. +For more info visit https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl +Note that this ACL is applied when server-side copying objects as S3 +doesn't copy the ACL from the source but rather writes a fresh one. +If the acl is an empty string then no X-Amz-Acl: header is added and +the default (private) will be used. +Choose a number from below, or type in your own value. +Press Enter to leave empty. + / Owner gets FULL_CONTROL. + 1 | No one else has access rights (default). + \ (private) +[snip] +acl> + +Edit advanced config? +y) Yes +n) No (default) +y/n> n + +Configuration complete. +Options: +- type: s3 +- provider: magalu +- access_key_id: ACCESS_KEY +- secret_access_key: SECRET_ACCESS_KEY +- endpoint: br-ne1.magaluobjects.com +Keep this "magalu" remote? +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +``` + +This will leave the config file looking like this. + +``` +[magalu] +type = s3 +provider = Magalu +access_key_id = ACCESS_KEY +secret_access_key = SECRET_ACCESS_KEY +endpoint = br-ne1.magaluobjects.com +``` + ### ArvanCloud {#arvan-cloud} [ArvanCloud](https://www.arvancloud.com/en/products/cloud-storage) ArvanCloud Object Storage goes beyond the limited traditional file storage. @@ -28454,10 +28784,11 @@ e) Edit this remote d) Delete this remote y/e/d> y +``` # Backblaze B2 -B2 is [Backblaze's cloud storage system](https://www.backblaze.com/b2/). +B2 is [Backblaze's cloud storage system](https://www.backblaze.com/cloud-storage). Paths are specified as `remote:bucket` (or `remote:` for the `lsd` command.) You may put subdirectories in too, e.g. `remote:bucket/path/to/dir`. @@ -28528,7 +28859,7 @@ excess files in the bucket. ### Application Keys B2 supports multiple [Application Keys for different access permission -to B2 Buckets](https://www.backblaze.com/b2/docs/application_keys.html). +to B2 Buckets](https://www.backblaze.com/docs/cloud-storage-application-keys). You can use these with rclone too; you will need to use rclone version 1.43 or later. @@ -28616,7 +28947,7 @@ used. ### Versions When rclone uploads a new version of a file it creates a [new version -of it](https://www.backblaze.com/b2/docs/file_versions.html). +of it](https://www.backblaze.com/docs/cloud-storage-file-versions). Likewise when you delete a file, the old version will be marked hidden and still be available. Conversely, you may opt in to a "hard delete" of files with the `--b2-hard-delete` flag which would permanently remove @@ -28630,14 +28961,24 @@ using the `--b2-version-at` flag. This will show the file versions as they were at that time, showing files that have been deleted afterwards, and hiding files that were created since. -If you wish to remove all the old versions then you can use the -`rclone cleanup remote:bucket` command which will delete all the old -versions of files, leaving the current ones intact. You can also -supply a path and only old versions under that path will be deleted, -e.g. `rclone cleanup remote:bucket/path/to/stuff`. +If you wish to remove all the old versions, and unfinished large file +uploads, then you can use the `rclone cleanup remote:bucket` command +which will delete all the old versions of files, leaving the current ones +intact. You can also supply a path and only old versions under that path +will be deleted, e.g. `rclone cleanup remote:bucket/path/to/stuff`. Note that `cleanup` will remove partially uploaded files from the bucket -if they are more than a day old. +if they are more than a day old. If you want more control over the +expiry date then run `rclone backend cleanup b2:bucket -o max-age=1h` +to remove all unfinished large file uploads older than one hour, leaving +old versions intact. + +If you wish to remove all the old versions, leaving current files and +unfinished large files intact, then you can use the +[`rclone backend cleanup-hidden remote:bucket`](#cleanup-hidden) +command. You can also supply a path and only old versions under that +path will be deleted, e.g. +`rclone backend cleanup-hidden remote:bucket/path/to/stuff`. When you `purge` a bucket, the current and the old versions will be deleted then the bucket will be deleted. @@ -28857,7 +29198,7 @@ below will cause b2 to return specific errors: * "force_cap_exceeded" These will be set in the "X-Bz-Test-Mode" header which is documented -in the [b2 integrations checklist](https://www.backblaze.com/b2/docs/integration_checklist.html). +in the [b2 integrations checklist](https://www.backblaze.com/docs/cloud-storage-integration-checklist). Properties: @@ -29088,7 +29429,7 @@ Properties: #### --b2-description -Description of the remote +Description of the remote. Properties: @@ -29164,6 +29505,42 @@ Options: - "daysFromHidingToDeleting": After a file has been hidden for this many days it is deleted. 0 is off. - "daysFromUploadingToHiding": This many days after uploading a file is hidden +### cleanup + +Remove unfinished large file uploads. + + rclone backend cleanup remote: [options] [+] + +This command removes unfinished large file uploads of age greater than +max-age, which defaults to 24 hours. + +Note that you can use --interactive/-i or --dry-run with this command to see what +it would do. + + rclone backend cleanup b2:bucket/path/to/object + rclone backend cleanup -o max-age=7w b2:bucket/path/to/object + +Durations are parsed as per the rest of rclone, 2h, 7d, 7w etc. + + +Options: + +- "max-age": Max age of upload to delete + +### cleanup-hidden + +Remove old versions of files. + + rclone backend cleanup-hidden remote: [options] [+] + +This command removes any old hidden versions of files. + +Note that you can use --interactive/-i or --dry-run with this command to see what +it would do. + + rclone backend cleanup-hidden b2:bucket/path/to/dir + + ## Limitations @@ -29646,7 +30023,7 @@ Properties: #### --box-description -Description of the remote +Description of the remote. Properties: @@ -30363,7 +30740,7 @@ Properties: #### --cache-description -Description of the remote +Description of the remote. Properties: @@ -30870,7 +31247,7 @@ Properties: #### --chunker-description -Description of the remote +Description of the remote. Properties: @@ -31182,7 +31559,7 @@ Properties: #### --sharefile-description -Description of the remote +Description of the remote. Properties: @@ -31384,7 +31761,7 @@ A long passphrase is recommended, or `rclone config` can generate a random one. The obscured password is created using AES-CTR with a static key. The -salt is stored verbatim at the beginning of the obscured password. This +IV (nonce) is stored verbatim at the beginning of the obscured password. This static key is shared between all versions of rclone. If you reconfigure rclone with the same passwords/passphrases @@ -31572,7 +31949,7 @@ Obfuscation cannot be relied upon for strong protection. Cloud storage systems have limits on file name length and total path length which rclone is more likely to breach using -"Standard" file name encryption. Where file names are less than 156 +"Standard" file name encryption. Where file names are 143 or fewer characters in length issues should not be encountered, irrespective of cloud storage provider. @@ -31836,7 +32213,7 @@ Properties: #### --crypt-description -Description of the remote +Description of the remote. Properties: @@ -32185,7 +32562,7 @@ Properties: #### --compress-description -Description of the remote +Description of the remote. Properties: @@ -32358,7 +32735,7 @@ Here are the Advanced options specific to combine (Combine several remotes into #### --combine-description -Description of the remote +Description of the remote. Properties: @@ -32707,6 +33084,9 @@ Note that we don't unmount the shared folder afterwards so the --dropbox-shared-folders can be omitted after the first use of a particular shared folder. +See also --dropbox-root-namespace for an alternative way to work with shared +folders. + Properties: - Config: shared_folders @@ -32738,6 +33118,17 @@ Properties: - Type: Encoding - Default: Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot +#### --dropbox-root-namespace + +Specify a different Dropbox namespace ID to use as the root for all paths. + +Properties: + +- Config: root_namespace +- Env Var: RCLONE_DROPBOX_ROOT_NAMESPACE +- Type: string +- Required: false + #### --dropbox-batch-mode Upload file batching sync|async|off. @@ -32826,7 +33217,7 @@ Properties: #### --dropbox-description -Description of the remote +Description of the remote. Properties: @@ -33160,7 +33551,7 @@ Properties: #### --filefabric-description -Description of the remote +Description of the remote. Properties: @@ -33622,7 +34013,7 @@ Properties: #### --ftp-description -Description of the remote +Description of the remote. Properties: @@ -34381,7 +34772,7 @@ Properties: #### --gcs-description -Description of the remote +Description of the remote. Properties: @@ -34833,6 +35224,8 @@ The [rclone backend](https://rclone.org/commands/rclone_backend/) command can be Shortcuts can be completely ignored with the `--drive-skip-shortcuts` flag or the corresponding `skip_shortcuts` configuration setting. +If you have shortcuts that lead to an infinite recursion in your drive (e.g. a shortcut pointing to a parent folder), `skip_shortcuts` might be mandatory to be able to copy the drive. + ### Emptying trash If you wish to empty your trash you can use the `rclone cleanup remote:` @@ -35686,6 +36079,8 @@ Properties: - Read the value only - "write" - Write the value only + - "failok" + - If writing fails log errors only, don't fail the transfer - "read,write" - Read and Write the value. @@ -35714,6 +36109,8 @@ Properties: - Read the value only - "write" - Write the value only + - "failok" + - If writing fails log errors only, don't fail the transfer - "read,write" - Read and Write the value. @@ -35749,6 +36146,8 @@ Properties: - Read the value only - "write" - Write the value only + - "failok" + - If writing fails log errors only, don't fail the transfer - "read,write" - Read and Write the value. @@ -35785,7 +36184,7 @@ Properties: #### --drive-description -Description of the remote +Description of the remote. Properties: @@ -35815,7 +36214,7 @@ Here are the possible system metadata items for the drive backend. | permissions | Permissions in a JSON dump of Google drive format. On shared drives these will only be present if they aren't inherited. Enable with --drive-metadata-permissions. | JSON | {} | N | | starred | Whether the user has starred the file. | boolean | false | N | | viewed-by-me | Whether the file has been viewed by this user. | boolean | true | **Y** | -| writers-can-share | Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. | boolean | false | N | +| writers-can-share | Whether users with only writer permission can modify the file's permissions. Not populated and ignored when setting for items in shared drives. | boolean | false | N | See the [metadata](https://rclone.org/docs/#metadata) docs for more info. @@ -36018,6 +36417,51 @@ Dump the import formats for debug purposes rclone backend importformats remote: [options] [+] +### query + +List files using Google Drive query language + + rclone backend query remote: [options] [+] + +This command lists files based on a query + +Usage: + + rclone backend query drive: query + +The query syntax is documented at [Google Drive Search query terms and +operators](https://developers.google.com/drive/api/guides/ref-search-terms). + +For example: + + rclone backend query drive: "'0ABc9DEFGHIJKLMNop0QRatUVW3X' in parents and name contains 'foo'" + +If the query contains literal ' or \ characters, these need to be escaped with +\ characters. "'" becomes "\'" and "\" becomes "\\\", for example to match a +file named "foo ' \.txt": + + rclone backend query drive: "name = 'foo \' \\\.txt'" + +The result is a JSON array of matches, for example: + + [ + { + "createdTime": "2017-06-29T19:58:28.537Z", + "id": "0AxBe_CDEF4zkGHI4d0FjYko2QkD", + "md5Checksum": "68518d16be0c6fbfab918be61d658032", + "mimeType": "text/plain", + "modifiedTime": "2024-02-02T10:40:02.874Z", + "name": "foo ' \\.txt", + "parents": [ + "0BxAe_BCDE4zkFGZpcWJGek0xbzC" + ], + "resourceKey": "0-ABCDEFGHIXJQpIGqBJq3MC", + "sha1Checksum": "8f284fa768bfb4e45d076a579ab3905ab6bfa893", + "size": "311", + "webViewLink": "https://drive.google.com/file/d/0AxBe_CDEF4zkGHI4d0FjYko2QkD/view?usp=drivesdk\u0026resourcekey=0-ABCDEFGHIXJQpIGqBJq3MC" + } + ] + ## Limitations @@ -36119,10 +36563,14 @@ to the next step; if not, click on "CONFIGURE CONSENT SCREEN" button and click on "CREATE"; on the next screen, enter an "Application name" ("rclone" is OK); enter "User Support Email" (your own email is OK); enter "Developer Contact Email" (your own email is OK); then click on -"Save" (all other data is optional). You will also have to add some scopes, -including `.../auth/docs` and `.../auth/drive` in order to be able to edit, -create and delete files with RClone. You may also want to include the -`../auth/drive.metadata.readonly` scope. After adding scopes, click +"Save" (all other data is optional). You will also have to add [some scopes](https://developers.google.com/drive/api/guides/api-specific-auth), +including + - `https://www.googleapis.com/auth/docs` + - `https://www.googleapis.com/auth/drive` in order to be able to edit, +create and delete files with RClone. + - `https://www.googleapis.com/auth/drive.metadata.readonly` which you may also want to add. + - If you want to add all at once, comma separated it would be `https://www.googleapis.com/auth/docs,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.metadata.readonly`. +6. After adding scopes, click "Save and continue" to add test users. Be sure to add your own account to the test users. Once you've added yourself as a test user and saved the changes, click again on "Credentials" on the left panel to go back to @@ -36132,21 +36580,21 @@ the "Credentials" screen. of "External" above, but this will restrict API use to Google Workspace users in your organisation). -6. Click on the "+ CREATE CREDENTIALS" button at the top of the screen, +7. Click on the "+ CREATE CREDENTIALS" button at the top of the screen, then select "OAuth client ID". -7. Choose an application type of "Desktop app" and click "Create". (the default name is fine) +8. Choose an application type of "Desktop app" and click "Create". (the default name is fine) -8. It will show you a client ID and client secret. Make a note of these. +9. It will show you a client ID and client secret. Make a note of these. (If you selected "External" at Step 5 continue to Step 9. If you chose "Internal" you don't need to publish and can skip straight to Step 10 but your destination drive must be part of the same Google Workspace.) -9. Go to "Oauth consent screen" and then click "PUBLISH APP" button and confirm. +10. Go to "Oauth consent screen" and then click "PUBLISH APP" button and confirm. You will also want to add yourself as a test user. -10. Provide the noted client ID and client secret to rclone. +11. Provide the noted client ID and client secret to rclone. Be aware that, due to the "enhanced security" recently introduced by Google, you are theoretically expected to "submit your app for verification" @@ -36628,7 +37076,7 @@ Properties: #### --gphotos-description -Description of the remote +Description of the remote. Properties: @@ -36954,7 +37402,7 @@ Properties: #### --hasher-description -Description of the remote +Description of the remote. Properties: @@ -37314,7 +37762,7 @@ Properties: #### --hdfs-description -Description of the remote +Description of the remote. Properties: @@ -37746,7 +38194,7 @@ Properties: #### --hidrive-description -Description of the remote +Description of the remote. Properties: @@ -37920,6 +38368,17 @@ Properties: - Type: string - Required: true +#### --http-no-escape + +Do not escape URL metacharacters in path names. + +Properties: + +- Config: no_escape +- Env Var: RCLONE_HTTP_NO_ESCAPE +- Type: bool +- Default: false + ### Advanced options Here are the Advanced options specific to http (HTTP). @@ -37992,7 +38451,7 @@ Properties: #### --http-description -Description of the remote +Description of the remote. Properties: @@ -38241,7 +38700,7 @@ Properties: #### --imagekit-description -Description of the remote +Description of the remote. Properties: @@ -38535,7 +38994,7 @@ Properties: #### --internetarchive-description -Description of the remote +Description of the remote. Properties: @@ -39020,7 +39479,7 @@ Properties: #### --jottacloud-description -Description of the remote +Description of the remote. Properties: @@ -39216,7 +39675,7 @@ Properties: #### --koofr-password -Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password). +Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password. **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). @@ -39273,7 +39732,7 @@ Properties: #### --koofr-description -Description of the remote +Description of the remote. Properties: @@ -39505,7 +39964,7 @@ Here are the Advanced options specific to linkbox (Linkbox). #### --linkbox-description -Description of the remote +Description of the remote. Properties: @@ -39931,7 +40390,7 @@ Properties: #### --mailru-description -Description of the remote +Description of the remote. Properties: @@ -40231,7 +40690,7 @@ Properties: #### --mega-description -Description of the remote +Description of the remote. Properties: @@ -40321,7 +40780,7 @@ Here are the Advanced options specific to memory (In memory object storage syste #### --memory-description -Description of the remote +Description of the remote. Properties: @@ -40572,7 +41031,7 @@ Properties: #### --netstorage-description -Description of the remote +Description of the remote. Properties: @@ -41466,7 +41925,7 @@ Properties: #### --azureblob-description -Description of the remote +Description of the remote. Properties: @@ -42203,7 +42662,7 @@ Properties: #### --azurefiles-description -Description of the remote +Description of the remote. Properties: @@ -42685,9 +43144,11 @@ Deprecated: use --server-side-across-configs instead. Allow server-side operations (e.g. copy) to work across different onedrive configs. -This will only work if you are copying between two OneDrive *Personal* drives AND -the files to copy are already shared between them. In other cases, rclone will -fall back to normal copy (which will be slightly slower). +This will work if you are copying between two OneDrive *Personal* drives AND the files to +copy are already shared between them. Additionally, it should also function for a user who +has access permissions both between Onedrive for *business* and *SharePoint* under the *same +tenant*, and between *SharePoint* and another *SharePoint* under the *same tenant*. In other +cases, rclone will fall back to normal copy (which will be slightly slower). Properties: @@ -42730,6 +43191,24 @@ Properties: - Type: bool - Default: false +#### --onedrive-hard-delete + +Permanently delete files on removal. + +Normally files will get sent to the recycle bin on deletion. Setting +this flag causes them to be permanently deleted. Use with care. + +OneDrive personal accounts do not support the permanentDelete API, +it only applies to OneDrive for Business and SharePoint document libraries. + + +Properties: + +- Config: hard_delete +- Env Var: RCLONE_ONEDRIVE_HARD_DELETE +- Type: bool +- Default: false + #### --onedrive-link-scope Set the scope of the links created by the link command. @@ -42794,7 +43273,7 @@ all onedrive types. If an SHA1 hash is desired then set this option accordingly. From July 2023 QuickXorHash will be the only available hash for -both OneDrive for Business and OneDriver Personal. +both OneDrive for Business and OneDrive Personal. This can be set to "none" to not use any hashes. @@ -42907,6 +43386,8 @@ Properties: - Write the value only - "read,write" - Read and Write the value. + - "failok" + - If writing fails log errors only, don't fail the transfer #### --onedrive-encoding @@ -42923,7 +43404,7 @@ Properties: #### --onedrive-description -Description of the remote +Description of the remote. Properties: @@ -42940,11 +43421,11 @@ differences between OneDrive Personal and Business (see table below for details). Permissions are also supported, if `--onedrive-metadata-permissions` is set. The -accepted values for `--onedrive-metadata-permissions` are `read`, `write`, -`read,write`, and `off` (the default). `write` supports adding new permissions, +accepted values for `--onedrive-metadata-permissions` are "`read`", "`write`", +"`read,write`", and "`off`" (the default). "`write`" supports adding new permissions, updating the "role" of existing permissions, and removing permissions. Updating and removing require the Permission ID to be known, so it is recommended to use -`read,write` instead of `write` if you wish to update/remove permissions. +"`read,write`" instead of "`write`" if you wish to update/remove permissions. Permissions are read/written in JSON format using the same schema as the [OneDrive API](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/permission?view=odsp-graph-online), @@ -43028,31 +43509,14 @@ an ObjectID can be provided in `User.ID`. At least one valid recipient must be provided in order to add a permission for a user. Creating a Public Link is also supported, if `Link.Scope` is set to `"anonymous"`. -Example request to add a "read" permission: +Example request to add a "read" permission with `--metadata-mapper`: ```json -[ - { - "id": "", - "grantedTo": { - "user": {}, - "application": {}, - "device": {} - }, - "grantedToIdentities": [ - { - "user": { - "id": "ryan@contoso.com" - }, - "application": {}, - "device": {} - } - ], - "roles": [ - "read" - ] - } -] +{ + "Metadata": { + "permissions": "[{\"grantedToIdentities\":[{\"user\":{\"id\":\"ryan@contoso.com\"}}],\"roles\":[\"read\"]}]" + } +} ``` Note that adding a permission can fail if a conflicting permission already @@ -43062,7 +43526,8 @@ To update an existing permission, include both the Permission ID and the new `roles` to be assigned. `roles` is the only property that can be changed. To remove permissions, pass in a blob containing only the permissions you wish -to keep (which can be empty, to remove all.) +to keep (which can be empty, to remove all.) Note that the `owner` role will be +ignored, as it cannot be removed. Note that both reading and writing permissions requires extra API calls, so if you don't need to read or write permissions it is recommended to omit @@ -43497,7 +43962,7 @@ Properties: #### --opendrive-description -Description of the remote +Description of the remote. Properties: @@ -44230,7 +44695,7 @@ Properties: #### --oos-description -Description of the remote +Description of the remote. Properties: @@ -44673,7 +45138,7 @@ Properties: #### --qingstor-description -Description of the remote +Description of the remote. Properties: @@ -44938,7 +45403,7 @@ Properties: #### --quatrix-description -Description of the remote +Description of the remote. Properties: @@ -45150,7 +45615,7 @@ Properties: #### --sia-description -Description of the remote +Description of the remote. Properties: @@ -45678,10 +46143,15 @@ Properties: #### --swift-chunk-size -Above this size files will be chunked into a _segments container. +Above this size files will be chunked. + +Above this size files will be chunked into a a `_segments` container +or a `.file-segments` directory. (See the `use_segments_container` option +for more info). Default for this is 5 GiB which is its maximum value, which +means only files above this size will be chunked. + +Rclone uploads chunked files as dynamic large objects (DLO). -Above this size files will be chunked into a _segments container. The -default for this is 5 GiB which is its maximum value. Properties: @@ -45694,14 +46164,16 @@ Properties: Don't chunk files during streaming upload. -When doing streaming uploads (e.g. using rcat or mount) setting this -flag will cause the swift backend to not upload chunked files. +When doing streaming uploads (e.g. using `rcat` or `mount` with +`--vfs-cache-mode off`) setting this flag will cause the swift backend +to not upload chunked files. -This will limit the maximum upload size to 5 GiB. However non chunked -files are easier to deal with and have an MD5SUM. +This will limit the maximum streamed upload size to 5 GiB. This is +useful because non chunked files are easier to deal with and have an +MD5SUM. -Rclone will still chunk files bigger than chunk_size when doing normal -copy operations. +Rclone will still chunk files bigger than `chunk_size` when doing +normal copy operations. Properties: @@ -45715,11 +46187,12 @@ Properties: Disable support for static and dynamic large objects Swift cannot transparently store files bigger than 5 GiB. There are -two schemes for doing that, static or dynamic large objects, and the -API does not allow rclone to determine whether a file is a static or -dynamic large object without doing a HEAD on the object. Since these -need to be treated differently, this means rclone has to issue HEAD -requests for objects for example when reading checksums. +two schemes for chunking large files, static large objects (SLO) or +dynamic large objects (DLO), and the API does not allow rclone to +determine whether a file is a static or dynamic large object without +doing a HEAD on the object. Since these need to be treated +differently, this means rclone has to issue HEAD requests for objects +for example when reading checksums. When `no_large_objects` is set, rclone will assume that there are no static or dynamic large objects stored. This means it can stop doing @@ -45730,7 +46203,7 @@ Setting this option implies `no_chunk` and also that no files will be uploaded in chunks, so files bigger than 5 GiB will just fail on upload. -If you set this option and there *are* static or dynamic large objects, +If you set this option and there **are** static or dynamic large objects, then this will give incorrect hashes for them. Downloads will succeed, but other operations such as Remove and Copy will fail. @@ -45742,6 +46215,40 @@ Properties: - Type: bool - Default: false +#### --swift-use-segments-container + +Choose destination for large object segments + +Swift cannot transparently store files bigger than 5 GiB and rclone +will chunk files larger than `chunk_size` (default 5 GiB) in order to +upload them. + +If this value is `true` the chunks will be stored in an additional +container named the same as the destination container but with +`_segments` appended. This means that there won't be any duplicated +data in the original container but having another container may not be +acceptable. + +If this value is `false` the chunks will be stored in a +`.file-segments` directory in the root of the container. This +directory will be omitted when listing the container. Some +providers (eg Blomp) require this mode as creating additional +containers isn't allowed. If it is desired to see the `.file-segments` +directory in the root then this flag must be set to `true`. + +If this value is `unset` (the default), then rclone will choose the value +to use. It will be `false` unless rclone detects any `auth_url`s that +it knows need it to be `true`. In this case you'll see a message in +the DEBUG log. + + +Properties: + +- Config: use_segments_container +- Env Var: RCLONE_SWIFT_USE_SEGMENTS_CONTAINER +- Type: Tristate +- Default: unset + #### --swift-encoding The encoding for the backend. @@ -45757,7 +46264,7 @@ Properties: #### --swift-description -Description of the remote +Description of the remote. Properties: @@ -46095,7 +46602,7 @@ Properties: #### --pcloud-description -Description of the remote +Description of the remote. Properties: @@ -46329,6 +46836,54 @@ Properties: - Type: SizeSuffix - Default: 10Mi +#### --pikpak-chunk-size + +Chunk size for multipart uploads. + +Large files will be uploaded in chunks of this size. + +Note that this is stored in memory and there may be up to +"--transfers" * "--pikpak-upload-concurrency" chunks stored at once +in memory. + +If you are transferring large files over high-speed links and you have +enough memory, then increasing this will speed up the transfers. + +Rclone will automatically increase the chunk size when uploading a +large file of known size to stay below the 10,000 chunks limit. + +Increasing the chunk size decreases the accuracy of the progress +statistics displayed with "-P" flag. + +Properties: + +- Config: chunk_size +- Env Var: RCLONE_PIKPAK_CHUNK_SIZE +- Type: SizeSuffix +- Default: 5Mi + +#### --pikpak-upload-concurrency + +Concurrency for multipart uploads. + +This is the number of chunks of the same file that are uploaded +concurrently for multipart uploads. + +Note that chunks are stored in memory and there may be up to +"--transfers" * "--pikpak-upload-concurrency" chunks stored at once +in memory. + +If you are uploading small numbers of large files over high-speed links +and these uploads do not fully utilize your bandwidth, then increasing +this may help to speed up the transfers. + +Properties: + +- Config: upload_concurrency +- Env Var: RCLONE_PIKPAK_UPLOAD_CONCURRENCY +- Type: int +- Default: 5 + #### --pikpak-encoding The encoding for the backend. @@ -46344,7 +46899,7 @@ Properties: #### --pikpak-description -Description of the remote +Description of the remote. Properties: @@ -46625,7 +47180,7 @@ Properties: #### --premiumizeme-description -Description of the remote +Description of the remote. Properties: @@ -46688,7 +47243,7 @@ Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / Proton Drive - \ "Proton Drive" + \ "protondrive" [snip] Storage> protondrive User name @@ -46975,7 +47530,7 @@ Properties: #### --protondrive-description -Description of the remote +Description of the remote. Properties: @@ -47208,7 +47763,7 @@ Properties: #### --putio-description -Description of the remote +Description of the remote. Properties: @@ -47269,7 +47824,7 @@ Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / Proton Drive - \ "Proton Drive" + \ "protondrive" [snip] Storage> protondrive User name @@ -47556,7 +48111,7 @@ Properties: #### --protondrive-description -Description of the remote +Description of the remote. Properties: @@ -47979,7 +48534,7 @@ Properties: #### --seafile-description -Description of the remote +Description of the remote. Properties: @@ -48265,6 +48820,8 @@ option before first run, the auto-detection will be skipped, and if you set a different value later this will override any existing. Value `none` can be set to avoid any attempts at executing shell commands, e.g. if this is not allowed on the server. +If you have `shell_type = none` in the configuration then +the [ssh](#sftp-ssh) must not be set. When the server is [rclone serve sftp](https://rclone.org/commands/rclone_serve_sftp/), the rclone SFTP remote will detect this as a Unix type shell - even @@ -48879,6 +49436,31 @@ Properties: - Type: int - Default: 64 +#### --sftp-connections + +Maximum number of SFTP simultaneous connections, 0 for unlimited. + +Note that setting this is very likely to cause deadlocks so it should +be used with care. + +If you are doing a sync or copy then make sure concurrency is one more +than the sum of `--transfers` and `--checkers`. + +If you use `--check-first` then it just needs to be one more than the +maximum of `--checkers` and `--transfers`. + +So for `concurrency 3` you'd use `--checkers 2 --transfers 2 +--check-first` or `--checkers 1 --transfers 1`. + + + +Properties: + +- Config: connections +- Env Var: RCLONE_SFTP_CONNECTIONS +- Type: int +- Default: 0 + #### --sftp-set-env Environment variables to pass to sftp and commands @@ -49030,7 +49612,7 @@ Properties: #### --sftp-description -Description of the remote +Description of the remote. Properties: @@ -49322,7 +49904,7 @@ Properties: #### --smb-description -Description of the remote +Description of the remote. Properties: @@ -49335,9 +49917,15 @@ Properties: # Storj -[Storj](https://storj.io) is an encrypted, secure, and -cost-effective object storage service that enables you to store, back up, and -archive large amounts of data in a decentralized manner. +[Storj](https://storj.io) is redefining the cloud to support the +future of data—sustainably and economically. Storj leverages the vast +global supply of underutilized resources to deliver better security, +durability, and performance services. Experience up to 90% lower costs +and carbon reduction with Storj. + +Storj is an encrypted, secure, and cost-effective object storage service +that enables you to store, back up, and archive large amounts of data +in a decentralized manner. ## Backend options @@ -49628,7 +50216,7 @@ Here are the Advanced options specific to storj (Storj Decentralized Cloud Stora #### --storj-description -Description of the remote +Description of the remote. Properties: @@ -50038,7 +50626,7 @@ Properties: #### --sugarsync-description -Description of the remote +Description of the remote. Properties: @@ -50063,6 +50651,273 @@ See [List of backends that do not support rclone about](https://rclone.org/overv The Tardigrade backend has been renamed to be the [Storj backend](https://rclone.org/storj/). Old configuration files will continue to work. +# Uloz.to + +Paths are specified as `remote:path` + +Paths may be as deep as required, e.g. `remote:directory/subdirectory`. + +The initial setup for Uloz.to involves filling in the user credentials. +`rclone config` walks you through it. + +## Configuration + +Here is an example of how to make a remote called `remote`. 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 +[snip] +XX / Uloz.to + \ "ulozto" +[snip] +Storage> ulozto + +Option app_token. +The application token identifying the app. An app API key can be either found in the API doc +https://uloz.to/upload-resumable-api-beta or obtained from customer service. +Enter a value. Press Enter to leave empty. +app_token> token_value + +Option username. +The username of the principal to operate as. +Enter a value. Press Enter to leave empty. +username> user + +Option password. +The password for the user. +Choose an alternative below. Press Enter for the default (n). +y) Yes, type in my own password +g) Generate random password +n) No, leave this optional password blank (default) +y/g/n> y +Enter the password: +password: +Confirm the password: +password: + +Edit advanced config? +y) Yes +n) No (default) +y/n> n + +Keep this "remote" remote? +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +``` + +Once configured you can then use `rclone` like this, + +List folders in root level folder: + + rclone lsd remote: + +List all the files in your root folder: + + rclone ls remote: + +To copy a local folder to a Uloz.to folder called backup: + + rclone copy /home/source remote:backup + +### User credentials + +The only reliable method is to authenticate the user using +username and password. Uloz.to offers an API key as well, but +it's reserved for the use of Uloz.to's in-house application +and using it in different circumstances is unreliable. + +### Modification times and hashes + +Uloz.to doesn't allow the user to set a custom modification time, +or retrieve the hashes after upload. As a result, the integration +uses a free form field the API provides to encode client-provided +timestamps and hashes. Timestamps are stored with microsecond +precision. + +A server calculated MD5 hash of the file is verified upon upload. +Afterwards, the backend only serves the client-side calculated +hashes. Hashes can also be retrieved upon creating a file download +link, but it's impractical for `list`-like use cases. + +### Restricted filename characters + +In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) +the following characters are also replaced: + +| Character | Value | Replacement | +| --------- |:-----:|:-----------:| +| \ | 0x5C | \ | + +Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), +as they can't be used in JSON strings. + +### Transfers + +All files are currently uploaded using a single HTTP request, so +for uploading large files a stable connection is necessary. Rclone will +upload up to `--transfers` chunks at the same time (shared among all +uploads). + +### Deleting files + +By default, files are moved to the recycle bin whereas folders +are deleted immediately. Trashed files are permanently deleted after +30 days in the recycle bin. + +Emptying the trash is currently not implemented in rclone. + +### Root folder ID + +You can set the `root_folder_slug` for rclone. This is the folder +(identified by its `Folder slug`) that rclone considers to be the root +of your Uloz.to drive. + +Normally you will leave this blank and rclone will determine the +correct root to use itself. However you can set this to restrict rclone +to a specific folder hierarchy. + +In order to do this you will have to find the `Folder slug` of the +folder you wish to use as root. This will be the last segment +of the URL when you open the relevant folder in the Uloz.to web +interface. + +For example, for exploring a folder with URL +`https://uloz.to/fm/my-files/foobar`, `foobar` should be used as the +root slug. + +`root_folder_slug` can be used alongside a specific path in the remote +path. For example, if your remote's `root_folder_slug` corresponds to `/foo/bar`, +`remote:baz/qux` will refer to `ABSOLUTE_ULOZTO_ROOT/foo/bar/baz/qux`. + + +### Standard options + +Here are the Standard options specific to ulozto (Uloz.to). + +#### --ulozto-app-token + +The application token identifying the app. An app API key can be either found in the API +doc https://uloz.to/upload-resumable-api-beta or obtained from customer service. + +Properties: + +- Config: app_token +- Env Var: RCLONE_ULOZTO_APP_TOKEN +- Type: string +- Required: false + +#### --ulozto-username + +The username of the principal to operate as. + +Properties: + +- Config: username +- Env Var: RCLONE_ULOZTO_USERNAME +- Type: string +- Required: false + +#### --ulozto-password + +The password for the user. + +**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). + +Properties: + +- Config: password +- Env Var: RCLONE_ULOZTO_PASSWORD +- Type: string +- Required: false + +### Advanced options + +Here are the Advanced options specific to ulozto (Uloz.to). + +#### --ulozto-root-folder-slug + +If set, rclone will use this folder as the root folder for all operations. For example, +if the slug identifies 'foo/bar/', 'ulozto:baz' is equivalent to 'ulozto:foo/bar/baz' without +any root slug set. + +Properties: + +- Config: root_folder_slug +- Env Var: RCLONE_ULOZTO_ROOT_FOLDER_SLUG +- Type: string +- Required: false + +#### --ulozto-list-page-size + +The size of a single page for list commands. 1-500 + +Properties: + +- Config: list_page_size +- Env Var: RCLONE_ULOZTO_LIST_PAGE_SIZE +- Type: int +- Default: 500 + +#### --ulozto-encoding + +The encoding for the backend. + +See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. + +Properties: + +- Config: encoding +- Env Var: RCLONE_ULOZTO_ENCODING +- Type: Encoding +- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot + +#### --ulozto-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_ULOZTO_DESCRIPTION +- Type: string +- Required: false + + + +## Limitations + +Uloz.to file names can't have the `\` character in. rclone maps this to +and from an identical looking unicode equivalent `\` (U+FF3C Fullwidth +Reverse Solidus). + +Uloz.to only supports filenames up to 255 characters in length. + +Uloz.to rate limits access to the API, but exact details are undisclosed. +Practical testing reveals that hitting the rate limit during normal use +is very rare, although not impossible with higher number of concurrently +uploaded files. + +`rclone about` is not supported by the Uloz.to backend. Although +there's an endpoint to retrieve the information for the UI, it's not +exposed in the API. Backends without this capability cannot determine +free space for an rclone mount or use policy `mfs` (most free space) +as a member of an rclone union remote. + +See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) + # Uptobox This is a Backend for Uptobox file storage service. Uptobox is closer to a one-click hoster than a traditional @@ -50207,7 +51062,7 @@ Properties: #### --uptobox-description -Description of the remote +Description of the remote. Properties: @@ -50510,7 +51365,7 @@ Properties: #### --union-description -Description of the remote +Description of the remote. Properties: @@ -50806,9 +51661,20 @@ Properties: - Type: bool - Default: false +#### --webdav-owncloud-exclude-mounts + +Exclude ownCloud mounted storages + +Properties: + +- Config: owncloud_exclude_mounts +- Env Var: RCLONE_WEBDAV_OWNCLOUD_EXCLUDE_MOUNTS +- Type: bool +- Default: false + #### --webdav-description -Description of the remote +Description of the remote. Properties: @@ -51220,7 +52086,7 @@ Properties: #### --yandex-description -Description of the remote +Description of the remote. Properties: @@ -51485,7 +52351,7 @@ Properties: #### --zoho-description -Description of the remote +Description of the remote. Properties: @@ -51741,7 +52607,7 @@ $ tree /tmp/a Copying the entire directory with '-l' ``` -$ rclone copyto -l /tmp/a/file1 remote:/tmp/a/ +$ rclone copy -l /tmp/a/ remote:/tmp/a/ ``` The remote files are created with a '.rclonelink' suffix @@ -51765,7 +52631,7 @@ $ rclone cat remote:/tmp/a/file2.rclonelink Copying them back with '-l' ``` -$ rclone copyto -l remote:/tmp/a/ /tmp/b/ +$ rclone copy -l remote:/tmp/a/ /tmp/b/ $ tree /tmp/b /tmp/b @@ -51784,6 +52650,16 @@ $ tree /tmp/b └── file2.rclonelink ```` +If you want to copy a single file with `-l` then you must use the `.rclonelink` suffix. + +``` +$ rclone copy -l remote:/tmp/a/file1.rclonelink /tmp/c + +$ tree /tmp/c +/tmp/c +└── file1 -> ./file4 +``` + Note that this flag is incompatible with `-copy-links` / `-L`. ### Restricting filesystems with --one-file-system @@ -52060,6 +52936,44 @@ Properties: - Type: bool - Default: false +#### --local-time-type + +Set what kind of time is returned. + +Normally rclone does all operations on the mtime or Modification time. + +If you set this flag then rclone will return the Modified time as whatever +you set here. So if you use "rclone lsl --local-time-type ctime" then +you will see ctimes in the listing. + +If the OS doesn't support returning the time_type specified then rclone +will silently replace it with the modification time which all OSes support. + +- mtime is supported by all OSes +- atime is supported on all OSes except: plan9, js +- btime is only supported on: Windows, macOS, freebsd, netbsd +- ctime is supported on all Oses except: Windows, plan9, js + +Note that setting the time will still set the modified time so this is +only useful for reading. + + +Properties: + +- Config: time_type +- Env Var: RCLONE_LOCAL_TIME_TYPE +- Type: mtime|atime|btime|ctime +- Default: mtime +- Examples: + - "mtime" + - The last modification time. + - "atime" + - The last access time. + - "btime" + - The creation time. + - "ctime" + - The last status change time. + #### --local-encoding The encoding for the backend. @@ -52075,7 +52989,7 @@ Properties: #### --local-description -Description of the remote +Description of the remote. Properties: @@ -52145,6 +53059,159 @@ Options: # Changelog +## v1.67.0 - 2024-06-14 + +[See commits](https://github.com/rclone/rclone/compare/v1.66.0...v1.67.0) + +* New backends + * [uloz.to](https://rclone.org/ulozto/) (iotmaestro) + * New S3 providers + * [Magalu Object Storage](https://rclone.org/s3/#magalu) (Bruno Fernandes) +* New commands + * [gitannex](https://rclone.org/commands/rclone_gitannex/): Enables git-annex to store and retrieve content from an rclone remote (Dan McArdle) +* New Features + * accounting: Add deleted files total size to status summary line (Kyle Reynolds) + * build + * Fix `CVE-2023-45288` by upgrading `golang.org/x/net` (Nick Craig-Wood) + * Fix `CVE-2024-35255` by upgrading `github.com/Azure/azure-sdk-for-go/sdk/azidentity` to 1.6.0 (dependabot) + * Convert source files with CRLF to LF (albertony) + * Update all dependencies (Nick Craig-Wood) + * doc updates (albertony, Alex Garel, Dave Nicolson, Dominik Joe Pantůček, Eric Wolf, Erisa A, Evan Harris, Evan McBeth, Gachoud Philippe, hidewrong, jakzoe, jumbi77, kapitainsky, Kyle Reynolds, Lewis Hook, Nick Craig-Wood, overallteach, pawsey-kbuckley, Pieter van Oostrum, psychopatt, racerole, static-moonlight, Warrentheo, yudrywet, yumeiyin ) + * ncdu: Do not quit on Esc to aid usability (Katia Esposito) + * rcserver: Set `ModTime` for dirs and files served by `--rc-serve` (Nikita Shoshin) +* Bug Fixes + * bisync: Add integration tests against all backends and fix many many problems (nielash) + * config: Fix default value for `description` (Nick Craig-Wood) + * copy: Fix `nil` pointer dereference when corrupted on transfer with `nil` dst (nielash) + * fs + * Improve JSON Unmarshalling for `Duration` types (Kyle Reynolds) + * Close the CPU profile on exit (guangwu) + * Replace `/bin/bash` with `/usr/bin/env bash` (Florian Klink) + * oauthutil: Clear client secret if client ID is set (Michael Terry) + * operations + * Rework `rcat` so that it doesn't call the `--metadata-mapper` twice (Nick Craig-Wood) + * Ensure `SrcFsType` is set correctly when using `--metadata-mapper` (Nick Craig-Wood) + * Fix "optional feature not implemented" error with a crypted sftp bug (Nick Craig-Wood) + * Fix very long file names when using copy with `--partial` (Nick Craig-Wood) + * Fix retries downloading too much data with certain backends (Nick Craig-Wood) + * Fix move when dst is nil and fdst is case-insensitive (nielash) + * Fix lsjson `--encrypted` when using `--crypt-XXX` parameters (Nick Craig-Wood) + * Fix missing metadata for multipart transfers to local disk (Nick Craig-Wood) + * Fix incorrect modtime on some multipart transfers (Nick Craig-Wood) + * Fix hashing problem in integration tests (Nick Craig-Wood) + * rc + * Fix stats groups being ignored in `operations/check` (Nick Craig-Wood) + * Fix incorrect `Content-Type` in HTTP API (Kyle Reynolds) + * serve s3 + * Fix `Last-Modified` header format (Butanediol) + * Fix in-memory metadata storing wrong modtime (nielash) + * Fix XML of error message (Nick Craig-Wood) + * serve webdav: Fix webdav with `--baseurl` under Windows (Nick Craig-Wood) + * serve dlna: Make `BrowseMetadata` more compliant (albertony) + * serve http: Added `Content-Length` header when HTML directory is served (Sunny) + * sync + * Don't sync directories if they haven't been modified (Nick Craig-Wood) + * Don't test reading metadata if we can't write it (Nick Craig-Wood) + * Fix case normalisation (problem on on s3) (Nick Craig-Wood) + * Fix management of empty directories to make it more accurate (Nick Craig-Wood) + * Fix creation of empty directories when `--create-empty-src-dirs=false` (Nick Craig-Wood) + * Fix directory modification times not being set (Nick Craig-Wood) + * Fix "failed to update directory timestamp or metadata: directory not found" (Nick Craig-Wood) + * Fix expecting SFTP to have MkdirMetadata method: optional feature not implemented (Nick Craig-Wood) + * test info: Improve cleanup of temp files (Kyle Reynolds) + * touch: Fix using `-R` on certain backends (Nick Craig-Wood) +* Mount + * Add `--direct-io` flag to force uncached access (Nick Craig-Wood) +* VFS + * Fix download loop when file size shrunk (Nick Craig-Wood) + * Fix renaming a directory (nielash) +* Local + * Add `--local-time-type` to use `mtime`/`atime`/`btime`/`ctime` as the time (Nick Craig-Wood) + * Allow `SeBackupPrivilege` and/or `SeRestorePrivilege` to work on Windows (Charles Hamilton) +* Azure Blob + * Fix encoding issue with dir path comparison (nielash) +* B2 + * Add new [cleanup](https://rclone.org/b2/#cleanup) and [cleanup-hidden](/b2/#cleanup-hidden) backend commands. (Pat Patterson) + * Update B2 URLs to new home (Nick Craig-Wood) +* Chunker + * Fix startup when root points to composite multi-chunk file without metadata (nielash) + * Fix case-insensitive comparison on local without metadata (nielash) + * Fix "finalizer already set" error (nielash) +* Drive + * Add [backend query](https://rclone.org/drive/#query) command for general purpose querying of files (John-Paul Smith) + * Stop sending notification emails when setting permissions (Nick Craig-Wood) + * Fix server side copy with metadata from my drive to shared drive (Nick Craig-Wood) + * Set all metadata permissions and return error summary instead of stopping on the first error (Nick Craig-Wood) + * Make errors setting permissions into no retry errors (Nick Craig-Wood) + * Fix description being overwritten on server side moves (Nick Craig-Wood) + * Allow setting metadata to fail if `failok` flag is set (Nick Craig-Wood) + * Fix panic when using `--metadata-mapper` on large google doc files (Nick Craig-Wood) +* Dropbox + * Add `--dropbox-root-namespace` to override the root namespace (Bill Fraser) +* Google Cloud Storage + * Fix encoding issue with dir path comparison (nielash) +* Hdfs + * Fix f.String() not including subpath (nielash) +* Http + * Add `--http-no-escape` to not escape URL metacharacters in path names (Kyle Reynolds) +* Jottacloud + * Set metadata on server side copy and move (albertony) +* Linkbox + * Fix working with names longer than 8-25 Unicode chars. (Vitaly) + * Fix list paging and optimized synchronization. (gvitali) +* Mailru + * Attempt to fix throttling by increasing min sleep to 100ms (Nick Craig-Wood) +* Memory + * Fix dst mutating src after server-side copy (nielash) + * Fix deadlock in operations.Purge (nielash) + * Fix incorrect list entries when rooted at subdirectory (nielash) +* Onedrive + * Add `--onedrive-hard-delete` to permanently delete files (Nick Craig-Wood) + * Make server-side copy work in more scenarios (YukiUnHappy) + * Fix "unauthenticated: Unauthenticated" errors when downloading (Nick Craig-Wood) + * Fix `--metadata-mapper` being called twice if writing permissions (nielash) + * Set all metadata permissions and return error summary instead of stopping on the first error (nielash) + * Make errors setting permissions into no retry errors (Nick Craig-Wood) + * Skip writing permissions with 'owner' role (nielash) + * Fix references to deprecated permissions properties (nielash) + * Add support for group permissions (nielash) + * Allow setting permissions to fail if `failok` flag is set (Nick Craig-Wood) +* Pikpak + * Make getFile() usage more efficient to avoid the download limit (wiserain) + * Improve upload reliability and resolve potential file conflicts (wiserain) + * Implement configurable chunk size for multipart upload (wiserain) +* Protondrive + * Don't auth with an empty access token (Michał Dzienisiewicz) +* Qingstor + * Disable integration tests as test account suspended (Nick Craig-Wood) +* Quatrix + * Fix f.String() not including subpath (nielash) +* S3 + * Add new AWS region `il-central-1` Tel Aviv (yoelvini) + * Update Scaleway's configuration options (Alexandre Lavigne) + * Ceph: fix quirks when creating buckets to fix trying to create an existing bucket (Thomas Schneider) + * Fix encoding issue with dir path comparison (nielash) + * Fix 405 error on HEAD for delete marker with versionId (nielash) + * Validate `--s3-copy-cutoff` size before copy (hoyho) +* SFTP + * Add `--sftp-connections` to limit the maximum number of connections (Tomasz Melcer) +* Storj + * Update `storj.io/uplink` to latest release (JT Olio) + * Update bio on request (Nick Craig-Wood) +* Swift + * Implement `--swift-use-segments-container` to allow >5G files on Blomp (Nick Craig-Wood) +* Union + * Fix deleting dirs when all remotes can't have empty dirs (Nick Craig-Wood) +* WebDAV + * Fix setting modification times erasing checksums on owncloud and nextcloud (nielash) + * owncloud: Add `--webdav-owncloud-exclude-mounts` which allows excluding mounted folders when listing remote resources (Thomas Müller) +* Zoho + * Fix throttling problem when uploading files (Nick Craig-Wood) + * Use cursor listing for improved performance (Nick Craig-Wood) + * Retry reading info after upload if size wasn't returned (Nick Craig-Wood) + * Remove simple file names complication which is no longer needed (Nick Craig-Wood) + * Sleep for 60 seconds if rate limit error received (Nick Craig-Wood) + ## v1.66.0 - 2024-03-10 [See commits](https://github.com/rclone/rclone/compare/v1.65.0...v1.66.0) @@ -57398,7 +58465,7 @@ support partially uploading an object. You can't take an existing object, and change some bytes in the middle of it. It would be possible to make a sync system which stored binary diffs -instead of whole objects like rclone does, but that would break the +like rsync does, instead of whole objects, but that would break the 1:1 mapping of files on your hard disk to objects in the remote cloud storage system. @@ -57992,7 +59059,7 @@ put them back in again.` >}} * Roman Kredentser * Kamil Trzciński * Zac Rubin - * Vincent Feltz + * Vincent Feltz * Heiko Bornholdt * Matteo Pietro Dazzi * jtagcat @@ -58432,6 +59499,45 @@ put them back in again.` >}} * Joe Cai * Anders Swanson * huajin tong <137764712+thirdkeyword@users.noreply.github.com> + * John-Paul Smith + * racerole <148756161+racerole@users.noreply.github.com> + * Gachoud Philippe + * YukiUnHappy + * Kyle Reynolds + * Lewis Hook + * hoyho + * Vitaly <9034218+gvitali@users.noreply.github.com> + * iotmaestro + * psychopatt <66741203+psychopatt@users.noreply.github.com> + * Alex Garel + * Warrentheo + * Alexandre Lavigne + * yoelvini <134453420+yoelvini@users.noreply.github.com> + * Erisa A + * Pieter van Oostrum + * jakzoe <155812065+jakzoe@users.noreply.github.com> + * guangwu + * static-moonlight <107991124+static-moonlight@users.noreply.github.com> + * yudrywet + * Butanediol + * Dave Nicolson + * Katia Esposito + * pawsey-kbuckley <36438302+pawsey-kbuckley@users.noreply.github.com> + * hidewrong <167099254+hidewrong@users.noreply.github.com> + * Michael Terry + * Sunny <25066078+LoSunny@users.noreply.github.com> + * overallteach + * JT Olio + * Evan McBeth <64177332+AtomicRobotMan0101@users.noreply.github.com> + * Dominik Joe Pantůček + * yumeiyin <155420652+yumeiyin@users.noreply.github.com> + * Bruno Fernandes <54373093+folkzb@users.noreply.github.com> + * Thomas Schneider + * Charles Hamilton <52973156+chamilton-ccn@users.noreply.github.com> + * Tomasz Melcer + * Michał Dzienisiewicz + * Florian Klink + * Bill Fraser # Contact the rclone project diff --git a/MANUAL.txt b/MANUAL.txt index 65aafc533..a401417af 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -1,6 +1,6 @@ rclone(1) User Manual Nick Craig-Wood -Mar 10, 2024 +Jun 14, 2024 Rclone syncs your files to cloud storage @@ -127,6 +127,7 @@ S3, that work out of the box.) - Liara Object Storage - Linkbox - Linode Object Storage +- Magalu - Mail.ru Cloud - Memset Memstore - Mega @@ -166,6 +167,7 @@ S3, that work out of the box.) - Synology - SugarSync - Tencent Cloud Object Storage (COS) +- Uloz.to - Uptobox - Wasabi - WebDAV @@ -269,7 +271,7 @@ developers so it may be out of date. Its current version is as below. [Homebrew package] -Installation with MacPorts (#macos-macports) +Installation with MacPorts On macOS, rclone can also be installed via MacPorts: @@ -869,6 +871,7 @@ See the following for detailed instructions for - Storj - SugarSync - Union +- Uloz.to - Uptobox - WebDAV - Yandex Disk @@ -881,7 +884,23 @@ Rclone syncs a directory tree from one storage system to another. Its syntax is like this - Syntax: [options] subcommand + rclone subcommand [options] + +A subcommand is a the rclone operation required, (e.g. sync, copy, ls). + +An option is a single letter flag (e.g. -v) or a group of single letter +flags (e.g. -Pv) or a long flag (e.g. --progress). No options are +required. Options can come after the subcommand or in between parameters +too or on the end, but only global options can be used before the +subcommand. Anything after a -- option will not be interpreted as an +option so if you need to add a parameter which starts with a - then put +a -- on its own first, eg + + rclone lsf -- -directory-starting-with-dash + +A parameter is usually a file path or rclone remote, eg /path/to/file or +remote:path/to/file but it can be other things - the subcommand help +will tell you what. Source and destination paths are specified by the name you gave the storage system in the config file then the sub path, e.g. @@ -2963,20 +2982,32 @@ Synopsis Generates a bash shell autocompletion script for rclone. -This writes to /etc/bash_completion.d/rclone by default so will probably -need to be run with sudo or as root, e.g. +By default, when run without any arguments, - sudo rclone genautocomplete bash + rclone genautocomplete bash -Logout and login again to use the autocompletion scripts, or source them -directly +the generated script will be written to - . /etc/bash_completion + /etc/bash_completion.d/rclone -If you supply a command line argument the script will be written there. +and so rclone will probably need to be run as root, or with sudo. + +If you supply a path to a file as the command line argument, then the +generated script will be written to that file, in which case you should +not need root privileges. If output_file is "-", then the output will be written to stdout. +If you have installed the script into the default location, you can +logout and login again to use the autocompletion script. + +Alternatively, you can source the script directly + + . /path/to/my_bash_completion_scripts/rclone + +and the autocompletion functionality will be added to your current +shell. + rclone completion bash [output_file] [flags] Options @@ -4117,6 +4148,79 @@ SEE ALSO - rclone - Show help for rclone commands, flags and backends. +rclone gitannex + +Speaks with git-annex over stdin/stdout. + +Synopsis + +Rclone's gitannex subcommand enables git-annex to store and retrieve +content from an rclone remote. It is meant to be run by git-annex, not +directly by users. + +Installation on Linux + +1. Skip this step if your version of git-annex is 10.20240430 or newer. + Otherwise, you must create a symlink somewhere on your PATH with a + particular name. This symlink helps git-annex tell rclone it wants + to run the "gitannex" subcommand. + + # Create the helper symlink in "$HOME/bin". + ln -s "$(realpath rclone)" "$HOME/bin/git-annex-remote-rclone-builtin" + + # Verify the new symlink is on your PATH. + which git-annex-remote-rclone-builtin + +2. Add a new remote to your git-annex repo. This new remote will + connect git-annex with the rclone gitannex subcommand. + + Start by asking git-annex to describe the remote's available + configuration parameters. + + # If you skipped step 1: + git annex initremote MyRemote type=rclone --whatelse + + # If you created a symlink in step 1: + git annex initremote MyRemote type=external externaltype=rclone-builtin --whatelse + + NOTE: If you're porting an existing git-annex-remote-rclone remote + to use rclone gitannex, you can probably reuse the configuration + parameters verbatim without renaming them. Check parameter + synonyms with --whatelse as shown above. + + The following example creates a new git-annex remote named + "MyRemote" that will use the rclone remote named "SomeRcloneRemote". + That rclone remote must be one configured in your rclone.conf file, + which can be located with rclone config file. + + git annex initremote MyRemote \ + type=external \ + externaltype=rclone-builtin \ + encryption=none \ + rcloneremotename=SomeRcloneRemote \ + rcloneprefix=git-annex-content \ + rclonelayout=nodir + +3. Before you trust this command with your precious data, be sure to + test the remote. This command is very new and has not been tested on + many rclone backends. Caveat emptor! + + git annex testremote MyRemote + +Happy annexing! + + rclone gitannex [flags] + +Options + + -h, --help help for gitannex + +See the global flags page for global options not listed here. + +SEE ALSO + +- rclone - Show help for rclone commands, flags and backends. + rclone hashsum Produces a hashsum file for all the objects in the path. @@ -4496,7 +4600,7 @@ The output is an array of Items, where each Item looks like this "Tier" : "hot", } -If --hash is not specified the Hashes property won't be emitted. The +If --hash is not specified, the Hashes property will be omitted. The types of hash can be specified with the --hash-type parameter (which may be repeated). If --hash-type is set then it implies --hash. @@ -4508,7 +4612,7 @@ If --no-mimetype is specified then MimeType will be blank. This can speed things up on remotes where reading the MimeType takes an extra request (e.g. s3, swift). -If --encrypted is not specified the Encrypted won't be emitted. +If --encrypted is not specified the Encrypted will be omitted. If --dirs-only is not specified files in addition to directories are returned @@ -4631,7 +4735,7 @@ Mount the remote as file system on a mountpoint. Synopsis -rclone mount allows Linux, FreeBSD, macOS and Windows to mount any of +Rclone mount allows Linux, FreeBSD, macOS and Windows to mount any of Rclone's cloud storage systems as a file system with FUSE. First set up your remote using rclone config. Check it works with @@ -5093,8 +5197,9 @@ Mount option syntax includes a few extra options treated specially: pgrep. - vv... will be transformed into appropriate --verbose=N - standard mount options like x-systemd.automount, _netdev, nosuid and - alike are intended only for Automountd and ignored by rclone. ## - VFS - Virtual File System + alike are intended only for Automountd and ignored by rclone. + +VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing @@ -5464,6 +5569,7 @@ Options --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) @@ -5698,7 +5804,8 @@ toggle the help on and off. The supported keys are: ^L refresh screen (fix screen corruption) r recalculate file sizes ? to toggle help on and off - q/ESC/^c to quit + ESC to close the menu box + q/^c to quit Listed files/directories may be prefixed by a one-character flag, some of them combined with a description in brackets at end of line. These @@ -5777,7 +5884,7 @@ Mount the remote as file system on a mountpoint. Synopsis -rclone nfsmount allows Linux, FreeBSD, macOS and Windows to mount any of +Rclone nfsmount allows Linux, FreeBSD, macOS and Windows to mount any of Rclone's cloud storage systems as a file system with FUSE. First set up your remote using rclone config. Check it works with @@ -6239,8 +6346,9 @@ Mount option syntax includes a few extra options treated specially: pgrep. - vv... will be transformed into appropriate --verbose=N - standard mount options like x-systemd.automount, _netdev, nosuid and - alike are intended only for Automountd and ignored by rclone. ## - VFS - Virtual File System + alike are intended only for Automountd and ignored by rclone. + +VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing @@ -6611,6 +6719,7 @@ Options --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) @@ -7048,6 +7157,7 @@ Flags to control the Remote Control API. --rc-realm string Realm for authentication --rc-salt string Password hashing salt (default "dlPL2MqE") --rc-serve Enable the serving of remote objects + --rc-serve-no-modtime Don't read the modification time (can speed things up) --rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s) --rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s) --rc-template string User-specified template @@ -7242,7 +7352,9 @@ Use --name to choose the friendly server name, which is by default "rclone (hostname)". Use --log-trace in conjunction with -vv to enable additional debug -logging of all UPNP traffic. ## VFS - Virtual File System +logging of all UPNP traffic. + +VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing @@ -7710,7 +7822,8 @@ directory with book-keeping records of created and mounted volumes. All mount and VFS options are submitted by the docker daemon via API, but you can also provide defaults on the command line as well as set path to the config file and cache directory or adjust logging verbosity. -## VFS - Virtual File System + +VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing @@ -8081,6 +8194,7 @@ Options --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --forget-state Skip restoring previous state --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) @@ -8180,7 +8294,9 @@ Authentication By default this will serve files without needing a login. You can set a single username and password with the --user and --pass -flags. ## VFS - Virtual File System +flags. + +VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing @@ -8842,8 +8958,9 @@ The password file can be updated while rclone is running. Use --realm to set the authentication realm. -Use --salt to change the password hashing salt from the default. ## VFS -- Virtual File System +Use --salt to change the password hashing salt from the default. + +VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing @@ -10048,8 +10165,24 @@ this: rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY remote:path -This will be compatible with an rclone remote which is defined like -this: +For example, to use a simple folder in the filesystem, run the server +with a command like this: + + rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY local:/path/to/folder + +The rclone.conf for the server could look like this: + + [local] + type = local + +The local configuration is optional though. If you run the server with a +remote:path like /path/to/folder (without the local: prefix and without +an rclone.conf file), rclone will fall back to a default configuration, +which will be visible as a warning in the logs. But it will run +nonetheless. + +This will be compatible with an rclone (client) remote configuration +which is defined like this: [serves3] type = s3 @@ -10166,7 +10299,8 @@ authority certificate. --min-tls-version is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). -## VFS - Virtual File System + +VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing @@ -11350,8 +11484,9 @@ The password file can be updated while rclone is running. Use --realm to set the authentication realm. -Use --salt to change the password hashing salt from the default. ## VFS -- Virtual File System +Use --salt to change the password hashing salt from the default. + +VFS - Virtual File System This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing @@ -12004,6 +12139,7 @@ Options --check-normalization Check UTF-8 Normalization --check-streaming Check uploads with indeterminate file size -h, --help help for info + --keep-test-files Keep test files after execution --upload-wait Duration Wait after writing a file (default 0s) --write-json string Write results to file @@ -14033,6 +14169,10 @@ with the --stats flag. This can be used with the --stats-one-line flag for a simpler display. +To change the display length of filenames (for different terminal +widths), see the --stats-file-name-length option. The default output is +formatted for 80 character wide terminals. + Note: On Windows until this bug is fixed all non-ASCII characters will be replaced with . when --progress is in use. @@ -14858,7 +14998,8 @@ List of exit codes - 7 - Fatal error (one that more retries won't fix, like account suspended) (Fatal errors) - 8 - Transfer exceeded - limit set by --max-transfer reached -- 9 - Operation successful, but no files transferred +- 9 - Operation successful, but no files transferred (Requires + --error-on-no-transfer) - 10 - Duration exceeded - limit set by --max-duration reached Environment Variables @@ -15449,7 +15590,7 @@ processed in. E.g. rclone ls remote: --exclude *.bak excludes all .bak files from listing. -E.g. rclone size remote: "--exclude /dir/**" returns the total size of +E.g. rclone size remote: --exclude "/dir/**" returns the total size of all files on remote: excluding those in root directory dir and sub directories. @@ -16068,6 +16209,13 @@ syntax http://127.0.0.1:5572/[remote:path]/path/to/object Default Off. +--rc-serve-no-modtime + +Set this flag to skip reading the modification time (can speed things +up). + +Default Off. + --rc-files /path/to/directory Path to local files to serve on the HTTP server. @@ -18236,6 +18384,7 @@ Here is an overview of the major features of each cloud storage system. SMB - R/W Yes No - - SugarSync - - No No - - Storj - R No No - - + Uloz.to MD5, SHA256 ¹³ - No Yes - - Uptobox - - No Yes - - WebDAV MD5, SHA1 ³ R ⁴ Depends No - - Yandex Disk MD5 R/W No No R - @@ -18277,6 +18426,9 @@ value for full modtime support. ¹² HiDrive supports its own custom hash. It combines SHA1 sums for each 4 KiB block hierarchically to a single top-level sum. +¹³ Uloz.to provides server-calculated MD5 hash upon file upload. MD5 and +SHA256 hashes are client-calculated and stored as metadata fields. + Hash The cloud storage system supports various hash types of the objects. The @@ -18808,6 +18960,8 @@ upon backend-specific capabilities. Storj Yes ² Yes Yes No No Yes Yes No Yes No No + Uloz.to No No Yes Yes No No No No No No Yes + Uptobox No Yes Yes Yes No No No No No No No WebDAV Yes Yes Yes Yes No No Yes ³ No No Yes Yes @@ -19012,7 +19166,7 @@ General networking and HTTP stuff. --tpslimit float Limit HTTP transactions per second to this --tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --use-cookies Enable session cookiejar - --user-agent string Set the user-agent to a specified string (default "rclone/v1.66.0") + --user-agent string Set the user-agent to a specified string (default "rclone/v1.67.0") Performance @@ -19155,6 +19309,7 @@ Flags to control the Remote Control API. --rc-realm string Realm for authentication --rc-salt string Password hashing salt (default "dlPL2MqE") --rc-serve Enable the serving of remote objects + --rc-serve-no-modtime Don't read the modification time (can speed things up) --rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s) --rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s) --rc-template string User-specified template @@ -19370,6 +19525,7 @@ Backend only flags. These can be set in the config file also. --dropbox-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot) --dropbox-impersonate string Impersonate this user when using a business account --dropbox-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) + --dropbox-root-namespace string Specify a different Dropbox namespace ID to use as the root for all paths --dropbox-shared-files Instructs rclone to work on individual shared files --dropbox-shared-folders Instructs rclone to work on shared folders --dropbox-token string OAuth Access Token as a JSON blob @@ -19475,6 +19631,7 @@ Backend only flags. These can be set in the config file also. --hidrive-upload-cutoff SizeSuffix Cutoff/Threshold for chunked uploads (default 96Mi) --http-description string Description of the remote --http-headers CommaSepList Set HTTP headers for all transactions + --http-no-escape Do not escape URL metacharacters in path names --http-no-head Don't use HEAD requests --http-no-slash Set this if the site doesn't end directories with / --http-url string URL of HTTP host to connect to @@ -19510,7 +19667,7 @@ Backend only flags. These can be set in the config file also. --koofr-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) --koofr-endpoint string The Koofr API endpoint to use --koofr-mountid string Mount ID of the mount to use - --koofr-password string Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password) (obscured) + --koofr-password string Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password (obscured) --koofr-provider string Choose your storage provider --koofr-setmtime Does the backend support setting modification time (default true) --koofr-user string Your user name @@ -19526,6 +19683,7 @@ Backend only flags. These can be set in the config file also. --local-no-set-modtime Disable setting modtime --local-no-sparse Disable sparse files for multi-thread downloads --local-nounc Disable UNC (long path names) conversion on Windows + --local-time-type mtime|atime|btime|ctime Set what kind of time is returned (default mtime) --local-unicode-normalization Apply unicode NFC normalization to paths and filenames --local-zero-size-links Assume the Stat size of links is zero (and read them instead) (deprecated) --mailru-auth-url string Auth server URL @@ -19568,6 +19726,7 @@ Backend only flags. These can be set in the config file also. --onedrive-drive-type string The type of the drive (personal | business | documentLibrary) --onedrive-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot) --onedrive-expose-onenote-files Set to make OneNote files show up in directory listings + --onedrive-hard-delete Permanently delete files on removal --onedrive-hash-type string Specify the hash in use for the backend (default "auto") --onedrive-link-password string Set the password for links created by the link command --onedrive-link-scope string Set the scope of the links created by the link command (default "anonymous") @@ -19622,6 +19781,7 @@ Backend only flags. These can be set in the config file also. --pcloud-token-url string Token server url --pcloud-username string Your pcloud username --pikpak-auth-url string Auth server URL + --pikpak-chunk-size SizeSuffix Chunk size for multipart uploads (default 5Mi) --pikpak-client-id string OAuth Client Id --pikpak-client-secret string OAuth Client Secret --pikpak-description string Description of the remote @@ -19632,6 +19792,7 @@ Backend only flags. These can be set in the config file also. --pikpak-token string OAuth Access Token as a JSON blob --pikpak-token-url string Token server url --pikpak-trashed-only Only show files that are in the trash + --pikpak-upload-concurrency int Concurrency for multipart uploads (default 5) --pikpak-use-trash Send files to the trash instead of deleting permanently (default true) --pikpak-user string Pikpak username --premiumizeme-auth-url string Auth server URL @@ -19745,6 +19906,7 @@ Backend only flags. These can be set in the config file also. --sftp-chunk-size SizeSuffix Upload and download chunk size (default 32Ki) --sftp-ciphers SpaceSepList Space separated list of ciphers to be used for session encryption, ordered by preference --sftp-concurrency int The maximum number of outstanding requests for one file (default 64) + --sftp-connections int Maximum number of SFTP simultaneous connections, 0 for unlimited --sftp-copy-is-hardlink Set to enable server side copies using hardlinks --sftp-description string Description of the remote --sftp-disable-concurrent-reads If set don't use concurrent reads @@ -19829,7 +19991,7 @@ Backend only flags. These can be set in the config file also. --swift-auth string Authentication URL for server (OS_AUTH_URL) --swift-auth-token string Auth Token from alternate authentication - optional (OS_AUTH_TOKEN) --swift-auth-version int AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION) - --swift-chunk-size SizeSuffix Above this size files will be chunked into a _segments container (default 5Gi) + --swift-chunk-size SizeSuffix Above this size files will be chunked (default 5Gi) --swift-description string Description of the remote --swift-domain string User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) --swift-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8) @@ -19845,8 +20007,16 @@ Backend only flags. These can be set in the config file also. --swift-tenant string Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME) --swift-tenant-domain string Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME) --swift-tenant-id string Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID) + --swift-use-segments-container Tristate Choose destination for large object segments (default unset) --swift-user string User name to log in (OS_USERNAME) --swift-user-id string User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID) + --ulozto-app-token string The application token identifying the app. An app API key can be either found in the API + --ulozto-description string Description of the remote + --ulozto-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) + --ulozto-list-page-size int The size of a single page for list commands. 1-500 (default 500) + --ulozto-password string The password for the user (obscured) + --ulozto-root-folder-slug string If set, rclone will use this folder as the root folder for all operations. For example, + --ulozto-username string The username of the principal to operate as --union-action-policy string Policy to choose upstream on ACTION category (default "epall") --union-cache-time int Cache time of usage and free space (in seconds) (default 120) --union-create-policy string Policy to choose upstream on CREATE category (default "epmfs") @@ -19864,6 +20034,7 @@ Backend only flags. These can be set in the config file also. --webdav-encoding string The encoding for the backend --webdav-headers CommaSepList Set HTTP headers for all transactions --webdav-nextcloud-chunk-size SizeSuffix Nextcloud upload chunk size (default 10Mi) + --webdav-owncloud-exclude-mounts Exclude ownCloud mounted storages --webdav-owncloud-exclude-shares Exclude ownCloud shares --webdav-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) --webdav-pass string Password (obscured) @@ -22635,7 +22806,7 @@ Properties: --fichier-description -Description of the remote +Description of the remote. Properties: @@ -22766,7 +22937,7 @@ remote). --alias-description -Description of the remote +Description of the remote. Properties: @@ -22795,6 +22966,7 @@ The S3 backend can be used with a number of different providers: - Leviia Object Storage - Liara Object Storage - Linode Object Storage +- Magalu Object Storage - Minio - Petabox - Qiniu Cloud Object Storage (Kodo) @@ -23438,9 +23610,9 @@ Standard options Here are the Standard options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, -IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, -RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, -TencentCOS, Wasabi, Qiniu and others). +IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, +Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, +Synology, TencentCOS, Wasabi, Qiniu and others). --s3-provider @@ -23487,6 +23659,8 @@ Properties: - Liara Object Storage - "Linode" - Linode Object Storage + - "Magalu" + - Magalu Object Storage - "Minio" - Minio Object Storage - "Netease" @@ -23631,6 +23805,9 @@ Properties: - "sa-east-1" - South America (Sao Paulo) Region. - Needs location constraint sa-east-1. + - "il-central-1" + - Israel (Tel Aviv) Region. + - Needs location constraint il-central-1. - "me-south-1" - Middle East (Bahrain) Region. - Needs location constraint me-south-1. @@ -23716,6 +23893,8 @@ Properties: - Asia Pacific (Hong Kong) Region - "sa-east-1" - South America (Sao Paulo) Region + - "il-central-1" + - Israel (Tel Aviv) Region - "me-south-1" - Middle East (Bahrain) Region - "af-south-1" @@ -23874,9 +24053,9 @@ Advanced options Here are the Advanced options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, -IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, -RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, -TencentCOS, Wasabi, Qiniu and others). +IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, +Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, +Synology, TencentCOS, Wasabi, Qiniu and others). --s3-bucket-acl @@ -24681,7 +24860,7 @@ Properties: --s3-description -Description of the remote +Description of the remote. Properties: @@ -25078,7 +25257,7 @@ of a bucket publicly. Type of storage to configure. Choose a number from below, or type in your own value. ... - XX / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi + XX / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Lyve Cloud, Minio, Magalu, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi \ (s3) ... Storage> s3 @@ -25147,6 +25326,9 @@ This will leave your config looking something like: Now run rclone lsf r2: to see your buckets and rclone lsf r2:bucket to look within a bucket. +For R2 tokens with the "Object Read & Write" permission, you may also +need to add no_check_bucket = true for object uploads to work correctly. + Dreamhost Dreamhost DreamObjects is an object storage system based on CEPH. @@ -26111,10 +26293,11 @@ rclone like this: access_key_id = SCWXXXXXXXXXXXXXX secret_access_key = 1111111-2222-3333-44444-55555555555555 region = nl-ams - location_constraint = + location_constraint = nl-ams acl = private - server_side_encryption = - storage_class = + upload_cutoff = 5M + chunk_size = 5M + copy_cutoff = 5M C14 Cold Storage is the low-cost S3 Glacier alternative from Scaleway and it works the same way as on S3 by accepting the "GLACIER" @@ -27089,6 +27272,119 @@ This will leave the config file looking like this. secret_access_key = SECRET_ACCESS_KEY endpoint = eu-central-1.linodeobjects.com +Magalu + +Here is an example of making a Magalu Object Storage configuration. +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 + + Enter name for new remote. + name> magalu + + Option Storage. + Type of storage to configure. + Choose a number from below, or type in your own value. + [snip] + XX / Amazon S3 Compliant Storage Providers including AWS, ...Magalu, ...and others + \ (s3) + [snip] + Storage> s3 + + Option provider. + Choose your S3 provider. + Choose a number from below, or type in your own value. + Press Enter to leave empty. + [snip] + XX / Magalu Object Storage + \ (Magalu) + [snip] + provider> Magalu + + Option env_auth. + Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). + Only applies if access_key_id and secret_access_key is blank. + Choose a number from below, or type in your own boolean value (true or false). + Press Enter for the default (false). + 1 / Enter AWS credentials in the next step. + \ (false) + 2 / Get AWS credentials from the environment (env vars or IAM). + \ (true) + env_auth> 1 + + Option access_key_id. + AWS Access Key ID. + Leave blank for anonymous access or runtime credentials. + Enter a value. Press Enter to leave empty. + access_key_id> ACCESS_KEY + + Option secret_access_key. + AWS Secret Access Key (password). + Leave blank for anonymous access or runtime credentials. + Enter a value. Press Enter to leave empty. + secret_access_key> SECRET_ACCESS_KEY + + Option endpoint. + Endpoint for Magalu Object Storage API. + Choose a number from below, or type in your own value. + Press Enter to leave empty. + 1 / São Paulo, SP (BR), br-se1 + \ (br-se1.magaluobjects.com) + 2 / Fortaleza, CE (BR), br-ne1 + \ (br-ne1.magaluobjects.com) + endpoint> 2 + + Option acl. + Canned ACL used when creating buckets and storing or copying objects. + This ACL is used for creating objects and if bucket_acl isn't set, for creating buckets too. + For more info visit https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl + Note that this ACL is applied when server-side copying objects as S3 + doesn't copy the ACL from the source but rather writes a fresh one. + If the acl is an empty string then no X-Amz-Acl: header is added and + the default (private) will be used. + Choose a number from below, or type in your own value. + Press Enter to leave empty. + / Owner gets FULL_CONTROL. + 1 | No one else has access rights (default). + \ (private) + [snip] + acl> + + Edit advanced config? + y) Yes + n) No (default) + y/n> n + + Configuration complete. + Options: + - type: s3 + - provider: magalu + - access_key_id: ACCESS_KEY + - secret_access_key: SECRET_ACCESS_KEY + - endpoint: br-ne1.magaluobjects.com + Keep this "magalu" remote? + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y + +This will leave the config file looking like this. + + [magalu] + type = s3 + provider = Magalu + access_key_id = ACCESS_KEY + secret_access_key = SECRET_ACCESS_KEY + endpoint = br-ne1.magaluobjects.com + ArvanCloud ArvanCloud ArvanCloud Object Storage goes beyond the limited traditional @@ -27710,4122 +28006,4614 @@ This will guide you through an interactive setup process. y/e/d> y - # Backblaze B2 - - B2 is [Backblaze's cloud storage system](https://www.backblaze.com/b2/). - - Paths are specified as `remote:bucket` (or `remote:` for the `lsd` - command.) You may put subdirectories in too, e.g. `remote:bucket/path/to/dir`. - - ## Configuration - - Here is an example of making a b2 configuration. First run - - rclone config - - This will guide you through an interactive setup process. To authenticate - you will either need your Account ID (a short hex number) and Master - Application Key (a long hex number) OR an Application Key, which is the - recommended method. See below for further details on generating and using - an Application Key. - -No remotes found, make a new one? n) New remote q) Quit config n/q> n -name> remote Type of storage to configure. Choose a number from below, -or type in your own value [snip] XX / Backblaze B2  "b2" [snip] Storage> -b2 Account ID or Application Key ID account> 123456789abc Application -Key key> 0123456789abcdef0123456789abcdef0123456789 Endpoint for the -service - leave blank normally. endpoint> Remote config --------------------- [remote] account = 123456789abc key = -0123456789abcdef0123456789abcdef0123456789 endpoint = --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y - - - This remote is called `remote` and can now be used like this - - See all buckets - - rclone lsd remote: - - Create a new bucket - - rclone mkdir remote:bucket - - List the contents of a bucket - - rclone ls remote:bucket - - Sync `/home/local/directory` to the remote bucket, deleting any - excess files in the bucket. - - rclone sync --interactive /home/local/directory remote:bucket - - ### Application Keys - - B2 supports multiple [Application Keys for different access permission - to B2 Buckets](https://www.backblaze.com/b2/docs/application_keys.html). - - You can use these with rclone too; you will need to use rclone version 1.43 - or later. - - Follow Backblaze's docs to create an Application Key with the required - permission and add the `applicationKeyId` as the `account` and the - `Application Key` itself as the `key`. - - Note that you must put the _applicationKeyId_ as the `account` – you - can't use the master Account ID. If you try then B2 will return 401 - errors. - - ### --fast-list - - This remote supports `--fast-list` which allows you to use fewer - transactions in exchange for more memory. See the [rclone - docs](https://rclone.org/docs/#fast-list) for more details. - - ### Modification times - - The modification time is stored as metadata on the object as - `X-Bz-Info-src_last_modified_millis` as milliseconds since 1970-01-01 - in the Backblaze standard. Other tools should be able to use this as - a modified time. - - Modified times are used in syncing and are fully supported. Note that - if a modification time needs to be updated on an object then it will - create a new version of the object. - - ### Restricted filename characters - - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | \ | 0x5C | \ | - - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. - - Note that in 2020-05 Backblaze started allowing \ characters in file - names. Rclone hasn't changed its encoding as this could cause syncs to - re-transfer files. If you want rclone not to replace \ then see the - `--b2-encoding` flag below and remove the `BackSlash` from the - string. This can be set in the config. - - ### SHA1 checksums - - The SHA1 checksums of the files are checked on upload and download and - will be used in the syncing process. - - Large files (bigger than the limit in `--b2-upload-cutoff`) which are - uploaded in chunks will store their SHA1 on the object as - `X-Bz-Info-large_file_sha1` as recommended by Backblaze. - - For a large file to be uploaded with an SHA1 checksum, the source - needs to support SHA1 checksums. The local disk supports SHA1 - checksums so large file transfers from local disk will have an SHA1. - See [the overview](https://rclone.org/overview/#features) for exactly which remotes - support SHA1. - - Sources which don't support SHA1, in particular `crypt` will upload - large files without SHA1 checksums. This may be fixed in the future - (see [#1767](https://github.com/rclone/rclone/issues/1767)). - - Files sizes below `--b2-upload-cutoff` will always have an SHA1 - regardless of the source. - - ### Transfers - - Backblaze recommends that you do lots of transfers simultaneously for - maximum speed. In tests from my SSD equipped laptop the optimum - setting is about `--transfers 32` though higher numbers may be used - for a slight speed improvement. The optimum number for you may vary - depending on your hardware, how big the files are, how much you want - to load your computer, etc. The default of `--transfers 4` is - definitely too low for Backblaze B2 though. - - Note that uploading big files (bigger than 200 MiB by default) will use - a 96 MiB RAM buffer by default. There can be at most `--transfers` of - these in use at any moment, so this sets the upper limit on the memory - used. - - ### Versions - - When rclone uploads a new version of a file it creates a [new version - of it](https://www.backblaze.com/b2/docs/file_versions.html). - Likewise when you delete a file, the old version will be marked hidden - and still be available. Conversely, you may opt in to a "hard delete" - of files with the `--b2-hard-delete` flag which would permanently remove - the file instead of hiding it. - - Old versions of files, where available, are visible using the - `--b2-versions` flag. - - It is also possible to view a bucket as it was at a certain point in time, - using the `--b2-version-at` flag. This will show the file versions as they - were at that time, showing files that have been deleted afterwards, and - hiding files that were created since. - - If you wish to remove all the old versions then you can use the - `rclone cleanup remote:bucket` command which will delete all the old - versions of files, leaving the current ones intact. You can also - supply a path and only old versions under that path will be deleted, - e.g. `rclone cleanup remote:bucket/path/to/stuff`. - - Note that `cleanup` will remove partially uploaded files from the bucket - if they are more than a day old. - - When you `purge` a bucket, the current and the old versions will be - deleted then the bucket will be deleted. - - However `delete` will cause the current versions of the files to - become hidden old versions. - - Here is a session showing the listing and retrieval of an old - version followed by a `cleanup` of the old versions. - - Show current version and all the versions with `--b2-versions` flag. - -$ rclone -q ls b2:cleanup-test 9 one.txt - -$ rclone -q --b2-versions ls b2:cleanup-test 9 one.txt 8 -one-v2016-07-04-141032-000.txt 16 one-v2016-07-04-141003-000.txt 15 -one-v2016-07-02-155621-000.txt - - - Retrieve an old version - -$ rclone -q --b2-versions copy -b2:cleanup-test/one-v2016-07-04-141003-000.txt /tmp - -$ ls -l /tmp/one-v2016-07-04-141003-000.txt -rw-rw-r-- 1 ncw ncw 16 Jul -2 17:46 /tmp/one-v2016-07-04-141003-000.txt - - - Clean up all the old versions and show that they've gone. - -$ rclone -q cleanup b2:cleanup-test - -$ rclone -q ls b2:cleanup-test 9 one.txt - -$ rclone -q --b2-versions ls b2:cleanup-test 9 one.txt - - - #### Versions naming caveat - - When using `--b2-versions` flag rclone is relying on the file name - to work out whether the objects are versions or not. Versions' names - are created by inserting timestamp between file name and its extension. - - 9 file.txt - 8 file-v2023-07-17-161032-000.txt - 16 file-v2023-06-15-141003-000.txt - - If there are real files present with the same names as versions, then - behaviour of `--b2-versions` can be unpredictable. - - ### Data usage - - It is useful to know how many requests are sent to the server in different scenarios. - - All copy commands send the following 4 requests: - -/b2api/v1/b2_authorize_account /b2api/v1/b2_create_bucket -/b2api/v1/b2_list_buckets /b2api/v1/b2_list_file_names - - - The `b2_list_file_names` request will be sent once for every 1k files - in the remote path, providing the checksum and modification time of - the listed files. As of version 1.33 issue - [#818](https://github.com/rclone/rclone/issues/818) causes extra requests - to be sent when using B2 with Crypt. When a copy operation does not - require any files to be uploaded, no more requests will be sent. - - Uploading files that do not require chunking, will send 2 requests per - file upload: - -/b2api/v1/b2_get_upload_url /b2api/v1/b2_upload_file/ - - - Uploading files requiring chunking, will send 2 requests (one each to - start and finish the upload) and another 2 requests for each chunk: - -/b2api/v1/b2_start_large_file /b2api/v1/b2_get_upload_part_url -/b2api/v1/b2_upload_part/ /b2api/v1/b2_finish_large_file - - - #### Versions - - Versions can be viewed with the `--b2-versions` flag. When it is set - rclone will show and act on older versions of files. For example - - Listing without `--b2-versions` - -$ rclone -q ls b2:cleanup-test 9 one.txt - - - And with - -$ rclone -q --b2-versions ls b2:cleanup-test 9 one.txt 8 -one-v2016-07-04-141032-000.txt 16 one-v2016-07-04-141003-000.txt 15 -one-v2016-07-02-155621-000.txt - - - Showing that the current version is unchanged but older versions can - be seen. These have the UTC date that they were uploaded to the - server to the nearest millisecond appended to them. - - Note that when using `--b2-versions` no file write operations are - permitted, so you can't upload files or delete them. - - ### B2 and rclone link - - Rclone supports generating file share links for private B2 buckets. - They can either be for a file for example: - -./rclone link B2:bucket/path/to/file.txt -https://f002.backblazeb2.com/file/bucket/path/to/file.txt?Authorization=xxxxxxxx - - - or if run on a directory you will get: - -./rclone link B2:bucket/path -https://f002.backblazeb2.com/file/bucket/path?Authorization=xxxxxxxx - - - you can then use the authorization token (the part of the url from the - `?Authorization=` on) on any file path under that directory. For example: - -https://f002.backblazeb2.com/file/bucket/path/to/file1?Authorization=xxxxxxxx -https://f002.backblazeb2.com/file/bucket/path/file2?Authorization=xxxxxxxx -https://f002.backblazeb2.com/file/bucket/path/folder/file3?Authorization=xxxxxxxx - - - - ### Standard options - - Here are the Standard options specific to b2 (Backblaze B2). - - #### --b2-account - - Account ID or Application Key ID. - - Properties: - - - Config: account - - Env Var: RCLONE_B2_ACCOUNT - - Type: string - - Required: true - - #### --b2-key - - Application Key. - - Properties: - - - Config: key - - Env Var: RCLONE_B2_KEY - - Type: string - - Required: true - - #### --b2-hard-delete - - Permanently delete files on remote removal, otherwise hide files. - - Properties: - - - Config: hard_delete - - Env Var: RCLONE_B2_HARD_DELETE - - Type: bool - - Default: false - - ### Advanced options - - Here are the Advanced options specific to b2 (Backblaze B2). - - #### --b2-endpoint - - Endpoint for the service. - - Leave blank normally. - - Properties: - - - Config: endpoint - - Env Var: RCLONE_B2_ENDPOINT - - Type: string - - Required: false - - #### --b2-test-mode - - A flag string for X-Bz-Test-Mode header for debugging. - - This is for debugging purposes only. Setting it to one of the strings - below will cause b2 to return specific errors: - - * "fail_some_uploads" - * "expire_some_account_authorization_tokens" - * "force_cap_exceeded" - - These will be set in the "X-Bz-Test-Mode" header which is documented - in the [b2 integrations checklist](https://www.backblaze.com/b2/docs/integration_checklist.html). - - Properties: - - - Config: test_mode - - Env Var: RCLONE_B2_TEST_MODE - - Type: string - - Required: false - - #### --b2-versions - - Include old versions in directory listings. - - Note that when using this no file write operations are permitted, - so you can't upload files or delete them. - - Properties: - - - Config: versions - - Env Var: RCLONE_B2_VERSIONS - - Type: bool - - Default: false - - #### --b2-version-at - - Show file versions as they were at the specified time. - - Note that when using this no file write operations are permitted, - so you can't upload files or delete them. - - Properties: - - - Config: version_at - - Env Var: RCLONE_B2_VERSION_AT - - Type: Time - - Default: off - - #### --b2-upload-cutoff - - Cutoff for switching to chunked upload. - - Files above this size will be uploaded in chunks of "--b2-chunk-size". - - This value should be set no larger than 4.657 GiB (== 5 GB). - - Properties: - - - Config: upload_cutoff - - Env Var: RCLONE_B2_UPLOAD_CUTOFF - - Type: SizeSuffix - - Default: 200Mi - - #### --b2-copy-cutoff - - Cutoff for switching to multipart copy. - - Any files larger than this that need to be server-side copied will be - copied in chunks of this size. - - The minimum is 0 and the maximum is 4.6 GiB. - - Properties: - - - Config: copy_cutoff - - Env Var: RCLONE_B2_COPY_CUTOFF - - Type: SizeSuffix - - Default: 4Gi - - #### --b2-chunk-size - - Upload chunk size. - - When uploading large files, chunk the file into this size. - - Must fit in memory. These chunks are buffered in memory and there - might a maximum of "--transfers" chunks in progress at once. - - 5,000,000 Bytes is the minimum size. - - Properties: - - - Config: chunk_size - - Env Var: RCLONE_B2_CHUNK_SIZE - - Type: SizeSuffix - - Default: 96Mi - - #### --b2-upload-concurrency - - Concurrency for multipart uploads. - - This is the number of chunks of the same file that are uploaded - concurrently. - - Note that chunks are stored in memory and there may be up to - "--transfers" * "--b2-upload-concurrency" chunks stored at once - in memory. - - Properties: - - - Config: upload_concurrency - - Env Var: RCLONE_B2_UPLOAD_CONCURRENCY - - Type: int - - Default: 4 - - #### --b2-disable-checksum - - Disable checksums for large (> upload cutoff) files. - - Normally rclone will calculate the SHA1 checksum of the input before - uploading it so it can add it to metadata on the object. This is great - for data integrity checking but can cause long delays for large files - to start uploading. - - Properties: - - - Config: disable_checksum - - Env Var: RCLONE_B2_DISABLE_CHECKSUM - - Type: bool - - Default: false - - #### --b2-download-url - - Custom endpoint for downloads. - - This is usually set to a Cloudflare CDN URL as Backblaze offers - free egress for data downloaded through the Cloudflare network. - Rclone works with private buckets by sending an "Authorization" header. - If the custom endpoint rewrites the requests for authentication, - e.g., in Cloudflare Workers, this header needs to be handled properly. - Leave blank if you want to use the endpoint provided by Backblaze. - - The URL provided here SHOULD have the protocol and SHOULD NOT have - a trailing slash or specify the /file/bucket subpath as rclone will - request files with "{download_url}/file/{bucket_name}/{path}". - - Example: - > https://mysubdomain.mydomain.tld - (No trailing "/", "file" or "bucket") - - Properties: - - - Config: download_url - - Env Var: RCLONE_B2_DOWNLOAD_URL - - Type: string - - Required: false - - #### --b2-download-auth-duration - - Time before the public link authorization token will expire in s or suffix ms|s|m|h|d. - - This is used in combination with "rclone link" for making files - accessible to the public and sets the duration before the download - authorization token will expire. - - The minimum value is 1 second. The maximum value is one week. - - Properties: - - - Config: download_auth_duration - - Env Var: RCLONE_B2_DOWNLOAD_AUTH_DURATION - - Type: Duration - - Default: 1w - - #### --b2-memory-pool-flush-time - - How often internal memory buffer pools will be flushed. (no longer used) - - Properties: - - - Config: memory_pool_flush_time - - Env Var: RCLONE_B2_MEMORY_POOL_FLUSH_TIME - - Type: Duration - - Default: 1m0s - - #### --b2-memory-pool-use-mmap - - Whether to use mmap buffers in internal memory pool. (no longer used) - - Properties: - - - Config: memory_pool_use_mmap - - Env Var: RCLONE_B2_MEMORY_POOL_USE_MMAP - - Type: bool - - Default: false - - #### --b2-lifecycle - - Set the number of days deleted files should be kept when creating a bucket. - - On bucket creation, this parameter is used to create a lifecycle rule - for the entire bucket. - - If lifecycle is 0 (the default) it does not create a lifecycle rule so - the default B2 behaviour applies. This is to create versions of files - on delete and overwrite and to keep them indefinitely. - - If lifecycle is >0 then it creates a single rule setting the number of - days before a file that is deleted or overwritten is deleted - permanently. This is known as daysFromHidingToDeleting in the b2 docs. - - The minimum value for this parameter is 1 day. - - You can also enable hard_delete in the config also which will mean - deletions won't cause versions but overwrites will still cause - versions to be made. - - See: [rclone backend lifecycle](#lifecycle) for setting lifecycles after bucket creation. - - - Properties: - - - Config: lifecycle - - Env Var: RCLONE_B2_LIFECYCLE - - Type: int - - Default: 0 - - #### --b2-encoding - - The encoding for the backend. - - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - - Properties: - - - Config: encoding - - Env Var: RCLONE_B2_ENCODING - - Type: Encoding - - Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot - - #### --b2-description - - Description of the remote - - Properties: - - - Config: description - - Env Var: RCLONE_B2_DESCRIPTION - - Type: string - - Required: false - - ## Backend commands - - Here are the commands specific to the b2 backend. - - Run them with - - rclone backend COMMAND remote: - - The help below will explain what arguments each command takes. - - See the [backend](https://rclone.org/commands/rclone_backend/) command for more - info on how to pass options and arguments. - - These can be run on a running backend using the rc command - [backend/command](https://rclone.org/rc/#backend-command). - - ### lifecycle - - Read or set the lifecycle for a bucket - - rclone backend lifecycle remote: [options] [+] - - This command can be used to read or set the lifecycle for a bucket. - - Usage Examples: - - To show the current lifecycle rules: - - rclone backend lifecycle b2:bucket - - This will dump something like this showing the lifecycle rules. - - [ - { - "daysFromHidingToDeleting": 1, - "daysFromUploadingToHiding": null, - "fileNamePrefix": "" - } - ] - - If there are no lifecycle rules (the default) then it will just return []. - - To reset the current lifecycle rules: - - rclone backend lifecycle b2:bucket -o daysFromHidingToDeleting=30 - rclone backend lifecycle b2:bucket -o daysFromUploadingToHiding=5 -o daysFromHidingToDeleting=1 - - This will run and then print the new lifecycle rules as above. - - Rclone only lets you set lifecycles for the whole bucket with the - fileNamePrefix = "". - - You can't disable versioning with B2. The best you can do is to set - the daysFromHidingToDeleting to 1 day. You can enable hard_delete in - the config also which will mean deletions won't cause versions but - overwrites will still cause versions to be made. - - rclone backend lifecycle b2:bucket -o daysFromHidingToDeleting=1 - - See: https://www.backblaze.com/docs/cloud-storage-lifecycle-rules - - - Options: - - - "daysFromHidingToDeleting": After a file has been hidden for this many days it is deleted. 0 is off. - - "daysFromUploadingToHiding": This many days after uploading a file is hidden - - - - ## Limitations - - `rclone about` is not supported by the B2 backend. Backends without - this capability cannot determine free space for an rclone mount or - use policy `mfs` (most free space) as a member of an rclone union - remote. - - See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - - # Box - - Paths are specified as `remote:path` - - Paths may be as deep as required, e.g. `remote:directory/subdirectory`. - - The initial setup for Box involves getting a token from Box which you - can do either in your browser, or with a config.json downloaded from Box - to use JWT authentication. `rclone config` walks you through it. - - ## Configuration - - Here is an example of how to make a remote called `remote`. 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 [snip] -XX / Box  "box" [snip] Storage> box Box App Client Id - leave blank -normally. client_id> Box App Client Secret - leave blank normally. -client_secret> Box App config.json location Leave blank normally. Enter -a string value. Press Enter for the default (""). box_config_file> Box -App Primary Access Token Leave blank normally. Enter a string value. -Press Enter for the default (""). access_token> - -Enter a string value. Press Enter for the default ("user"). Choose a -number from below, or type in your own value 1 / Rclone should act on -behalf of a user  "user" 2 / Rclone should act on behalf of a service -account  "enterprise" box_sub_type> Remote config Use web browser to -automatically authenticate rclone with remote? * Say Y if the machine -running rclone has a web browser you can use * Say N if running rclone -on a (remote) machine without web browser access If not sure try Y. If Y -failed, try N. y) Yes n) No y/n> y If your browser doesn't open -automatically go to the following link: http://127.0.0.1:53682/auth Log -in and authorize rclone for access Waiting for code... Got code --------------------- [remote] client_id = client_secret = token = -{"access_token":"XXX","token_type":"bearer","refresh_token":"XXX","expiry":"XXX"} --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y - - - See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a - machine with no Internet browser available. - - Note that rclone runs a webserver on your local machine to collect the - token as returned from Box. This only runs from the moment it opens - your browser to the moment you get back the verification code. This - is on `http://127.0.0.1:53682/` and this it may require you to unblock - it temporarily if you are running a host firewall. - - Once configured you can then use `rclone` like this, - - List directories in top level of your Box - - rclone lsd remote: - - List all the files in your Box - - rclone ls remote: - - To copy a local directory to an Box directory called backup - - rclone copy /home/source remote:backup - - ### Using rclone with an Enterprise account with SSO - - If you have an "Enterprise" account type with Box with single sign on - (SSO), you need to create a password to use Box with rclone. This can - be done at your Enterprise Box account by going to Settings, "Account" - Tab, and then set the password in the "Authentication" field. - - Once you have done this, you can setup your Enterprise Box account - using the same procedure detailed above in the, using the password you - have just set. - - ### Invalid refresh token - - According to the [box docs](https://developer.box.com/v2.0/docs/oauth-20#section-6-using-the-access-and-refresh-tokens): - - > Each refresh_token is valid for one use in 60 days. - - This means that if you - - * Don't use the box remote for 60 days - * Copy the config file with a box refresh token in and use it in two places - * Get an error on a token refresh - - then rclone will return an error which includes the text `Invalid - refresh token`. - - To fix this you will need to use oauth2 again to update the refresh - token. You can use the methods in [the remote setup - docs](https://rclone.org/remote_setup/), bearing in mind that if you use the copy the - config file method, you should not use that remote on the computer you - did the authentication on. - - Here is how to do it. - -$ rclone config Current remotes: - -Name Type ==== ==== remote box - -e) Edit existing remote -f) New remote -g) Delete remote -h) Rename remote -i) Copy remote -j) Set configuration password -k) Quit config e/n/d/r/c/s/q> e Choose a number from below, or type in - an existing value 1 > remote remote> remote -------------------- - [remote] type = box token = - {"access_token":"XXX","token_type":"bearer","refresh_token":"XXX","expiry":"2017-07-08T23:40:08.059167677+01:00"} - -------------------- Edit remote Value "client_id" = "" Edit? (y/n)> -l) Yes -m) No y/n> n Value "client_secret" = "" Edit? (y/n)> -n) Yes -o) No y/n> n Remote config Already have a token - refresh? -p) Yes -q) No y/n> y Use web browser to automatically authenticate rclone with - remote? - -- Say Y if the machine running rclone has a web browser you can use -- Say N if running rclone on a (remote) machine without web browser - access If not sure try Y. If Y failed, try N. - -y) Yes -z) No y/n> y If your browser doesn't open automatically go to the - following link: http://127.0.0.1:53682/auth Log in and authorize - rclone for access Waiting for code... Got code -------------------- - [remote] type = box token = - {"access_token":"YYY","token_type":"bearer","refresh_token":"YYY","expiry":"2017-07-23T12:22:29.259137901+01:00"} +Backblaze B2 + +B2 is Backblaze's cloud storage system. + +Paths are specified as remote:bucket (or remote: for the lsd command.) +You may put subdirectories in too, e.g. remote:bucket/path/to/dir. + +Configuration + +Here is an example of making a b2 configuration. First run + + rclone config + +This will guide you through an interactive setup process. To +authenticate you will either need your Account ID (a short hex number) +and Master Application Key (a long hex number) OR an Application Key, +which is the recommended method. See below for further details on +generating and using an Application Key. + + No remotes found, make a new one? + n) New remote + q) Quit config + n/q> n + name> remote + Type of storage to configure. + Choose a number from below, or type in your own value + [snip] + XX / Backblaze B2 + \ "b2" + [snip] + Storage> b2 + Account ID or Application Key ID + account> 123456789abc + Application Key + key> 0123456789abcdef0123456789abcdef0123456789 + Endpoint for the service - leave blank normally. + endpoint> + Remote config -------------------- -a) Yes this is OK -b) Edit this remote -c) Delete this remote y/e/d> y + [remote] + account = 123456789abc + key = 0123456789abcdef0123456789abcdef0123456789 + endpoint = + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y +This remote is called remote and can now be used like this - ### Modification times and hashes +See all buckets - Box allows modification times to be set on objects accurate to 1 - second. These will be used to detect whether objects need syncing or - not. + rclone lsd remote: - Box supports SHA1 type hashes, so you can use the `--checksum` - flag. +Create a new bucket - ### Restricted filename characters + rclone mkdir remote:bucket - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: +List the contents of a bucket - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | \ | 0x5C | \ | + rclone ls remote:bucket - File names can also not end with the following characters. - These only get replaced if they are the last character in the name: +Sync /home/local/directory to the remote bucket, deleting any excess +files in the bucket. - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | SP | 0x20 | ␠ | + rclone sync --interactive /home/local/directory remote:bucket - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. +Application Keys - ### Transfers +B2 supports multiple Application Keys for different access permission to +B2 Buckets. - For files above 50 MiB rclone will use a chunked transfer. Rclone will - upload up to `--transfers` chunks at the same time (shared among all - the multipart uploads). Chunks are buffered in memory and are - normally 8 MiB so increasing `--transfers` will increase memory use. +You can use these with rclone too; you will need to use rclone version +1.43 or later. - ### Deleting files +Follow Backblaze's docs to create an Application Key with the required +permission and add the applicationKeyId as the account and the +Application Key itself as the key. - Depending on the enterprise settings for your user, the item will - either be actually deleted from Box or moved to the trash. +Note that you must put the applicationKeyId as the account – you can't +use the master Account ID. If you try then B2 will return 401 errors. - Emptying the trash is supported via the rclone however cleanup command - however this deletes every trashed file and folder individually so it - may take a very long time. - Emptying the trash via the WebUI does not have this limitation - so it is advised to empty the trash via the WebUI. +--fast-list - ### Root folder ID +This remote supports --fast-list which allows you to use fewer +transactions in exchange for more memory. See the rclone docs for more +details. - You can set the `root_folder_id` for rclone. This is the directory - (identified by its `Folder ID`) that rclone considers to be the root - of your Box drive. +Modification times - Normally you will leave this blank and rclone will determine the - correct root to use itself. +The modification time is stored as metadata on the object as +X-Bz-Info-src_last_modified_millis as milliseconds since 1970-01-01 in +the Backblaze standard. Other tools should be able to use this as a +modified time. - However you can set this to restrict rclone to a specific folder - hierarchy. +Modified times are used in syncing and are fully supported. Note that if +a modification time needs to be updated on an object then it will create +a new version of the object. - In order to do this you will have to find the `Folder ID` of the - directory you wish rclone to display. This will be the last segment - of the URL when you open the relevant folder in the Box web - interface. +Restricted filename characters - So if the folder you want rclone to use has a URL which looks like - `https://app.box.com/folder/11xxxxxxxxx8` - in the browser, then you use `11xxxxxxxxx8` as - the `root_folder_id` in the config. +In addition to the default restricted characters set the following +characters are also replaced: + Character Value Replacement + ----------- ------- ------------- + \ 0x5C \ - ### Standard options +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - Here are the Standard options specific to box (Box). +Note that in 2020-05 Backblaze started allowing  characters in file +names. Rclone hasn't changed its encoding as this could cause syncs to +re-transfer files. If you want rclone not to replace  then see the +--b2-encoding flag below and remove the BackSlash from the string. This +can be set in the config. - #### --box-client-id +SHA1 checksums - OAuth Client Id. +The SHA1 checksums of the files are checked on upload and download and +will be used in the syncing process. - Leave blank normally. +Large files (bigger than the limit in --b2-upload-cutoff) which are +uploaded in chunks will store their SHA1 on the object as +X-Bz-Info-large_file_sha1 as recommended by Backblaze. - Properties: +For a large file to be uploaded with an SHA1 checksum, the source needs +to support SHA1 checksums. The local disk supports SHA1 checksums so +large file transfers from local disk will have an SHA1. See the overview +for exactly which remotes support SHA1. - - Config: client_id - - Env Var: RCLONE_BOX_CLIENT_ID - - Type: string - - Required: false +Sources which don't support SHA1, in particular crypt will upload large +files without SHA1 checksums. This may be fixed in the future (see +#1767). - #### --box-client-secret +Files sizes below --b2-upload-cutoff will always have an SHA1 regardless +of the source. - OAuth Client Secret. +Transfers - Leave blank normally. +Backblaze recommends that you do lots of transfers simultaneously for +maximum speed. In tests from my SSD equipped laptop the optimum setting +is about --transfers 32 though higher numbers may be used for a slight +speed improvement. The optimum number for you may vary depending on your +hardware, how big the files are, how much you want to load your +computer, etc. The default of --transfers 4 is definitely too low for +Backblaze B2 though. - Properties: +Note that uploading big files (bigger than 200 MiB by default) will use +a 96 MiB RAM buffer by default. There can be at most --transfers of +these in use at any moment, so this sets the upper limit on the memory +used. - - Config: client_secret - - Env Var: RCLONE_BOX_CLIENT_SECRET - - Type: string - - Required: false +Versions - #### --box-box-config-file +When rclone uploads a new version of a file it creates a new version of +it. Likewise when you delete a file, the old version will be marked +hidden and still be available. Conversely, you may opt in to a "hard +delete" of files with the --b2-hard-delete flag which would permanently +remove the file instead of hiding it. +Old versions of files, where available, are visible using the +--b2-versions flag. + +It is also possible to view a bucket as it was at a certain point in +time, using the --b2-version-at flag. This will show the file versions +as they were at that time, showing files that have been deleted +afterwards, and hiding files that were created since. + +If you wish to remove all the old versions, and unfinished large file +uploads, then you can use the rclone cleanup remote:bucket command which +will delete all the old versions of files, leaving the current ones +intact. You can also supply a path and only old versions under that path +will be deleted, e.g. rclone cleanup remote:bucket/path/to/stuff. + +Note that cleanup will remove partially uploaded files from the bucket +if they are more than a day old. If you want more control over the +expiry date then run rclone backend cleanup b2:bucket -o max-age=1h to +remove all unfinished large file uploads older than one hour, leaving +old versions intact. + +If you wish to remove all the old versions, leaving current files and +unfinished large files intact, then you can use the +rclone backend cleanup-hidden remote:bucket command. You can also supply +a path and only old versions under that path will be deleted, e.g. +rclone backend cleanup-hidden remote:bucket/path/to/stuff. + +When you purge a bucket, the current and the old versions will be +deleted then the bucket will be deleted. + +However delete will cause the current versions of the files to become +hidden old versions. + +Here is a session showing the listing and retrieval of an old version +followed by a cleanup of the old versions. + +Show current version and all the versions with --b2-versions flag. + + $ rclone -q ls b2:cleanup-test + 9 one.txt + + $ rclone -q --b2-versions ls b2:cleanup-test + 9 one.txt + 8 one-v2016-07-04-141032-000.txt + 16 one-v2016-07-04-141003-000.txt + 15 one-v2016-07-02-155621-000.txt + +Retrieve an old version + + $ rclone -q --b2-versions copy b2:cleanup-test/one-v2016-07-04-141003-000.txt /tmp + + $ ls -l /tmp/one-v2016-07-04-141003-000.txt + -rw-rw-r-- 1 ncw ncw 16 Jul 2 17:46 /tmp/one-v2016-07-04-141003-000.txt + +Clean up all the old versions and show that they've gone. + + $ rclone -q cleanup b2:cleanup-test + + $ rclone -q ls b2:cleanup-test + 9 one.txt + + $ rclone -q --b2-versions ls b2:cleanup-test + 9 one.txt + +Versions naming caveat + +When using --b2-versions flag rclone is relying on the file name to work +out whether the objects are versions or not. Versions' names are created +by inserting timestamp between file name and its extension. + + 9 file.txt + 8 file-v2023-07-17-161032-000.txt + 16 file-v2023-06-15-141003-000.txt + +If there are real files present with the same names as versions, then +behaviour of --b2-versions can be unpredictable. + +Data usage + +It is useful to know how many requests are sent to the server in +different scenarios. + +All copy commands send the following 4 requests: + + /b2api/v1/b2_authorize_account + /b2api/v1/b2_create_bucket + /b2api/v1/b2_list_buckets + /b2api/v1/b2_list_file_names + +The b2_list_file_names request will be sent once for every 1k files in +the remote path, providing the checksum and modification time of the +listed files. As of version 1.33 issue #818 causes extra requests to be +sent when using B2 with Crypt. When a copy operation does not require +any files to be uploaded, no more requests will be sent. + +Uploading files that do not require chunking, will send 2 requests per +file upload: + + /b2api/v1/b2_get_upload_url + /b2api/v1/b2_upload_file/ + +Uploading files requiring chunking, will send 2 requests (one each to +start and finish the upload) and another 2 requests for each chunk: + + /b2api/v1/b2_start_large_file + /b2api/v1/b2_get_upload_part_url + /b2api/v1/b2_upload_part/ + /b2api/v1/b2_finish_large_file + +Versions + +Versions can be viewed with the --b2-versions flag. When it is set +rclone will show and act on older versions of files. For example + +Listing without --b2-versions + + $ rclone -q ls b2:cleanup-test + 9 one.txt + +And with + + $ rclone -q --b2-versions ls b2:cleanup-test + 9 one.txt + 8 one-v2016-07-04-141032-000.txt + 16 one-v2016-07-04-141003-000.txt + 15 one-v2016-07-02-155621-000.txt + +Showing that the current version is unchanged but older versions can be +seen. These have the UTC date that they were uploaded to the server to +the nearest millisecond appended to them. + +Note that when using --b2-versions no file write operations are +permitted, so you can't upload files or delete them. + +B2 and rclone link + +Rclone supports generating file share links for private B2 buckets. They +can either be for a file for example: + + ./rclone link B2:bucket/path/to/file.txt + https://f002.backblazeb2.com/file/bucket/path/to/file.txt?Authorization=xxxxxxxx + +or if run on a directory you will get: + + ./rclone link B2:bucket/path + https://f002.backblazeb2.com/file/bucket/path?Authorization=xxxxxxxx + +you can then use the authorization token (the part of the url from the +?Authorization= on) on any file path under that directory. For example: + + https://f002.backblazeb2.com/file/bucket/path/to/file1?Authorization=xxxxxxxx + https://f002.backblazeb2.com/file/bucket/path/file2?Authorization=xxxxxxxx + https://f002.backblazeb2.com/file/bucket/path/folder/file3?Authorization=xxxxxxxx + +Standard options + +Here are the Standard options specific to b2 (Backblaze B2). + +--b2-account + +Account ID or Application Key ID. + +Properties: + +- Config: account +- Env Var: RCLONE_B2_ACCOUNT +- Type: string +- Required: true + +--b2-key + +Application Key. + +Properties: + +- Config: key +- Env Var: RCLONE_B2_KEY +- Type: string +- Required: true + +--b2-hard-delete + +Permanently delete files on remote removal, otherwise hide files. + +Properties: + +- Config: hard_delete +- Env Var: RCLONE_B2_HARD_DELETE +- Type: bool +- Default: false + +Advanced options + +Here are the Advanced options specific to b2 (Backblaze B2). + +--b2-endpoint + +Endpoint for the service. + +Leave blank normally. + +Properties: + +- Config: endpoint +- Env Var: RCLONE_B2_ENDPOINT +- Type: string +- Required: false + +--b2-test-mode + +A flag string for X-Bz-Test-Mode header for debugging. + +This is for debugging purposes only. Setting it to one of the strings +below will cause b2 to return specific errors: + +- "fail_some_uploads" +- "expire_some_account_authorization_tokens" +- "force_cap_exceeded" + +These will be set in the "X-Bz-Test-Mode" header which is documented in +the b2 integrations checklist. + +Properties: + +- Config: test_mode +- Env Var: RCLONE_B2_TEST_MODE +- Type: string +- Required: false + +--b2-versions + +Include old versions in directory listings. + +Note that when using this no file write operations are permitted, so you +can't upload files or delete them. + +Properties: + +- Config: versions +- Env Var: RCLONE_B2_VERSIONS +- Type: bool +- Default: false + +--b2-version-at + +Show file versions as they were at the specified time. + +Note that when using this no file write operations are permitted, so you +can't upload files or delete them. + +Properties: + +- Config: version_at +- Env Var: RCLONE_B2_VERSION_AT +- Type: Time +- Default: off + +--b2-upload-cutoff + +Cutoff for switching to chunked upload. + +Files above this size will be uploaded in chunks of "--b2-chunk-size". + +This value should be set no larger than 4.657 GiB (== 5 GB). + +Properties: + +- Config: upload_cutoff +- Env Var: RCLONE_B2_UPLOAD_CUTOFF +- Type: SizeSuffix +- Default: 200Mi + +--b2-copy-cutoff + +Cutoff for switching to multipart copy. + +Any files larger than this that need to be server-side copied will be +copied in chunks of this size. + +The minimum is 0 and the maximum is 4.6 GiB. + +Properties: + +- Config: copy_cutoff +- Env Var: RCLONE_B2_COPY_CUTOFF +- Type: SizeSuffix +- Default: 4Gi + +--b2-chunk-size + +Upload chunk size. + +When uploading large files, chunk the file into this size. + +Must fit in memory. These chunks are buffered in memory and there might +a maximum of "--transfers" chunks in progress at once. + +5,000,000 Bytes is the minimum size. + +Properties: + +- Config: chunk_size +- Env Var: RCLONE_B2_CHUNK_SIZE +- Type: SizeSuffix +- Default: 96Mi + +--b2-upload-concurrency + +Concurrency for multipart uploads. + +This is the number of chunks of the same file that are uploaded +concurrently. + +Note that chunks are stored in memory and there may be up to +"--transfers" * "--b2-upload-concurrency" chunks stored at once in +memory. + +Properties: + +- Config: upload_concurrency +- Env Var: RCLONE_B2_UPLOAD_CONCURRENCY +- Type: int +- Default: 4 + +--b2-disable-checksum + +Disable checksums for large (> upload cutoff) files. + +Normally rclone will calculate the SHA1 checksum of the input before +uploading it so it can add it to metadata on the object. This is great +for data integrity checking but can cause long delays for large files to +start uploading. + +Properties: + +- Config: disable_checksum +- Env Var: RCLONE_B2_DISABLE_CHECKSUM +- Type: bool +- Default: false + +--b2-download-url + +Custom endpoint for downloads. + +This is usually set to a Cloudflare CDN URL as Backblaze offers free +egress for data downloaded through the Cloudflare network. Rclone works +with private buckets by sending an "Authorization" header. If the custom +endpoint rewrites the requests for authentication, e.g., in Cloudflare +Workers, this header needs to be handled properly. Leave blank if you +want to use the endpoint provided by Backblaze. + +The URL provided here SHOULD have the protocol and SHOULD NOT have a +trailing slash or specify the /file/bucket subpath as rclone will +request files with "{download_url}/file/{bucket_name}/{path}". + +Example: > https://mysubdomain.mydomain.tld (No trailing "/", "file" or +"bucket") + +Properties: + +- Config: download_url +- Env Var: RCLONE_B2_DOWNLOAD_URL +- Type: string +- Required: false + +--b2-download-auth-duration + +Time before the public link authorization token will expire in s or +suffix ms|s|m|h|d. + +This is used in combination with "rclone link" for making files +accessible to the public and sets the duration before the download +authorization token will expire. + +The minimum value is 1 second. The maximum value is one week. + +Properties: + +- Config: download_auth_duration +- Env Var: RCLONE_B2_DOWNLOAD_AUTH_DURATION +- Type: Duration +- Default: 1w + +--b2-memory-pool-flush-time + +How often internal memory buffer pools will be flushed. (no longer used) + +Properties: + +- Config: memory_pool_flush_time +- Env Var: RCLONE_B2_MEMORY_POOL_FLUSH_TIME +- Type: Duration +- Default: 1m0s + +--b2-memory-pool-use-mmap + +Whether to use mmap buffers in internal memory pool. (no longer used) + +Properties: + +- Config: memory_pool_use_mmap +- Env Var: RCLONE_B2_MEMORY_POOL_USE_MMAP +- Type: bool +- Default: false + +--b2-lifecycle + +Set the number of days deleted files should be kept when creating a +bucket. + +On bucket creation, this parameter is used to create a lifecycle rule +for the entire bucket. + +If lifecycle is 0 (the default) it does not create a lifecycle rule so +the default B2 behaviour applies. This is to create versions of files on +delete and overwrite and to keep them indefinitely. + +If lifecycle is >0 then it creates a single rule setting the number of +days before a file that is deleted or overwritten is deleted +permanently. This is known as daysFromHidingToDeleting in the b2 docs. + +The minimum value for this parameter is 1 day. + +You can also enable hard_delete in the config also which will mean +deletions won't cause versions but overwrites will still cause versions +to be made. + +See: rclone backend lifecycle for setting lifecycles after bucket +creation. + +Properties: + +- Config: lifecycle +- Env Var: RCLONE_B2_LIFECYCLE +- Type: int +- Default: 0 + +--b2-encoding + +The encoding for the backend. + +See the encoding section in the overview for more info. + +Properties: + +- Config: encoding +- Env Var: RCLONE_B2_ENCODING +- Type: Encoding +- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot + +--b2-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_B2_DESCRIPTION +- Type: string +- Required: false + +Backend commands + +Here are the commands specific to the b2 backend. + +Run them with + + rclone backend COMMAND remote: + +The help below will explain what arguments each command takes. + +See the backend command for more info on how to pass options and +arguments. + +These can be run on a running backend using the rc command +backend/command. + +lifecycle + +Read or set the lifecycle for a bucket + + rclone backend lifecycle remote: [options] [+] + +This command can be used to read or set the lifecycle for a bucket. + +Usage Examples: + +To show the current lifecycle rules: + + rclone backend lifecycle b2:bucket + +This will dump something like this showing the lifecycle rules. + + [ + { + "daysFromHidingToDeleting": 1, + "daysFromUploadingToHiding": null, + "fileNamePrefix": "" + } + ] + +If there are no lifecycle rules (the default) then it will just return +[]. + +To reset the current lifecycle rules: + + rclone backend lifecycle b2:bucket -o daysFromHidingToDeleting=30 + rclone backend lifecycle b2:bucket -o daysFromUploadingToHiding=5 -o daysFromHidingToDeleting=1 + +This will run and then print the new lifecycle rules as above. + +Rclone only lets you set lifecycles for the whole bucket with the +fileNamePrefix = "". + +You can't disable versioning with B2. The best you can do is to set the +daysFromHidingToDeleting to 1 day. You can enable hard_delete in the +config also which will mean deletions won't cause versions but +overwrites will still cause versions to be made. + + rclone backend lifecycle b2:bucket -o daysFromHidingToDeleting=1 + +See: https://www.backblaze.com/docs/cloud-storage-lifecycle-rules + +Options: + +- "daysFromHidingToDeleting": After a file has been hidden for this + many days it is deleted. 0 is off. +- "daysFromUploadingToHiding": This many days after uploading a file + is hidden + +cleanup + +Remove unfinished large file uploads. + + rclone backend cleanup remote: [options] [+] + +This command removes unfinished large file uploads of age greater than +max-age, which defaults to 24 hours. + +Note that you can use --interactive/-i or --dry-run with this command to +see what it would do. + + rclone backend cleanup b2:bucket/path/to/object + rclone backend cleanup -o max-age=7w b2:bucket/path/to/object + +Durations are parsed as per the rest of rclone, 2h, 7d, 7w etc. + +Options: + +- "max-age": Max age of upload to delete + +cleanup-hidden + +Remove old versions of files. + + rclone backend cleanup-hidden remote: [options] [+] + +This command removes any old hidden versions of files. + +Note that you can use --interactive/-i or --dry-run with this command to +see what it would do. + + rclone backend cleanup-hidden b2:bucket/path/to/dir + +Limitations + +rclone about is not supported by the B2 backend. Backends without this +capability cannot determine free space for an rclone mount or use policy +mfs (most free space) as a member of an rclone union remote. + +See List of backends that do not support rclone about and rclone about + +Box + +Paths are specified as remote:path + +Paths may be as deep as required, e.g. remote:directory/subdirectory. + +The initial setup for Box involves getting a token from Box which you +can do either in your browser, or with a config.json downloaded from Box +to use JWT authentication. rclone config walks you through it. + +Configuration + +Here is an example of how to make a remote called remote. 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 + [snip] + XX / Box + \ "box" + [snip] + Storage> box + Box App Client Id - leave blank normally. + client_id> + Box App Client Secret - leave blank normally. + client_secret> Box App config.json location - Leave blank normally. - - Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`. - - Properties: - - - Config: box_config_file - - Env Var: RCLONE_BOX_BOX_CONFIG_FILE - - Type: string - - Required: false - - #### --box-access-token - + Enter a string value. Press Enter for the default (""). + box_config_file> Box App Primary Access Token - Leave blank normally. + Enter a string value. Press Enter for the default (""). + access_token> + + Enter a string value. Press Enter for the default ("user"). + Choose a number from below, or type in your own value + 1 / Rclone should act on behalf of a user + \ "user" + 2 / Rclone should act on behalf of a service account + \ "enterprise" + box_sub_type> + Remote config + Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access + If not sure try Y. If Y failed, try N. + y) Yes + n) No + y/n> y + If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth + Log in and authorize rclone for access + Waiting for code... + Got code + -------------------- + [remote] + client_id = + client_secret = + token = {"access_token":"XXX","token_type":"bearer","refresh_token":"XXX","expiry":"XXX"} + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y + +See the remote setup docs for how to set it up on a machine with no +Internet browser available. + +Note that rclone runs a webserver on your local machine to collect the +token as returned from Box. This only runs from the moment it opens your +browser to the moment you get back the verification code. This is on +http://127.0.0.1:53682/ and this it may require you to unblock it +temporarily if you are running a host firewall. + +Once configured you can then use rclone like this, + +List directories in top level of your Box + + rclone lsd remote: + +List all the files in your Box + + rclone ls remote: + +To copy a local directory to an Box directory called backup + + rclone copy /home/source remote:backup + +Using rclone with an Enterprise account with SSO + +If you have an "Enterprise" account type with Box with single sign on +(SSO), you need to create a password to use Box with rclone. This can be +done at your Enterprise Box account by going to Settings, "Account" Tab, +and then set the password in the "Authentication" field. + +Once you have done this, you can setup your Enterprise Box account using +the same procedure detailed above in the, using the password you have +just set. + +Invalid refresh token + +According to the box docs: + + Each refresh_token is valid for one use in 60 days. + +This means that if you + +- Don't use the box remote for 60 days +- Copy the config file with a box refresh token in and use it in two + places +- Get an error on a token refresh + +then rclone will return an error which includes the text +Invalid refresh token. + +To fix this you will need to use oauth2 again to update the refresh +token. You can use the methods in the remote setup docs, bearing in mind +that if you use the copy the config file method, you should not use that +remote on the computer you did the authentication on. + +Here is how to do it. + + $ rclone config + Current remotes: + + Name Type + ==== ==== + remote box + + 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> e + Choose a number from below, or type in an existing value + 1 > remote + remote> remote + -------------------- + [remote] + type = box + token = {"access_token":"XXX","token_type":"bearer","refresh_token":"XXX","expiry":"2017-07-08T23:40:08.059167677+01:00"} + -------------------- + Edit remote + Value "client_id" = "" + Edit? (y/n)> + y) Yes + n) No + y/n> n + Value "client_secret" = "" + Edit? (y/n)> + y) Yes + n) No + y/n> n + Remote config + Already have a token - refresh? + y) Yes + n) No + y/n> y + Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access + If not sure try Y. If Y failed, try N. + y) Yes + n) No + y/n> y + If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth + Log in and authorize rclone for access + Waiting for code... + Got code + -------------------- + [remote] + type = box + token = {"access_token":"YYY","token_type":"bearer","refresh_token":"YYY","expiry":"2017-07-23T12:22:29.259137901+01:00"} + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y - Properties: +Modification times and hashes - - Config: access_token - - Env Var: RCLONE_BOX_ACCESS_TOKEN - - Type: string - - Required: false +Box allows modification times to be set on objects accurate to 1 second. +These will be used to detect whether objects need syncing or not. - #### --box-box-sub-type +Box supports SHA1 type hashes, so you can use the --checksum flag. +Restricted filename characters +In addition to the default restricted characters set the following +characters are also replaced: - Properties: + Character Value Replacement + ----------- ------- ------------- + \ 0x5C \ - - Config: box_sub_type - - Env Var: RCLONE_BOX_BOX_SUB_TYPE - - Type: string - - Default: "user" - - Examples: - - "user" - - Rclone should act on behalf of a user. - - "enterprise" - - Rclone should act on behalf of a service account. +File names can also not end with the following characters. These only +get replaced if they are the last character in the name: - ### Advanced options + Character Value Replacement + ----------- ------- ------------- + SP 0x20 ␠ - Here are the Advanced options specific to box (Box). +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - #### --box-token +Transfers - OAuth Access Token as a JSON blob. +For files above 50 MiB rclone will use a chunked transfer. Rclone will +upload up to --transfers chunks at the same time (shared among all the +multipart uploads). Chunks are buffered in memory and are normally 8 MiB +so increasing --transfers will increase memory use. - Properties: +Deleting files - - Config: token - - Env Var: RCLONE_BOX_TOKEN - - Type: string - - Required: false +Depending on the enterprise settings for your user, the item will either +be actually deleted from Box or moved to the trash. - #### --box-auth-url +Emptying the trash is supported via the rclone however cleanup command +however this deletes every trashed file and folder individually so it +may take a very long time. Emptying the trash via the WebUI does not +have this limitation so it is advised to empty the trash via the WebUI. - Auth server URL. +Root folder ID - Leave blank to use the provider defaults. +You can set the root_folder_id for rclone. This is the directory +(identified by its Folder ID) that rclone considers to be the root of +your Box drive. - Properties: +Normally you will leave this blank and rclone will determine the correct +root to use itself. - - Config: auth_url - - Env Var: RCLONE_BOX_AUTH_URL - - Type: string - - Required: false +However you can set this to restrict rclone to a specific folder +hierarchy. - #### --box-token-url +In order to do this you will have to find the Folder ID of the directory +you wish rclone to display. This will be the last segment of the URL +when you open the relevant folder in the Box web interface. - Token server url. +So if the folder you want rclone to use has a URL which looks like +https://app.box.com/folder/11xxxxxxxxx8 in the browser, then you use +11xxxxxxxxx8 as the root_folder_id in the config. - Leave blank to use the provider defaults. +Standard options - Properties: +Here are the Standard options specific to box (Box). - - Config: token_url - - Env Var: RCLONE_BOX_TOKEN_URL - - Type: string - - Required: false +--box-client-id - #### --box-root-folder-id +OAuth Client Id. - Fill in for rclone to use a non root folder as its starting point. +Leave blank normally. - Properties: +Properties: - - Config: root_folder_id - - Env Var: RCLONE_BOX_ROOT_FOLDER_ID - - Type: string - - Default: "0" +- Config: client_id +- Env Var: RCLONE_BOX_CLIENT_ID +- Type: string +- Required: false - #### --box-upload-cutoff +--box-client-secret - Cutoff for switching to multipart upload (>= 50 MiB). +OAuth Client Secret. - Properties: +Leave blank normally. - - Config: upload_cutoff - - Env Var: RCLONE_BOX_UPLOAD_CUTOFF - - Type: SizeSuffix - - Default: 50Mi +Properties: - #### --box-commit-retries +- Config: client_secret +- Env Var: RCLONE_BOX_CLIENT_SECRET +- Type: string +- Required: false - Max number of times to try committing a multipart file. +--box-box-config-file - Properties: +Box App config.json location - - Config: commit_retries - - Env Var: RCLONE_BOX_COMMIT_RETRIES - - Type: int - - Default: 100 +Leave blank normally. - #### --box-list-chunk +Leading ~ will be expanded in the file name as will environment +variables such as ${RCLONE_CONFIG_DIR}. - Size of listing chunk 1-1000. +Properties: - Properties: +- Config: box_config_file +- Env Var: RCLONE_BOX_BOX_CONFIG_FILE +- Type: string +- Required: false - - Config: list_chunk - - Env Var: RCLONE_BOX_LIST_CHUNK - - Type: int - - Default: 1000 +--box-access-token - #### --box-owned-by +Box App Primary Access Token - Only show items owned by the login (email address) passed in. +Leave blank normally. - Properties: +Properties: - - Config: owned_by - - Env Var: RCLONE_BOX_OWNED_BY - - Type: string - - Required: false +- Config: access_token +- Env Var: RCLONE_BOX_ACCESS_TOKEN +- Type: string +- Required: false - #### --box-impersonate +--box-box-sub-type - Impersonate this user ID when using a service account. +Properties: - Setting this flag allows rclone, when using a JWT service account, to - act on behalf of another user by setting the as-user header. +- Config: box_sub_type +- Env Var: RCLONE_BOX_BOX_SUB_TYPE +- Type: string +- Default: "user" +- Examples: + - "user" + - Rclone should act on behalf of a user. + - "enterprise" + - Rclone should act on behalf of a service account. - The user ID is the Box identifier for a user. User IDs can found for - any user via the GET /users endpoint, which is only available to - admins, or by calling the GET /users/me endpoint with an authenticated - user session. +Advanced options - See: https://developer.box.com/guides/authentication/jwt/as-user/ +Here are the Advanced options specific to box (Box). +--box-token - Properties: +OAuth Access Token as a JSON blob. - - Config: impersonate - - Env Var: RCLONE_BOX_IMPERSONATE - - Type: string - - Required: false +Properties: - #### --box-encoding +- Config: token +- Env Var: RCLONE_BOX_TOKEN +- Type: string +- Required: false - The encoding for the backend. +--box-auth-url - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +Auth server URL. - Properties: +Leave blank to use the provider defaults. - - Config: encoding - - Env Var: RCLONE_BOX_ENCODING - - Type: Encoding - - Default: Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot +Properties: - #### --box-description +- Config: auth_url +- Env Var: RCLONE_BOX_AUTH_URL +- Type: string +- Required: false - Description of the remote +--box-token-url - Properties: +Token server url. - - Config: description - - Env Var: RCLONE_BOX_DESCRIPTION - - Type: string - - Required: false +Leave blank to use the provider defaults. +Properties: +- Config: token_url +- Env Var: RCLONE_BOX_TOKEN_URL +- Type: string +- Required: false - ## Limitations +--box-root-folder-id - Note that Box is case insensitive so you can't have a file called - "Hello.doc" and one called "hello.doc". +Fill in for rclone to use a non root folder as its starting point. - Box file names can't have the `\` character in. rclone maps this to - and from an identical looking unicode equivalent `\` (U+FF3C Fullwidth - Reverse Solidus). +Properties: - Box only supports filenames up to 255 characters in length. +- Config: root_folder_id +- Env Var: RCLONE_BOX_ROOT_FOLDER_ID +- Type: string +- Default: "0" - Box has [API rate limits](https://developer.box.com/guides/api-calls/permissions-and-errors/rate-limits/) that sometimes reduce the speed of rclone. +--box-upload-cutoff - `rclone about` is not supported by the Box backend. Backends without - this capability cannot determine free space for an rclone mount or - use policy `mfs` (most free space) as a member of an rclone union - remote. +Cutoff for switching to multipart upload (>= 50 MiB). - See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) +Properties: - ## Get your own Box App ID +- Config: upload_cutoff +- Env Var: RCLONE_BOX_UPLOAD_CUTOFF +- Type: SizeSuffix +- Default: 50Mi - Here is how to create your own Box App ID for rclone: +--box-commit-retries - 1. Go to the [Box Developer Console](https://app.box.com/developers/console) - and login, then click `My Apps` on the sidebar. Click `Create New App` - and select `Custom App`. +Max number of times to try committing a multipart file. - 2. In the first screen on the box that pops up, you can pretty much enter - whatever you want. The `App Name` can be whatever. For `Purpose` choose - automation to avoid having to fill out anything else. Click `Next`. +Properties: - 3. In the second screen of the creation screen, select - `User Authentication (OAuth 2.0)`. Then click `Create App`. +- Config: commit_retries +- Env Var: RCLONE_BOX_COMMIT_RETRIES +- Type: int +- Default: 100 - 4. You should now be on the `Configuration` tab of your new app. If not, - click on it at the top of the webpage. Copy down `Client ID` - and `Client Secret`, you'll need those for rclone. +--box-list-chunk - 5. Under "OAuth 2.0 Redirect URI", add `http://127.0.0.1:53682/` +Size of listing chunk 1-1000. - 6. For `Application Scopes`, select `Read all files and folders stored in Box` - and `Write all files and folders stored in box` (assuming you want to do both). - Leave others unchecked. Click `Save Changes` at the top right. +Properties: - # Cache +- Config: list_chunk +- Env Var: RCLONE_BOX_LIST_CHUNK +- Type: int +- Default: 1000 - The `cache` remote wraps another existing remote and stores file structure - and its data for long running tasks like `rclone mount`. +--box-owned-by - ## Status +Only show items owned by the login (email address) passed in. - The cache backend code is working but it currently doesn't - have a maintainer so there are [outstanding bugs](https://github.com/rclone/rclone/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3A%22Remote%3A+Cache%22) which aren't getting fixed. +Properties: - The cache backend is due to be phased out in favour of the VFS caching - layer eventually which is more tightly integrated into rclone. +- Config: owned_by +- Env Var: RCLONE_BOX_OWNED_BY +- Type: string +- Required: false - Until this happens we recommend only using the cache backend if you - find you can't work without it. There are many docs online describing - the use of the cache backend to minimize API hits and by-and-large - these are out of date and the cache backend isn't needed in those - scenarios any more. +--box-impersonate - ## Configuration +Impersonate this user ID when using a service account. - To get started you just need to have an existing remote which can be configured - with `cache`. +Setting this flag allows rclone, when using a JWT service account, to +act on behalf of another user by setting the as-user header. - Here is an example of how to make a remote called `test-cache`. First run: +The user ID is the Box identifier for a user. User IDs can found for any +user via the GET /users endpoint, which is only available to admins, or +by calling the GET /users/me endpoint with an authenticated user +session. - rclone config +See: https://developer.box.com/guides/authentication/jwt/as-user/ - This will guide you through an interactive setup process: +Properties: -No remotes found, make a new one? n) New remote r) Rename remote c) Copy -remote s) Set configuration password q) Quit config n/r/c/s/q> n name> -test-cache Type of storage to configure. Choose a number from below, or -type in your own value [snip] XX / Cache a remote  "cache" [snip] -Storage> cache Remote to cache. Normally should contain a ':' and a -path, e.g. "myremote:path/to/dir", "myremote:bucket" or maybe -"myremote:" (not recommended). remote> local:/test Optional: The URL of -the Plex server plex_url> http://127.0.0.1:32400 Optional: The username -of the Plex user plex_username> dummyusername Optional: The password of -the Plex user y) Yes type in my own password g) Generate random password -n) No leave this optional password blank y/g/n> y Enter the password: -password: Confirm the password: password: The size of a chunk. Lower -value good for slow connections but can affect seamless reading. -Default: 5M Choose a number from below, or type in your own value 1 / 1 -MiB  "1M" 2 / 5 MiB  "5M" 3 / 10 MiB  "10M" chunk_size> 2 How much time -should object info (file size, file hashes, etc.) be stored in cache. -Use a very high value if you don't plan on changing the source FS from -outside the cache. Accepted units are: "s", "m", "h". Default: 5m Choose -a number from below, or type in your own value 1 / 1 hour  "1h" 2 / 24 -hours  "24h" 3 / 24 hours  "48h" info_age> 2 The maximum size of stored -chunks. When the storage grows beyond this size, the oldest chunks will -be deleted. Default: 10G Choose a number from below, or type in your own -value 1 / 500 MiB  "500M" 2 / 1 GiB  "1G" 3 / 10 GiB  "10G" -chunk_total_size> 3 Remote config -------------------- [test-cache] -remote = local:/test plex_url = http://127.0.0.1:32400 plex_username = -dummyusername plex_password = *** ENCRYPTED *** chunk_size = 5M info_age -= 48h chunk_total_size = 10G +- Config: impersonate +- Env Var: RCLONE_BOX_IMPERSONATE +- Type: string +- Required: false +--box-encoding - You can then use it like this, +The encoding for the backend. - List directories in top level of your drive +See the encoding section in the overview for more info. - rclone lsd test-cache: +Properties: - List all the files in your drive +- Config: encoding +- Env Var: RCLONE_BOX_ENCODING +- Type: Encoding +- Default: Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot - rclone ls test-cache: +--box-description - To start a cached mount +Description of the remote. - rclone mount --allow-other test-cache: /var/tmp/test-cache +Properties: - ### Write Features ### +- Config: description +- Env Var: RCLONE_BOX_DESCRIPTION +- Type: string +- Required: false - ### Offline uploading ### +Limitations - In an effort to make writing through cache more reliable, the backend - now supports this feature which can be activated by specifying a - `cache-tmp-upload-path`. +Note that Box is case insensitive so you can't have a file called +"Hello.doc" and one called "hello.doc". - A files goes through these states when using this feature: +Box file names can't have the \ character in. rclone maps this to and +from an identical looking unicode equivalent \ (U+FF3C Fullwidth +Reverse Solidus). - 1. An upload is started (usually by copying a file on the cache remote) - 2. When the copy to the temporary location is complete the file is part - of the cached remote and looks and behaves like any other file (reading included) - 3. After `cache-tmp-wait-time` passes and the file is next in line, `rclone move` - is used to move the file to the cloud provider - 4. Reading the file still works during the upload but most modifications on it will be prohibited - 5. Once the move is complete the file is unlocked for modifications as it - becomes as any other regular file - 6. If the file is being read through `cache` when it's actually - deleted from the temporary path then `cache` will simply swap the source - to the cloud provider without interrupting the reading (small blip can happen though) +Box only supports filenames up to 255 characters in length. - Files are uploaded in sequence and only one file is uploaded at a time. - Uploads will be stored in a queue and be processed based on the order they were added. - The queue and the temporary storage is persistent across restarts but - can be cleared on startup with the `--cache-db-purge` flag. +Box has API rate limits that sometimes reduce the speed of rclone. - ### Write Support ### +rclone about is not supported by the Box backend. Backends without this +capability cannot determine free space for an rclone mount or use policy +mfs (most free space) as a member of an rclone union remote. - Writes are supported through `cache`. - One caveat is that a mounted cache remote does not add any retry or fallback - mechanism to the upload operation. This will depend on the implementation - of the wrapped remote. Consider using `Offline uploading` for reliable writes. +See List of backends that do not support rclone about and rclone about - One special case is covered with `cache-writes` which will cache the file - data at the same time as the upload when it is enabled making it available - from the cache store immediately once the upload is finished. +Get your own Box App ID - ### Read Features ### +Here is how to create your own Box App ID for rclone: - #### Multiple connections #### +1. Go to the Box Developer Console and login, then click My Apps on the + sidebar. Click Create New App and select Custom App. - To counter the high latency between a local PC where rclone is running - and cloud providers, the cache remote can split multiple requests to the - cloud provider for smaller file chunks and combines them together locally - where they can be available almost immediately before the reader usually - needs them. +2. In the first screen on the box that pops up, you can pretty much + enter whatever you want. The App Name can be whatever. For Purpose + choose automation to avoid having to fill out anything else. Click + Next. - This is similar to buffering when media files are played online. Rclone - will stay around the current marker but always try its best to stay ahead - and prepare the data before. +3. In the second screen of the creation screen, select + User Authentication (OAuth 2.0). Then click Create App. - #### Plex Integration #### +4. You should now be on the Configuration tab of your new app. If not, + click on it at the top of the webpage. Copy down Client ID and + Client Secret, you'll need those for rclone. - There is a direct integration with Plex which allows cache to detect during reading - if the file is in playback or not. This helps cache to adapt how it queries - the cloud provider depending on what is needed for. +5. Under "OAuth 2.0 Redirect URI", add http://127.0.0.1:53682/ - Scans will have a minimum amount of workers (1) while in a confirmed playback cache - will deploy the configured number of workers. +6. For Application Scopes, select + Read all files and folders stored in Box and + Write all files and folders stored in box (assuming you want to do + both). Leave others unchecked. Click Save Changes at the top right. - This integration opens the doorway to additional performance improvements - which will be explored in the near future. +Cache - **Note:** If Plex options are not configured, `cache` will function with its - configured options without adapting any of its settings. +The cache remote wraps another existing remote and stores file structure +and its data for long running tasks like rclone mount. - How to enable? Run `rclone config` and add all the Plex options (endpoint, username - and password) in your remote and it will be automatically enabled. +Status - Affected settings: - - `cache-workers`: _Configured value_ during confirmed playback or _1_ all the other times +The cache backend code is working but it currently doesn't have a +maintainer so there are outstanding bugs which aren't getting fixed. - ##### Certificate Validation ##### +The cache backend is due to be phased out in favour of the VFS caching +layer eventually which is more tightly integrated into rclone. - When the Plex server is configured to only accept secure connections, it is - possible to use `.plex.direct` URLs to ensure certificate validation succeeds. - These URLs are used by Plex internally to connect to the Plex server securely. +Until this happens we recommend only using the cache backend if you find +you can't work without it. There are many docs online describing the use +of the cache backend to minimize API hits and by-and-large these are out +of date and the cache backend isn't needed in those scenarios any more. - The format for these URLs is the following: +Configuration - `https://ip-with-dots-replaced.server-hash.plex.direct:32400/` +To get started you just need to have an existing remote which can be +configured with cache. - The `ip-with-dots-replaced` part can be any IPv4 address, where the dots - have been replaced with dashes, e.g. `127.0.0.1` becomes `127-0-0-1`. +Here is an example of how to make a remote called test-cache. First run: - To get the `server-hash` part, the easiest way is to visit + rclone config - https://plex.tv/api/resources?includeHttps=1&X-Plex-Token=your-plex-token - - This page will list all the available Plex servers for your account - with at least one `.plex.direct` link for each. Copy one URL and replace - the IP address with the desired address. This can be used as the - `plex_url` value. - - ### Known issues ### - - #### Mount and --dir-cache-time #### - - --dir-cache-time controls the first layer of directory caching which works at the mount layer. - Being an independent caching mechanism from the `cache` backend, it will manage its own entries - based on the configured time. - - To avoid getting in a scenario where dir cache has obsolete data and cache would have the correct - one, try to set `--dir-cache-time` to a lower time than `--cache-info-age`. Default values are - already configured in this way. - - #### Windows support - Experimental #### - - There are a couple of issues with Windows `mount` functionality that still require some investigations. - It should be considered as experimental thus far as fixes come in for this OS. - - Most of the issues seem to be related to the difference between filesystems - on Linux flavors and Windows as cache is heavily dependent on them. - - Any reports or feedback on how cache behaves on this OS is greatly appreciated. - - - https://github.com/rclone/rclone/issues/1935 - - https://github.com/rclone/rclone/issues/1907 - - https://github.com/rclone/rclone/issues/1834 - - #### Risk of throttling #### - - Future iterations of the cache backend will make use of the pooling functionality - of the cloud provider to synchronize and at the same time make writing through it - more tolerant to failures. - - There are a couple of enhancements in track to add these but in the meantime - there is a valid concern that the expiring cache listings can lead to cloud provider - throttles or bans due to repeated queries on it for very large mounts. - - Some recommendations: - - don't use a very small interval for entry information (`--cache-info-age`) - - while writes aren't yet optimised, you can still write through `cache` which gives you the advantage - of adding the file in the cache at the same time if configured to do so. - - Future enhancements: - - - https://github.com/rclone/rclone/issues/1937 - - https://github.com/rclone/rclone/issues/1936 - - #### cache and crypt #### - - One common scenario is to keep your data encrypted in the cloud provider - using the `crypt` remote. `crypt` uses a similar technique to wrap around - an existing remote and handles this translation in a seamless way. - - There is an issue with wrapping the remotes in this order: - **cloud remote** -> **crypt** -> **cache** - - During testing, I experienced a lot of bans with the remotes in this order. - I suspect it might be related to how crypt opens files on the cloud provider - which makes it think we're downloading the full file instead of small chunks. - Organizing the remotes in this order yields better results: - **cloud remote** -> **cache** -> **crypt** - - #### absolute remote paths #### - - `cache` can not differentiate between relative and absolute paths for the wrapped remote. - Any path given in the `remote` config setting and on the command line will be passed to - the wrapped remote as is, but for storing the chunks on disk the path will be made - relative by removing any leading `/` character. - - This behavior is irrelevant for most backend types, but there are backends where a leading `/` - changes the effective directory, e.g. in the `sftp` backend paths starting with a `/` are - relative to the root of the SSH server and paths without are relative to the user home directory. - As a result `sftp:bin` and `sftp:/bin` will share the same cache folder, even if they represent - a different directory on the SSH server. - - ### Cache and Remote Control (--rc) ### - Cache supports the new `--rc` mode in rclone and can be remote controlled through the following end points: - By default, the listener is disabled if you do not add the flag. - - ### rc cache/expire - Purge a remote from the cache backend. Supports either a directory or a file. - It supports both encrypted and unencrypted file names if cache is wrapped by crypt. - - Params: - - **remote** = path to remote **(required)** - - **withData** = true/false to delete cached data (chunks) as well _(optional, false by default)_ - - - ### Standard options - - Here are the Standard options specific to cache (Cache a remote). - - #### --cache-remote +This will guide you through an interactive setup process: + No remotes found, make a new one? + n) New remote + r) Rename remote + c) Copy remote + s) Set configuration password + q) Quit config + n/r/c/s/q> n + name> test-cache + Type of storage to configure. + Choose a number from below, or type in your own value + [snip] + XX / Cache a remote + \ "cache" + [snip] + Storage> cache Remote to cache. - Normally should contain a ':' and a path, e.g. "myremote:path/to/dir", "myremote:bucket" or maybe "myremote:" (not recommended). + remote> local:/test + Optional: The URL of the Plex server + plex_url> http://127.0.0.1:32400 + Optional: The username of the Plex user + plex_username> dummyusername + Optional: The password of the Plex user + y) Yes type in my own password + g) Generate random password + n) No leave this optional password blank + y/g/n> y + Enter the password: + password: + Confirm the password: + password: + The size of a chunk. Lower value good for slow connections but can affect seamless reading. + Default: 5M + Choose a number from below, or type in your own value + 1 / 1 MiB + \ "1M" + 2 / 5 MiB + \ "5M" + 3 / 10 MiB + \ "10M" + chunk_size> 2 + How much time should object info (file size, file hashes, etc.) be stored in cache. Use a very high value if you don't plan on changing the source FS from outside the cache. + Accepted units are: "s", "m", "h". + Default: 5m + Choose a number from below, or type in your own value + 1 / 1 hour + \ "1h" + 2 / 24 hours + \ "24h" + 3 / 24 hours + \ "48h" + info_age> 2 + The maximum size of stored chunks. When the storage grows beyond this size, the oldest chunks will be deleted. + Default: 10G + Choose a number from below, or type in your own value + 1 / 500 MiB + \ "500M" + 2 / 1 GiB + \ "1G" + 3 / 10 GiB + \ "10G" + chunk_total_size> 3 + Remote config + -------------------- + [test-cache] + remote = local:/test + plex_url = http://127.0.0.1:32400 + plex_username = dummyusername + plex_password = *** ENCRYPTED *** + chunk_size = 5M + info_age = 48h + chunk_total_size = 10G + +You can then use it like this, + +List directories in top level of your drive + + rclone lsd test-cache: + +List all the files in your drive + + rclone ls test-cache: + +To start a cached mount + + rclone mount --allow-other test-cache: /var/tmp/test-cache + +Write Features + +Offline uploading + +In an effort to make writing through cache more reliable, the backend +now supports this feature which can be activated by specifying a +cache-tmp-upload-path. + +A files goes through these states when using this feature: + +1. An upload is started (usually by copying a file on the cache remote) +2. When the copy to the temporary location is complete the file is part + of the cached remote and looks and behaves like any other file + (reading included) +3. After cache-tmp-wait-time passes and the file is next in line, + rclone move is used to move the file to the cloud provider +4. Reading the file still works during the upload but most + modifications on it will be prohibited +5. Once the move is complete the file is unlocked for modifications as + it becomes as any other regular file +6. If the file is being read through cache when it's actually deleted + from the temporary path then cache will simply swap the source to + the cloud provider without interrupting the reading (small blip can + happen though) + +Files are uploaded in sequence and only one file is uploaded at a time. +Uploads will be stored in a queue and be processed based on the order +they were added. The queue and the temporary storage is persistent +across restarts but can be cleared on startup with the --cache-db-purge +flag. + +Write Support + +Writes are supported through cache. One caveat is that a mounted cache +remote does not add any retry or fallback mechanism to the upload +operation. This will depend on the implementation of the wrapped remote. +Consider using Offline uploading for reliable writes. + +One special case is covered with cache-writes which will cache the file +data at the same time as the upload when it is enabled making it +available from the cache store immediately once the upload is finished. + +Read Features + +Multiple connections + +To counter the high latency between a local PC where rclone is running +and cloud providers, the cache remote can split multiple requests to the +cloud provider for smaller file chunks and combines them together +locally where they can be available almost immediately before the reader +usually needs them. - Properties: +This is similar to buffering when media files are played online. Rclone +will stay around the current marker but always try its best to stay +ahead and prepare the data before. - - Config: remote - - Env Var: RCLONE_CACHE_REMOTE - - Type: string - - Required: true +Plex Integration - #### --cache-plex-url +There is a direct integration with Plex which allows cache to detect +during reading if the file is in playback or not. This helps cache to +adapt how it queries the cloud provider depending on what is needed for. - The URL of the Plex server. +Scans will have a minimum amount of workers (1) while in a confirmed +playback cache will deploy the configured number of workers. - Properties: +This integration opens the doorway to additional performance +improvements which will be explored in the near future. - - Config: plex_url - - Env Var: RCLONE_CACHE_PLEX_URL - - Type: string - - Required: false +Note: If Plex options are not configured, cache will function with its +configured options without adapting any of its settings. - #### --cache-plex-username +How to enable? Run rclone config and add all the Plex options (endpoint, +username and password) in your remote and it will be automatically +enabled. - The username of the Plex user. +Affected settings: - cache-workers: Configured value during confirmed +playback or 1 all the other times - Properties: +Certificate Validation - - Config: plex_username - - Env Var: RCLONE_CACHE_PLEX_USERNAME - - Type: string - - Required: false +When the Plex server is configured to only accept secure connections, it +is possible to use .plex.direct URLs to ensure certificate validation +succeeds. These URLs are used by Plex internally to connect to the Plex +server securely. - #### --cache-plex-password +The format for these URLs is the following: - The password of the Plex user. +https://ip-with-dots-replaced.server-hash.plex.direct:32400/ - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). +The ip-with-dots-replaced part can be any IPv4 address, where the dots +have been replaced with dashes, e.g. 127.0.0.1 becomes 127-0-0-1. - Properties: +To get the server-hash part, the easiest way is to visit - - Config: plex_password - - Env Var: RCLONE_CACHE_PLEX_PASSWORD - - Type: string - - Required: false +https://plex.tv/api/resources?includeHttps=1&X-Plex-Token=your-plex-token - #### --cache-chunk-size +This page will list all the available Plex servers for your account with +at least one .plex.direct link for each. Copy one URL and replace the IP +address with the desired address. This can be used as the plex_url +value. - The size of a chunk (partial file data). +Known issues - Use lower numbers for slower connections. If the chunk size is - changed, any downloaded chunks will be invalid and cache-chunk-path - will need to be cleared or unexpected EOF errors will occur. +Mount and --dir-cache-time - Properties: +--dir-cache-time controls the first layer of directory caching which +works at the mount layer. Being an independent caching mechanism from +the cache backend, it will manage its own entries based on the +configured time. - - Config: chunk_size - - Env Var: RCLONE_CACHE_CHUNK_SIZE - - Type: SizeSuffix - - Default: 5Mi - - Examples: - - "1M" - - 1 MiB - - "5M" - - 5 MiB - - "10M" - - 10 MiB +To avoid getting in a scenario where dir cache has obsolete data and +cache would have the correct one, try to set --dir-cache-time to a lower +time than --cache-info-age. Default values are already configured in +this way. - #### --cache-info-age +Windows support - Experimental - How long to cache file structure information (directory listings, file size, times, etc.). - If all write operations are done through the cache then you can safely make - this value very large as the cache store will also be updated in real time. +There are a couple of issues with Windows mount functionality that still +require some investigations. It should be considered as experimental +thus far as fixes come in for this OS. - Properties: +Most of the issues seem to be related to the difference between +filesystems on Linux flavors and Windows as cache is heavily dependent +on them. - - Config: info_age - - Env Var: RCLONE_CACHE_INFO_AGE - - Type: Duration - - Default: 6h0m0s - - Examples: - - "1h" - - 1 hour - - "24h" - - 24 hours - - "48h" - - 48 hours +Any reports or feedback on how cache behaves on this OS is greatly +appreciated. - #### --cache-chunk-total-size +- https://github.com/rclone/rclone/issues/1935 +- https://github.com/rclone/rclone/issues/1907 +- https://github.com/rclone/rclone/issues/1834 - The total size that the chunks can take up on the local disk. +Risk of throttling - If the cache exceeds this value then it will start to delete the - oldest chunks until it goes under this value. +Future iterations of the cache backend will make use of the pooling +functionality of the cloud provider to synchronize and at the same time +make writing through it more tolerant to failures. - Properties: +There are a couple of enhancements in track to add these but in the +meantime there is a valid concern that the expiring cache listings can +lead to cloud provider throttles or bans due to repeated queries on it +for very large mounts. - - Config: chunk_total_size - - Env Var: RCLONE_CACHE_CHUNK_TOTAL_SIZE - - Type: SizeSuffix - - Default: 10Gi - - Examples: - - "500M" - - 500 MiB - - "1G" - - 1 GiB - - "10G" - - 10 GiB +Some recommendations: - don't use a very small interval for entry +information (--cache-info-age) - while writes aren't yet optimised, you +can still write through cache which gives you the advantage of adding +the file in the cache at the same time if configured to do so. - ### Advanced options +Future enhancements: - Here are the Advanced options specific to cache (Cache a remote). +- https://github.com/rclone/rclone/issues/1937 +- https://github.com/rclone/rclone/issues/1936 - #### --cache-plex-token +cache and crypt - The plex token for authentication - auto set normally. +One common scenario is to keep your data encrypted in the cloud provider +using the crypt remote. crypt uses a similar technique to wrap around an +existing remote and handles this translation in a seamless way. - Properties: +There is an issue with wrapping the remotes in this order: cloud remote +-> crypt -> cache - - Config: plex_token - - Env Var: RCLONE_CACHE_PLEX_TOKEN - - Type: string - - Required: false +During testing, I experienced a lot of bans with the remotes in this +order. I suspect it might be related to how crypt opens files on the +cloud provider which makes it think we're downloading the full file +instead of small chunks. Organizing the remotes in this order yields +better results: cloud remote -> cache -> crypt - #### --cache-plex-insecure +absolute remote paths - Skip all certificate verification when connecting to the Plex server. +cache can not differentiate between relative and absolute paths for the +wrapped remote. Any path given in the remote config setting and on the +command line will be passed to the wrapped remote as is, but for storing +the chunks on disk the path will be made relative by removing any +leading / character. - Properties: +This behavior is irrelevant for most backend types, but there are +backends where a leading / changes the effective directory, e.g. in the +sftp backend paths starting with a / are relative to the root of the SSH +server and paths without are relative to the user home directory. As a +result sftp:bin and sftp:/bin will share the same cache folder, even if +they represent a different directory on the SSH server. - - Config: plex_insecure - - Env Var: RCLONE_CACHE_PLEX_INSECURE - - Type: string - - Required: false +Cache and Remote Control (--rc) - #### --cache-db-path +Cache supports the new --rc mode in rclone and can be remote controlled +through the following end points: By default, the listener is disabled +if you do not add the flag. - Directory to store file structure metadata DB. +rc cache/expire - The remote name is used as the DB file name. +Purge a remote from the cache backend. Supports either a directory or a +file. It supports both encrypted and unencrypted file names if cache is +wrapped by crypt. - Properties: +Params: - remote = path to remote (required) - withData = true/false to +delete cached data (chunks) as well (optional, false by default) - - Config: db_path - - Env Var: RCLONE_CACHE_DB_PATH - - Type: string - - Default: "$HOME/.cache/rclone/cache-backend" +Standard options - #### --cache-chunk-path +Here are the Standard options specific to cache (Cache a remote). - Directory to cache chunk files. +--cache-remote - Path to where partial file data (chunks) are stored locally. The remote - name is appended to the final path. +Remote to cache. - This config follows the "--cache-db-path". If you specify a custom - location for "--cache-db-path" and don't specify one for "--cache-chunk-path" - then "--cache-chunk-path" will use the same path as "--cache-db-path". +Normally should contain a ':' and a path, e.g. "myremote:path/to/dir", +"myremote:bucket" or maybe "myremote:" (not recommended). - Properties: +Properties: - - Config: chunk_path - - Env Var: RCLONE_CACHE_CHUNK_PATH - - Type: string - - Default: "$HOME/.cache/rclone/cache-backend" +- Config: remote +- Env Var: RCLONE_CACHE_REMOTE +- Type: string +- Required: true - #### --cache-db-purge +--cache-plex-url - Clear all the cached data for this remote on start. +The URL of the Plex server. - Properties: +Properties: - - Config: db_purge - - Env Var: RCLONE_CACHE_DB_PURGE - - Type: bool - - Default: false +- Config: plex_url +- Env Var: RCLONE_CACHE_PLEX_URL +- Type: string +- Required: false - #### --cache-chunk-clean-interval +--cache-plex-username - How often should the cache perform cleanups of the chunk storage. +The username of the Plex user. - The default value should be ok for most people. If you find that the - cache goes over "cache-chunk-total-size" too often then try to lower - this value to force it to perform cleanups more often. +Properties: - Properties: +- Config: plex_username +- Env Var: RCLONE_CACHE_PLEX_USERNAME +- Type: string +- Required: false - - Config: chunk_clean_interval - - Env Var: RCLONE_CACHE_CHUNK_CLEAN_INTERVAL - - Type: Duration - - Default: 1m0s +--cache-plex-password - #### --cache-read-retries +The password of the Plex user. - How many times to retry a read from a cache storage. +NB Input to this must be obscured - see rclone obscure. - Since reading from a cache stream is independent from downloading file - data, readers can get to a point where there's no more data in the - cache. Most of the times this can indicate a connectivity issue if - cache isn't able to provide file data anymore. +Properties: - For really slow connections, increase this to a point where the stream is - able to provide data but your experience will be very stuttering. +- Config: plex_password +- Env Var: RCLONE_CACHE_PLEX_PASSWORD +- Type: string +- Required: false - Properties: +--cache-chunk-size - - Config: read_retries - - Env Var: RCLONE_CACHE_READ_RETRIES - - Type: int - - Default: 10 +The size of a chunk (partial file data). - #### --cache-workers +Use lower numbers for slower connections. If the chunk size is changed, +any downloaded chunks will be invalid and cache-chunk-path will need to +be cleared or unexpected EOF errors will occur. - How many workers should run in parallel to download chunks. +Properties: - Higher values will mean more parallel processing (better CPU needed) - and more concurrent requests on the cloud provider. This impacts - several aspects like the cloud provider API limits, more stress on the - hardware that rclone runs on but it also means that streams will be - more fluid and data will be available much more faster to readers. +- Config: chunk_size +- Env Var: RCLONE_CACHE_CHUNK_SIZE +- Type: SizeSuffix +- Default: 5Mi +- Examples: + - "1M" + - 1 MiB + - "5M" + - 5 MiB + - "10M" + - 10 MiB - **Note**: If the optional Plex integration is enabled then this - setting will adapt to the type of reading performed and the value - specified here will be used as a maximum number of workers to use. +--cache-info-age - Properties: +How long to cache file structure information (directory listings, file +size, times, etc.). If all write operations are done through the cache +then you can safely make this value very large as the cache store will +also be updated in real time. - - Config: workers - - Env Var: RCLONE_CACHE_WORKERS - - Type: int - - Default: 4 +Properties: - #### --cache-chunk-no-memory +- Config: info_age +- Env Var: RCLONE_CACHE_INFO_AGE +- Type: Duration +- Default: 6h0m0s +- Examples: + - "1h" + - 1 hour + - "24h" + - 24 hours + - "48h" + - 48 hours - Disable the in-memory cache for storing chunks during streaming. +--cache-chunk-total-size - By default, cache will keep file data during streaming in RAM as well - to provide it to readers as fast as possible. +The total size that the chunks can take up on the local disk. - This transient data is evicted as soon as it is read and the number of - chunks stored doesn't exceed the number of workers. However, depending - on other settings like "cache-chunk-size" and "cache-workers" this footprint - can increase if there are parallel streams too (multiple files being read - at the same time). +If the cache exceeds this value then it will start to delete the oldest +chunks until it goes under this value. - If the hardware permits it, use this feature to provide an overall better - performance during streaming but it can also be disabled if RAM is not - available on the local machine. +Properties: - Properties: +- Config: chunk_total_size +- Env Var: RCLONE_CACHE_CHUNK_TOTAL_SIZE +- Type: SizeSuffix +- Default: 10Gi +- Examples: + - "500M" + - 500 MiB + - "1G" + - 1 GiB + - "10G" + - 10 GiB - - Config: chunk_no_memory - - Env Var: RCLONE_CACHE_CHUNK_NO_MEMORY - - Type: bool - - Default: false +Advanced options - #### --cache-rps +Here are the Advanced options specific to cache (Cache a remote). - Limits the number of requests per second to the source FS (-1 to disable). +--cache-plex-token - This setting places a hard limit on the number of requests per second - that cache will be doing to the cloud provider remote and try to - respect that value by setting waits between reads. +The plex token for authentication - auto set normally. - If you find that you're getting banned or limited on the cloud - provider through cache and know that a smaller number of requests per - second will allow you to work with it then you can use this setting - for that. +Properties: - A good balance of all the other settings should make this setting - useless but it is available to set for more special cases. +- Config: plex_token +- Env Var: RCLONE_CACHE_PLEX_TOKEN +- Type: string +- Required: false - **NOTE**: This will limit the number of requests during streams but - other API calls to the cloud provider like directory listings will - still pass. +--cache-plex-insecure - Properties: +Skip all certificate verification when connecting to the Plex server. - - Config: rps - - Env Var: RCLONE_CACHE_RPS - - Type: int - - Default: -1 +Properties: - #### --cache-writes +- Config: plex_insecure +- Env Var: RCLONE_CACHE_PLEX_INSECURE +- Type: string +- Required: false - Cache file data on writes through the FS. +--cache-db-path - If you need to read files immediately after you upload them through - cache you can enable this flag to have their data stored in the - cache store at the same time during upload. +Directory to store file structure metadata DB. - Properties: +The remote name is used as the DB file name. - - Config: writes - - Env Var: RCLONE_CACHE_WRITES - - Type: bool - - Default: false +Properties: - #### --cache-tmp-upload-path +- Config: db_path +- Env Var: RCLONE_CACHE_DB_PATH +- Type: string +- Default: "$HOME/.cache/rclone/cache-backend" - Directory to keep temporary files until they are uploaded. +--cache-chunk-path - This is the path where cache will use as a temporary storage for new - files that need to be uploaded to the cloud provider. +Directory to cache chunk files. - Specifying a value will enable this feature. Without it, it is - completely disabled and files will be uploaded directly to the cloud - provider +Path to where partial file data (chunks) are stored locally. The remote +name is appended to the final path. - Properties: +This config follows the "--cache-db-path". If you specify a custom +location for "--cache-db-path" and don't specify one for +"--cache-chunk-path" then "--cache-chunk-path" will use the same path as +"--cache-db-path". - - Config: tmp_upload_path - - Env Var: RCLONE_CACHE_TMP_UPLOAD_PATH - - Type: string - - Required: false +Properties: - #### --cache-tmp-wait-time +- Config: chunk_path +- Env Var: RCLONE_CACHE_CHUNK_PATH +- Type: string +- Default: "$HOME/.cache/rclone/cache-backend" - How long should files be stored in local cache before being uploaded. +--cache-db-purge - This is the duration that a file must wait in the temporary location - _cache-tmp-upload-path_ before it is selected for upload. +Clear all the cached data for this remote on start. - Note that only one file is uploaded at a time and it can take longer - to start the upload if a queue formed for this purpose. +Properties: - Properties: +- Config: db_purge +- Env Var: RCLONE_CACHE_DB_PURGE +- Type: bool +- Default: false - - Config: tmp_wait_time - - Env Var: RCLONE_CACHE_TMP_WAIT_TIME - - Type: Duration - - Default: 15s +--cache-chunk-clean-interval - #### --cache-db-wait-time +How often should the cache perform cleanups of the chunk storage. - How long to wait for the DB to be available - 0 is unlimited. +The default value should be ok for most people. If you find that the +cache goes over "cache-chunk-total-size" too often then try to lower +this value to force it to perform cleanups more often. - Only one process can have the DB open at any one time, so rclone waits - for this duration for the DB to become available before it gives an - error. +Properties: - If you set it to 0 then it will wait forever. +- Config: chunk_clean_interval +- Env Var: RCLONE_CACHE_CHUNK_CLEAN_INTERVAL +- Type: Duration +- Default: 1m0s - Properties: +--cache-read-retries - - Config: db_wait_time - - Env Var: RCLONE_CACHE_DB_WAIT_TIME - - Type: Duration - - Default: 1s +How many times to retry a read from a cache storage. - #### --cache-description +Since reading from a cache stream is independent from downloading file +data, readers can get to a point where there's no more data in the +cache. Most of the times this can indicate a connectivity issue if cache +isn't able to provide file data anymore. - Description of the remote +For really slow connections, increase this to a point where the stream +is able to provide data but your experience will be very stuttering. - Properties: +Properties: - - Config: description - - Env Var: RCLONE_CACHE_DESCRIPTION - - Type: string - - Required: false +- Config: read_retries +- Env Var: RCLONE_CACHE_READ_RETRIES +- Type: int +- Default: 10 - ## Backend commands +--cache-workers - Here are the commands specific to the cache backend. +How many workers should run in parallel to download chunks. - Run them with +Higher values will mean more parallel processing (better CPU needed) and +more concurrent requests on the cloud provider. This impacts several +aspects like the cloud provider API limits, more stress on the hardware +that rclone runs on but it also means that streams will be more fluid +and data will be available much more faster to readers. - rclone backend COMMAND remote: +Note: If the optional Plex integration is enabled then this setting will +adapt to the type of reading performed and the value specified here will +be used as a maximum number of workers to use. - The help below will explain what arguments each command takes. +Properties: - See the [backend](https://rclone.org/commands/rclone_backend/) command for more - info on how to pass options and arguments. +- Config: workers +- Env Var: RCLONE_CACHE_WORKERS +- Type: int +- Default: 4 - These can be run on a running backend using the rc command - [backend/command](https://rclone.org/rc/#backend-command). +--cache-chunk-no-memory - ### stats +Disable the in-memory cache for storing chunks during streaming. - Print stats on the cache backend in JSON format. +By default, cache will keep file data during streaming in RAM as well to +provide it to readers as fast as possible. - rclone backend stats remote: [options] [+] +This transient data is evicted as soon as it is read and the number of +chunks stored doesn't exceed the number of workers. However, depending +on other settings like "cache-chunk-size" and "cache-workers" this +footprint can increase if there are parallel streams too (multiple files +being read at the same time). +If the hardware permits it, use this feature to provide an overall +better performance during streaming but it can also be disabled if RAM +is not available on the local machine. +Properties: - # Chunker +- Config: chunk_no_memory +- Env Var: RCLONE_CACHE_CHUNK_NO_MEMORY +- Type: bool +- Default: false - The `chunker` overlay transparently splits large files into smaller chunks - during upload to wrapped remote and transparently assembles them back - when the file is downloaded. This allows to effectively overcome size limits - imposed by storage providers. +--cache-rps - ## Configuration +Limits the number of requests per second to the source FS (-1 to +disable). - To use it, first set up the underlying remote following the configuration - instructions for that remote. You can also use a local pathname instead of - a remote. +This setting places a hard limit on the number of requests per second +that cache will be doing to the cloud provider remote and try to respect +that value by setting waits between reads. - First check your chosen remote is working - we'll call it `remote:path` here. - Note that anything inside `remote:path` will be chunked and anything outside - won't. This means that if you are using a bucket-based remote (e.g. S3, B2, swift) - then you should probably put the bucket in the remote `s3:bucket`. +If you find that you're getting banned or limited on the cloud provider +through cache and know that a smaller number of requests per second will +allow you to work with it then you can use this setting for that. - Now configure `chunker` using `rclone config`. We will call this one `overlay` - to separate it from the `remote` itself. +A good balance of all the other settings should make this setting +useless but it is available to set for more special cases. -No remotes found, make a new one? n) New remote s) Set configuration -password q) Quit config n/s/q> n name> overlay Type of storage to -configure. Choose a number from below, or type in your own value [snip] -XX / Transparently chunk/split large files  "chunker" [snip] Storage> -chunker Remote to chunk/unchunk. Normally should contain a ':' and a -path, e.g. "myremote:path/to/dir", "myremote:bucket" or maybe -"myremote:" (not recommended). Enter a string value. Press Enter for the -default (""). remote> remote:path Files larger than chunk size will be -split in chunks. Enter a size with suffix K,M,G,T. Press Enter for the -default ("2G"). chunk_size> 100M Choose how chunker handles hash sums. -All modes but "none" require metadata. Enter a string value. Press Enter -for the default ("md5"). Choose a number from below, or type in your own -value 1 / Pass any hash supported by wrapped remote for non-chunked -files, return nothing otherwise  "none" 2 / MD5 for composite files - "md5" 3 / SHA1 for composite files  "sha1" 4 / MD5 for all files - "md5all" 5 / SHA1 for all files  "sha1all" 6 / Copying a file to -chunker will request MD5 from the source falling back to SHA1 if -unsupported  "md5quick" 7 / Similar to "md5quick" but prefers SHA1 over -MD5  "sha1quick" hash_type> md5 Edit advanced config? (y/n) y) Yes n) No -y/n> n Remote config -------------------- [overlay] type = chunker -remote = remote:bucket chunk_size = 100M hash_type = md5 --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y +NOTE: This will limit the number of requests during streams but other +API calls to the cloud provider like directory listings will still pass. +Properties: - ### Specifying the remote +- Config: rps +- Env Var: RCLONE_CACHE_RPS +- Type: int +- Default: -1 - In normal use, make sure the remote has a `:` in. If you specify the remote - without a `:` then rclone will use a local directory of that name. - So if you use a remote of `/path/to/secret/files` then rclone will - chunk stuff in that directory. If you use a remote of `name` then rclone - will put files in a directory called `name` in the current directory. +--cache-writes +Cache file data on writes through the FS. - ### Chunking +If you need to read files immediately after you upload them through +cache you can enable this flag to have their data stored in the cache +store at the same time during upload. - When rclone starts a file upload, chunker checks the file size. If it - doesn't exceed the configured chunk size, chunker will just pass the file - to the wrapped remote (however, see caveat below). If a file is large, chunker will transparently cut - data in pieces with temporary names and stream them one by one, on the fly. - Each data chunk will contain the specified number of bytes, except for the - last one which may have less data. If file size is unknown in advance - (this is called a streaming upload), chunker will internally create - a temporary copy, record its size and repeat the above process. +Properties: - When upload completes, temporary chunk files are finally renamed. - This scheme guarantees that operations can be run in parallel and look - from outside as atomic. - A similar method with hidden temporary chunks is used for other operations - (copy/move/rename, etc.). If an operation fails, hidden chunks are normally - destroyed, and the target composite file stays intact. - - When a composite file download is requested, chunker transparently - assembles it by concatenating data chunks in order. As the split is trivial - one could even manually concatenate data chunks together to obtain the - original content. - - When the `list` rclone command scans a directory on wrapped remote, - the potential chunk files are accounted for, grouped and assembled into - composite directory entries. Any temporary chunks are hidden. - - List and other commands can sometimes come across composite files with - missing or invalid chunks, e.g. shadowed by like-named directory or - another file. This usually means that wrapped file system has been directly - tampered with or damaged. If chunker detects a missing chunk it will - by default print warning, skip the whole incomplete group of chunks but - proceed with current command. - You can set the `--chunker-fail-hard` flag to have commands abort with - error message in such cases. - - **Caveat**: As it is now, chunker will always create a temporary file in the - backend and then rename it, even if the file is below the chunk threshold. - This will result in unnecessary API calls and can severely restrict throughput - when handling transfers primarily composed of small files on some backends (e.g. Box). - A workaround to this issue is to use chunker only for files above the chunk threshold - via `--min-size` and then perform a separate call without chunker on the remaining - files. - - - #### Chunk names - - The default chunk name format is `*.rclone_chunk.###`, hence by default - chunk names are `BIG_FILE_NAME.rclone_chunk.001`, - `BIG_FILE_NAME.rclone_chunk.002` etc. You can configure another name format - using the `name_format` configuration file option. The format uses asterisk - `*` as a placeholder for the base file name and one or more consecutive - hash characters `#` as a placeholder for sequential chunk number. - There must be one and only one asterisk. The number of consecutive hash - characters defines the minimum length of a string representing a chunk number. - If decimal chunk number has less digits than the number of hashes, it is - left-padded by zeros. If the decimal string is longer, it is left intact. - By default numbering starts from 1 but there is another option that allows - user to start from 0, e.g. for compatibility with legacy software. - - For example, if name format is `big_*-##.part` and original file name is - `data.txt` and numbering starts from 0, then the first chunk will be named - `big_data.txt-00.part`, the 99th chunk will be `big_data.txt-98.part` - and the 302nd chunk will become `big_data.txt-301.part`. - - Note that `list` assembles composite directory entries only when chunk names - match the configured format and treats non-conforming file names as normal - non-chunked files. - - When using `norename` transactions, chunk names will additionally have a unique - file version suffix. For example, `BIG_FILE_NAME.rclone_chunk.001_bp562k`. - - - ### Metadata - - Besides data chunks chunker will by default create metadata object for - a composite file. The object is named after the original file. - Chunker allows user to disable metadata completely (the `none` format). - Note that metadata is normally not created for files smaller than the - configured chunk size. This may change in future rclone releases. - - #### Simple JSON metadata format - - This is the default format. It supports hash sums and chunk validation - for composite files. Meta objects carry the following fields: - - - `ver` - version of format, currently `1` - - `size` - total size of composite file - - `nchunks` - number of data chunks in file - - `md5` - MD5 hashsum of composite file (if present) - - `sha1` - SHA1 hashsum (if present) - - `txn` - identifies current version of the file - - There is no field for composite file name as it's simply equal to the name - of meta object on the wrapped remote. Please refer to respective sections - for details on hashsums and modified time handling. - - #### No metadata - - You can disable meta objects by setting the meta format option to `none`. - In this mode chunker will scan directory for all files that follow - configured chunk name format, group them by detecting chunks with the same - base name and show group names as virtual composite files. - This method is more prone to missing chunk errors (especially missing - last chunk) than format with metadata enabled. - - - ### Hashsums - - Chunker supports hashsums only when a compatible metadata is present. - Hence, if you choose metadata format of `none`, chunker will report hashsum - as `UNSUPPORTED`. - - Please note that by default metadata is stored only for composite files. - If a file is smaller than configured chunk size, chunker will transparently - redirect hash requests to wrapped remote, so support depends on that. - You will see the empty string as a hashsum of requested type for small - files if the wrapped remote doesn't support it. - - Many storage backends support MD5 and SHA1 hash types, so does chunker. - With chunker you can choose one or another but not both. - MD5 is set by default as the most supported type. - Since chunker keeps hashes for composite files and falls back to the - wrapped remote hash for non-chunked ones, we advise you to choose the same - hash type as supported by wrapped remote so that your file listings - look coherent. - - If your storage backend does not support MD5 or SHA1 but you need consistent - file hashing, configure chunker with `md5all` or `sha1all`. These two modes - guarantee given hash for all files. If wrapped remote doesn't support it, - chunker will then add metadata to all files, even small. However, this can - double the amount of small files in storage and incur additional service charges. - You can even use chunker to force md5/sha1 support in any other remote - at expense of sidecar meta objects by setting e.g. `hash_type=sha1all` - to force hashsums and `chunk_size=1P` to effectively disable chunking. - - Normally, when a file is copied to chunker controlled remote, chunker - will ask the file source for compatible file hash and revert to on-the-fly - calculation if none is found. This involves some CPU overhead but provides - a guarantee that given hashsum is available. Also, chunker will reject - a server-side copy or move operation if source and destination hashsum - types are different resulting in the extra network bandwidth, too. - In some rare cases this may be undesired, so chunker provides two optional - choices: `sha1quick` and `md5quick`. If the source does not support primary - hash type and the quick mode is enabled, chunker will try to fall back to - the secondary type. This will save CPU and bandwidth but can result in empty - hashsums at destination. Beware of consequences: the `sync` command will - revert (sometimes silently) to time/size comparison if compatible hashsums - between source and target are not found. - - - ### Modification times - - Chunker stores modification times using the wrapped remote so support - depends on that. For a small non-chunked file the chunker overlay simply - manipulates modification time of the wrapped remote file. - For a composite file with metadata chunker will get and set - modification time of the metadata object on the wrapped remote. - If file is chunked but metadata format is `none` then chunker will - use modification time of the first data chunk. - - - ### Migrations - - The idiomatic way to migrate to a different chunk size, hash type, transaction - style or chunk naming scheme is to: - - - Collect all your chunked files under a directory and have your - chunker remote point to it. - - Create another directory (most probably on the same cloud storage) - and configure a new remote with desired metadata format, - hash type, chunk naming etc. - - Now run `rclone sync --interactive oldchunks: newchunks:` and all your data - will be transparently converted in transfer. - This may take some time, yet chunker will try server-side - copy if possible. - - After checking data integrity you may remove configuration section - of the old remote. - - If rclone gets killed during a long operation on a big composite file, - hidden temporary chunks may stay in the directory. They will not be - shown by the `list` command but will eat up your account quota. - Please note that the `deletefile` command deletes only active - chunks of a file. As a workaround, you can use remote of the wrapped - file system to see them. - An easy way to get rid of hidden garbage is to copy littered directory - somewhere using the chunker remote and purge the original directory. - The `copy` command will copy only active chunks while the `purge` will - remove everything including garbage. - - - ### Caveats and Limitations - - Chunker requires wrapped remote to support server-side `move` (or `copy` + - `delete`) operations, otherwise it will explicitly refuse to start. - This is because it internally renames temporary chunk files to their final - names when an operation completes successfully. - - Chunker encodes chunk number in file name, so with default `name_format` - setting it adds 17 characters. Also chunker adds 7 characters of temporary - suffix during operations. Many file systems limit base file name without path - by 255 characters. Using rclone's crypt remote as a base file system limits - file name by 143 characters. Thus, maximum name length is 231 for most files - and 119 for chunker-over-crypt. A user in need can change name format to - e.g. `*.rcc##` and save 10 characters (provided at most 99 chunks per file). - - Note that a move implemented using the copy-and-delete method may incur - double charging with some cloud storage providers. - - Chunker will not automatically rename existing chunks when you run - `rclone config` on a live remote and change the chunk name format. - Beware that in result of this some files which have been treated as chunks - before the change can pop up in directory listings as normal files - and vice versa. The same warning holds for the chunk size. - If you desperately need to change critical chunking settings, you should - run data migration as described above. - - If wrapped remote is case insensitive, the chunker overlay will inherit - that property (so you can't have a file called "Hello.doc" and "hello.doc" - in the same directory). - - Chunker included in rclone releases up to `v1.54` can sometimes fail to - detect metadata produced by recent versions of rclone. We recommend users - to keep rclone up-to-date to avoid data corruption. - - Changing `transactions` is dangerous and requires explicit migration. - - - ### Standard options - - Here are the Standard options specific to chunker (Transparently chunk/split large files). - - #### --chunker-remote +- Config: writes +- Env Var: RCLONE_CACHE_WRITES +- Type: bool +- Default: false +--cache-tmp-upload-path + +Directory to keep temporary files until they are uploaded. + +This is the path where cache will use as a temporary storage for new +files that need to be uploaded to the cloud provider. + +Specifying a value will enable this feature. Without it, it is +completely disabled and files will be uploaded directly to the cloud +provider + +Properties: + +- Config: tmp_upload_path +- Env Var: RCLONE_CACHE_TMP_UPLOAD_PATH +- Type: string +- Required: false + +--cache-tmp-wait-time + +How long should files be stored in local cache before being uploaded. + +This is the duration that a file must wait in the temporary location +cache-tmp-upload-path before it is selected for upload. + +Note that only one file is uploaded at a time and it can take longer to +start the upload if a queue formed for this purpose. + +Properties: + +- Config: tmp_wait_time +- Env Var: RCLONE_CACHE_TMP_WAIT_TIME +- Type: Duration +- Default: 15s + +--cache-db-wait-time + +How long to wait for the DB to be available - 0 is unlimited. + +Only one process can have the DB open at any one time, so rclone waits +for this duration for the DB to become available before it gives an +error. + +If you set it to 0 then it will wait forever. + +Properties: + +- Config: db_wait_time +- Env Var: RCLONE_CACHE_DB_WAIT_TIME +- Type: Duration +- Default: 1s + +--cache-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_CACHE_DESCRIPTION +- Type: string +- Required: false + +Backend commands + +Here are the commands specific to the cache backend. + +Run them with + + rclone backend COMMAND remote: + +The help below will explain what arguments each command takes. + +See the backend command for more info on how to pass options and +arguments. + +These can be run on a running backend using the rc command +backend/command. + +stats + +Print stats on the cache backend in JSON format. + + rclone backend stats remote: [options] [+] + +Chunker + +The chunker overlay transparently splits large files into smaller chunks +during upload to wrapped remote and transparently assembles them back +when the file is downloaded. This allows to effectively overcome size +limits imposed by storage providers. + +Configuration + +To use it, first set up the underlying remote following the +configuration instructions for that remote. You can also use a local +pathname instead of a remote. + +First check your chosen remote is working - we'll call it remote:path +here. Note that anything inside remote:path will be chunked and anything +outside won't. This means that if you are using a bucket-based remote +(e.g. S3, B2, swift) then you should probably put the bucket in the +remote s3:bucket. + +Now configure chunker using rclone config. We will call this one overlay +to separate it from the remote itself. + + No remotes found, make a new one? + n) New remote + s) Set configuration password + q) Quit config + n/s/q> n + name> overlay + Type of storage to configure. + Choose a number from below, or type in your own value + [snip] + XX / Transparently chunk/split large files + \ "chunker" + [snip] + Storage> chunker Remote to chunk/unchunk. - Normally should contain a ':' and a path, e.g. "myremote:path/to/dir", "myremote:bucket" or maybe "myremote:" (not recommended). - - Properties: - - - Config: remote - - Env Var: RCLONE_CHUNKER_REMOTE - - Type: string - - Required: true - - #### --chunker-chunk-size - + Enter a string value. Press Enter for the default (""). + remote> remote:path Files larger than chunk size will be split in chunks. + Enter a size with suffix K,M,G,T. Press Enter for the default ("2G"). + chunk_size> 100M + Choose how chunker handles hash sums. All modes but "none" require metadata. + Enter a string value. Press Enter for the default ("md5"). + Choose a number from below, or type in your own value + 1 / Pass any hash supported by wrapped remote for non-chunked files, return nothing otherwise + \ "none" + 2 / MD5 for composite files + \ "md5" + 3 / SHA1 for composite files + \ "sha1" + 4 / MD5 for all files + \ "md5all" + 5 / SHA1 for all files + \ "sha1all" + 6 / Copying a file to chunker will request MD5 from the source falling back to SHA1 if unsupported + \ "md5quick" + 7 / Similar to "md5quick" but prefers SHA1 over MD5 + \ "sha1quick" + hash_type> md5 + Edit advanced config? (y/n) + y) Yes + n) No + y/n> n + Remote config + -------------------- + [overlay] + type = chunker + remote = remote:bucket + chunk_size = 100M + hash_type = md5 + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y + +Specifying the remote + +In normal use, make sure the remote has a : in. If you specify the +remote without a : then rclone will use a local directory of that name. +So if you use a remote of /path/to/secret/files then rclone will chunk +stuff in that directory. If you use a remote of name then rclone will +put files in a directory called name in the current directory. + +Chunking + +When rclone starts a file upload, chunker checks the file size. If it +doesn't exceed the configured chunk size, chunker will just pass the +file to the wrapped remote (however, see caveat below). If a file is +large, chunker will transparently cut data in pieces with temporary +names and stream them one by one, on the fly. Each data chunk will +contain the specified number of bytes, except for the last one which may +have less data. If file size is unknown in advance (this is called a +streaming upload), chunker will internally create a temporary copy, +record its size and repeat the above process. + +When upload completes, temporary chunk files are finally renamed. This +scheme guarantees that operations can be run in parallel and look from +outside as atomic. A similar method with hidden temporary chunks is used +for other operations (copy/move/rename, etc.). If an operation fails, +hidden chunks are normally destroyed, and the target composite file +stays intact. + +When a composite file download is requested, chunker transparently +assembles it by concatenating data chunks in order. As the split is +trivial one could even manually concatenate data chunks together to +obtain the original content. + +When the list rclone command scans a directory on wrapped remote, the +potential chunk files are accounted for, grouped and assembled into +composite directory entries. Any temporary chunks are hidden. + +List and other commands can sometimes come across composite files with +missing or invalid chunks, e.g. shadowed by like-named directory or +another file. This usually means that wrapped file system has been +directly tampered with or damaged. If chunker detects a missing chunk it +will by default print warning, skip the whole incomplete group of chunks +but proceed with current command. You can set the --chunker-fail-hard +flag to have commands abort with error message in such cases. + +Caveat: As it is now, chunker will always create a temporary file in the +backend and then rename it, even if the file is below the chunk +threshold. This will result in unnecessary API calls and can severely +restrict throughput when handling transfers primarily composed of small +files on some backends (e.g. Box). A workaround to this issue is to use +chunker only for files above the chunk threshold via --min-size and then +perform a separate call without chunker on the remaining files. + +Chunk names + +The default chunk name format is *.rclone_chunk.###, hence by default +chunk names are BIG_FILE_NAME.rclone_chunk.001, +BIG_FILE_NAME.rclone_chunk.002 etc. You can configure another name +format using the name_format configuration file option. The format uses +asterisk * as a placeholder for the base file name and one or more +consecutive hash characters # as a placeholder for sequential chunk +number. There must be one and only one asterisk. The number of +consecutive hash characters defines the minimum length of a string +representing a chunk number. If decimal chunk number has less digits +than the number of hashes, it is left-padded by zeros. If the decimal +string is longer, it is left intact. By default numbering starts from 1 +but there is another option that allows user to start from 0, e.g. for +compatibility with legacy software. + +For example, if name format is big_*-##.part and original file name is +data.txt and numbering starts from 0, then the first chunk will be named +big_data.txt-00.part, the 99th chunk will be big_data.txt-98.part and +the 302nd chunk will become big_data.txt-301.part. + +Note that list assembles composite directory entries only when chunk +names match the configured format and treats non-conforming file names +as normal non-chunked files. + +When using norename transactions, chunk names will additionally have a +unique file version suffix. For example, +BIG_FILE_NAME.rclone_chunk.001_bp562k. + +Metadata + +Besides data chunks chunker will by default create metadata object for a +composite file. The object is named after the original file. Chunker +allows user to disable metadata completely (the none format). Note that +metadata is normally not created for files smaller than the configured +chunk size. This may change in future rclone releases. + +Simple JSON metadata format + +This is the default format. It supports hash sums and chunk validation +for composite files. Meta objects carry the following fields: + +- ver - version of format, currently 1 +- size - total size of composite file +- nchunks - number of data chunks in file +- md5 - MD5 hashsum of composite file (if present) +- sha1 - SHA1 hashsum (if present) +- txn - identifies current version of the file + +There is no field for composite file name as it's simply equal to the +name of meta object on the wrapped remote. Please refer to respective +sections for details on hashsums and modified time handling. + +No metadata + +You can disable meta objects by setting the meta format option to none. +In this mode chunker will scan directory for all files that follow +configured chunk name format, group them by detecting chunks with the +same base name and show group names as virtual composite files. This +method is more prone to missing chunk errors (especially missing last +chunk) than format with metadata enabled. + +Hashsums + +Chunker supports hashsums only when a compatible metadata is present. +Hence, if you choose metadata format of none, chunker will report +hashsum as UNSUPPORTED. + +Please note that by default metadata is stored only for composite files. +If a file is smaller than configured chunk size, chunker will +transparently redirect hash requests to wrapped remote, so support +depends on that. You will see the empty string as a hashsum of requested +type for small files if the wrapped remote doesn't support it. + +Many storage backends support MD5 and SHA1 hash types, so does chunker. +With chunker you can choose one or another but not both. MD5 is set by +default as the most supported type. Since chunker keeps hashes for +composite files and falls back to the wrapped remote hash for +non-chunked ones, we advise you to choose the same hash type as +supported by wrapped remote so that your file listings look coherent. + +If your storage backend does not support MD5 or SHA1 but you need +consistent file hashing, configure chunker with md5all or sha1all. These +two modes guarantee given hash for all files. If wrapped remote doesn't +support it, chunker will then add metadata to all files, even small. +However, this can double the amount of small files in storage and incur +additional service charges. You can even use chunker to force md5/sha1 +support in any other remote at expense of sidecar meta objects by +setting e.g. hash_type=sha1all to force hashsums and chunk_size=1P to +effectively disable chunking. + +Normally, when a file is copied to chunker controlled remote, chunker +will ask the file source for compatible file hash and revert to +on-the-fly calculation if none is found. This involves some CPU overhead +but provides a guarantee that given hashsum is available. Also, chunker +will reject a server-side copy or move operation if source and +destination hashsum types are different resulting in the extra network +bandwidth, too. In some rare cases this may be undesired, so chunker +provides two optional choices: sha1quick and md5quick. If the source +does not support primary hash type and the quick mode is enabled, +chunker will try to fall back to the secondary type. This will save CPU +and bandwidth but can result in empty hashsums at destination. Beware of +consequences: the sync command will revert (sometimes silently) to +time/size comparison if compatible hashsums between source and target +are not found. + +Modification times + +Chunker stores modification times using the wrapped remote so support +depends on that. For a small non-chunked file the chunker overlay simply +manipulates modification time of the wrapped remote file. For a +composite file with metadata chunker will get and set modification time +of the metadata object on the wrapped remote. If file is chunked but +metadata format is none then chunker will use modification time of the +first data chunk. + +Migrations + +The idiomatic way to migrate to a different chunk size, hash type, +transaction style or chunk naming scheme is to: + +- Collect all your chunked files under a directory and have your + chunker remote point to it. +- Create another directory (most probably on the same cloud storage) + and configure a new remote with desired metadata format, hash type, + chunk naming etc. +- Now run rclone sync --interactive oldchunks: newchunks: and all your + data will be transparently converted in transfer. This may take some + time, yet chunker will try server-side copy if possible. +- After checking data integrity you may remove configuration section + of the old remote. + +If rclone gets killed during a long operation on a big composite file, +hidden temporary chunks may stay in the directory. They will not be +shown by the list command but will eat up your account quota. Please +note that the deletefile command deletes only active chunks of a file. +As a workaround, you can use remote of the wrapped file system to see +them. An easy way to get rid of hidden garbage is to copy littered +directory somewhere using the chunker remote and purge the original +directory. The copy command will copy only active chunks while the purge +will remove everything including garbage. + +Caveats and Limitations + +Chunker requires wrapped remote to support server-side move (or copy + +delete) operations, otherwise it will explicitly refuse to start. This +is because it internally renames temporary chunk files to their final +names when an operation completes successfully. + +Chunker encodes chunk number in file name, so with default name_format +setting it adds 17 characters. Also chunker adds 7 characters of +temporary suffix during operations. Many file systems limit base file +name without path by 255 characters. Using rclone's crypt remote as a +base file system limits file name by 143 characters. Thus, maximum name +length is 231 for most files and 119 for chunker-over-crypt. A user in +need can change name format to e.g. *.rcc## and save 10 characters +(provided at most 99 chunks per file). + +Note that a move implemented using the copy-and-delete method may incur +double charging with some cloud storage providers. + +Chunker will not automatically rename existing chunks when you run +rclone config on a live remote and change the chunk name format. Beware +that in result of this some files which have been treated as chunks +before the change can pop up in directory listings as normal files and +vice versa. The same warning holds for the chunk size. If you +desperately need to change critical chunking settings, you should run +data migration as described above. + +If wrapped remote is case insensitive, the chunker overlay will inherit +that property (so you can't have a file called "Hello.doc" and +"hello.doc" in the same directory). + +Chunker included in rclone releases up to v1.54 can sometimes fail to +detect metadata produced by recent versions of rclone. We recommend +users to keep rclone up-to-date to avoid data corruption. + +Changing transactions is dangerous and requires explicit migration. + +Standard options + +Here are the Standard options specific to chunker (Transparently +chunk/split large files). + +--chunker-remote + +Remote to chunk/unchunk. + +Normally should contain a ':' and a path, e.g. "myremote:path/to/dir", +"myremote:bucket" or maybe "myremote:" (not recommended). + +Properties: + +- Config: remote +- Env Var: RCLONE_CHUNKER_REMOTE +- Type: string +- Required: true + +--chunker-chunk-size + +Files larger than chunk size will be split in chunks. - Properties: +Properties: - - Config: chunk_size - - Env Var: RCLONE_CHUNKER_CHUNK_SIZE - - Type: SizeSuffix - - Default: 2Gi +- Config: chunk_size +- Env Var: RCLONE_CHUNKER_CHUNK_SIZE +- Type: SizeSuffix +- Default: 2Gi + +--chunker-hash-type + +Choose how chunker handles hash sums. + +All modes but "none" require metadata. - #### --chunker-hash-type +Properties: - Choose how chunker handles hash sums. +- Config: hash_type +- Env Var: RCLONE_CHUNKER_HASH_TYPE +- Type: string +- Default: "md5" +- Examples: + - "none" + - Pass any hash supported by wrapped remote for non-chunked + files. + - Return nothing otherwise. + - "md5" + - MD5 for composite files. + - "sha1" + - SHA1 for composite files. + - "md5all" + - MD5 for all files. + - "sha1all" + - SHA1 for all files. + - "md5quick" + - Copying a file to chunker will request MD5 from the source. + - Falling back to SHA1 if unsupported. + - "sha1quick" + - Similar to "md5quick" but prefers SHA1 over MD5. + +Advanced options + +Here are the Advanced options specific to chunker (Transparently +chunk/split large files). + +--chunker-name-format + +String format of chunk file names. + +The two placeholders are: base file name (*) and chunk number (#...). +There must be one and only one asterisk and one or more consecutive hash +characters. If chunk number has less digits than the number of hashes, +it is left-padded by zeros. If there are more digits in the number, they +are left as is. Possible chunk files are ignored if their name does not +match given format. - All modes but "none" require metadata. +Properties: - Properties: +- Config: name_format +- Env Var: RCLONE_CHUNKER_NAME_FORMAT +- Type: string +- Default: "*.rclone_chunk.###" - - Config: hash_type - - Env Var: RCLONE_CHUNKER_HASH_TYPE - - Type: string - - Default: "md5" - - Examples: - - "none" - - Pass any hash supported by wrapped remote for non-chunked files. - - Return nothing otherwise. - - "md5" - - MD5 for composite files. - - "sha1" - - SHA1 for composite files. - - "md5all" - - MD5 for all files. - - "sha1all" - - SHA1 for all files. - - "md5quick" - - Copying a file to chunker will request MD5 from the source. - - Falling back to SHA1 if unsupported. - - "sha1quick" - - Similar to "md5quick" but prefers SHA1 over MD5. +--chunker-start-from - ### Advanced options +Minimum valid chunk number. Usually 0 or 1. - Here are the Advanced options specific to chunker (Transparently chunk/split large files). +By default chunk numbers start from 1. - #### --chunker-name-format +Properties: - String format of chunk file names. +- Config: start_from +- Env Var: RCLONE_CHUNKER_START_FROM +- Type: int +- Default: 1 - The two placeholders are: base file name (*) and chunk number (#...). - There must be one and only one asterisk and one or more consecutive hash characters. - If chunk number has less digits than the number of hashes, it is left-padded by zeros. - If there are more digits in the number, they are left as is. - Possible chunk files are ignored if their name does not match given format. +--chunker-meta-format - Properties: +Format of the metadata object or "none". - - Config: name_format - - Env Var: RCLONE_CHUNKER_NAME_FORMAT - - Type: string - - Default: "*.rclone_chunk.###" +By default "simplejson". Metadata is a small JSON file named after the +composite file. - #### --chunker-start-from +Properties: - Minimum valid chunk number. Usually 0 or 1. - - By default chunk numbers start from 1. - - Properties: - - - Config: start_from - - Env Var: RCLONE_CHUNKER_START_FROM - - Type: int - - Default: 1 - - #### --chunker-meta-format - - Format of the metadata object or "none". - - By default "simplejson". - Metadata is a small JSON file named after the composite file. - - Properties: - - - Config: meta_format - - Env Var: RCLONE_CHUNKER_META_FORMAT - - Type: string - - Default: "simplejson" - - Examples: - - "none" - - Do not use metadata files at all. - - Requires hash type "none". - - "simplejson" - - Simple JSON supports hash sums and chunk validation. - - - - It has the following fields: ver, size, nchunks, md5, sha1. - - #### --chunker-fail-hard - - Choose how chunker should handle files with missing or invalid chunks. - - Properties: - - - Config: fail_hard - - Env Var: RCLONE_CHUNKER_FAIL_HARD - - Type: bool - - Default: false - - Examples: - - "true" - - Report errors and abort current command. - - "false" - - Warn user, skip incomplete file and proceed. - - #### --chunker-transactions - - Choose how chunker should handle temporary files during transactions. - - Properties: - - - Config: transactions - - Env Var: RCLONE_CHUNKER_TRANSACTIONS - - Type: string - - Default: "rename" - - Examples: - - "rename" - - Rename temporary files after a successful transaction. - - "norename" - - Leave temporary file names and write transaction ID to metadata file. - - Metadata is required for no rename transactions (meta format cannot be "none"). - - If you are using norename transactions you should be careful not to downgrade Rclone - - as older versions of Rclone don't support this transaction style and will misinterpret - - files manipulated by norename transactions. - - This method is EXPERIMENTAL, don't use on production systems. - - "auto" - - Rename or norename will be used depending on capabilities of the backend. - - If meta format is set to "none", rename transactions will always be used. - - This method is EXPERIMENTAL, don't use on production systems. - - #### --chunker-description - - Description of the remote - - Properties: - - - Config: description - - Env Var: RCLONE_CHUNKER_DESCRIPTION - - Type: string - - Required: false - - - - # Citrix ShareFile - - [Citrix ShareFile](https://sharefile.com) is a secure file sharing and transfer service aimed as business. - - ## Configuration - - The initial setup for Citrix ShareFile involves getting a token from - Citrix ShareFile which you can in your browser. `rclone config` walks you - through it. - - Here is an example of how to make a remote called `remote`. 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. Enter a string value. Press Enter for the default (""). -Choose a number from below, or type in your own value XX / Citrix -Sharefile  "sharefile" Storage> sharefile ** See help for sharefile -backend at: https://rclone.org/sharefile/ ** - -ID of the root folder - -Leave blank to access "Personal Folders". You can use one of the -standard values here or any folder ID (long hex number ID). Enter a -string value. Press Enter for the default (""). Choose a number from -below, or type in your own value 1 / Access the Personal Folders. -(Default)  "" 2 / Access the Favorites folder.  "favorites" 3 / Access -all the shared folders.  "allshared" 4 / Access all the individual -connectors.  "connectors" 5 / Access the home, favorites, and shared -folders as well as the connectors.  "top" root_folder_id> Edit advanced -config? (y/n) y) Yes n) No y/n> n Remote config Use web browser to -automatically authenticate rclone with remote? * Say Y if the machine -running rclone has a web browser you can use * Say N if running rclone -on a (remote) machine without web browser access If not sure try Y. If Y -failed, try N. y) Yes n) No y/n> y If your browser doesn't open -automatically go to the following link: -http://127.0.0.1:53682/auth?state=XXX Log in and authorize rclone for -access Waiting for code... Got code -------------------- [remote] type = -sharefile endpoint = https://XXX.sharefile.com token = -{"access_token":"XXX","token_type":"bearer","refresh_token":"XXX","expiry":"2019-09-30T19:41:45.878561877+01:00"} --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y - - - See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a - machine with no Internet browser available. - - Note that rclone runs a webserver on your local machine to collect the - token as returned from Citrix ShareFile. This only runs from the moment it opens - your browser to the moment you get back the verification code. This - is on `http://127.0.0.1:53682/` and this it may require you to unblock - it temporarily if you are running a host firewall. - - Once configured you can then use `rclone` like this, - - List directories in top level of your ShareFile - - rclone lsd remote: - - List all the files in your ShareFile - - rclone ls remote: - - To copy a local directory to an ShareFile directory called backup - - rclone copy /home/source remote:backup - - Paths may be as deep as required, e.g. `remote:directory/subdirectory`. - - ### Modification times and hashes - - ShareFile allows modification times to be set on objects accurate to 1 - second. These will be used to detect whether objects need syncing or - not. - - ShareFile supports MD5 type hashes, so you can use the `--checksum` - flag. - - ### Transfers - - For files above 128 MiB rclone will use a chunked transfer. Rclone will - upload up to `--transfers` chunks at the same time (shared among all - the multipart uploads). Chunks are buffered in memory and are - normally 64 MiB so increasing `--transfers` will increase memory use. - - ### Restricted filename characters - - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | \\ | 0x5C | \ | - | * | 0x2A | * | - | < | 0x3C | < | - | > | 0x3E | > | - | ? | 0x3F | ? | - | : | 0x3A | : | - | \| | 0x7C | | | - | " | 0x22 | " | - - File names can also not start or end with the following characters. - These only get replaced if they are the first or last character in the - name: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | SP | 0x20 | ␠ | - | . | 0x2E | . | - - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. - - - ### Standard options - - Here are the Standard options specific to sharefile (Citrix Sharefile). - - #### --sharefile-client-id - - OAuth Client Id. - - Leave blank normally. - - Properties: - - - Config: client_id - - Env Var: RCLONE_SHAREFILE_CLIENT_ID - - Type: string - - Required: false - - #### --sharefile-client-secret - - OAuth Client Secret. - - Leave blank normally. - - Properties: - - - Config: client_secret - - Env Var: RCLONE_SHAREFILE_CLIENT_SECRET - - Type: string - - Required: false - - #### --sharefile-root-folder-id - - ID of the root folder. +- Config: meta_format +- Env Var: RCLONE_CHUNKER_META_FORMAT +- Type: string +- Default: "simplejson" +- Examples: + - "none" + - Do not use metadata files at all. + - Requires hash type "none". + - "simplejson" + - Simple JSON supports hash sums and chunk validation. + - + - It has the following fields: ver, size, nchunks, md5, sha1. + +--chunker-fail-hard + +Choose how chunker should handle files with missing or invalid chunks. + +Properties: + +- Config: fail_hard +- Env Var: RCLONE_CHUNKER_FAIL_HARD +- Type: bool +- Default: false +- Examples: + - "true" + - Report errors and abort current command. + - "false" + - Warn user, skip incomplete file and proceed. + +--chunker-transactions + +Choose how chunker should handle temporary files during transactions. + +Properties: + +- Config: transactions +- Env Var: RCLONE_CHUNKER_TRANSACTIONS +- Type: string +- Default: "rename" +- Examples: + - "rename" + - Rename temporary files after a successful transaction. + - "norename" + - Leave temporary file names and write transaction ID to + metadata file. + - Metadata is required for no rename transactions (meta format + cannot be "none"). + - If you are using norename transactions you should be careful + not to downgrade Rclone + - as older versions of Rclone don't support this transaction + style and will misinterpret + - files manipulated by norename transactions. + - This method is EXPERIMENTAL, don't use on production + systems. + - "auto" + - Rename or norename will be used depending on capabilities of + the backend. + - If meta format is set to "none", rename transactions will + always be used. + - This method is EXPERIMENTAL, don't use on production + systems. + +--chunker-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_CHUNKER_DESCRIPTION +- Type: string +- Required: false + +Citrix ShareFile + +Citrix ShareFile is a secure file sharing and transfer service aimed as +business. + +Configuration + +The initial setup for Citrix ShareFile involves getting a token from +Citrix ShareFile which you can in your browser. rclone config walks you +through it. + +Here is an example of how to make a remote called remote. 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. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + XX / Citrix Sharefile + \ "sharefile" + Storage> sharefile + ** See help for sharefile backend at: https://rclone.org/sharefile/ ** + + ID of the root folder Leave blank to access "Personal Folders". You can use one of the standard values here or any folder ID (long hex number ID). + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + 1 / Access the Personal Folders. (Default) + \ "" + 2 / Access the Favorites folder. + \ "favorites" + 3 / Access all the shared folders. + \ "allshared" + 4 / Access all the individual connectors. + \ "connectors" + 5 / Access the home, favorites, and shared folders as well as the connectors. + \ "top" + root_folder_id> + Edit advanced config? (y/n) + y) Yes + n) No + y/n> n + Remote config + Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access + If not sure try Y. If Y failed, try N. + y) Yes + n) No + y/n> y + If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=XXX + Log in and authorize rclone for access + Waiting for code... + Got code + -------------------- + [remote] + type = sharefile + endpoint = https://XXX.sharefile.com + token = {"access_token":"XXX","token_type":"bearer","refresh_token":"XXX","expiry":"2019-09-30T19:41:45.878561877+01:00"} + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y - Properties: +See the remote setup docs for how to set it up on a machine with no +Internet browser available. - - Config: root_folder_id - - Env Var: RCLONE_SHAREFILE_ROOT_FOLDER_ID - - Type: string - - Required: false - - Examples: - - "" - - Access the Personal Folders (default). - - "favorites" - - Access the Favorites folder. - - "allshared" - - Access all the shared folders. - - "connectors" - - Access all the individual connectors. - - "top" - - Access the home, favorites, and shared folders as well as the connectors. +Note that rclone runs a webserver on your local machine to collect the +token as returned from Citrix ShareFile. This only runs from the moment +it opens your browser to the moment you get back the verification code. +This is on http://127.0.0.1:53682/ and this it may require you to +unblock it temporarily if you are running a host firewall. - ### Advanced options +Once configured you can then use rclone like this, - Here are the Advanced options specific to sharefile (Citrix Sharefile). +List directories in top level of your ShareFile - #### --sharefile-token + rclone lsd remote: - OAuth Access Token as a JSON blob. +List all the files in your ShareFile + + rclone ls remote: + +To copy a local directory to an ShareFile directory called backup + + rclone copy /home/source remote:backup + +Paths may be as deep as required, e.g. remote:directory/subdirectory. + +Modification times and hashes + +ShareFile allows modification times to be set on objects accurate to 1 +second. These will be used to detect whether objects need syncing or +not. - Properties: +ShareFile supports MD5 type hashes, so you can use the --checksum flag. - - Config: token - - Env Var: RCLONE_SHAREFILE_TOKEN - - Type: string - - Required: false +Transfers - #### --sharefile-auth-url +For files above 128 MiB rclone will use a chunked transfer. Rclone will +upload up to --transfers chunks at the same time (shared among all the +multipart uploads). Chunks are buffered in memory and are normally 64 +MiB so increasing --transfers will increase memory use. - Auth server URL. +Restricted filename characters - Leave blank to use the provider defaults. +In addition to the default restricted characters set the following +characters are also replaced: - Properties: + Character Value Replacement + ----------- ------- ------------- + \ 0x5C \ + * 0x2A * + < 0x3C < + > 0x3E > + ? 0x3F ? + : 0x3A : + | 0x7C | + " 0x22 " - - Config: auth_url - - Env Var: RCLONE_SHAREFILE_AUTH_URL - - Type: string - - Required: false +File names can also not start or end with the following characters. +These only get replaced if they are the first or last character in the +name: - #### --sharefile-token-url + Character Value Replacement + ----------- ------- ------------- + SP 0x20 ␠ + . 0x2E . - Token server url. +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - Leave blank to use the provider defaults. +Standard options - Properties: +Here are the Standard options specific to sharefile (Citrix Sharefile). - - Config: token_url - - Env Var: RCLONE_SHAREFILE_TOKEN_URL - - Type: string - - Required: false +--sharefile-client-id - #### --sharefile-upload-cutoff +OAuth Client Id. - Cutoff for switching to multipart upload. +Leave blank normally. - Properties: +Properties: - - Config: upload_cutoff - - Env Var: RCLONE_SHAREFILE_UPLOAD_CUTOFF - - Type: SizeSuffix - - Default: 128Mi +- Config: client_id +- Env Var: RCLONE_SHAREFILE_CLIENT_ID +- Type: string +- Required: false - #### --sharefile-chunk-size +--sharefile-client-secret - Upload chunk size. +OAuth Client Secret. - Must a power of 2 >= 256k. +Leave blank normally. - Making this larger will improve performance, but note that each chunk - is buffered in memory one per transfer. +Properties: - Reducing this will reduce memory usage but decrease performance. +- Config: client_secret +- Env Var: RCLONE_SHAREFILE_CLIENT_SECRET +- Type: string +- Required: false - Properties: +--sharefile-root-folder-id - - Config: chunk_size - - Env Var: RCLONE_SHAREFILE_CHUNK_SIZE - - Type: SizeSuffix - - Default: 64Mi +ID of the root folder. - #### --sharefile-endpoint +Leave blank to access "Personal Folders". You can use one of the +standard values here or any folder ID (long hex number ID). - Endpoint for API calls. +Properties: - This is usually auto discovered as part of the oauth process, but can - be set manually to something like: https://XXX.sharefile.com +- Config: root_folder_id +- Env Var: RCLONE_SHAREFILE_ROOT_FOLDER_ID +- Type: string +- Required: false +- Examples: + - "" + - Access the Personal Folders (default). + - "favorites" + - Access the Favorites folder. + - "allshared" + - Access all the shared folders. + - "connectors" + - Access all the individual connectors. + - "top" + - Access the home, favorites, and shared folders as well as + the connectors. +Advanced options - Properties: +Here are the Advanced options specific to sharefile (Citrix Sharefile). - - Config: endpoint - - Env Var: RCLONE_SHAREFILE_ENDPOINT - - Type: string - - Required: false +--sharefile-token - #### --sharefile-encoding +OAuth Access Token as a JSON blob. - The encoding for the backend. +Properties: - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +- Config: token +- Env Var: RCLONE_SHAREFILE_TOKEN +- Type: string +- Required: false - Properties: +--sharefile-auth-url - - Config: encoding - - Env Var: RCLONE_SHAREFILE_ENCODING - - Type: Encoding - - Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot +Auth server URL. - #### --sharefile-description +Leave blank to use the provider defaults. - Description of the remote +Properties: - Properties: +- Config: auth_url +- Env Var: RCLONE_SHAREFILE_AUTH_URL +- Type: string +- Required: false - - Config: description - - Env Var: RCLONE_SHAREFILE_DESCRIPTION - - Type: string - - Required: false +--sharefile-token-url +Token server url. - ## Limitations +Leave blank to use the provider defaults. - Note that ShareFile is case insensitive so you can't have a file called - "Hello.doc" and one called "hello.doc". +Properties: - ShareFile only supports filenames up to 256 characters in length. +- Config: token_url +- Env Var: RCLONE_SHAREFILE_TOKEN_URL +- Type: string +- Required: false - `rclone about` is not supported by the Citrix ShareFile backend. Backends without - this capability cannot determine free space for an rclone mount or - use policy `mfs` (most free space) as a member of an rclone union - remote. +--sharefile-upload-cutoff - See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) +Cutoff for switching to multipart upload. - # Crypt +Properties: - Rclone `crypt` remotes encrypt and decrypt other remotes. +- Config: upload_cutoff +- Env Var: RCLONE_SHAREFILE_UPLOAD_CUTOFF +- Type: SizeSuffix +- Default: 128Mi - A remote of type `crypt` does not access a [storage system](https://rclone.org/overview/) - directly, but instead wraps another remote, which in turn accesses - the storage system. This is similar to how [alias](https://rclone.org/alias/), - [union](https://rclone.org/union/), [chunker](https://rclone.org/chunker/) - and a few others work. It makes the usage very flexible, as you can - add a layer, in this case an encryption layer, on top of any other - backend, even in multiple layers. Rclone's functionality - can be used as with any other remote, for example you can - [mount](https://rclone.org/commands/rclone_mount/) a crypt remote. - - Accessing a storage system through a crypt remote realizes client-side - encryption, which makes it safe to keep your data in a location you do - not trust will not get compromised. - When working against the `crypt` remote, rclone will automatically - encrypt (before uploading) and decrypt (after downloading) on your local - system as needed on the fly, leaving the data encrypted at rest in the - wrapped remote. If you access the storage system using an application - other than rclone, or access the wrapped remote directly using rclone, - there will not be any encryption/decryption: Downloading existing content - will just give you the encrypted (scrambled) format, and anything you - upload will *not* become encrypted. - - The encryption is a secret-key encryption (also called symmetric key encryption) - algorithm, where a password (or pass phrase) is used to generate real encryption key. - The password can be supplied by user, or you may chose to let rclone - generate one. It will be stored in the configuration file, in a lightly obscured form. - If you are in an environment where you are not able to keep your configuration - secured, you should add - [configuration encryption](https://rclone.org/docs/#configuration-encryption) - as protection. As long as you have this configuration file, you will be able to - decrypt your data. Without the configuration file, as long as you remember - the password (or keep it in a safe place), you can re-create the configuration - and gain access to the existing data. You may also configure a corresponding - remote in a different installation to access the same data. - See below for guidance to [changing password](#changing-password). - - Encryption uses [cryptographic salt](https://en.wikipedia.org/wiki/Salt_(cryptography)), - to permute the encryption key so that the same string may be encrypted in - different ways. When configuring the crypt remote it is optional to enter a salt, - or to let rclone generate a unique salt. If omitted, rclone uses a built-in unique string. - Normally in cryptography, the salt is stored together with the encrypted content, - and do not have to be memorized by the user. This is not the case in rclone, - because rclone does not store any additional information on the remotes. Use of - custom salt is effectively a second password that must be memorized. - - [File content](#file-encryption) encryption is performed using - [NaCl SecretBox](https://godoc.org/golang.org/x/crypto/nacl/secretbox), - based on XSalsa20 cipher and Poly1305 for integrity. - [Names](#name-encryption) (file- and directory names) are also encrypted - by default, but this has some implications and is therefore - possible to be turned off. - - ## Configuration - - Here is an example of how to make a remote called `secret`. - - To use `crypt`, first set up the underlying remote. Follow the - `rclone config` instructions for the specific backend. - - Before configuring the crypt remote, check the underlying remote is - working. In this example the underlying remote is called `remote`. - We will configure a path `path` within this remote to contain the - encrypted content. Anything inside `remote:path` will be encrypted - and anything outside will not. - - Configure `crypt` using `rclone config`. In this example the `crypt` - remote is called `secret`, to differentiate it from the underlying - `remote`. - - When you are done you can use the crypt remote named `secret` just - as you would with any other remote, e.g. `rclone copy D:\docs secret:\docs`, - and rclone will encrypt and decrypt as needed on the fly. - If you access the wrapped remote `remote:path` directly you will bypass - the encryption, and anything you read will be in encrypted form, and - anything you write will be unencrypted. To avoid issues it is best to - configure a dedicated path for encrypted content, and access it - exclusively through a crypt remote. - -No remotes found, make a new one? n) New remote s) Set configuration -password q) Quit config n/s/q> n name> secret Type of storage to -configure. Enter a string value. Press Enter for the default (""). -Choose a number from below, or type in your own value [snip] XX / -Encrypt/Decrypt a remote  "crypt" [snip] Storage> crypt ** See help for -crypt backend at: https://rclone.org/crypt/ ** - -Remote to encrypt/decrypt. Normally should contain a ':' and a path, eg -"myremote:path/to/dir", "myremote:bucket" or maybe "myremote:" (not -recommended). Enter a string value. Press Enter for the default (""). -remote> remote:path How to encrypt the filenames. Enter a string value. -Press Enter for the default ("standard"). Choose a number from below, or -type in your own value. / Encrypt the filenames. 1 | See the docs for -the details.  "standard" 2 / Very simple filename obfuscation. - "obfuscate" / Don't encrypt the file names. 3 | Adds a ".bin" extension -only.  "off" filename_encryption> Option to either encrypt directory -names or leave them intact. - -NB If filename_encryption is "off" then this option will do nothing. -Enter a boolean value (true or false). Press Enter for the default -("true"). Choose a number from below, or type in your own value 1 / -Encrypt directory names.  "true" 2 / Don't encrypt directory names, -leave them intact.  "false" directory_name_encryption> Password or pass -phrase for encryption. y) Yes type in my own password g) Generate random -password y/g> y Enter the password: password: Confirm the password: -password: Password or pass phrase for salt. Optional but recommended. -Should be different to the previous password. y) Yes type in my own -password g) Generate random password n) No leave this optional password -blank (default) y/g/n> g Password strength in bits. 64 is just about -memorable 128 is secure 1024 is the maximum Bits> 128 Your password is: -JAsJvRcgR-_veXNfy_sGmQ Use this password? Please note that an obscured -version of this password (and not the password itself) will be stored -under your configuration file, so keep this generated password in a safe -place. y) Yes (default) n) No y/n> Edit advanced config? (y/n) y) Yes n) -No (default) y/n> Remote config -------------------- [secret] type = -crypt remote = remote:path password = *** ENCRYPTED password2 = -ENCRYPTED *** -------------------- y) Yes this is OK (default) e) Edit -this remote d) Delete this remote y/e/d> - - - **Important** The crypt password stored in `rclone.conf` is lightly - obscured. That only protects it from cursory inspection. It is not - secure unless [configuration encryption](https://rclone.org/docs/#configuration-encryption) of `rclone.conf` is specified. - - A long passphrase is recommended, or `rclone config` can generate a - random one. - - The obscured password is created using AES-CTR with a static key. The - salt is stored verbatim at the beginning of the obscured password. This - static key is shared between all versions of rclone. - - If you reconfigure rclone with the same passwords/passphrases - elsewhere it will be compatible, but the obscured version will be different - due to the different salt. - - Rclone does not encrypt - - * file length - this can be calculated within 16 bytes - * modification time - used for syncing - - ### Specifying the remote - - When configuring the remote to encrypt/decrypt, you may specify any - string that rclone accepts as a source/destination of other commands. - - The primary use case is to specify the path into an already configured - remote (e.g. `remote:path/to/dir` or `remote:bucket`), such that - data in a remote untrusted location can be stored encrypted. - - You may also specify a local filesystem path, such as - `/path/to/dir` on Linux, `C:\path\to\dir` on Windows. By creating - a crypt remote pointing to such a local filesystem path, you can - use rclone as a utility for pure local file encryption, for example - to keep encrypted files on a removable USB drive. - - **Note**: A string which do not contain a `:` will by rclone be treated - as a relative path in the local filesystem. For example, if you enter - the name `remote` without the trailing `:`, it will be treated as - a subdirectory of the current directory with name "remote". - - If a path `remote:path/to/dir` is specified, rclone stores encrypted - files in `path/to/dir` on the remote. With file name encryption, files - saved to `secret:subdir/subfile` are stored in the unencrypted path - `path/to/dir` but the `subdir/subpath` element is encrypted. - - The path you specify does not have to exist, rclone will create - it when needed. - - If you intend to use the wrapped remote both directly for keeping - unencrypted content, as well as through a crypt remote for encrypted - content, it is recommended to point the crypt remote to a separate - directory within the wrapped remote. If you use a bucket-based storage - system (e.g. Swift, S3, Google Compute Storage, B2) it is generally - advisable to wrap the crypt remote around a specific bucket (`s3:bucket`). - If wrapping around the entire root of the storage (`s3:`), and use the - optional file name encryption, rclone will encrypt the bucket name. - - ### Changing password - - Should the password, or the configuration file containing a lightly obscured - form of the password, be compromised, you need to re-encrypt your data with - a new password. Since rclone uses secret-key encryption, where the encryption - key is generated directly from the password kept on the client, it is not - possible to change the password/key of already encrypted content. Just changing - the password configured for an existing crypt remote means you will no longer - able to decrypt any of the previously encrypted content. The only possibility - is to re-upload everything via a crypt remote configured with your new password. - - Depending on the size of your data, your bandwidth, storage quota etc, there are - different approaches you can take: - - If you have everything in a different location, for example on your local system, - you could remove all of the prior encrypted files, change the password for your - configured crypt remote (or delete and re-create the crypt configuration), - and then re-upload everything from the alternative location. - - If you have enough space on the storage system you can create a new crypt - remote pointing to a separate directory on the same backend, and then use - rclone to copy everything from the original crypt remote to the new, - effectively decrypting everything on the fly using the old password and - re-encrypting using the new password. When done, delete the original crypt - remote directory and finally the rclone crypt configuration with the old password. - All data will be streamed from the storage system and back, so you will - get half the bandwidth and be charged twice if you have upload and download quota - on the storage system. - - **Note**: A security problem related to the random password generator - was fixed in rclone version 1.53.3 (released 2020-11-19). Passwords generated - by rclone config in version 1.49.0 (released 2019-08-26) to 1.53.2 - (released 2020-10-26) are not considered secure and should be changed. - If you made up your own password, or used rclone version older than 1.49.0 or - newer than 1.53.2 to generate it, you are *not* affected by this issue. - See [issue #4783](https://github.com/rclone/rclone/issues/4783) for more - details, and a tool you can use to check if you are affected. +--sharefile-chunk-size - ### Example +Upload chunk size. - Create the following file structure using "standard" file name - encryption. +Must a power of 2 >= 256k. -plaintext/ ├── file0.txt ├── file1.txt └── subdir ├── file2.txt ├── -file3.txt └── subsubdir └── file4.txt +Making this larger will improve performance, but note that each chunk is +buffered in memory one per transfer. +Reducing this will reduce memory usage but decrease performance. - Copy these to the remote, and list them +Properties: -$ rclone -q copy plaintext secret: $ rclone -q ls secret: 7 file1.txt 6 -file0.txt 8 subdir/file2.txt 10 subdir/subsubdir/file4.txt 9 -subdir/file3.txt +- Config: chunk_size +- Env Var: RCLONE_SHAREFILE_CHUNK_SIZE +- Type: SizeSuffix +- Default: 64Mi +--sharefile-endpoint - The crypt remote looks like +Endpoint for API calls. -$ rclone -q ls remote:path 55 hagjclgavj2mbiqm6u6cnjjqcg 54 -v05749mltvv1tf4onltun46gls 57 -86vhrsv86mpbtd3a0akjuqslj8/dlj7fkq4kdq72emafg7a7s41uo 58 -86vhrsv86mpbtd3a0akjuqslj8/7uu829995du6o42n32otfhjqp4/b9pausrfansjth5ob3jkdqd4lc -56 86vhrsv86mpbtd3a0akjuqslj8/8njh1sk437gttmep3p70g81aps +This is usually auto discovered as part of the oauth process, but can be +set manually to something like: https://XXX.sharefile.com +Properties: - The directory structure is preserved +- Config: endpoint +- Env Var: RCLONE_SHAREFILE_ENDPOINT +- Type: string +- Required: false -$ rclone -q ls secret:subdir 8 file2.txt 9 file3.txt 10 -subsubdir/file4.txt +--sharefile-encoding +The encoding for the backend. - Without file name encryption `.bin` extensions are added to underlying - names. This prevents the cloud provider attempting to interpret file - content. +See the encoding section in the overview for more info. -$ rclone -q ls remote:path 54 file0.txt.bin 57 subdir/file3.txt.bin 56 -subdir/file2.txt.bin 58 subdir/subsubdir/file4.txt.bin 55 file1.txt.bin +Properties: +- Config: encoding +- Env Var: RCLONE_SHAREFILE_ENCODING +- Type: Encoding +- Default: + Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot - ### File name encryption modes +--sharefile-description - Off +Description of the remote. - * doesn't hide file names or directory structure - * allows for longer file names (~246 characters) - * can use sub paths and copy single files +Properties: - Standard +- Config: description +- Env Var: RCLONE_SHAREFILE_DESCRIPTION +- Type: string +- Required: false - * file names encrypted - * file names can't be as long (~143 characters) - * can use sub paths and copy single files - * directory structure visible - * identical files names will have identical uploaded names - * can use shortcuts to shorten the directory recursion +Limitations - Obfuscation +Note that ShareFile is case insensitive so you can't have a file called +"Hello.doc" and one called "hello.doc". - This is a simple "rotate" of the filename, with each file having a rot - distance based on the filename. Rclone stores the distance at the - beginning of the filename. A file called "hello" may become "53.jgnnq". +ShareFile only supports filenames up to 256 characters in length. - Obfuscation is not a strong encryption of filenames, but hinders - automated scanning tools picking up on filename patterns. It is an - intermediate between "off" and "standard" which allows for longer path - segment names. +rclone about is not supported by the Citrix ShareFile backend. Backends +without this capability cannot determine free space for an rclone mount +or use policy mfs (most free space) as a member of an rclone union +remote. - There is a possibility with some unicode based filenames that the - obfuscation is weak and may map lower case characters to upper case - equivalents. +See List of backends that do not support rclone about and rclone about - Obfuscation cannot be relied upon for strong protection. +Crypt - * file names very lightly obfuscated - * file names can be longer than standard encryption - * can use sub paths and copy single files - * directory structure visible - * identical files names will have identical uploaded names +Rclone crypt remotes encrypt and decrypt other remotes. - Cloud storage systems have limits on file name length and - total path length which rclone is more likely to breach using - "Standard" file name encryption. Where file names are less than 156 - characters in length issues should not be encountered, irrespective of - cloud storage provider. +A remote of type crypt does not access a storage system directly, but +instead wraps another remote, which in turn accesses the storage system. +This is similar to how alias, union, chunker and a few others work. It +makes the usage very flexible, as you can add a layer, in this case an +encryption layer, on top of any other backend, even in multiple layers. +Rclone's functionality can be used as with any other remote, for example +you can mount a crypt remote. - An experimental advanced option `filename_encoding` is now provided to - address this problem to a certain degree. - For cloud storage systems with case sensitive file names (e.g. Google Drive), - `base64` can be used to reduce file name length. - For cloud storage systems using UTF-16 to store file names internally - (e.g. OneDrive, Dropbox, Box), `base32768` can be used to drastically reduce - file name length. - - An alternative, future rclone file name encryption mode may tolerate - backend provider path length limits. - - ### Directory name encryption - - Crypt offers the option of encrypting dir names or leaving them intact. - There are two options: - - True - - Encrypts the whole file path including directory names - Example: - `1/12/123.txt` is encrypted to - `p0e52nreeaj0a5ea7s64m4j72s/l42g6771hnv3an9cgc8cr2n1ng/qgm4avr35m5loi1th53ato71v0` - - False - - Only encrypts file names, skips directory names - Example: - `1/12/123.txt` is encrypted to - `1/12/qgm4avr35m5loi1th53ato71v0` - - - ### Modification times and hashes - - Crypt stores modification times using the underlying remote so support - depends on that. - - Hashes are not stored for crypt. However the data integrity is - protected by an extremely strong crypto authenticator. - - Use the `rclone cryptcheck` command to check the - integrity of an encrypted remote instead of `rclone check` which can't - check the checksums properly. - - - ### Standard options - - Here are the Standard options specific to crypt (Encrypt/Decrypt a remote). - - #### --crypt-remote +Accessing a storage system through a crypt remote realizes client-side +encryption, which makes it safe to keep your data in a location you do +not trust will not get compromised. When working against the crypt +remote, rclone will automatically encrypt (before uploading) and decrypt +(after downloading) on your local system as needed on the fly, leaving +the data encrypted at rest in the wrapped remote. If you access the +storage system using an application other than rclone, or access the +wrapped remote directly using rclone, there will not be any +encryption/decryption: Downloading existing content will just give you +the encrypted (scrambled) format, and anything you upload will not +become encrypted. + +The encryption is a secret-key encryption (also called symmetric key +encryption) algorithm, where a password (or pass phrase) is used to +generate real encryption key. The password can be supplied by user, or +you may chose to let rclone generate one. It will be stored in the +configuration file, in a lightly obscured form. If you are in an +environment where you are not able to keep your configuration secured, +you should add configuration encryption as protection. As long as you +have this configuration file, you will be able to decrypt your data. +Without the configuration file, as long as you remember the password (or +keep it in a safe place), you can re-create the configuration and gain +access to the existing data. You may also configure a corresponding +remote in a different installation to access the same data. See below +for guidance to changing password. + +Encryption uses cryptographic salt, to permute the encryption key so +that the same string may be encrypted in different ways. When +configuring the crypt remote it is optional to enter a salt, or to let +rclone generate a unique salt. If omitted, rclone uses a built-in unique +string. Normally in cryptography, the salt is stored together with the +encrypted content, and do not have to be memorized by the user. This is +not the case in rclone, because rclone does not store any additional +information on the remotes. Use of custom salt is effectively a second +password that must be memorized. + +File content encryption is performed using NaCl SecretBox, based on +XSalsa20 cipher and Poly1305 for integrity. Names (file- and directory +names) are also encrypted by default, but this has some implications and +is therefore possible to be turned off. + +Configuration + +Here is an example of how to make a remote called secret. + +To use crypt, first set up the underlying remote. Follow the +rclone config instructions for the specific backend. + +Before configuring the crypt remote, check the underlying remote is +working. In this example the underlying remote is called remote. We will +configure a path path within this remote to contain the encrypted +content. Anything inside remote:path will be encrypted and anything +outside will not. + +Configure crypt using rclone config. In this example the crypt remote is +called secret, to differentiate it from the underlying remote. + +When you are done you can use the crypt remote named secret just as you +would with any other remote, e.g. rclone copy D:\docs secret:\docs, and +rclone will encrypt and decrypt as needed on the fly. If you access the +wrapped remote remote:path directly you will bypass the encryption, and +anything you read will be in encrypted form, and anything you write will +be unencrypted. To avoid issues it is best to configure a dedicated path +for encrypted content, and access it exclusively through a crypt remote. + + No remotes found, make a new one? + n) New remote + s) Set configuration password + q) Quit config + n/s/q> n + name> secret + Type of storage to configure. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + [snip] + XX / Encrypt/Decrypt a remote + \ "crypt" + [snip] + Storage> crypt + ** See help for crypt backend at: https://rclone.org/crypt/ ** Remote to encrypt/decrypt. - - Normally should contain a ':' and a path, e.g. "myremote:path/to/dir", + Normally should contain a ':' and a path, eg "myremote:path/to/dir", "myremote:bucket" or maybe "myremote:" (not recommended). - - Properties: - - - Config: remote - - Env Var: RCLONE_CRYPT_REMOTE - - Type: string - - Required: true - - #### --crypt-filename-encryption - + Enter a string value. Press Enter for the default (""). + remote> remote:path How to encrypt the filenames. - - Properties: - - - Config: filename_encryption - - Env Var: RCLONE_CRYPT_FILENAME_ENCRYPTION - - Type: string - - Default: "standard" - - Examples: - - "standard" - - Encrypt the filenames. - - See the docs for the details. - - "obfuscate" - - Very simple filename obfuscation. - - "off" - - Don't encrypt the file names. - - Adds a ".bin", or "suffix" extension only. - - #### --crypt-directory-name-encryption - + Enter a string value. Press Enter for the default ("standard"). + Choose a number from below, or type in your own value. + / Encrypt the filenames. + 1 | See the docs for the details. + \ "standard" + 2 / Very simple filename obfuscation. + \ "obfuscate" + / Don't encrypt the file names. + 3 | Adds a ".bin" extension only. + \ "off" + filename_encryption> Option to either encrypt directory names or leave them intact. NB If filename_encryption is "off" then this option will do nothing. - - Properties: - - - Config: directory_name_encryption - - Env Var: RCLONE_CRYPT_DIRECTORY_NAME_ENCRYPTION - - Type: bool - - Default: true - - Examples: - - "true" - - Encrypt directory names. - - "false" - - Don't encrypt directory names, leave them intact. - - #### --crypt-password - + Enter a boolean value (true or false). Press Enter for the default ("true"). + Choose a number from below, or type in your own value + 1 / Encrypt directory names. + \ "true" + 2 / Don't encrypt directory names, leave them intact. + \ "false" + directory_name_encryption> Password or pass phrase for encryption. - - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - - Properties: - - - Config: password - - Env Var: RCLONE_CRYPT_PASSWORD - - Type: string - - Required: true - - #### --crypt-password2 - - Password or pass phrase for salt. - - Optional but recommended. + y) Yes type in my own password + g) Generate random password + y/g> y + Enter the password: + password: + Confirm the password: + password: + Password or pass phrase for salt. Optional but recommended. Should be different to the previous password. + y) Yes type in my own password + g) Generate random password + n) No leave this optional password blank (default) + y/g/n> g + Password strength in bits. + 64 is just about memorable + 128 is secure + 1024 is the maximum + Bits> 128 + Your password is: JAsJvRcgR-_veXNfy_sGmQ + Use this password? Please note that an obscured version of this + password (and not the password itself) will be stored under your + configuration file, so keep this generated password in a safe place. + y) Yes (default) + n) No + y/n> + Edit advanced config? (y/n) + y) Yes + n) No (default) + y/n> + Remote config + -------------------- + [secret] + type = crypt + remote = remote:path + password = *** ENCRYPTED *** + password2 = *** ENCRYPTED *** + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> + +Important The crypt password stored in rclone.conf is lightly obscured. +That only protects it from cursory inspection. It is not secure unless +configuration encryption of rclone.conf is specified. + +A long passphrase is recommended, or rclone config can generate a random +one. + +The obscured password is created using AES-CTR with a static key. The IV +(nonce) is stored verbatim at the beginning of the obscured password. +This static key is shared between all versions of rclone. + +If you reconfigure rclone with the same passwords/passphrases elsewhere +it will be compatible, but the obscured version will be different due to +the different salt. + +Rclone does not encrypt + +- file length - this can be calculated within 16 bytes +- modification time - used for syncing + +Specifying the remote + +When configuring the remote to encrypt/decrypt, you may specify any +string that rclone accepts as a source/destination of other commands. + +The primary use case is to specify the path into an already configured +remote (e.g. remote:path/to/dir or remote:bucket), such that data in a +remote untrusted location can be stored encrypted. + +You may also specify a local filesystem path, such as /path/to/dir on +Linux, C:\path\to\dir on Windows. By creating a crypt remote pointing to +such a local filesystem path, you can use rclone as a utility for pure +local file encryption, for example to keep encrypted files on a +removable USB drive. + +Note: A string which do not contain a : will by rclone be treated as a +relative path in the local filesystem. For example, if you enter the +name remote without the trailing :, it will be treated as a subdirectory +of the current directory with name "remote". + +If a path remote:path/to/dir is specified, rclone stores encrypted files +in path/to/dir on the remote. With file name encryption, files saved to +secret:subdir/subfile are stored in the unencrypted path path/to/dir but +the subdir/subpath element is encrypted. + +The path you specify does not have to exist, rclone will create it when +needed. + +If you intend to use the wrapped remote both directly for keeping +unencrypted content, as well as through a crypt remote for encrypted +content, it is recommended to point the crypt remote to a separate +directory within the wrapped remote. If you use a bucket-based storage +system (e.g. Swift, S3, Google Compute Storage, B2) it is generally +advisable to wrap the crypt remote around a specific bucket (s3:bucket). +If wrapping around the entire root of the storage (s3:), and use the +optional file name encryption, rclone will encrypt the bucket name. + +Changing password + +Should the password, or the configuration file containing a lightly +obscured form of the password, be compromised, you need to re-encrypt +your data with a new password. Since rclone uses secret-key encryption, +where the encryption key is generated directly from the password kept on +the client, it is not possible to change the password/key of already +encrypted content. Just changing the password configured for an existing +crypt remote means you will no longer able to decrypt any of the +previously encrypted content. The only possibility is to re-upload +everything via a crypt remote configured with your new password. + +Depending on the size of your data, your bandwidth, storage quota etc, +there are different approaches you can take: - If you have everything in +a different location, for example on your local system, you could remove +all of the prior encrypted files, change the password for your +configured crypt remote (or delete and re-create the crypt +configuration), and then re-upload everything from the alternative +location. - If you have enough space on the storage system you can +create a new crypt remote pointing to a separate directory on the same +backend, and then use rclone to copy everything from the original crypt +remote to the new, effectively decrypting everything on the fly using +the old password and re-encrypting using the new password. When done, +delete the original crypt remote directory and finally the rclone crypt +configuration with the old password. All data will be streamed from the +storage system and back, so you will get half the bandwidth and be +charged twice if you have upload and download quota on the storage +system. + +Note: A security problem related to the random password generator was +fixed in rclone version 1.53.3 (released 2020-11-19). Passwords +generated by rclone config in version 1.49.0 (released 2019-08-26) to +1.53.2 (released 2020-10-26) are not considered secure and should be +changed. If you made up your own password, or used rclone version older +than 1.49.0 or newer than 1.53.2 to generate it, you are not affected by +this issue. See issue #4783 for more details, and a tool you can use to +check if you are affected. + +Example + +Create the following file structure using "standard" file name +encryption. + + plaintext/ + ├── file0.txt + ├── file1.txt + └── subdir + ├── file2.txt + ├── file3.txt + └── subsubdir + └── file4.txt + +Copy these to the remote, and list them + + $ rclone -q copy plaintext secret: + $ rclone -q ls secret: + 7 file1.txt + 6 file0.txt + 8 subdir/file2.txt + 10 subdir/subsubdir/file4.txt + 9 subdir/file3.txt + +The crypt remote looks like + + $ rclone -q ls remote:path + 55 hagjclgavj2mbiqm6u6cnjjqcg + 54 v05749mltvv1tf4onltun46gls + 57 86vhrsv86mpbtd3a0akjuqslj8/dlj7fkq4kdq72emafg7a7s41uo + 58 86vhrsv86mpbtd3a0akjuqslj8/7uu829995du6o42n32otfhjqp4/b9pausrfansjth5ob3jkdqd4lc + 56 86vhrsv86mpbtd3a0akjuqslj8/8njh1sk437gttmep3p70g81aps + +The directory structure is preserved + + $ rclone -q ls secret:subdir + 8 file2.txt + 9 file3.txt + 10 subsubdir/file4.txt + +Without file name encryption .bin extensions are added to underlying +names. This prevents the cloud provider attempting to interpret file +content. + + $ rclone -q ls remote:path + 54 file0.txt.bin + 57 subdir/file3.txt.bin + 56 subdir/file2.txt.bin + 58 subdir/subsubdir/file4.txt.bin + 55 file1.txt.bin + +File name encryption modes + +Off + +- doesn't hide file names or directory structure +- allows for longer file names (~246 characters) +- can use sub paths and copy single files - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). +Standard - Properties: +- file names encrypted +- file names can't be as long (~143 characters) +- can use sub paths and copy single files +- directory structure visible +- identical files names will have identical uploaded names +- can use shortcuts to shorten the directory recursion + +Obfuscation + +This is a simple "rotate" of the filename, with each file having a rot +distance based on the filename. Rclone stores the distance at the +beginning of the filename. A file called "hello" may become "53.jgnnq". + +Obfuscation is not a strong encryption of filenames, but hinders +automated scanning tools picking up on filename patterns. It is an +intermediate between "off" and "standard" which allows for longer path +segment names. - - Config: password2 - - Env Var: RCLONE_CRYPT_PASSWORD2 - - Type: string - - Required: false +There is a possibility with some unicode based filenames that the +obfuscation is weak and may map lower case characters to upper case +equivalents. - ### Advanced options +Obfuscation cannot be relied upon for strong protection. - Here are the Advanced options specific to crypt (Encrypt/Decrypt a remote). +- file names very lightly obfuscated +- file names can be longer than standard encryption +- can use sub paths and copy single files +- directory structure visible +- identical files names will have identical uploaded names - #### --crypt-server-side-across-configs +Cloud storage systems have limits on file name length and total path +length which rclone is more likely to breach using "Standard" file name +encryption. Where file names are 143 or fewer characters in length +issues should not be encountered, irrespective of cloud storage +provider. - Deprecated: use --server-side-across-configs instead. +An experimental advanced option filename_encoding is now provided to +address this problem to a certain degree. For cloud storage systems with +case sensitive file names (e.g. Google Drive), base64 can be used to +reduce file name length. For cloud storage systems using UTF-16 to store +file names internally (e.g. OneDrive, Dropbox, Box), base32768 can be +used to drastically reduce file name length. - Allow server-side operations (e.g. copy) to work across different crypt configs. +An alternative, future rclone file name encryption mode may tolerate +backend provider path length limits. - Normally this option is not what you want, but if you have two crypts - pointing to the same backend you can use it. +Directory name encryption - This can be used, for example, to change file name encryption type - without re-uploading all the data. Just make two crypt backends - pointing to two different directories with the single changed - parameter and use rclone move to move the files between the crypt - remotes. +Crypt offers the option of encrypting dir names or leaving them intact. +There are two options: - Properties: +True - - Config: server_side_across_configs - - Env Var: RCLONE_CRYPT_SERVER_SIDE_ACROSS_CONFIGS - - Type: bool - - Default: false +Encrypts the whole file path including directory names Example: +1/12/123.txt is encrypted to +p0e52nreeaj0a5ea7s64m4j72s/l42g6771hnv3an9cgc8cr2n1ng/qgm4avr35m5loi1th53ato71v0 - #### --crypt-show-mapping +False - For all files listed show how the names encrypt. +Only encrypts file names, skips directory names Example: 1/12/123.txt is +encrypted to 1/12/qgm4avr35m5loi1th53ato71v0 - If this flag is set then for each file that the remote is asked to - list, it will log (at level INFO) a line stating the decrypted file - name and the encrypted file name. +Modification times and hashes - This is so you can work out which encrypted names are which decrypted - names just in case you need to do something with the encrypted file - names, or for debugging purposes. +Crypt stores modification times using the underlying remote so support +depends on that. - Properties: +Hashes are not stored for crypt. However the data integrity is protected +by an extremely strong crypto authenticator. - - Config: show_mapping - - Env Var: RCLONE_CRYPT_SHOW_MAPPING - - Type: bool - - Default: false +Use the rclone cryptcheck command to check the integrity of an encrypted +remote instead of rclone check which can't check the checksums properly. - #### --crypt-no-data-encryption +Standard options - Option to either encrypt file data or leave it unencrypted. +Here are the Standard options specific to crypt (Encrypt/Decrypt a +remote). - Properties: +--crypt-remote - - Config: no_data_encryption - - Env Var: RCLONE_CRYPT_NO_DATA_ENCRYPTION - - Type: bool - - Default: false - - Examples: - - "true" - - Don't encrypt file data, leave it unencrypted. - - "false" - - Encrypt file data. +Remote to encrypt/decrypt. - #### --crypt-pass-bad-blocks +Normally should contain a ':' and a path, e.g. "myremote:path/to/dir", +"myremote:bucket" or maybe "myremote:" (not recommended). - If set this will pass bad blocks through as all 0. +Properties: - This should not be set in normal operation, it should only be set if - trying to recover an encrypted file with errors and it is desired to - recover as much of the file as possible. +- Config: remote +- Env Var: RCLONE_CRYPT_REMOTE +- Type: string +- Required: true - Properties: +--crypt-filename-encryption - - Config: pass_bad_blocks - - Env Var: RCLONE_CRYPT_PASS_BAD_BLOCKS - - Type: bool - - Default: false +How to encrypt the filenames. - #### --crypt-strict-names +Properties: - If set, this will raise an error when crypt comes across a filename that can't be decrypted. +- Config: filename_encryption +- Env Var: RCLONE_CRYPT_FILENAME_ENCRYPTION +- Type: string +- Default: "standard" +- Examples: + - "standard" + - Encrypt the filenames. + - See the docs for the details. + - "obfuscate" + - Very simple filename obfuscation. + - "off" + - Don't encrypt the file names. + - Adds a ".bin", or "suffix" extension only. - (By default, rclone will just log a NOTICE and continue as normal.) - This can happen if encrypted and unencrypted files are stored in the same - directory (which is not recommended.) It may also indicate a more serious - problem that should be investigated. +--crypt-directory-name-encryption - Properties: +Option to either encrypt directory names or leave them intact. - - Config: strict_names - - Env Var: RCLONE_CRYPT_STRICT_NAMES - - Type: bool - - Default: false +NB If filename_encryption is "off" then this option will do nothing. - #### --crypt-filename-encoding +Properties: - How to encode the encrypted filename to text string. +- Config: directory_name_encryption +- Env Var: RCLONE_CRYPT_DIRECTORY_NAME_ENCRYPTION +- Type: bool +- Default: true +- Examples: + - "true" + - Encrypt directory names. + - "false" + - Don't encrypt directory names, leave them intact. - This option could help with shortening the encrypted filename. The - suitable option would depend on the way your remote count the filename - length and if it's case sensitive. +--crypt-password - Properties: +Password or pass phrase for encryption. - - Config: filename_encoding - - Env Var: RCLONE_CRYPT_FILENAME_ENCODING - - Type: string - - Default: "base32" - - Examples: - - "base32" - - Encode using base32. Suitable for all remote. - - "base64" - - Encode using base64. Suitable for case sensitive remote. - - "base32768" - - Encode using base32768. Suitable if your remote counts UTF-16 or - - Unicode codepoint instead of UTF-8 byte length. (Eg. Onedrive, Dropbox) +NB Input to this must be obscured - see rclone obscure. - #### --crypt-suffix +Properties: - If this is set it will override the default suffix of ".bin". +- Config: password +- Env Var: RCLONE_CRYPT_PASSWORD +- Type: string +- Required: true - Setting suffix to "none" will result in an empty suffix. This may be useful - when the path length is critical. +--crypt-password2 - Properties: +Password or pass phrase for salt. - - Config: suffix - - Env Var: RCLONE_CRYPT_SUFFIX - - Type: string - - Default: ".bin" +Optional but recommended. Should be different to the previous password. - #### --crypt-description +NB Input to this must be obscured - see rclone obscure. - Description of the remote +Properties: - Properties: +- Config: password2 +- Env Var: RCLONE_CRYPT_PASSWORD2 +- Type: string +- Required: false - - Config: description - - Env Var: RCLONE_CRYPT_DESCRIPTION - - Type: string - - Required: false +Advanced options - ### Metadata +Here are the Advanced options specific to crypt (Encrypt/Decrypt a +remote). - Any metadata supported by the underlying remote is read and written. +--crypt-server-side-across-configs - See the [metadata](https://rclone.org/docs/#metadata) docs for more info. +Deprecated: use --server-side-across-configs instead. - ## Backend commands +Allow server-side operations (e.g. copy) to work across different crypt +configs. - Here are the commands specific to the crypt backend. +Normally this option is not what you want, but if you have two crypts +pointing to the same backend you can use it. - Run them with +This can be used, for example, to change file name encryption type +without re-uploading all the data. Just make two crypt backends pointing +to two different directories with the single changed parameter and use +rclone move to move the files between the crypt remotes. - rclone backend COMMAND remote: +Properties: - The help below will explain what arguments each command takes. +- Config: server_side_across_configs +- Env Var: RCLONE_CRYPT_SERVER_SIDE_ACROSS_CONFIGS +- Type: bool +- Default: false - See the [backend](https://rclone.org/commands/rclone_backend/) command for more - info on how to pass options and arguments. +--crypt-show-mapping - These can be run on a running backend using the rc command - [backend/command](https://rclone.org/rc/#backend-command). +For all files listed show how the names encrypt. - ### encode +If this flag is set then for each file that the remote is asked to list, +it will log (at level INFO) a line stating the decrypted file name and +the encrypted file name. - Encode the given filename(s) +This is so you can work out which encrypted names are which decrypted +names just in case you need to do something with the encrypted file +names, or for debugging purposes. - rclone backend encode remote: [options] [+] +Properties: - This encodes the filenames given as arguments returning a list of - strings of the encoded results. +- Config: show_mapping +- Env Var: RCLONE_CRYPT_SHOW_MAPPING +- Type: bool +- Default: false - Usage Example: +--crypt-no-data-encryption - rclone backend encode crypt: file1 [file2...] - rclone rc backend/command command=encode fs=crypt: file1 [file2...] +Option to either encrypt file data or leave it unencrypted. +Properties: - ### decode +- Config: no_data_encryption +- Env Var: RCLONE_CRYPT_NO_DATA_ENCRYPTION +- Type: bool +- Default: false +- Examples: + - "true" + - Don't encrypt file data, leave it unencrypted. + - "false" + - Encrypt file data. - Decode the given filename(s) +--crypt-pass-bad-blocks - rclone backend decode remote: [options] [+] +If set this will pass bad blocks through as all 0. - This decodes the filenames given as arguments returning a list of - strings of the decoded results. It will return an error if any of the - inputs are invalid. +This should not be set in normal operation, it should only be set if +trying to recover an encrypted file with errors and it is desired to +recover as much of the file as possible. - Usage Example: +Properties: - rclone backend decode crypt: encryptedfile1 [encryptedfile2...] - rclone rc backend/command command=decode fs=crypt: encryptedfile1 [encryptedfile2...] +- Config: pass_bad_blocks +- Env Var: RCLONE_CRYPT_PASS_BAD_BLOCKS +- Type: bool +- Default: false +--crypt-strict-names +If set, this will raise an error when crypt comes across a filename that +can't be decrypted. +(By default, rclone will just log a NOTICE and continue as normal.) This +can happen if encrypted and unencrypted files are stored in the same +directory (which is not recommended.) It may also indicate a more +serious problem that should be investigated. - ## Backing up an encrypted remote +Properties: - If you wish to backup an encrypted remote, it is recommended that you use - `rclone sync` on the encrypted files, and make sure the passwords are - the same in the new encrypted remote. +- Config: strict_names +- Env Var: RCLONE_CRYPT_STRICT_NAMES +- Type: bool +- Default: false - This will have the following advantages +--crypt-filename-encoding - * `rclone sync` will check the checksums while copying - * you can use `rclone check` between the encrypted remotes - * you don't decrypt and encrypt unnecessarily +How to encode the encrypted filename to text string. - For example, let's say you have your original remote at `remote:` with - the encrypted version at `eremote:` with path `remote:crypt`. You - would then set up the new remote `remote2:` and then the encrypted - version `eremote2:` with path `remote2:crypt` using the same passwords - as `eremote:`. +This option could help with shortening the encrypted filename. The +suitable option would depend on the way your remote count the filename +length and if it's case sensitive. - To sync the two remotes you would do +Properties: - rclone sync --interactive remote:crypt remote2:crypt +- Config: filename_encoding +- Env Var: RCLONE_CRYPT_FILENAME_ENCODING +- Type: string +- Default: "base32" +- Examples: + - "base32" + - Encode using base32. Suitable for all remote. + - "base64" + - Encode using base64. Suitable for case sensitive remote. + - "base32768" + - Encode using base32768. Suitable if your remote counts + UTF-16 or + - Unicode codepoint instead of UTF-8 byte length. (Eg. + Onedrive, Dropbox) - And to check the integrity you would do +--crypt-suffix - rclone check remote:crypt remote2:crypt +If this is set it will override the default suffix of ".bin". - ## File formats +Setting suffix to "none" will result in an empty suffix. This may be +useful when the path length is critical. - ### File encryption +Properties: - Files are encrypted 1:1 source file to destination object. The file - has a header and is divided into chunks. +- Config: suffix +- Env Var: RCLONE_CRYPT_SUFFIX +- Type: string +- Default: ".bin" - #### Header +--crypt-description - * 8 bytes magic string `RCLONE\x00\x00` - * 24 bytes Nonce (IV) +Description of the remote. - The initial nonce is generated from the operating systems crypto - strong random number generator. The nonce is incremented for each - chunk read making sure each nonce is unique for each block written. - The chance of a nonce being reused is minuscule. If you wrote an - exabyte of data (10¹⁸ bytes) you would have a probability of - approximately 2×10⁻³² of re-using a nonce. +Properties: - #### Chunk +- Config: description +- Env Var: RCLONE_CRYPT_DESCRIPTION +- Type: string +- Required: false - Each chunk will contain 64 KiB of data, except for the last one which - may have less data. The data chunk is in standard NaCl SecretBox - format. SecretBox uses XSalsa20 and Poly1305 to encrypt and - authenticate messages. +Metadata - Each chunk contains: +Any metadata supported by the underlying remote is read and written. - * 16 Bytes of Poly1305 authenticator - * 1 - 65536 bytes XSalsa20 encrypted data +See the metadata docs for more info. - 64k chunk size was chosen as the best performing chunk size (the - authenticator takes too much time below this and the performance drops - off due to cache effects above this). Note that these chunks are - buffered in memory so they can't be too big. +Backend commands - This uses a 32 byte (256 bit key) key derived from the user password. +Here are the commands specific to the crypt backend. - #### Examples +Run them with - 1 byte file will encrypt to + rclone backend COMMAND remote: - * 32 bytes header - * 17 bytes data chunk +The help below will explain what arguments each command takes. - 49 bytes total +See the backend command for more info on how to pass options and +arguments. - 1 MiB (1048576 bytes) file will encrypt to +These can be run on a running backend using the rc command +backend/command. - * 32 bytes header - * 16 chunks of 65568 bytes +encode - 1049120 bytes total (a 0.05% overhead). This is the overhead for big - files. +Encode the given filename(s) - ### Name encryption + rclone backend encode remote: [options] [+] - File names are encrypted segment by segment - the path is broken up - into `/` separated strings and these are encrypted individually. +This encodes the filenames given as arguments returning a list of +strings of the encoded results. - File segments are padded using PKCS#7 to a multiple of 16 bytes - before encryption. +Usage Example: - They are then encrypted with EME using AES with 256 bit key. EME - (ECB-Mix-ECB) is a wide-block encryption mode presented in the 2003 - paper "A Parallelizable Enciphering Mode" by Halevi and Rogaway. + rclone backend encode crypt: file1 [file2...] + rclone rc backend/command command=encode fs=crypt: file1 [file2...] - This makes for deterministic encryption which is what we want - the - same filename must encrypt to the same thing otherwise we can't find - it on the cloud storage system. +decode - This means that +Decode the given filename(s) - * filenames with the same name will encrypt the same - * filenames which start the same won't have a common prefix + rclone backend decode remote: [options] [+] - This uses a 32 byte key (256 bits) and a 16 byte (128 bits) IV both of - which are derived from the user password. +This decodes the filenames given as arguments returning a list of +strings of the decoded results. It will return an error if any of the +inputs are invalid. - After encryption they are written out using a modified version of - standard `base32` encoding as described in RFC4648. The standard - encoding is modified in two ways: +Usage Example: - * it becomes lower case (no-one likes upper case filenames!) - * we strip the padding character `=` + rclone backend decode crypt: encryptedfile1 [encryptedfile2...] + rclone rc backend/command command=decode fs=crypt: encryptedfile1 [encryptedfile2...] - `base32` is used rather than the more efficient `base64` so rclone can be - used on case insensitive remotes (e.g. Windows, Box, Dropbox, Onedrive etc). +Backing up an encrypted remote - ### Key derivation +If you wish to backup an encrypted remote, it is recommended that you +use rclone sync on the encrypted files, and make sure the passwords are +the same in the new encrypted remote. - Rclone uses `scrypt` with parameters `N=16384, r=8, p=1` with an - optional user supplied salt (password2) to derive the 32+32+16 = 80 - bytes of key material required. If the user doesn't supply a salt - then rclone uses an internal one. +This will have the following advantages - `scrypt` makes it impractical to mount a dictionary attack on rclone - encrypted data. For full protection against this you should always use - a salt. +- rclone sync will check the checksums while copying +- you can use rclone check between the encrypted remotes +- you don't decrypt and encrypt unnecessarily - ## SEE ALSO +For example, let's say you have your original remote at remote: with the +encrypted version at eremote: with path remote:crypt. You would then set +up the new remote remote2: and then the encrypted version eremote2: with +path remote2:crypt using the same passwords as eremote:. - * [rclone cryptdecode](https://rclone.org/commands/rclone_cryptdecode/) - Show forward/reverse mapping of encrypted filenames +To sync the two remotes you would do - # Compress + rclone sync --interactive remote:crypt remote2:crypt - ## Warning +And to check the integrity you would do - This remote is currently **experimental**. Things may break and data may be lost. Anything you do with this remote is - at your own risk. Please understand the risks associated with using experimental code and don't use this remote in - critical applications. + rclone check remote:crypt remote2:crypt - The `Compress` remote adds compression to another remote. It is best used with remotes containing - many large compressible files. +File formats - ## Configuration +File encryption - To use this remote, all you need to do is specify another remote and a compression mode to use: +Files are encrypted 1:1 source file to destination object. The file has +a header and is divided into chunks. -Current remotes: +Header -Name Type ==== ==== remote_to_press sometype +- 8 bytes magic string RCLONE\x00\x00 +- 24 bytes Nonce (IV) -e) Edit existing remote $ rclone config -f) New remote -g) Delete remote -h) Rename remote -i) Copy remote -j) Set configuration password -k) Quit config e/n/d/r/c/s/q> n name> compress ... 8 / Compress a - remote  "compress" ... Storage> compress ** See help for compress - backend at: https://rclone.org/compress/ ** +The initial nonce is generated from the operating systems crypto strong +random number generator. The nonce is incremented for each chunk read +making sure each nonce is unique for each block written. The chance of a +nonce being reused is minuscule. If you wrote an exabyte of data (10¹⁸ +bytes) you would have a probability of approximately 2×10⁻³² of re-using +a nonce. -Remote to compress. Enter a string value. Press Enter for the default -(""). remote> remote_to_press:subdir Compression mode. Enter a string -value. Press Enter for the default ("gzip"). Choose a number from below, -or type in your own value 1 / Gzip compression balanced for speed and -compression strength.  "gzip" compression_mode> gzip Edit advanced -config? (y/n) y) Yes n) No (default) y/n> n Remote config --------------------- [compress] type = compress remote = -remote_to_press:subdir compression_mode = gzip -------------------- y) -Yes this is OK (default) e) Edit this remote d) Delete this remote -y/e/d> y +Chunk +Each chunk will contain 64 KiB of data, except for the last one which +may have less data. The data chunk is in standard NaCl SecretBox format. +SecretBox uses XSalsa20 and Poly1305 to encrypt and authenticate +messages. - ### Compression Modes +Each chunk contains: - Currently only gzip compression is supported. It provides a decent balance between speed and size and is well - supported by other applications. Compression strength can further be configured via an advanced setting where 0 is no - compression and 9 is strongest compression. +- 16 Bytes of Poly1305 authenticator +- 1 - 65536 bytes XSalsa20 encrypted data - ### File types +64k chunk size was chosen as the best performing chunk size (the +authenticator takes too much time below this and the performance drops +off due to cache effects above this). Note that these chunks are +buffered in memory so they can't be too big. - If you open a remote wrapped by compress, you will see that there are many files with an extension corresponding to - the compression algorithm you chose. These files are standard files that can be opened by various archive programs, - but they have some hidden metadata that allows them to be used by rclone. - While you may download and decompress these files at will, do **not** manually delete or rename files. Files without - correct metadata files will not be recognized by rclone. +This uses a 32 byte (256 bit key) key derived from the user password. - ### File names +Examples - The compressed files will be named `*.###########.gz` where `*` is the base file and the `#` part is base64 encoded - size of the uncompressed file. The file names should not be changed by anything other than the rclone compression backend. +1 byte file will encrypt to +- 32 bytes header +- 17 bytes data chunk - ### Standard options +49 bytes total - Here are the Standard options specific to compress (Compress a remote). +1 MiB (1048576 bytes) file will encrypt to - #### --compress-remote +- 32 bytes header +- 16 chunks of 65568 bytes + +1049120 bytes total (a 0.05% overhead). This is the overhead for big +files. + +Name encryption + +File names are encrypted segment by segment - the path is broken up into +/ separated strings and these are encrypted individually. + +File segments are padded using PKCS#7 to a multiple of 16 bytes before +encryption. + +They are then encrypted with EME using AES with 256 bit key. EME +(ECB-Mix-ECB) is a wide-block encryption mode presented in the 2003 +paper "A Parallelizable Enciphering Mode" by Halevi and Rogaway. + +This makes for deterministic encryption which is what we want - the same +filename must encrypt to the same thing otherwise we can't find it on +the cloud storage system. + +This means that + +- filenames with the same name will encrypt the same +- filenames which start the same won't have a common prefix + +This uses a 32 byte key (256 bits) and a 16 byte (128 bits) IV both of +which are derived from the user password. + +After encryption they are written out using a modified version of +standard base32 encoding as described in RFC4648. The standard encoding +is modified in two ways: + +- it becomes lower case (no-one likes upper case filenames!) +- we strip the padding character = + +base32 is used rather than the more efficient base64 so rclone can be +used on case insensitive remotes (e.g. Windows, Box, Dropbox, Onedrive +etc). + +Key derivation + +Rclone uses scrypt with parameters N=16384, r=8, p=1 with an optional +user supplied salt (password2) to derive the 32+32+16 = 80 bytes of key +material required. If the user doesn't supply a salt then rclone uses an +internal one. + +scrypt makes it impractical to mount a dictionary attack on rclone +encrypted data. For full protection against this you should always use a +salt. + +SEE ALSO + +- rclone cryptdecode - Show forward/reverse mapping of encrypted + filenames + +Compress + +Warning + +This remote is currently experimental. Things may break and data may be +lost. Anything you do with this remote is at your own risk. Please +understand the risks associated with using experimental code and don't +use this remote in critical applications. + +The Compress remote adds compression to another remote. It is best used +with remotes containing many large compressible files. + +Configuration + +To use this remote, all you need to do is specify another remote and a +compression mode to use: + + Current remotes: + + Name Type + ==== ==== + remote_to_press sometype + + e) Edit existing remote + $ rclone config + 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> n + name> compress + ... + 8 / Compress a remote + \ "compress" + ... + Storage> compress + ** See help for compress backend at: https://rclone.org/compress/ ** Remote to compress. - - Properties: - - - Config: remote - - Env Var: RCLONE_COMPRESS_REMOTE - - Type: string - - Required: true - - #### --compress-mode - + Enter a string value. Press Enter for the default (""). + remote> remote_to_press:subdir Compression mode. + Enter a string value. Press Enter for the default ("gzip"). + Choose a number from below, or type in your own value + 1 / Gzip compression balanced for speed and compression strength. + \ "gzip" + compression_mode> gzip + Edit advanced config? (y/n) + y) Yes + n) No (default) + y/n> n + Remote config + -------------------- + [compress] + type = compress + remote = remote_to_press:subdir + compression_mode = gzip + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y - Properties: +Compression Modes - - Config: mode - - Env Var: RCLONE_COMPRESS_MODE - - Type: string - - Default: "gzip" - - Examples: - - "gzip" - - Standard gzip compression with fastest parameters. +Currently only gzip compression is supported. It provides a decent +balance between speed and size and is well supported by other +applications. Compression strength can further be configured via an +advanced setting where 0 is no compression and 9 is strongest +compression. - ### Advanced options +File types - Here are the Advanced options specific to compress (Compress a remote). +If you open a remote wrapped by compress, you will see that there are +many files with an extension corresponding to the compression algorithm +you chose. These files are standard files that can be opened by various +archive programs, but they have some hidden metadata that allows them to +be used by rclone. While you may download and decompress these files at +will, do not manually delete or rename files. Files without correct +metadata files will not be recognized by rclone. - #### --compress-level +File names - GZIP compression level (-2 to 9). +The compressed files will be named *.###########.gz where * is the base +file and the # part is base64 encoded size of the uncompressed file. The +file names should not be changed by anything other than the rclone +compression backend. - Generally -1 (default, equivalent to 5) is recommended. - Levels 1 to 9 increase compression at the cost of speed. Going past 6 - generally offers very little return. +Standard options - Level -2 uses Huffman encoding only. Only use if you know what you - are doing. - Level 0 turns off compression. +Here are the Standard options specific to compress (Compress a remote). - Properties: +--compress-remote - - Config: level - - Env Var: RCLONE_COMPRESS_LEVEL - - Type: int - - Default: -1 +Remote to compress. - #### --compress-ram-cache-limit +Properties: - Some remotes don't allow the upload of files with unknown size. - In this case the compressed file will need to be cached to determine - it's size. +- Config: remote +- Env Var: RCLONE_COMPRESS_REMOTE +- Type: string +- Required: true - Files smaller than this limit will be cached in RAM, files larger than - this limit will be cached on disk. +--compress-mode - Properties: +Compression mode. - - Config: ram_cache_limit - - Env Var: RCLONE_COMPRESS_RAM_CACHE_LIMIT - - Type: SizeSuffix - - Default: 20Mi +Properties: - #### --compress-description +- Config: mode +- Env Var: RCLONE_COMPRESS_MODE +- Type: string +- Default: "gzip" +- Examples: + - "gzip" + - Standard gzip compression with fastest parameters. - Description of the remote +Advanced options - Properties: +Here are the Advanced options specific to compress (Compress a remote). - - Config: description - - Env Var: RCLONE_COMPRESS_DESCRIPTION - - Type: string - - Required: false +--compress-level - ### Metadata +GZIP compression level (-2 to 9). - Any metadata supported by the underlying remote is read and written. +Generally -1 (default, equivalent to 5) is recommended. Levels 1 to 9 +increase compression at the cost of speed. Going past 6 generally offers +very little return. - See the [metadata](https://rclone.org/docs/#metadata) docs for more info. +Level -2 uses Huffman encoding only. Only use if you know what you are +doing. Level 0 turns off compression. +Properties: +- Config: level +- Env Var: RCLONE_COMPRESS_LEVEL +- Type: int +- Default: -1 - # Combine +--compress-ram-cache-limit - The `combine` backend joins remotes together into a single directory - tree. +Some remotes don't allow the upload of files with unknown size. In this +case the compressed file will need to be cached to determine it's size. - For example you might have a remote for images on one provider: +Files smaller than this limit will be cached in RAM, files larger than +this limit will be cached on disk. -$ rclone tree s3:imagesbucket / ├── image1.jpg └── image2.jpg +Properties: +- Config: ram_cache_limit +- Env Var: RCLONE_COMPRESS_RAM_CACHE_LIMIT +- Type: SizeSuffix +- Default: 20Mi - And a remote for files on another: +--compress-description -$ rclone tree drive:important/files / ├── file1.txt └── file2.txt +Description of the remote. +Properties: - The `combine` backend can join these together into a synthetic - directory structure like this: +- Config: description +- Env Var: RCLONE_COMPRESS_DESCRIPTION +- Type: string +- Required: false -$ rclone tree combined: / ├── files │ ├── file1.txt │ └── file2.txt └── -images ├── image1.jpg └── image2.jpg +Metadata +Any metadata supported by the underlying remote is read and written. - You'd do this by specifying an `upstreams` parameter in the config - like this +See the metadata docs for more info. - upstreams = images=s3:imagesbucket files=drive:important/files +Combine - During the initial setup with `rclone config` you will specify the - upstreams remotes as a space separated list. The upstream remotes can - either be a local paths or other remotes. +The combine backend joins remotes together into a single directory tree. - ## Configuration +For example you might have a remote for images on one provider: - Here is an example of how to make a combine called `remote` for the - example above. First run: + $ rclone tree s3:imagesbucket + / + ├── image1.jpg + └── image2.jpg - rclone config +And a remote for files on another: - This will guide you through an interactive setup process: + $ rclone tree drive:important/files + / + ├── file1.txt + └── file2.txt -No remotes found, make a new one? n) New remote s) Set configuration -password q) Quit config n/s/q> n name> remote Option Storage. Type of -storage to configure. Choose a number from below, or type in your own -value. ... XX / Combine several remotes into one  (combine) ... Storage> -combine Option upstreams. Upstreams for combining These should be in the -form dir=remote:path dir2=remote2:path Where before the = is specified -the root directory and after is the remote to put there. Embedded spaces -can be added using quotes "dir=remote:path with space" -"dir2=remote2:path with space" Enter a fs.SpaceSepList value. upstreams> -images=s3:imagesbucket files=drive:important/files -------------------- -[remote] type = combine upstreams = images=s3:imagesbucket -files=drive:important/files -------------------- y) Yes this is OK -(default) e) Edit this remote d) Delete this remote y/e/d> y +The combine backend can join these together into a synthetic directory +structure like this: + $ rclone tree combined: + / + ├── files + │ ├── file1.txt + │ └── file2.txt + └── images + ├── image1.jpg + └── image2.jpg - ### Configuring for Google Drive Shared Drives +You'd do this by specifying an upstreams parameter in the config like +this - Rclone has a convenience feature for making a combine backend for all - the shared drives you have access to. + upstreams = images=s3:imagesbucket files=drive:important/files - Assuming your main (non shared drive) Google drive remote is called - `drive:` you would run +During the initial setup with rclone config you will specify the +upstreams remotes as a space separated list. The upstream remotes can +either be a local paths or other remotes. - rclone backend -o config drives drive: +Configuration - This would produce something like this: +Here is an example of how to make a combine called remote for the +example above. First run: - [My Drive] - type = alias - remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=: + rclone config - [Test Drive] - type = alias - remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=: - - [AllDrives] - type = combine - upstreams = "My Drive=My Drive:" "Test Drive=Test Drive:" - - If you then add that config to your config file (find it with `rclone - config file`) then you can access all the shared drives in one place - with the `AllDrives:` remote. - - See [the Google Drive docs](https://rclone.org/drive/#drives) for full info. - - - ### Standard options - - Here are the Standard options specific to combine (Combine several remotes into one). - - #### --combine-upstreams +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 + Option Storage. + Type of storage to configure. + Choose a number from below, or type in your own value. + ... + XX / Combine several remotes into one + \ (combine) + ... + Storage> combine + Option upstreams. Upstreams for combining - These should be in the form - dir=remote:path dir2=remote2:path - Where before the = is specified the root directory and after is the remote to put there. - Embedded spaces can be added using quotes - "dir=remote:path with space" "dir2=remote2:path with space" + Enter a fs.SpaceSepList value. + upstreams> images=s3:imagesbucket files=drive:important/files + -------------------- + [remote] + type = combine + upstreams = images=s3:imagesbucket files=drive:important/files + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y +Configuring for Google Drive Shared Drives +Rclone has a convenience feature for making a combine backend for all +the shared drives you have access to. - Properties: +Assuming your main (non shared drive) Google drive remote is called +drive: you would run - - Config: upstreams - - Env Var: RCLONE_COMBINE_UPSTREAMS - - Type: SpaceSepList - - Default: + rclone backend -o config drives drive: - ### Advanced options +This would produce something like this: - Here are the Advanced options specific to combine (Combine several remotes into one). + [My Drive] + type = alias + remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=: - #### --combine-description + [Test Drive] + type = alias + remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=: - Description of the remote + [AllDrives] + type = combine + upstreams = "My Drive=My Drive:" "Test Drive=Test Drive:" - Properties: +If you then add that config to your config file (find it with +rclone config file) then you can access all the shared drives in one +place with the AllDrives: remote. - - Config: description - - Env Var: RCLONE_COMBINE_DESCRIPTION - - Type: string - - Required: false +See the Google Drive docs for full info. - ### Metadata +Standard options - Any metadata supported by the underlying remote is read and written. +Here are the Standard options specific to combine (Combine several +remotes into one). - See the [metadata](https://rclone.org/docs/#metadata) docs for more info. +--combine-upstreams +Upstreams for combining +These should be in the form - # Dropbox + dir=remote:path dir2=remote2:path - Paths are specified as `remote:path` +Where before the = is specified the root directory and after is the +remote to put there. - Dropbox paths may be as deep as required, e.g. - `remote:directory/subdirectory`. +Embedded spaces can be added using quotes - ## Configuration + "dir=remote:path with space" "dir2=remote2:path with space" - The initial setup for dropbox involves getting a token from Dropbox - which you need to do in your browser. `rclone config` walks you - through it. +Properties: - Here is an example of how to make a remote called `remote`. First run: +- Config: upstreams +- Env Var: RCLONE_COMBINE_UPSTREAMS +- Type: SpaceSepList +- Default: - rclone config +Advanced options - This will guide you through an interactive setup process: +Here are the Advanced options specific to combine (Combine several +remotes into one). -n) New remote -o) Delete remote -p) Quit config e/n/d/q> n name> remote Type of storage to configure. - Choose a number from below, or type in your own value [snip] XX / - Dropbox  "dropbox" [snip] Storage> dropbox Dropbox App Key - leave - blank normally. app_key> Dropbox App Secret - leave blank normally. - app_secret> Remote config Please visit: +--combine-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_COMBINE_DESCRIPTION +- Type: string +- Required: false + +Metadata + +Any metadata supported by the underlying remote is read and written. + +See the metadata docs for more info. + +Dropbox + +Paths are specified as remote:path + +Dropbox paths may be as deep as required, e.g. +remote:directory/subdirectory. + +Configuration + +The initial setup for dropbox involves getting a token from Dropbox +which you need to do in your browser. rclone config walks you through +it. + +Here is an example of how to make a remote called remote. First run: + + rclone config + +This will guide you through an interactive setup process: + + n) New remote + d) Delete remote + q) Quit config + e/n/d/q> n + name> remote + Type of storage to configure. + Choose a number from below, or type in your own value + [snip] + XX / Dropbox + \ "dropbox" + [snip] + Storage> dropbox + Dropbox App Key - leave blank normally. + app_key> + Dropbox App Secret - leave blank normally. + app_secret> + Remote config + Please visit: https://www.dropbox.com/1/oauth2/authorize?client_id=XXXXXXXXXXXXXXX&response_type=code Enter the code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXXXXXXXX - -------------------- [remote] app_key = app_secret = token = - XXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX -------------------- -q) Yes this is OK -r) Edit this remote -s) Delete this remote y/e/d> y + [remote] + app_key = + app_secret = + token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y +See the remote setup docs for how to set it up on a machine with no +Internet browser available. - See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a - machine with no Internet browser available. +Note that rclone runs a webserver on your local machine to collect the +token as returned from Dropbox. This only runs from the moment it opens +your browser to the moment you get back the verification code. This is +on http://127.0.0.1:53682/ and it may require you to unblock it +temporarily if you are running a host firewall, or use manual mode. - Note that rclone runs a webserver on your local machine to collect the - token as returned from Dropbox. This only - runs from the moment it opens your browser to the moment you get back - the verification code. This is on `http://127.0.0.1:53682/` and it - may require you to unblock it temporarily if you are running a host - firewall, or use manual mode. +You can then use it like this, - You can then use it like this, +List directories in top level of your dropbox - List directories in top level of your dropbox + rclone lsd remote: - rclone lsd remote: +List all the files in your dropbox - List all the files in your dropbox + rclone ls remote: - rclone ls remote: +To copy a local directory to a dropbox directory called backup - To copy a local directory to a dropbox directory called backup + rclone copy /home/source remote:backup - rclone copy /home/source remote:backup +Dropbox for business - ### Dropbox for business +Rclone supports Dropbox for business and Team Folders. - Rclone supports Dropbox for business and Team Folders. +When using Dropbox for business remote: and remote:path/to/file will +refer to your personal folder. - When using Dropbox for business `remote:` and `remote:path/to/file` - will refer to your personal folder. +If you wish to see Team Folders you must use a leading / in the path, so +rclone lsd remote:/ will refer to the root and show you all Team Folders +and your User Folder. - If you wish to see Team Folders you must use a leading `/` in the - path, so `rclone lsd remote:/` will refer to the root and show you all - Team Folders and your User Folder. +You can then use team folders like this remote:/TeamFolder and +remote:/TeamFolder/path/to/file. - You can then use team folders like this `remote:/TeamFolder` and - `remote:/TeamFolder/path/to/file`. +A leading / for a Dropbox personal account will do nothing, but it will +take an extra HTTP transaction so it should be avoided. - A leading `/` for a Dropbox personal account will do nothing, but it - will take an extra HTTP transaction so it should be avoided. +Modification times and hashes - ### Modification times and hashes +Dropbox supports modified times, but the only way to set a modification +time is to re-upload the file. - Dropbox supports modified times, but the only way to set a - modification time is to re-upload the file. +This means that if you uploaded your data with an older version of +rclone which didn't support the v2 API and modified times, rclone will +decide to upload all your old data to fix the modification times. If you +don't want this to happen use --size-only or --checksum flag to stop it. - This means that if you uploaded your data with an older version of - rclone which didn't support the v2 API and modified times, rclone will - decide to upload all your old data to fix the modification times. If - you don't want this to happen use `--size-only` or `--checksum` flag - to stop it. +Dropbox supports its own hash type which is checked for all transfers. - Dropbox supports [its own hash - type](https://www.dropbox.com/developers/reference/content-hash) which - is checked for all transfers. +Restricted filename characters - ### Restricted filename characters + Character Value Replacement + ----------- ------- ------------- + NUL 0x00 ␀ + / 0x2F / + DEL 0x7F ␡ + \ 0x5C \ - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | NUL | 0x00 | ␀ | - | / | 0x2F | / | - | DEL | 0x7F | ␡ | - | \ | 0x5C | \ | +File names can also not end with the following characters. These only +get replaced if they are the last character in the name: - File names can also not end with the following characters. - These only get replaced if they are the last character in the name: + Character Value Replacement + ----------- ------- ------------- + SP 0x20 ␠ - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | SP | 0x20 | ␠ | +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. +Batch mode uploads - ### Batch mode uploads {#batch-mode} +Using batch mode uploads is very important for performance when using +the Dropbox API. See the dropbox performance guide for more info. - Using batch mode uploads is very important for performance when using - the Dropbox API. See [the dropbox performance guide](https://developers.dropbox.com/dbx-performance-guide) - for more info. +There are 3 modes rclone can use for uploads. - There are 3 modes rclone can use for uploads. +--dropbox-batch-mode off - #### --dropbox-batch-mode off +In this mode rclone will not use upload batching. This was the default +before rclone v1.55. It has the disadvantage that it is very likely to +encounter too_many_requests errors like this - In this mode rclone will not use upload batching. This was the default - before rclone v1.55. It has the disadvantage that it is very likely to - encounter `too_many_requests` errors like this + NOTICE: too_many_requests/.: Too many requests or write operations. Trying again in 15 seconds. - NOTICE: too_many_requests/.: Too many requests or write operations. Trying again in 15 seconds. +When rclone receives these it has to wait for 15s or sometimes 300s +before continuing which really slows down transfers. - When rclone receives these it has to wait for 15s or sometimes 300s - before continuing which really slows down transfers. +This will happen especially if --transfers is large, so this mode isn't +recommended except for compatibility or investigating problems. - This will happen especially if `--transfers` is large, so this mode - isn't recommended except for compatibility or investigating problems. +--dropbox-batch-mode sync - #### --dropbox-batch-mode sync +In this mode rclone will batch up uploads to the size specified by +--dropbox-batch-size and commit them together. - In this mode rclone will batch up uploads to the size specified by - `--dropbox-batch-size` and commit them together. +Using this mode means you can use a much higher --transfers parameter +(32 or 64 works fine) without receiving too_many_requests errors. - Using this mode means you can use a much higher `--transfers` - parameter (32 or 64 works fine) without receiving `too_many_requests` - errors. +This mode ensures full data integrity. - This mode ensures full data integrity. +Note that there may be a pause when quitting rclone while rclone +finishes up the last batch using this mode. - Note that there may be a pause when quitting rclone while rclone - finishes up the last batch using this mode. +--dropbox-batch-mode async - #### --dropbox-batch-mode async +In this mode rclone will batch up uploads to the size specified by +--dropbox-batch-size and commit them together. - In this mode rclone will batch up uploads to the size specified by - `--dropbox-batch-size` and commit them together. +However it will not wait for the status of the batch to be returned to +the caller. This means rclone can use a much bigger batch size (much +bigger than --transfers), at the cost of not being able to check the +status of the upload. - However it will not wait for the status of the batch to be returned to - the caller. This means rclone can use a much bigger batch size (much - bigger than `--transfers`), at the cost of not being able to check the - status of the upload. +This provides the maximum possible upload speed especially with lots of +small files, however rclone can't check the file got uploaded properly +using this mode. - This provides the maximum possible upload speed especially with lots - of small files, however rclone can't check the file got uploaded - properly using this mode. +If you are using this mode then using "rclone check" after the transfer +completes is recommended. Or you could do an initial transfer with +--dropbox-batch-mode async then do a final transfer with +--dropbox-batch-mode sync (the default). - If you are using this mode then using "rclone check" after the - transfer completes is recommended. Or you could do an initial transfer - with `--dropbox-batch-mode async` then do a final transfer with - `--dropbox-batch-mode sync` (the default). +Note that there may be a pause when quitting rclone while rclone +finishes up the last batch using this mode. - Note that there may be a pause when quitting rclone while rclone - finishes up the last batch using this mode. +Standard options +Here are the Standard options specific to dropbox (Dropbox). +--dropbox-client-id - ### Standard options +OAuth Client Id. - Here are the Standard options specific to dropbox (Dropbox). +Leave blank normally. - #### --dropbox-client-id +Properties: - OAuth Client Id. +- Config: client_id +- Env Var: RCLONE_DROPBOX_CLIENT_ID +- Type: string +- Required: false +--dropbox-client-secret + +OAuth Client Secret. + +Leave blank normally. + +Properties: + +- Config: client_secret +- Env Var: RCLONE_DROPBOX_CLIENT_SECRET +- Type: string +- Required: false + +Advanced options + +Here are the Advanced options specific to dropbox (Dropbox). + +--dropbox-token + +OAuth Access Token as a JSON blob. + +Properties: + +- Config: token +- Env Var: RCLONE_DROPBOX_TOKEN +- Type: string +- Required: false + +--dropbox-auth-url + +Auth server URL. + +Leave blank to use the provider defaults. + +Properties: + +- Config: auth_url +- Env Var: RCLONE_DROPBOX_AUTH_URL +- Type: string +- Required: false + +--dropbox-token-url + +Token server url. + +Leave blank to use the provider defaults. + +Properties: + +- Config: token_url +- Env Var: RCLONE_DROPBOX_TOKEN_URL +- Type: string +- Required: false + +--dropbox-chunk-size + +Upload chunk size (< 150Mi). + +Any files larger than this will be uploaded in chunks of this size. + +Note that chunks are buffered in memory (one at a time) so rclone can +deal with retries. Setting this larger will increase the speed slightly +(at most 10% for 128 MiB in tests) at the cost of using more memory. It +can be set smaller if you are tight on memory. + +Properties: + +- Config: chunk_size +- Env Var: RCLONE_DROPBOX_CHUNK_SIZE +- Type: SizeSuffix +- Default: 48Mi + +--dropbox-impersonate + +Impersonate this user when using a business account. + +Note that if you want to use impersonate, you should make sure this flag +is set when running "rclone config" as this will cause rclone to request +the "members.read" scope which it won't normally. This is needed to +lookup a members email address into the internal ID that dropbox uses in +the API. + +Using the "members.read" scope will require a Dropbox Team Admin to +approve during the OAuth flow. + +You will have to use your own App (setting your own client_id and +client_secret) to use this option as currently rclone's default set of +permissions doesn't include "members.read". This can be added once v1.55 +or later is in use everywhere. + +Properties: + +- Config: impersonate +- Env Var: RCLONE_DROPBOX_IMPERSONATE +- Type: string +- Required: false + +--dropbox-shared-files + +Instructs rclone to work on individual shared files. + +In this mode rclone's features are extremely limited - only list (ls, +lsl, etc.) operations and read operations (e.g. downloading) are +supported in this mode. All other operations will be disabled. + +Properties: + +- Config: shared_files +- Env Var: RCLONE_DROPBOX_SHARED_FILES +- Type: bool +- Default: false + +--dropbox-shared-folders + +Instructs rclone to work on shared folders. + +When this flag is used with no path only the List operation is supported +and all available shared folders will be listed. If you specify a path +the first part will be interpreted as the name of shared folder. Rclone +will then try to mount this shared to the root namespace. On success +shared folder rclone proceeds normally. The shared folder is now pretty +much a normal folder and all normal operations are supported. + +Note that we don't unmount the shared folder afterwards so the +--dropbox-shared-folders can be omitted after the first use of a +particular shared folder. + +See also --dropbox-root-namespace for an alternative way to work with +shared folders. + +Properties: + +- Config: shared_folders +- Env Var: RCLONE_DROPBOX_SHARED_FOLDERS +- Type: bool +- Default: false + +--dropbox-pacer-min-sleep + +Minimum time to sleep between API calls. + +Properties: + +- Config: pacer_min_sleep +- Env Var: RCLONE_DROPBOX_PACER_MIN_SLEEP +- Type: Duration +- Default: 10ms + +--dropbox-encoding + +The encoding for the backend. + +See the encoding section in the overview for more info. + +Properties: + +- Config: encoding +- Env Var: RCLONE_DROPBOX_ENCODING +- Type: Encoding +- Default: Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot + +--dropbox-root-namespace + +Specify a different Dropbox namespace ID to use as the root for all +paths. + +Properties: + +- Config: root_namespace +- Env Var: RCLONE_DROPBOX_ROOT_NAMESPACE +- Type: string +- Required: false + +--dropbox-batch-mode + +Upload file batching sync|async|off. + +This sets the batch mode used by rclone. + +For full info see the main docs + +This has 3 possible values + +- off - no batching +- sync - batch uploads and check completion (default) +- async - batch upload and don't check completion + +Rclone will close any outstanding batches when it exits which may make a +delay on quit. + +Properties: + +- Config: batch_mode +- Env Var: RCLONE_DROPBOX_BATCH_MODE +- Type: string +- Default: "sync" + +--dropbox-batch-size + +Max number of files in upload batch. + +This sets the batch size of files to upload. It has to be less than +1000. + +By default this is 0 which means rclone which calculate the batch size +depending on the setting of batch_mode. + +- batch_mode: async - default batch_size is 100 +- batch_mode: sync - default batch_size is the same as --transfers +- batch_mode: off - not in use + +Rclone will close any outstanding batches when it exits which may make a +delay on quit. + +Setting this is a great idea if you are uploading lots of small files as +it will make them a lot quicker. You can use --transfers 32 to maximise +throughput. + +Properties: + +- Config: batch_size +- Env Var: RCLONE_DROPBOX_BATCH_SIZE +- Type: int +- Default: 0 + +--dropbox-batch-timeout + +Max time to allow an idle upload batch before uploading. + +If an upload batch is idle for more than this long then it will be +uploaded. + +The default for this is 0 which means rclone will choose a sensible +default based on the batch_mode in use. + +- batch_mode: async - default batch_timeout is 10s +- batch_mode: sync - default batch_timeout is 500ms +- batch_mode: off - not in use + +Properties: + +- Config: batch_timeout +- Env Var: RCLONE_DROPBOX_BATCH_TIMEOUT +- Type: Duration +- Default: 0s + +--dropbox-batch-commit-timeout + +Max time to wait for a batch to finish committing + +Properties: + +- Config: batch_commit_timeout +- Env Var: RCLONE_DROPBOX_BATCH_COMMIT_TIMEOUT +- Type: Duration +- Default: 10m0s + +--dropbox-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_DROPBOX_DESCRIPTION +- Type: string +- Required: false + +Limitations + +Note that Dropbox is case insensitive so you can't have a file called +"Hello.doc" and one called "hello.doc". + +There are some file names such as thumbs.db which Dropbox can't store. +There is a full list of them in the "Ignored Files" section of this +document. Rclone will issue an error message +File name disallowed - not uploading if it attempts to upload one of +those file names, but the sync won't fail. + +Some errors may occur if you try to sync copyright-protected files +because Dropbox has its own copyright detector that prevents this sort +of file being downloaded. This will return the error +ERROR : /path/to/your/file: Failed to copy: failed to open source object: path/restricted_content/. + +If you have more than 10,000 files in a directory then +rclone purge dropbox:dir will return the error +Failed to purge: There are too many files involved in this operation. As +a work-around do an rclone delete dropbox:dir followed by an +rclone rmdir dropbox:dir. + +When using rclone link you'll need to set --expire if using a +non-personal account otherwise the visibility may not be correct. (Note +that --expire isn't supported on personal accounts). See the forum +discussion and the dropbox SDK issue. + +Get your own Dropbox App ID + +When you use rclone with Dropbox in its default configuration you are +using rclone's App ID. This is shared between all the rclone users. + +Here is how to create your own Dropbox App ID for rclone: + +1. Log into the Dropbox App console with your Dropbox Account (It need + not to be the same account as the Dropbox you want to access) + +2. Choose an API => Usually this should be Dropbox API + +3. Choose the type of access you want to use => Full Dropbox or + App Folder. If you want to use Team Folders, Full Dropbox is + required (see here). + +4. Name your App. The app name is global, so you can't use rclone for + example + +5. Click the button Create App + +6. Switch to the Permissions tab. Enable at least the following + permissions: account_info.read, files.metadata.write, + files.content.write, files.content.read, sharing.write. The + files.metadata.read and sharing.read checkboxes will be marked too. + Click Submit + +7. Switch to the Settings tab. Fill OAuth2 - Redirect URIs as + http://localhost:53682/ and click on Add + +8. Find the App key and App secret values on the Settings tab. Use + these values in rclone config to add a new remote or edit an + existing remote. The App key setting corresponds to client_id in + rclone config, the App secret corresponds to client_secret + +Enterprise File Fabric + +This backend supports Storage Made Easy's Enterprise File Fabric™ which +provides a software solution to integrate and unify File and Object +Storage accessible through a global file system. + +Configuration + +The initial setup for the Enterprise File Fabric backend involves +getting a token from the Enterprise File Fabric which you need to do in +your browser. rclone config walks you through it. + +Here is an example of how to make a remote called remote. 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. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + [snip] + XX / Enterprise File Fabric + \ "filefabric" + [snip] + Storage> filefabric + ** See help for filefabric backend at: https://rclone.org/filefabric/ ** + + URL of the Enterprise File Fabric to connect to + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + 1 / Storage Made Easy US + \ "https://storagemadeeasy.com" + 2 / Storage Made Easy EU + \ "https://eu.storagemadeeasy.com" + 3 / Connect to your Enterprise File Fabric + \ "https://yourfabric.smestorage.com" + url> https://yourfabric.smestorage.com/ + ID of the root folder Leave blank normally. - Properties: + Fill in to make rclone start with directory of a given ID. - - Config: client_id - - Env Var: RCLONE_DROPBOX_CLIENT_ID - - Type: string - - Required: false + Enter a string value. Press Enter for the default (""). + root_folder_id> + Permanent Authentication Token - #### --dropbox-client-secret + A Permanent Authentication Token can be created in the Enterprise File + Fabric, on the users Dashboard under Security, there is an entry + you'll see called "My Authentication Tokens". Click the Manage button + to create one. - OAuth Client Secret. + These tokens are normally valid for several years. - Leave blank normally. + For more info see: https://docs.storagemadeeasy.com/organisationcloud/api-tokens - Properties: + Enter a string value. Press Enter for the default (""). + permanent_token> xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx + Edit advanced config? (y/n) + y) Yes + n) No (default) + y/n> n + Remote config + -------------------- + [remote] + type = filefabric + url = https://yourfabric.smestorage.com/ + permanent_token = xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y - - Config: client_secret - - Env Var: RCLONE_DROPBOX_CLIENT_SECRET - - Type: string - - Required: false +Once configured you can then use rclone like this, - ### Advanced options +List directories in top level of your Enterprise File Fabric - Here are the Advanced options specific to dropbox (Dropbox). + rclone lsd remote: - #### --dropbox-token +List all the files in your Enterprise File Fabric - OAuth Access Token as a JSON blob. + rclone ls remote: - Properties: +To copy a local directory to an Enterprise File Fabric directory called +backup - - Config: token - - Env Var: RCLONE_DROPBOX_TOKEN - - Type: string - - Required: false + rclone copy /home/source remote:backup - #### --dropbox-auth-url +Modification times and hashes - Auth server URL. +The Enterprise File Fabric allows modification times to be set on files +accurate to 1 second. These will be used to detect whether objects need +syncing or not. - Leave blank to use the provider defaults. +The Enterprise File Fabric does not support any data hashes at this +time. - Properties: +Restricted filename characters - - Config: auth_url - - Env Var: RCLONE_DROPBOX_AUTH_URL - - Type: string - - Required: false +The default restricted characters set will be replaced. - #### --dropbox-token-url +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - Token server url. +Empty files - Leave blank to use the provider defaults. +Empty files aren't supported by the Enterprise File Fabric. Rclone will +therefore upload an empty file as a single space with a mime type of +application/vnd.rclone.empty.file and files with that mime type are +treated as empty. - Properties: +Root folder ID - - Config: token_url - - Env Var: RCLONE_DROPBOX_TOKEN_URL - - Type: string - - Required: false +You can set the root_folder_id for rclone. This is the directory +(identified by its Folder ID) that rclone considers to be the root of +your Enterprise File Fabric. - #### --dropbox-chunk-size +Normally you will leave this blank and rclone will determine the correct +root to use itself. - Upload chunk size (< 150Mi). +However you can set this to restrict rclone to a specific folder +hierarchy. - Any files larger than this will be uploaded in chunks of this size. +In order to do this you will have to find the Folder ID of the directory +you wish rclone to display. These aren't displayed in the web interface, +but you can use rclone lsf to find them, for example - Note that chunks are buffered in memory (one at a time) so rclone can - deal with retries. Setting this larger will increase the speed - slightly (at most 10% for 128 MiB in tests) at the cost of using more - memory. It can be set smaller if you are tight on memory. + $ rclone lsf --dirs-only -Fip --csv filefabric: + 120673758,Burnt PDFs/ + 120673759,My Quick Uploads/ + 120673755,My Syncs/ + 120673756,My backups/ + 120673757,My contacts/ + 120673761,S3 Storage/ - Properties: +The ID for "S3 Storage" would be 120673761. - - Config: chunk_size - - Env Var: RCLONE_DROPBOX_CHUNK_SIZE - - Type: SizeSuffix - - Default: 48Mi +Standard options - #### --dropbox-impersonate +Here are the Standard options specific to filefabric (Enterprise File +Fabric). - Impersonate this user when using a business account. +--filefabric-url - Note that if you want to use impersonate, you should make sure this - flag is set when running "rclone config" as this will cause rclone to - request the "members.read" scope which it won't normally. This is - needed to lookup a members email address into the internal ID that - dropbox uses in the API. +URL of the Enterprise File Fabric to connect to. - Using the "members.read" scope will require a Dropbox Team Admin - to approve during the OAuth flow. +Properties: - You will have to use your own App (setting your own client_id and - client_secret) to use this option as currently rclone's default set of - permissions doesn't include "members.read". This can be added once - v1.55 or later is in use everywhere. +- Config: url +- Env Var: RCLONE_FILEFABRIC_URL +- Type: string +- Required: true +- Examples: + - "https://storagemadeeasy.com" + - Storage Made Easy US + - "https://eu.storagemadeeasy.com" + - Storage Made Easy EU + - "https://yourfabric.smestorage.com" + - Connect to your Enterprise File Fabric +--filefabric-root-folder-id - Properties: +ID of the root folder. - - Config: impersonate - - Env Var: RCLONE_DROPBOX_IMPERSONATE - - Type: string - - Required: false - - #### --dropbox-shared-files - - Instructs rclone to work on individual shared files. - - In this mode rclone's features are extremely limited - only list (ls, lsl, etc.) - operations and read operations (e.g. downloading) are supported in this mode. - All other operations will be disabled. - - Properties: - - - Config: shared_files - - Env Var: RCLONE_DROPBOX_SHARED_FILES - - Type: bool - - Default: false - - #### --dropbox-shared-folders - - Instructs rclone to work on shared folders. - - When this flag is used with no path only the List operation is supported and - all available shared folders will be listed. If you specify a path the first part - will be interpreted as the name of shared folder. Rclone will then try to mount this - shared to the root namespace. On success shared folder rclone proceeds normally. - The shared folder is now pretty much a normal folder and all normal operations - are supported. - - Note that we don't unmount the shared folder afterwards so the - --dropbox-shared-folders can be omitted after the first use of a particular - shared folder. - - Properties: - - - Config: shared_folders - - Env Var: RCLONE_DROPBOX_SHARED_FOLDERS - - Type: bool - - Default: false - - #### --dropbox-pacer-min-sleep - - Minimum time to sleep between API calls. - - Properties: - - - Config: pacer_min_sleep - - Env Var: RCLONE_DROPBOX_PACER_MIN_SLEEP - - Type: Duration - - Default: 10ms - - #### --dropbox-encoding - - The encoding for the backend. - - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - - Properties: - - - Config: encoding - - Env Var: RCLONE_DROPBOX_ENCODING - - Type: Encoding - - Default: Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot - - #### --dropbox-batch-mode - - Upload file batching sync|async|off. - - This sets the batch mode used by rclone. - - For full info see [the main docs](https://rclone.org/dropbox/#batch-mode) - - This has 3 possible values - - - off - no batching - - sync - batch uploads and check completion (default) - - async - batch upload and don't check completion - - Rclone will close any outstanding batches when it exits which may make - a delay on quit. - - - Properties: - - - Config: batch_mode - - Env Var: RCLONE_DROPBOX_BATCH_MODE - - Type: string - - Default: "sync" - - #### --dropbox-batch-size - - Max number of files in upload batch. - - This sets the batch size of files to upload. It has to be less than 1000. - - By default this is 0 which means rclone which calculate the batch size - depending on the setting of batch_mode. - - - batch_mode: async - default batch_size is 100 - - batch_mode: sync - default batch_size is the same as --transfers - - batch_mode: off - not in use - - Rclone will close any outstanding batches when it exits which may make - a delay on quit. - - Setting this is a great idea if you are uploading lots of small files - as it will make them a lot quicker. You can use --transfers 32 to - maximise throughput. - - - Properties: - - - Config: batch_size - - Env Var: RCLONE_DROPBOX_BATCH_SIZE - - Type: int - - Default: 0 - - #### --dropbox-batch-timeout - - Max time to allow an idle upload batch before uploading. - - If an upload batch is idle for more than this long then it will be - uploaded. - - The default for this is 0 which means rclone will choose a sensible - default based on the batch_mode in use. - - - batch_mode: async - default batch_timeout is 10s - - batch_mode: sync - default batch_timeout is 500ms - - batch_mode: off - not in use - - - Properties: - - - Config: batch_timeout - - Env Var: RCLONE_DROPBOX_BATCH_TIMEOUT - - Type: Duration - - Default: 0s - - #### --dropbox-batch-commit-timeout - - Max time to wait for a batch to finish committing - - Properties: - - - Config: batch_commit_timeout - - Env Var: RCLONE_DROPBOX_BATCH_COMMIT_TIMEOUT - - Type: Duration - - Default: 10m0s - - #### --dropbox-description - - Description of the remote - - Properties: - - - Config: description - - Env Var: RCLONE_DROPBOX_DESCRIPTION - - Type: string - - Required: false - - - - ## Limitations - - Note that Dropbox is case insensitive so you can't have a file called - "Hello.doc" and one called "hello.doc". - - There are some file names such as `thumbs.db` which Dropbox can't - store. There is a full list of them in the ["Ignored Files" section - of this document](https://www.dropbox.com/en/help/145). Rclone will - issue an error message `File name disallowed - not uploading` if it - attempts to upload one of those file names, but the sync won't fail. - - Some errors may occur if you try to sync copyright-protected files - because Dropbox has its own [copyright detector](https://techcrunch.com/2014/03/30/how-dropbox-knows-when-youre-sharing-copyrighted-stuff-without-actually-looking-at-your-stuff/) that - prevents this sort of file being downloaded. This will return the error `ERROR : - /path/to/your/file: Failed to copy: failed to open source object: - path/restricted_content/.` - - If you have more than 10,000 files in a directory then `rclone purge - dropbox:dir` will return the error `Failed to purge: There are too - many files involved in this operation`. As a work-around do an - `rclone delete dropbox:dir` followed by an `rclone rmdir dropbox:dir`. - - When using `rclone link` you'll need to set `--expire` if using a - non-personal account otherwise the visibility may not be correct. - (Note that `--expire` isn't supported on personal accounts). See the - [forum discussion](https://forum.rclone.org/t/rclone-link-dropbox-permissions/23211) and the - [dropbox SDK issue](https://github.com/dropbox/dropbox-sdk-go-unofficial/issues/75). - - ## Get your own Dropbox App ID - - When you use rclone with Dropbox in its default configuration you are using rclone's App ID. This is shared between all the rclone users. - - Here is how to create your own Dropbox App ID for rclone: - - 1. Log into the [Dropbox App console](https://www.dropbox.com/developers/apps/create) with your Dropbox Account (It need not - to be the same account as the Dropbox you want to access) - - 2. Choose an API => Usually this should be `Dropbox API` - - 3. Choose the type of access you want to use => `Full Dropbox` or `App Folder`. If you want to use Team Folders, `Full Dropbox` is required ([see here](https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-create-team-folder-inside-my-app-s-folder/m-p/601005/highlight/true#M27911)). - - 4. Name your App. The app name is global, so you can't use `rclone` for example - - 5. Click the button `Create App` - - 6. Switch to the `Permissions` tab. Enable at least the following permissions: `account_info.read`, `files.metadata.write`, `files.content.write`, `files.content.read`, `sharing.write`. The `files.metadata.read` and `sharing.read` checkboxes will be marked too. Click `Submit` - - 7. Switch to the `Settings` tab. Fill `OAuth2 - Redirect URIs` as `http://localhost:53682/` and click on `Add` - - 8. Find the `App key` and `App secret` values on the `Settings` tab. Use these values in rclone config to add a new remote or edit an existing remote. The `App key` setting corresponds to `client_id` in rclone config, the `App secret` corresponds to `client_secret` - - # Enterprise File Fabric - - This backend supports [Storage Made Easy's Enterprise File - Fabric™](https://storagemadeeasy.com/about/) which provides a software - solution to integrate and unify File and Object Storage accessible - through a global file system. - - ## Configuration - - The initial setup for the Enterprise File Fabric backend involves - getting a token from the Enterprise File Fabric which you need to - do in your browser. `rclone config` walks you through it. - - Here is an example of how to make a remote called `remote`. 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. Enter a string value. Press Enter for the default (""). -Choose a number from below, or type in your own value [snip] XX / -Enterprise File Fabric  "filefabric" [snip] Storage> filefabric ** See -help for filefabric backend at: https://rclone.org/filefabric/ ** - -URL of the Enterprise File Fabric to connect to Enter a string value. -Press Enter for the default (""). Choose a number from below, or type in -your own value 1 / Storage Made Easy US  "https://storagemadeeasy.com" 2 -/ Storage Made Easy EU  "https://eu.storagemadeeasy.com" 3 / Connect to -your Enterprise File Fabric  "https://yourfabric.smestorage.com" url> -https://yourfabric.smestorage.com/ ID of the root folder Leave blank -normally. +Leave blank normally. Fill in to make rclone start with directory of a given ID. -Enter a string value. Press Enter for the default (""). root_folder_id> -Permanent Authentication Token +Properties: + +- Config: root_folder_id +- Env Var: RCLONE_FILEFABRIC_ROOT_FOLDER_ID +- Type: string +- Required: false + +--filefabric-permanent-token + +Permanent Authentication Token. A Permanent Authentication Token can be created in the Enterprise File Fabric, on the users Dashboard under Security, there is an entry you'll @@ -31837,9059 +32625,10186 @@ These tokens are normally valid for several years. For more info see: https://docs.storagemadeeasy.com/organisationcloud/api-tokens -Enter a string value. Press Enter for the default (""). permanent_token> -xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx Edit advanced config? (y/n) y) Yes n) -No (default) y/n> n Remote config -------------------- [remote] type = -filefabric url = https://yourfabric.smestorage.com/ permanent_token = -xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx -------------------- y) Yes this is OK -(default) e) Edit this remote d) Delete this remote y/e/d> y +Properties: +- Config: permanent_token +- Env Var: RCLONE_FILEFABRIC_PERMANENT_TOKEN +- Type: string +- Required: false - Once configured you can then use `rclone` like this, +Advanced options - List directories in top level of your Enterprise File Fabric +Here are the Advanced options specific to filefabric (Enterprise File +Fabric). - rclone lsd remote: +--filefabric-token - List all the files in your Enterprise File Fabric +Session Token. - rclone ls remote: +This is a session token which rclone caches in the config file. It is +usually valid for 1 hour. - To copy a local directory to an Enterprise File Fabric directory called backup +Don't set this value - rclone will set it automatically. - rclone copy /home/source remote:backup +Properties: - ### Modification times and hashes +- Config: token +- Env Var: RCLONE_FILEFABRIC_TOKEN +- Type: string +- Required: false - The Enterprise File Fabric allows modification times to be set on - files accurate to 1 second. These will be used to detect whether - objects need syncing or not. +--filefabric-token-expiry - The Enterprise File Fabric does not support any data hashes at this time. +Token expiry time. - ### Restricted filename characters +Don't set this value - rclone will set it automatically. - The [default restricted characters set](https://rclone.org/overview/#restricted-characters) - will be replaced. +Properties: - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. +- Config: token_expiry +- Env Var: RCLONE_FILEFABRIC_TOKEN_EXPIRY +- Type: string +- Required: false - ### Empty files +--filefabric-version - Empty files aren't supported by the Enterprise File Fabric. Rclone will therefore - upload an empty file as a single space with a mime type of - `application/vnd.rclone.empty.file` and files with that mime type are - treated as empty. +Version read from the file fabric. - ### Root folder ID ### +Don't set this value - rclone will set it automatically. - You can set the `root_folder_id` for rclone. This is the directory - (identified by its `Folder ID`) that rclone considers to be the root - of your Enterprise File Fabric. +Properties: - Normally you will leave this blank and rclone will determine the - correct root to use itself. +- Config: version +- Env Var: RCLONE_FILEFABRIC_VERSION +- Type: string +- Required: false - However you can set this to restrict rclone to a specific folder - hierarchy. +--filefabric-encoding - In order to do this you will have to find the `Folder ID` of the - directory you wish rclone to display. These aren't displayed in the - web interface, but you can use `rclone lsf` to find them, for example +The encoding for the backend. -$ rclone lsf --dirs-only -Fip --csv filefabric: 120673758,Burnt PDFs/ -120673759,My Quick Uploads/ 120673755,My Syncs/ 120673756,My backups/ -120673757,My contacts/ 120673761,S3 Storage/ +See the encoding section in the overview for more info. +Properties: - The ID for "S3 Storage" would be `120673761`. +- Config: encoding +- Env Var: RCLONE_FILEFABRIC_ENCODING +- Type: Encoding +- Default: Slash,Del,Ctl,InvalidUtf8,Dot +--filefabric-description - ### Standard options +Description of the remote. - Here are the Standard options specific to filefabric (Enterprise File Fabric). +Properties: - #### --filefabric-url +- Config: description +- Env Var: RCLONE_FILEFABRIC_DESCRIPTION +- Type: string +- Required: false - URL of the Enterprise File Fabric to connect to. +FTP - Properties: +FTP is the File Transfer Protocol. Rclone FTP support is provided using +the github.com/jlaffaye/ftp package. - - Config: url - - Env Var: RCLONE_FILEFABRIC_URL - - Type: string - - Required: true - - Examples: - - "https://storagemadeeasy.com" - - Storage Made Easy US - - "https://eu.storagemadeeasy.com" - - Storage Made Easy EU - - "https://yourfabric.smestorage.com" - - Connect to your Enterprise File Fabric +Limitations of Rclone's FTP backend - #### --filefabric-root-folder-id +Paths are specified as remote:path. If the path does not begin with a / +it is relative to the home directory of the user. An empty path remote: +refers to the user's home directory. - ID of the root folder. +Configuration - Leave blank normally. +To create an FTP configuration named remote, run - Fill in to make rclone start with directory of a given ID. + rclone config +Rclone config guides you through an interactive setup process. A minimal +rclone FTP remote definition only requires host, username and password. +For an anonymous FTP server, see below. - Properties: + No remotes found, make a new one? + n) New remote + r) Rename remote + c) Copy remote + s) Set configuration password + q) Quit config + n/r/c/s/q> n + name> remote + Type of storage to configure. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + [snip] + XX / FTP + \ "ftp" + [snip] + Storage> ftp + ** See help for ftp backend at: https://rclone.org/ftp/ ** - - Config: root_folder_id - - Env Var: RCLONE_FILEFABRIC_ROOT_FOLDER_ID - - Type: string - - Required: false - - #### --filefabric-permanent-token - - Permanent Authentication Token. - - A Permanent Authentication Token can be created in the Enterprise File - Fabric, on the users Dashboard under Security, there is an entry - you'll see called "My Authentication Tokens". Click the Manage button - to create one. - - These tokens are normally valid for several years. - - For more info see: https://docs.storagemadeeasy.com/organisationcloud/api-tokens - - - Properties: - - - Config: permanent_token - - Env Var: RCLONE_FILEFABRIC_PERMANENT_TOKEN - - Type: string - - Required: false - - ### Advanced options - - Here are the Advanced options specific to filefabric (Enterprise File Fabric). - - #### --filefabric-token - - Session Token. - - This is a session token which rclone caches in the config file. It is - usually valid for 1 hour. - - Don't set this value - rclone will set it automatically. - - - Properties: - - - Config: token - - Env Var: RCLONE_FILEFABRIC_TOKEN - - Type: string - - Required: false - - #### --filefabric-token-expiry - - Token expiry time. - - Don't set this value - rclone will set it automatically. - - - Properties: - - - Config: token_expiry - - Env Var: RCLONE_FILEFABRIC_TOKEN_EXPIRY - - Type: string - - Required: false - - #### --filefabric-version - - Version read from the file fabric. - - Don't set this value - rclone will set it automatically. - - - Properties: - - - Config: version - - Env Var: RCLONE_FILEFABRIC_VERSION - - Type: string - - Required: false - - #### --filefabric-encoding - - The encoding for the backend. - - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - - Properties: - - - Config: encoding - - Env Var: RCLONE_FILEFABRIC_ENCODING - - Type: Encoding - - Default: Slash,Del,Ctl,InvalidUtf8,Dot - - #### --filefabric-description - - Description of the remote - - Properties: - - - Config: description - - Env Var: RCLONE_FILEFABRIC_DESCRIPTION - - Type: string - - Required: false - - - - # FTP - - FTP is the File Transfer Protocol. Rclone FTP support is provided using the - [github.com/jlaffaye/ftp](https://godoc.org/github.com/jlaffaye/ftp) - package. - - [Limitations of Rclone's FTP backend](#limitations) - - Paths are specified as `remote:path`. If the path does not begin with - a `/` it is relative to the home directory of the user. An empty path - `remote:` refers to the user's home directory. - - ## Configuration - - To create an FTP configuration named `remote`, run - - rclone config - - Rclone config guides you through an interactive setup process. A minimal - rclone FTP remote definition only requires host, username and password. - For an anonymous FTP server, see [below](#anonymous-ftp). - -No remotes found, make a new one? n) New remote r) Rename remote c) Copy -remote s) Set configuration password q) Quit config n/r/c/s/q> n name> -remote Type of storage to configure. Enter a string value. Press Enter -for the default (""). Choose a number from below, or type in your own -value [snip] XX / FTP  "ftp" [snip] Storage> ftp ** See help for ftp -backend at: https://rclone.org/ftp/ ** - -FTP host to connect to Enter a string value. Press Enter for the default -(""). Choose a number from below, or type in your own value 1 / Connect -to ftp.example.com  "ftp.example.com" host> ftp.example.com FTP username -Enter a string value. Press Enter for the default ("$USER"). user> FTP -port number Enter a signed integer. Press Enter for the default (21). -port> FTP password y) Yes type in my own password g) Generate random -password y/g> y Enter the password: password: Confirm the password: -password: Use FTP over TLS (Implicit) Enter a boolean value (true or -false). Press Enter for the default ("false"). tls> Use FTP over TLS -(Explicit) Enter a boolean value (true or false). Press Enter for the -default ("false"). explicit_tls> Remote config -------------------- -[remote] type = ftp host = ftp.example.com pass = *** ENCRYPTED *** --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y - - - To see all directories in the home directory of `remote` - - rclone lsd remote: - - Make a new directory - - rclone mkdir remote:path/to/directory - - List the contents of a directory - - rclone ls remote:path/to/directory - - Sync `/home/local/directory` to the remote directory, deleting any - excess files in the directory. - - rclone sync --interactive /home/local/directory remote:directory - - ### Anonymous FTP - - When connecting to a FTP server that allows anonymous login, you can use the - special "anonymous" username. Traditionally, this user account accepts any - string as a password, although it is common to use either the password - "anonymous" or "guest". Some servers require the use of a valid e-mail - address as password. - - Using [on-the-fly](#backend-path-to-dir) or - [connection string](https://rclone.org/docs/#connection-strings) remotes makes it easy to access - such servers, without requiring any configuration in advance. The following - are examples of that: - - rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=$(rclone obscure dummy) - rclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=$(rclone obscure dummy): - - The above examples work in Linux shells and in PowerShell, but not Windows - Command Prompt. They execute the [rclone obscure](https://rclone.org/commands/rclone_obscure/) - command to create a password string in the format required by the - [pass](#ftp-pass) option. The following examples are exactly the same, except use - an already obscured string representation of the same password "dummy", and - therefore works even in Windows Command Prompt: - - rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxM - rclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxM: - - ### Implicit TLS - - Rlone FTP supports implicit FTP over TLS servers (FTPS). This has to - be enabled in the FTP backend config for the remote, or with - [`--ftp-tls`](#ftp-tls). The default FTPS port is `990`, not `21` and - can be set with [`--ftp-port`](#ftp-port). - - ### Restricted filename characters - - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: - - File names cannot end with the following characters. Replacement is - limited to the last character in a file name: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | SP | 0x20 | ␠ | - - Not all FTP servers can have all characters in file names, for example: - - | FTP Server| Forbidden characters | - | --------- |:--------------------:| - | proftpd | `*` | - | pureftpd | `\ [ ]` | - - This backend's interactive configuration wizard provides a selection of - sensible encoding settings for major FTP servers: ProFTPd, PureFTPd, VsFTPd. - Just hit a selection number when prompted. - - - ### Standard options - - Here are the Standard options specific to ftp (FTP). - - #### --ftp-host - - FTP host to connect to. - - E.g. "ftp.example.com". - - Properties: - - - Config: host - - Env Var: RCLONE_FTP_HOST - - Type: string - - Required: true - - #### --ftp-user - - FTP username. - - Properties: - - - Config: user - - Env Var: RCLONE_FTP_USER - - Type: string - - Default: "$USER" - - #### --ftp-port - - FTP port number. - - Properties: - - - Config: port - - Env Var: RCLONE_FTP_PORT - - Type: int - - Default: 21 - - #### --ftp-pass - - FTP password. - - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - - Properties: - - - Config: pass - - Env Var: RCLONE_FTP_PASS - - Type: string - - Required: false - - #### --ftp-tls - - Use Implicit FTPS (FTP over TLS). - - When using implicit FTP over TLS the client connects using TLS - right from the start which breaks compatibility with - non-TLS-aware servers. This is usually served over port 990 rather - than port 21. Cannot be used in combination with explicit FTPS. - - Properties: - - - Config: tls - - Env Var: RCLONE_FTP_TLS - - Type: bool - - Default: false - - #### --ftp-explicit-tls - - Use Explicit FTPS (FTP over TLS). - - When using explicit FTP over TLS the client explicitly requests - security from the server in order to upgrade a plain text connection - to an encrypted one. Cannot be used in combination with implicit FTPS. - - Properties: - - - Config: explicit_tls - - Env Var: RCLONE_FTP_EXPLICIT_TLS - - Type: bool - - Default: false - - ### Advanced options - - Here are the Advanced options specific to ftp (FTP). - - #### --ftp-concurrency - - Maximum number of FTP simultaneous connections, 0 for unlimited. - - Note that setting this is very likely to cause deadlocks so it should - be used with care. - - If you are doing a sync or copy then make sure concurrency is one more - than the sum of `--transfers` and `--checkers`. - - If you use `--check-first` then it just needs to be one more than the - maximum of `--checkers` and `--transfers`. - - So for `concurrency 3` you'd use `--checkers 2 --transfers 2 - --check-first` or `--checkers 1 --transfers 1`. - - - - Properties: - - - Config: concurrency - - Env Var: RCLONE_FTP_CONCURRENCY - - Type: int - - Default: 0 - - #### --ftp-no-check-certificate - - Do not verify the TLS certificate of the server. - - Properties: - - - Config: no_check_certificate - - Env Var: RCLONE_FTP_NO_CHECK_CERTIFICATE - - Type: bool - - Default: false - - #### --ftp-disable-epsv - - Disable using EPSV even if server advertises support. - - Properties: - - - Config: disable_epsv - - Env Var: RCLONE_FTP_DISABLE_EPSV - - Type: bool - - Default: false - - #### --ftp-disable-mlsd - - Disable using MLSD even if server advertises support. - - Properties: - - - Config: disable_mlsd - - Env Var: RCLONE_FTP_DISABLE_MLSD - - Type: bool - - Default: false - - #### --ftp-disable-utf8 - - Disable using UTF-8 even if server advertises support. - - Properties: - - - Config: disable_utf8 - - Env Var: RCLONE_FTP_DISABLE_UTF8 - - Type: bool - - Default: false - - #### --ftp-writing-mdtm - - Use MDTM to set modification time (VsFtpd quirk) - - Properties: - - - Config: writing_mdtm - - Env Var: RCLONE_FTP_WRITING_MDTM - - Type: bool - - Default: false - - #### --ftp-force-list-hidden - - Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. - - Properties: - - - Config: force_list_hidden - - Env Var: RCLONE_FTP_FORCE_LIST_HIDDEN - - Type: bool - - Default: false - - #### --ftp-idle-timeout - - Max time before closing idle connections. - - If no connections have been returned to the connection pool in the time - given, rclone will empty the connection pool. - - Set to 0 to keep connections indefinitely. - - - Properties: - - - Config: idle_timeout - - Env Var: RCLONE_FTP_IDLE_TIMEOUT - - Type: Duration - - Default: 1m0s - - #### --ftp-close-timeout - - Maximum time to wait for a response to close. - - Properties: - - - Config: close_timeout - - Env Var: RCLONE_FTP_CLOSE_TIMEOUT - - Type: Duration - - Default: 1m0s - - #### --ftp-tls-cache-size - - Size of TLS session cache for all control and data connections. - - TLS cache allows to resume TLS sessions and reuse PSK between connections. - Increase if default size is not enough resulting in TLS resumption errors. - Enabled by default. Use 0 to disable. - - Properties: - - - Config: tls_cache_size - - Env Var: RCLONE_FTP_TLS_CACHE_SIZE - - Type: int - - Default: 32 - - #### --ftp-disable-tls13 - - Disable TLS 1.3 (workaround for FTP servers with buggy TLS) - - Properties: - - - Config: disable_tls13 - - Env Var: RCLONE_FTP_DISABLE_TLS13 - - Type: bool - - Default: false - - #### --ftp-shut-timeout - - Maximum time to wait for data connection closing status. - - Properties: - - - Config: shut_timeout - - Env Var: RCLONE_FTP_SHUT_TIMEOUT - - Type: Duration - - Default: 1m0s - - #### --ftp-ask-password - - Allow asking for FTP password when needed. - - If this is set and no password is supplied then rclone will ask for a password - - - Properties: - - - Config: ask_password - - Env Var: RCLONE_FTP_ASK_PASSWORD - - Type: bool - - Default: false - - #### --ftp-socks-proxy - - Socks 5 proxy host. - - Supports the format user:pass@host:port, user@host:port, host:port. - - Example: - - myUser:myPass@localhost:9005 - - - Properties: - - - Config: socks_proxy - - Env Var: RCLONE_FTP_SOCKS_PROXY - - Type: string - - Required: false - - #### --ftp-encoding - - The encoding for the backend. - - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - - Properties: - - - Config: encoding - - Env Var: RCLONE_FTP_ENCODING - - Type: Encoding - - Default: Slash,Del,Ctl,RightSpace,Dot - - Examples: - - "Asterisk,Ctl,Dot,Slash" - - ProFTPd can't handle '*' in file names - - "BackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket" - - PureFTPd can't handle '[]' or '*' in file names - - "Ctl,LeftPeriod,Slash" - - VsFTPd can't handle file names starting with dot - - #### --ftp-description - - Description of the remote - - Properties: - - - Config: description - - Env Var: RCLONE_FTP_DESCRIPTION - - Type: string - - Required: false - - - - ## Limitations - - FTP servers acting as rclone remotes must support `passive` mode. - The mode cannot be configured as `passive` is the only supported one. - Rclone's FTP implementation is not compatible with `active` mode - as [the library it uses doesn't support it](https://github.com/jlaffaye/ftp/issues/29). - This will likely never be supported due to security concerns. - - Rclone's FTP backend does not support any checksums but can compare - file sizes. - - `rclone about` is not supported by the FTP backend. Backends without - this capability cannot determine free space for an rclone mount or - use policy `mfs` (most free space) as a member of an rclone union - remote. - - See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - - The implementation of : `--dump headers`, - `--dump bodies`, `--dump auth` for debugging isn't the same as - for rclone HTTP based backends - it has less fine grained control. - - `--timeout` isn't supported (but `--contimeout` is). - - `--bind` isn't supported. - - Rclone's FTP backend could support server-side move but does not - at present. - - The `ftp_proxy` environment variable is not currently supported. - - ### Modification times - - File modification time (timestamps) is supported to 1 second resolution - for major FTP servers: ProFTPd, PureFTPd, VsFTPd, and FileZilla FTP server. - The `VsFTPd` server has non-standard implementation of time related protocol - commands and needs a special configuration setting: `writing_mdtm = true`. - - Support for precise file time with other FTP servers varies depending on what - protocol extensions they advertise. If all the `MLSD`, `MDTM` and `MFTM` - extensions are present, rclone will use them together to provide precise time. - Otherwise the times you see on the FTP server through rclone are those of the - last file upload. - - You can use the following command to check whether rclone can use precise time - with your FTP server: `rclone backend features your_ftp_remote:` (the trailing - colon is important). Look for the number in the line tagged by `Precision` - designating the remote time precision expressed as nanoseconds. A value of - `1000000000` means that file time precision of 1 second is available. - A value of `3153600000000000000` (or another large number) means "unsupported". - - # Google Cloud Storage - - Paths are specified as `remote:bucket` (or `remote:` for the `lsd` - command.) You may put subdirectories in too, e.g. `remote:bucket/path/to/dir`. - - ## Configuration - - The initial setup for google cloud storage involves getting a token from Google Cloud Storage - which you need to do in your browser. `rclone config` walks you - through it. - - Here is an example of how to make a remote called `remote`. First run: - - rclone config - - This will guide you through an interactive setup process: - -n) New remote -o) Delete remote -p) Quit config e/n/d/q> n name> remote Type of storage to configure. - Choose a number from below, or type in your own value [snip] XX / - Google Cloud Storage (this is not Google Drive)  "google cloud - storage" [snip] Storage> google cloud storage Google Application - Client Id - leave blank normally. client_id> Google Application - Client Secret - leave blank normally. client_secret> Project number - optional - needed only for list/create/delete buckets - see your - developer console. project_number> 12345678 Service Account - Credentials JSON file path - needed only if you want use SA instead - of interactive login. service_account_file> Access Control List for - new objects. Choose a number from below, or type in your own value 1 - / Object owner gets OWNER access, and all Authenticated Users get - READER access.  "authenticatedRead" 2 / Object owner gets OWNER - access, and project team owners get OWNER access. -  "bucketOwnerFullControl" 3 / Object owner gets OWNER access, and - project team owners get READER access.  "bucketOwnerRead" 4 / Object - owner gets OWNER access [default if left blank].  "private" 5 / - Object owner gets OWNER access, and project team members get access - according to their roles.  "projectPrivate" 6 / Object owner gets - OWNER access, and all Users get READER access.  "publicRead" - object_acl> 4 Access Control List for new buckets. Choose a number - from below, or type in your own value 1 / Project team owners get - OWNER access, and all Authenticated Users get READER access. -  "authenticatedRead" 2 / Project team owners get OWNER access - [default if left blank].  "private" 3 / Project team members get - access according to their roles.  "projectPrivate" 4 / Project team - owners get OWNER access, and all Users get READER access. -  "publicRead" 5 / Project team owners get OWNER access, and all - Users get WRITER access.  "publicReadWrite" bucket_acl> 2 Location - for the newly created buckets. Choose a number from below, or type - in your own value 1 / Empty for default location (US).  "" 2 / - Multi-regional location for Asia.  "asia" 3 / Multi-regional - location for Europe.  "eu" 4 / Multi-regional location for United - States.  "us" 5 / Taiwan.  "asia-east1" 6 / Tokyo. -  "asia-northeast1" 7 / Singapore.  "asia-southeast1" 8 / Sydney. -  "australia-southeast1" 9 / Belgium.  "europe-west1" 10 / London. -  "europe-west2" 11 / Iowa.  "us-central1" 12 / South Carolina. -  "us-east1" 13 / Northern Virginia.  "us-east4" 14 / Oregon. -  "us-west1" location> 12 The storage class to use when storing - objects in Google Cloud Storage. Choose a number from below, or type - in your own value 1 / Default  "" 2 / Multi-regional storage class -  "MULTI_REGIONAL" 3 / Regional storage class  "REGIONAL" 4 / - Nearline storage class  "NEARLINE" 5 / Coldline storage class -  "COLDLINE" 6 / Durable reduced availability storage class -  "DURABLE_REDUCED_AVAILABILITY" storage_class> 5 Remote config Use - web browser to automatically authenticate rclone with remote? - -- Say Y if the machine running rclone has a web browser you can use -- Say N if running rclone on a (remote) machine without web browser - access If not sure try Y. If Y failed, try N. - -y) Yes -z) No y/n> y If your browser doesn't open automatically go to the - following link: http://127.0.0.1:53682/auth Log in and authorize - rclone for access Waiting for code... Got code -------------------- - [remote] type = google cloud storage client_id = client_secret = - token = - {"AccessToken":"xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","RefreshToken":"x/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxx","Expiry":"2014-07-17T20:49:14.929208288+01:00","Extra":null} - project_number = 12345678 object_acl = private bucket_acl = private + FTP host to connect to + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + 1 / Connect to ftp.example.com + \ "ftp.example.com" + host> ftp.example.com + FTP username + Enter a string value. Press Enter for the default ("$USER"). + user> + FTP port number + Enter a signed integer. Press Enter for the default (21). + port> + FTP password + y) Yes type in my own password + g) Generate random password + y/g> y + Enter the password: + password: + Confirm the password: + password: + Use FTP over TLS (Implicit) + Enter a boolean value (true or false). Press Enter for the default ("false"). + tls> + Use FTP over TLS (Explicit) + Enter a boolean value (true or false). Press Enter for the default ("false"). + explicit_tls> + Remote config -------------------- -a) Yes this is OK -b) Edit this remote -c) Delete this remote y/e/d> y + [remote] + type = ftp + host = ftp.example.com + pass = *** ENCRYPTED *** + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y +To see all directories in the home directory of remote - See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a - machine with no Internet browser available. + rclone lsd remote: - Note that rclone runs a webserver on your local machine to collect the - token as returned from Google if using web browser to automatically - authenticate. This only - runs from the moment it opens your browser to the moment you get back - the verification code. This is on `http://127.0.0.1:53682/` and this - it may require you to unblock it temporarily if you are running a host - firewall, or use manual mode. +Make a new directory - This remote is called `remote` and can now be used like this + rclone mkdir remote:path/to/directory - See all the buckets in your project +List the contents of a directory - rclone lsd remote: + rclone ls remote:path/to/directory - Make a new bucket +Sync /home/local/directory to the remote directory, deleting any excess +files in the directory. - rclone mkdir remote:bucket + rclone sync --interactive /home/local/directory remote:directory - List the contents of a bucket +Anonymous FTP - rclone ls remote:bucket +When connecting to a FTP server that allows anonymous login, you can use +the special "anonymous" username. Traditionally, this user account +accepts any string as a password, although it is common to use either +the password "anonymous" or "guest". Some servers require the use of a +valid e-mail address as password. - Sync `/home/local/directory` to the remote bucket, deleting any excess - files in the bucket. +Using on-the-fly or connection string remotes makes it easy to access +such servers, without requiring any configuration in advance. The +following are examples of that: - rclone sync --interactive /home/local/directory remote:bucket + rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=$(rclone obscure dummy) + rclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=$(rclone obscure dummy): - ### Service Account support +The above examples work in Linux shells and in PowerShell, but not +Windows Command Prompt. They execute the rclone obscure command to +create a password string in the format required by the pass option. The +following examples are exactly the same, except use an already obscured +string representation of the same password "dummy", and therefore works +even in Windows Command Prompt: - You can set up rclone with Google Cloud Storage in an unattended mode, - i.e. not tied to a specific end-user Google account. This is useful - when you want to synchronise files onto machines that don't have - actively logged-in users, for example build machines. + rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxM + rclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxM: - To get credentials for Google Cloud Platform - [IAM Service Accounts](https://cloud.google.com/iam/docs/service-accounts), - please head to the - [Service Account](https://console.cloud.google.com/permissions/serviceaccounts) - section of the Google Developer Console. Service Accounts behave just - like normal `User` permissions in - [Google Cloud Storage ACLs](https://cloud.google.com/storage/docs/access-control), - so you can limit their access (e.g. make them read only). After - creating an account, a JSON file containing the Service Account's - credentials will be downloaded onto your machines. These credentials - are what rclone will use for authentication. +Implicit TLS - To use a Service Account instead of OAuth2 token flow, enter the path - to your Service Account credentials at the `service_account_file` - prompt and rclone won't use the browser based authentication - flow. If you'd rather stuff the contents of the credentials file into - the rclone config file, you can set `service_account_credentials` with - the actual contents of the file instead, or set the equivalent - environment variable. +Rlone FTP supports implicit FTP over TLS servers (FTPS). This has to be +enabled in the FTP backend config for the remote, or with --ftp-tls. The +default FTPS port is 990, not 21 and can be set with --ftp-port. - ### Anonymous Access +Restricted filename characters - For downloads of objects that permit public access you can configure rclone - to use anonymous access by setting `anonymous` to `true`. - With unauthorized access you can't write or create files but only read or list - those buckets and objects that have public read access. +In addition to the default restricted characters set the following +characters are also replaced: - ### Application Default Credentials +File names cannot end with the following characters. Replacement is +limited to the last character in a file name: - If no other source of credentials is provided, rclone will fall back - to - [Application Default Credentials](https://cloud.google.com/video-intelligence/docs/common/auth#authenticating_with_application_default_credentials) - this is useful both when you already have configured authentication - for your developer account, or in production when running on a google - compute host. Note that if running in docker, you may need to run - additional commands on your google compute machine - - [see this page](https://cloud.google.com/container-registry/docs/advanced-authentication#gcloud_as_a_docker_credential_helper). + Character Value Replacement + ----------- ------- ------------- + SP 0x20 ␠ - Note that in the case application default credentials are used, there - is no need to explicitly configure a project number. +Not all FTP servers can have all characters in file names, for example: - ### --fast-list + FTP Server Forbidden characters + ------------ ---------------------- + proftpd * + pureftpd \ [ ] - This remote supports `--fast-list` which allows you to use fewer - transactions in exchange for more memory. See the [rclone - docs](https://rclone.org/docs/#fast-list) for more details. +This backend's interactive configuration wizard provides a selection of +sensible encoding settings for major FTP servers: ProFTPd, PureFTPd, +VsFTPd. Just hit a selection number when prompted. - ### Custom upload headers +Standard options - You can set custom upload headers with the `--header-upload` - flag. Google Cloud Storage supports the headers as described in the - [working with metadata documentation](https://cloud.google.com/storage/docs/gsutil/addlhelp/WorkingWithObjectMetadata) +Here are the Standard options specific to ftp (FTP). - - Cache-Control - - Content-Disposition - - Content-Encoding - - Content-Language - - Content-Type - - X-Goog-Storage-Class - - X-Goog-Meta- +--ftp-host - Eg `--header-upload "Content-Type text/potato"` +FTP host to connect to. - Note that the last of these is for setting custom metadata in the form - `--header-upload "x-goog-meta-key: value"` +E.g. "ftp.example.com". - ### Modification times +Properties: - Google Cloud Storage stores md5sum natively. - Google's [gsutil](https://cloud.google.com/storage/docs/gsutil) tool stores modification time - with one-second precision as `goog-reserved-file-mtime` in file metadata. +- Config: host +- Env Var: RCLONE_FTP_HOST +- Type: string +- Required: true - To ensure compatibility with gsutil, rclone stores modification time in 2 separate metadata entries. - `mtime` uses RFC3339 format with one-nanosecond precision. - `goog-reserved-file-mtime` uses Unix timestamp format with one-second precision. - To get modification time from object metadata, rclone reads the metadata in the following order: `mtime`, `goog-reserved-file-mtime`, object updated time. +--ftp-user - Note that rclone's default modify window is 1ns. - Files uploaded by gsutil only contain timestamps with one-second precision. - If you use rclone to sync files previously uploaded by gsutil, - rclone will attempt to update modification time for all these files. - To avoid these possibly unnecessary updates, use `--modify-window 1s`. +FTP username. - ### Restricted filename characters +Properties: - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | NUL | 0x00 | ␀ | - | LF | 0x0A | ␊ | - | CR | 0x0D | ␍ | - | / | 0x2F | / | +- Config: user +- Env Var: RCLONE_FTP_USER +- Type: string +- Default: "$USER" - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. +--ftp-port +FTP port number. - ### Standard options +Properties: - Here are the Standard options specific to google cloud storage (Google Cloud Storage (this is not Google Drive)). +- Config: port +- Env Var: RCLONE_FTP_PORT +- Type: int +- Default: 21 - #### --gcs-client-id +--ftp-pass - OAuth Client Id. +FTP password. - Leave blank normally. +NB Input to this must be obscured - see rclone obscure. - Properties: +Properties: - - Config: client_id - - Env Var: RCLONE_GCS_CLIENT_ID - - Type: string - - Required: false +- Config: pass +- Env Var: RCLONE_FTP_PASS +- Type: string +- Required: false - #### --gcs-client-secret +--ftp-tls - OAuth Client Secret. +Use Implicit FTPS (FTP over TLS). - Leave blank normally. +When using implicit FTP over TLS the client connects using TLS right +from the start which breaks compatibility with non-TLS-aware servers. +This is usually served over port 990 rather than port 21. Cannot be used +in combination with explicit FTPS. - Properties: +Properties: - - Config: client_secret - - Env Var: RCLONE_GCS_CLIENT_SECRET - - Type: string - - Required: false +- Config: tls +- Env Var: RCLONE_FTP_TLS +- Type: bool +- Default: false - #### --gcs-project-number +--ftp-explicit-tls - Project number. +Use Explicit FTPS (FTP over TLS). - Optional - needed only for list/create/delete buckets - see your developer console. +When using explicit FTP over TLS the client explicitly requests security +from the server in order to upgrade a plain text connection to an +encrypted one. Cannot be used in combination with implicit FTPS. - Properties: +Properties: - - Config: project_number - - Env Var: RCLONE_GCS_PROJECT_NUMBER - - Type: string - - Required: false +- Config: explicit_tls +- Env Var: RCLONE_FTP_EXPLICIT_TLS +- Type: bool +- Default: false - #### --gcs-user-project +Advanced options - User project. +Here are the Advanced options specific to ftp (FTP). - Optional - needed only for requester pays. +--ftp-concurrency - Properties: +Maximum number of FTP simultaneous connections, 0 for unlimited. - - Config: user_project - - Env Var: RCLONE_GCS_USER_PROJECT - - Type: string - - Required: false +Note that setting this is very likely to cause deadlocks so it should be +used with care. - #### --gcs-service-account-file +If you are doing a sync or copy then make sure concurrency is one more +than the sum of --transfers and --checkers. - Service Account Credentials JSON file path. +If you use --check-first then it just needs to be one more than the +maximum of --checkers and --transfers. - Leave blank normally. - Needed only if you want use SA instead of interactive login. +So for concurrency 3 you'd use --checkers 2 --transfers 2 --check-first +or --checkers 1 --transfers 1. - Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`. +Properties: - Properties: +- Config: concurrency +- Env Var: RCLONE_FTP_CONCURRENCY +- Type: int +- Default: 0 - - Config: service_account_file - - Env Var: RCLONE_GCS_SERVICE_ACCOUNT_FILE - - Type: string - - Required: false +--ftp-no-check-certificate - #### --gcs-service-account-credentials +Do not verify the TLS certificate of the server. - Service Account Credentials JSON blob. +Properties: - Leave blank normally. - Needed only if you want use SA instead of interactive login. +- Config: no_check_certificate +- Env Var: RCLONE_FTP_NO_CHECK_CERTIFICATE +- Type: bool +- Default: false - Properties: +--ftp-disable-epsv - - Config: service_account_credentials - - Env Var: RCLONE_GCS_SERVICE_ACCOUNT_CREDENTIALS - - Type: string - - Required: false +Disable using EPSV even if server advertises support. - #### --gcs-anonymous +Properties: - Access public buckets and objects without credentials. +- Config: disable_epsv +- Env Var: RCLONE_FTP_DISABLE_EPSV +- Type: bool +- Default: false - Set to 'true' if you just want to download files and don't configure credentials. +--ftp-disable-mlsd - Properties: +Disable using MLSD even if server advertises support. - - Config: anonymous - - Env Var: RCLONE_GCS_ANONYMOUS - - Type: bool - - Default: false +Properties: - #### --gcs-object-acl +- Config: disable_mlsd +- Env Var: RCLONE_FTP_DISABLE_MLSD +- Type: bool +- Default: false +--ftp-disable-utf8 + +Disable using UTF-8 even if server advertises support. + +Properties: + +- Config: disable_utf8 +- Env Var: RCLONE_FTP_DISABLE_UTF8 +- Type: bool +- Default: false + +--ftp-writing-mdtm + +Use MDTM to set modification time (VsFtpd quirk) + +Properties: + +- Config: writing_mdtm +- Env Var: RCLONE_FTP_WRITING_MDTM +- Type: bool +- Default: false + +--ftp-force-list-hidden + +Use LIST -a to force listing of hidden files and folders. This will +disable the use of MLSD. + +Properties: + +- Config: force_list_hidden +- Env Var: RCLONE_FTP_FORCE_LIST_HIDDEN +- Type: bool +- Default: false + +--ftp-idle-timeout + +Max time before closing idle connections. + +If no connections have been returned to the connection pool in the time +given, rclone will empty the connection pool. + +Set to 0 to keep connections indefinitely. + +Properties: + +- Config: idle_timeout +- Env Var: RCLONE_FTP_IDLE_TIMEOUT +- Type: Duration +- Default: 1m0s + +--ftp-close-timeout + +Maximum time to wait for a response to close. + +Properties: + +- Config: close_timeout +- Env Var: RCLONE_FTP_CLOSE_TIMEOUT +- Type: Duration +- Default: 1m0s + +--ftp-tls-cache-size + +Size of TLS session cache for all control and data connections. + +TLS cache allows to resume TLS sessions and reuse PSK between +connections. Increase if default size is not enough resulting in TLS +resumption errors. Enabled by default. Use 0 to disable. + +Properties: + +- Config: tls_cache_size +- Env Var: RCLONE_FTP_TLS_CACHE_SIZE +- Type: int +- Default: 32 + +--ftp-disable-tls13 + +Disable TLS 1.3 (workaround for FTP servers with buggy TLS) + +Properties: + +- Config: disable_tls13 +- Env Var: RCLONE_FTP_DISABLE_TLS13 +- Type: bool +- Default: false + +--ftp-shut-timeout + +Maximum time to wait for data connection closing status. + +Properties: + +- Config: shut_timeout +- Env Var: RCLONE_FTP_SHUT_TIMEOUT +- Type: Duration +- Default: 1m0s + +--ftp-ask-password + +Allow asking for FTP password when needed. + +If this is set and no password is supplied then rclone will ask for a +password + +Properties: + +- Config: ask_password +- Env Var: RCLONE_FTP_ASK_PASSWORD +- Type: bool +- Default: false + +--ftp-socks-proxy + +Socks 5 proxy host. + + Supports the format user:pass@host:port, user@host:port, host:port. + + Example: + + myUser:myPass@localhost:9005 + + +Properties: + +- Config: socks_proxy +- Env Var: RCLONE_FTP_SOCKS_PROXY +- Type: string +- Required: false + +--ftp-encoding + +The encoding for the backend. + +See the encoding section in the overview for more info. + +Properties: + +- Config: encoding +- Env Var: RCLONE_FTP_ENCODING +- Type: Encoding +- Default: Slash,Del,Ctl,RightSpace,Dot +- Examples: + - "Asterisk,Ctl,Dot,Slash" + - ProFTPd can't handle '*' in file names + - "BackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket" + - PureFTPd can't handle '[]' or '*' in file names + - "Ctl,LeftPeriod,Slash" + - VsFTPd can't handle file names starting with dot + +--ftp-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_FTP_DESCRIPTION +- Type: string +- Required: false + +Limitations + +FTP servers acting as rclone remotes must support passive mode. The mode +cannot be configured as passive is the only supported one. Rclone's FTP +implementation is not compatible with active mode as the library it uses +doesn't support it. This will likely never be supported due to security +concerns. + +Rclone's FTP backend does not support any checksums but can compare file +sizes. + +rclone about is not supported by the FTP backend. Backends without this +capability cannot determine free space for an rclone mount or use policy +mfs (most free space) as a member of an rclone union remote. + +See List of backends that do not support rclone about and rclone about + +The implementation of : --dump headers, --dump bodies, --dump auth for +debugging isn't the same as for rclone HTTP based backends - it has less +fine grained control. + +--timeout isn't supported (but --contimeout is). + +--bind isn't supported. + +Rclone's FTP backend could support server-side move but does not at +present. + +The ftp_proxy environment variable is not currently supported. + +Modification times + +File modification time (timestamps) is supported to 1 second resolution +for major FTP servers: ProFTPd, PureFTPd, VsFTPd, and FileZilla FTP +server. The VsFTPd server has non-standard implementation of time +related protocol commands and needs a special configuration setting: +writing_mdtm = true. + +Support for precise file time with other FTP servers varies depending on +what protocol extensions they advertise. If all the MLSD, MDTM and MFTM +extensions are present, rclone will use them together to provide precise +time. Otherwise the times you see on the FTP server through rclone are +those of the last file upload. + +You can use the following command to check whether rclone can use +precise time with your FTP server: +rclone backend features your_ftp_remote: (the trailing colon is +important). Look for the number in the line tagged by Precision +designating the remote time precision expressed as nanoseconds. A value +of 1000000000 means that file time precision of 1 second is available. A +value of 3153600000000000000 (or another large number) means +"unsupported". + +Google Cloud Storage + +Paths are specified as remote:bucket (or remote: for the lsd command.) +You may put subdirectories in too, e.g. remote:bucket/path/to/dir. + +Configuration + +The initial setup for google cloud storage involves getting a token from +Google Cloud Storage which you need to do in your browser. rclone config +walks you through it. + +Here is an example of how to make a remote called remote. First run: + + rclone config + +This will guide you through an interactive setup process: + + n) New remote + d) Delete remote + q) Quit config + e/n/d/q> n + name> remote + Type of storage to configure. + Choose a number from below, or type in your own value + [snip] + XX / Google Cloud Storage (this is not Google Drive) + \ "google cloud storage" + [snip] + Storage> google cloud storage + Google Application Client Id - leave blank normally. + client_id> + Google Application Client Secret - leave blank normally. + client_secret> + Project number optional - needed only for list/create/delete buckets - see your developer console. + project_number> 12345678 + Service Account Credentials JSON file path - needed only if you want use SA instead of interactive login. + service_account_file> Access Control List for new objects. - - Properties: - - - Config: object_acl - - Env Var: RCLONE_GCS_OBJECT_ACL - - Type: string - - Required: false - - Examples: - - "authenticatedRead" - - Object owner gets OWNER access. - - All Authenticated Users get READER access. - - "bucketOwnerFullControl" - - Object owner gets OWNER access. - - Project team owners get OWNER access. - - "bucketOwnerRead" - - Object owner gets OWNER access. - - Project team owners get READER access. - - "private" - - Object owner gets OWNER access. - - Default if left blank. - - "projectPrivate" - - Object owner gets OWNER access. - - Project team members get access according to their roles. - - "publicRead" - - Object owner gets OWNER access. - - All Users get READER access. - - #### --gcs-bucket-acl - + Choose a number from below, or type in your own value + 1 / Object owner gets OWNER access, and all Authenticated Users get READER access. + \ "authenticatedRead" + 2 / Object owner gets OWNER access, and project team owners get OWNER access. + \ "bucketOwnerFullControl" + 3 / Object owner gets OWNER access, and project team owners get READER access. + \ "bucketOwnerRead" + 4 / Object owner gets OWNER access [default if left blank]. + \ "private" + 5 / Object owner gets OWNER access, and project team members get access according to their roles. + \ "projectPrivate" + 6 / Object owner gets OWNER access, and all Users get READER access. + \ "publicRead" + object_acl> 4 Access Control List for new buckets. - - Properties: - - - Config: bucket_acl - - Env Var: RCLONE_GCS_BUCKET_ACL - - Type: string - - Required: false - - Examples: - - "authenticatedRead" - - Project team owners get OWNER access. - - All Authenticated Users get READER access. - - "private" - - Project team owners get OWNER access. - - Default if left blank. - - "projectPrivate" - - Project team members get access according to their roles. - - "publicRead" - - Project team owners get OWNER access. - - All Users get READER access. - - "publicReadWrite" - - Project team owners get OWNER access. - - All Users get WRITER access. - - #### --gcs-bucket-policy-only - - Access checks should use bucket-level IAM policies. - - If you want to upload objects to a bucket with Bucket Policy Only set - then you will need to set this. - - When it is set, rclone: - - - ignores ACLs set on buckets - - ignores ACLs set on objects - - creates buckets with Bucket Policy Only set - - Docs: https://cloud.google.com/storage/docs/bucket-policy-only - - - Properties: - - - Config: bucket_policy_only - - Env Var: RCLONE_GCS_BUCKET_POLICY_ONLY - - Type: bool - - Default: false - - #### --gcs-location - + Choose a number from below, or type in your own value + 1 / Project team owners get OWNER access, and all Authenticated Users get READER access. + \ "authenticatedRead" + 2 / Project team owners get OWNER access [default if left blank]. + \ "private" + 3 / Project team members get access according to their roles. + \ "projectPrivate" + 4 / Project team owners get OWNER access, and all Users get READER access. + \ "publicRead" + 5 / Project team owners get OWNER access, and all Users get WRITER access. + \ "publicReadWrite" + bucket_acl> 2 Location for the newly created buckets. - - Properties: - - - Config: location - - Env Var: RCLONE_GCS_LOCATION - - Type: string - - Required: false - - Examples: - - "" - - Empty for default location (US) - - "asia" - - Multi-regional location for Asia - - "eu" - - Multi-regional location for Europe - - "us" - - Multi-regional location for United States - - "asia-east1" - - Taiwan - - "asia-east2" - - Hong Kong - - "asia-northeast1" - - Tokyo - - "asia-northeast2" - - Osaka - - "asia-northeast3" - - Seoul - - "asia-south1" - - Mumbai - - "asia-south2" - - Delhi - - "asia-southeast1" - - Singapore - - "asia-southeast2" - - Jakarta - - "australia-southeast1" - - Sydney - - "australia-southeast2" - - Melbourne - - "europe-north1" - - Finland - - "europe-west1" - - Belgium - - "europe-west2" - - London - - "europe-west3" - - Frankfurt - - "europe-west4" - - Netherlands - - "europe-west6" - - Zürich - - "europe-central2" - - Warsaw - - "us-central1" - - Iowa - - "us-east1" - - South Carolina - - "us-east4" - - Northern Virginia - - "us-west1" - - Oregon - - "us-west2" - - California - - "us-west3" - - Salt Lake City - - "us-west4" - - Las Vegas - - "northamerica-northeast1" - - Montréal - - "northamerica-northeast2" - - Toronto - - "southamerica-east1" - - São Paulo - - "southamerica-west1" - - Santiago - - "asia1" - - Dual region: asia-northeast1 and asia-northeast2. - - "eur4" - - Dual region: europe-north1 and europe-west4. - - "nam4" - - Dual region: us-central1 and us-east1. - - #### --gcs-storage-class - + Choose a number from below, or type in your own value + 1 / Empty for default location (US). + \ "" + 2 / Multi-regional location for Asia. + \ "asia" + 3 / Multi-regional location for Europe. + \ "eu" + 4 / Multi-regional location for United States. + \ "us" + 5 / Taiwan. + \ "asia-east1" + 6 / Tokyo. + \ "asia-northeast1" + 7 / Singapore. + \ "asia-southeast1" + 8 / Sydney. + \ "australia-southeast1" + 9 / Belgium. + \ "europe-west1" + 10 / London. + \ "europe-west2" + 11 / Iowa. + \ "us-central1" + 12 / South Carolina. + \ "us-east1" + 13 / Northern Virginia. + \ "us-east4" + 14 / Oregon. + \ "us-west1" + location> 12 The storage class to use when storing objects in Google Cloud Storage. + Choose a number from below, or type in your own value + 1 / Default + \ "" + 2 / Multi-regional storage class + \ "MULTI_REGIONAL" + 3 / Regional storage class + \ "REGIONAL" + 4 / Nearline storage class + \ "NEARLINE" + 5 / Coldline storage class + \ "COLDLINE" + 6 / Durable reduced availability storage class + \ "DURABLE_REDUCED_AVAILABILITY" + storage_class> 5 + Remote config + Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access + If not sure try Y. If Y failed, try N. + y) Yes + n) No + y/n> y + If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth + Log in and authorize rclone for access + Waiting for code... + Got code + -------------------- + [remote] + type = google cloud storage + client_id = + client_secret = + token = {"AccessToken":"xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","RefreshToken":"x/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxx","Expiry":"2014-07-17T20:49:14.929208288+01:00","Extra":null} + project_number = 12345678 + object_acl = private + bucket_acl = private + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y + +See the remote setup docs for how to set it up on a machine with no +Internet browser available. + +Note that rclone runs a webserver on your local machine to collect the +token as returned from Google if using web browser to automatically +authenticate. This only runs from the moment it opens your browser to +the moment you get back the verification code. This is on +http://127.0.0.1:53682/ and this it may require you to unblock it +temporarily if you are running a host firewall, or use manual mode. + +This remote is called remote and can now be used like this + +See all the buckets in your project + + rclone lsd remote: + +Make a new bucket + + rclone mkdir remote:bucket + +List the contents of a bucket + + rclone ls remote:bucket + +Sync /home/local/directory to the remote bucket, deleting any excess +files in the bucket. + + rclone sync --interactive /home/local/directory remote:bucket + +Service Account support + +You can set up rclone with Google Cloud Storage in an unattended mode, +i.e. not tied to a specific end-user Google account. This is useful when +you want to synchronise files onto machines that don't have actively +logged-in users, for example build machines. + +To get credentials for Google Cloud Platform IAM Service Accounts, +please head to the Service Account section of the Google Developer +Console. Service Accounts behave just like normal User permissions in +Google Cloud Storage ACLs, so you can limit their access (e.g. make them +read only). After creating an account, a JSON file containing the +Service Account's credentials will be downloaded onto your machines. +These credentials are what rclone will use for authentication. + +To use a Service Account instead of OAuth2 token flow, enter the path to +your Service Account credentials at the service_account_file prompt and +rclone won't use the browser based authentication flow. If you'd rather +stuff the contents of the credentials file into the rclone config file, +you can set service_account_credentials with the actual contents of the +file instead, or set the equivalent environment variable. + +Anonymous Access + +For downloads of objects that permit public access you can configure +rclone to use anonymous access by setting anonymous to true. With +unauthorized access you can't write or create files but only read or +list those buckets and objects that have public read access. + +Application Default Credentials + +If no other source of credentials is provided, rclone will fall back to +Application Default Credentials this is useful both when you already +have configured authentication for your developer account, or in +production when running on a google compute host. Note that if running +in docker, you may need to run additional commands on your google +compute machine - see this page. - Properties: +Note that in the case application default credentials are used, there is +no need to explicitly configure a project number. - - Config: storage_class - - Env Var: RCLONE_GCS_STORAGE_CLASS - - Type: string - - Required: false - - Examples: - - "" - - Default - - "MULTI_REGIONAL" - - Multi-regional storage class - - "REGIONAL" - - Regional storage class - - "NEARLINE" - - Nearline storage class - - "COLDLINE" - - Coldline storage class - - "ARCHIVE" - - Archive storage class - - "DURABLE_REDUCED_AVAILABILITY" - - Durable reduced availability storage class +--fast-list - #### --gcs-env-auth +This remote supports --fast-list which allows you to use fewer +transactions in exchange for more memory. See the rclone docs for more +details. - Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). +Custom upload headers - Only applies if service_account_file and service_account_credentials is blank. +You can set custom upload headers with the --header-upload flag. Google +Cloud Storage supports the headers as described in the working with +metadata documentation - Properties: +- Cache-Control +- Content-Disposition +- Content-Encoding +- Content-Language +- Content-Type +- X-Goog-Storage-Class +- X-Goog-Meta- - - Config: env_auth - - Env Var: RCLONE_GCS_ENV_AUTH - - Type: bool - - Default: false - - Examples: - - "false" - - Enter credentials in the next step. - - "true" - - Get GCP IAM credentials from the environment (env vars or IAM). +Eg --header-upload "Content-Type text/potato" - ### Advanced options +Note that the last of these is for setting custom metadata in the form +--header-upload "x-goog-meta-key: value" - Here are the Advanced options specific to google cloud storage (Google Cloud Storage (this is not Google Drive)). +Modification times - #### --gcs-token +Google Cloud Storage stores md5sum natively. Google's gsutil tool stores +modification time with one-second precision as goog-reserved-file-mtime +in file metadata. - OAuth Access Token as a JSON blob. +To ensure compatibility with gsutil, rclone stores modification time in +2 separate metadata entries. mtime uses RFC3339 format with +one-nanosecond precision. goog-reserved-file-mtime uses Unix timestamp +format with one-second precision. To get modification time from object +metadata, rclone reads the metadata in the following order: mtime, +goog-reserved-file-mtime, object updated time. - Properties: +Note that rclone's default modify window is 1ns. Files uploaded by +gsutil only contain timestamps with one-second precision. If you use +rclone to sync files previously uploaded by gsutil, rclone will attempt +to update modification time for all these files. To avoid these possibly +unnecessary updates, use --modify-window 1s. - - Config: token - - Env Var: RCLONE_GCS_TOKEN - - Type: string - - Required: false +Restricted filename characters - #### --gcs-auth-url + Character Value Replacement + ----------- ------- ------------- + NUL 0x00 ␀ + LF 0x0A ␊ + CR 0x0D ␍ + / 0x2F / - Auth server URL. +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - Leave blank to use the provider defaults. +Standard options - Properties: +Here are the Standard options specific to google cloud storage (Google +Cloud Storage (this is not Google Drive)). - - Config: auth_url - - Env Var: RCLONE_GCS_AUTH_URL - - Type: string - - Required: false +--gcs-client-id - #### --gcs-token-url +OAuth Client Id. - Token server url. +Leave blank normally. - Leave blank to use the provider defaults. +Properties: - Properties: +- Config: client_id +- Env Var: RCLONE_GCS_CLIENT_ID +- Type: string +- Required: false - - Config: token_url - - Env Var: RCLONE_GCS_TOKEN_URL - - Type: string - - Required: false +--gcs-client-secret - #### --gcs-directory-markers +OAuth Client Secret. - Upload an empty object with a trailing slash when a new directory is created +Leave blank normally. - Empty folders are unsupported for bucket based remotes, this option creates an empty - object ending with "/", to persist the folder. +Properties: +- Config: client_secret +- Env Var: RCLONE_GCS_CLIENT_SECRET +- Type: string +- Required: false - Properties: +--gcs-project-number - - Config: directory_markers - - Env Var: RCLONE_GCS_DIRECTORY_MARKERS - - Type: bool - - Default: false +Project number. - #### --gcs-no-check-bucket +Optional - needed only for list/create/delete buckets - see your +developer console. - If set, don't attempt to check the bucket exists or create it. +Properties: - This can be useful when trying to minimise the number of transactions - rclone does if you know the bucket exists already. +- Config: project_number +- Env Var: RCLONE_GCS_PROJECT_NUMBER +- Type: string +- Required: false +--gcs-user-project - Properties: +User project. - - Config: no_check_bucket - - Env Var: RCLONE_GCS_NO_CHECK_BUCKET - - Type: bool - - Default: false +Optional - needed only for requester pays. - #### --gcs-decompress +Properties: - If set this will decompress gzip encoded objects. +- Config: user_project +- Env Var: RCLONE_GCS_USER_PROJECT +- Type: string +- Required: false - It is possible to upload objects to GCS with "Content-Encoding: gzip" - set. Normally rclone will download these files as compressed objects. +--gcs-service-account-file - If this flag is set then rclone will decompress these files with - "Content-Encoding: gzip" as they are received. This means that rclone - can't check the size and hash but the file contents will be decompressed. +Service Account Credentials JSON file path. +Leave blank normally. Needed only if you want use SA instead of +interactive login. - Properties: +Leading ~ will be expanded in the file name as will environment +variables such as ${RCLONE_CONFIG_DIR}. - - Config: decompress - - Env Var: RCLONE_GCS_DECOMPRESS - - Type: bool - - Default: false +Properties: - #### --gcs-endpoint +- Config: service_account_file +- Env Var: RCLONE_GCS_SERVICE_ACCOUNT_FILE +- Type: string +- Required: false - Endpoint for the service. +--gcs-service-account-credentials - Leave blank normally. +Service Account Credentials JSON blob. - Properties: +Leave blank normally. Needed only if you want use SA instead of +interactive login. - - Config: endpoint - - Env Var: RCLONE_GCS_ENDPOINT - - Type: string - - Required: false +Properties: - #### --gcs-encoding +- Config: service_account_credentials +- Env Var: RCLONE_GCS_SERVICE_ACCOUNT_CREDENTIALS +- Type: string +- Required: false - The encoding for the backend. +--gcs-anonymous - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +Access public buckets and objects without credentials. - Properties: +Set to 'true' if you just want to download files and don't configure +credentials. - - Config: encoding - - Env Var: RCLONE_GCS_ENCODING - - Type: Encoding - - Default: Slash,CrLf,InvalidUtf8,Dot +Properties: - #### --gcs-description +- Config: anonymous +- Env Var: RCLONE_GCS_ANONYMOUS +- Type: bool +- Default: false - Description of the remote +--gcs-object-acl - Properties: +Access Control List for new objects. - - Config: description - - Env Var: RCLONE_GCS_DESCRIPTION - - Type: string - - Required: false +Properties: +- Config: object_acl +- Env Var: RCLONE_GCS_OBJECT_ACL +- Type: string +- Required: false +- Examples: + - "authenticatedRead" + - Object owner gets OWNER access. + - All Authenticated Users get READER access. + - "bucketOwnerFullControl" + - Object owner gets OWNER access. + - Project team owners get OWNER access. + - "bucketOwnerRead" + - Object owner gets OWNER access. + - Project team owners get READER access. + - "private" + - Object owner gets OWNER access. + - Default if left blank. + - "projectPrivate" + - Object owner gets OWNER access. + - Project team members get access according to their roles. + - "publicRead" + - Object owner gets OWNER access. + - All Users get READER access. + +--gcs-bucket-acl + +Access Control List for new buckets. + +Properties: + +- Config: bucket_acl +- Env Var: RCLONE_GCS_BUCKET_ACL +- Type: string +- Required: false +- Examples: + - "authenticatedRead" + - Project team owners get OWNER access. + - All Authenticated Users get READER access. + - "private" + - Project team owners get OWNER access. + - Default if left blank. + - "projectPrivate" + - Project team members get access according to their roles. + - "publicRead" + - Project team owners get OWNER access. + - All Users get READER access. + - "publicReadWrite" + - Project team owners get OWNER access. + - All Users get WRITER access. + +--gcs-bucket-policy-only + +Access checks should use bucket-level IAM policies. + +If you want to upload objects to a bucket with Bucket Policy Only set +then you will need to set this. + +When it is set, rclone: + +- ignores ACLs set on buckets +- ignores ACLs set on objects +- creates buckets with Bucket Policy Only set + +Docs: https://cloud.google.com/storage/docs/bucket-policy-only + +Properties: + +- Config: bucket_policy_only +- Env Var: RCLONE_GCS_BUCKET_POLICY_ONLY +- Type: bool +- Default: false + +--gcs-location + +Location for the newly created buckets. + +Properties: + +- Config: location +- Env Var: RCLONE_GCS_LOCATION +- Type: string +- Required: false +- Examples: + - "" + - Empty for default location (US) + - "asia" + - Multi-regional location for Asia + - "eu" + - Multi-regional location for Europe + - "us" + - Multi-regional location for United States + - "asia-east1" + - Taiwan + - "asia-east2" + - Hong Kong + - "asia-northeast1" + - Tokyo + - "asia-northeast2" + - Osaka + - "asia-northeast3" + - Seoul + - "asia-south1" + - Mumbai + - "asia-south2" + - Delhi + - "asia-southeast1" + - Singapore + - "asia-southeast2" + - Jakarta + - "australia-southeast1" + - Sydney + - "australia-southeast2" + - Melbourne + - "europe-north1" + - Finland + - "europe-west1" + - Belgium + - "europe-west2" + - London + - "europe-west3" + - Frankfurt + - "europe-west4" + - Netherlands + - "europe-west6" + - Zürich + - "europe-central2" + - Warsaw + - "us-central1" + - Iowa + - "us-east1" + - South Carolina + - "us-east4" + - Northern Virginia + - "us-west1" + - Oregon + - "us-west2" + - California + - "us-west3" + - Salt Lake City + - "us-west4" + - Las Vegas + - "northamerica-northeast1" + - Montréal + - "northamerica-northeast2" + - Toronto + - "southamerica-east1" + - São Paulo + - "southamerica-west1" + - Santiago + - "asia1" + - Dual region: asia-northeast1 and asia-northeast2. + - "eur4" + - Dual region: europe-north1 and europe-west4. + - "nam4" + - Dual region: us-central1 and us-east1. + +--gcs-storage-class + +The storage class to use when storing objects in Google Cloud Storage. + +Properties: + +- Config: storage_class +- Env Var: RCLONE_GCS_STORAGE_CLASS +- Type: string +- Required: false +- Examples: + - "" + - Default + - "MULTI_REGIONAL" + - Multi-regional storage class + - "REGIONAL" + - Regional storage class + - "NEARLINE" + - Nearline storage class + - "COLDLINE" + - Coldline storage class + - "ARCHIVE" + - Archive storage class + - "DURABLE_REDUCED_AVAILABILITY" + - Durable reduced availability storage class + +--gcs-env-auth + +Get GCP IAM credentials from runtime (environment variables or instance +meta data if no env vars). + +Only applies if service_account_file and service_account_credentials is +blank. + +Properties: + +- Config: env_auth +- Env Var: RCLONE_GCS_ENV_AUTH +- Type: bool +- Default: false +- Examples: + - "false" + - Enter credentials in the next step. + - "true" + - Get GCP IAM credentials from the environment (env vars or + IAM). + +Advanced options + +Here are the Advanced options specific to google cloud storage (Google +Cloud Storage (this is not Google Drive)). + +--gcs-token + +OAuth Access Token as a JSON blob. +Properties: - ## Limitations +- Config: token +- Env Var: RCLONE_GCS_TOKEN +- Type: string +- Required: false - `rclone about` is not supported by the Google Cloud Storage backend. Backends without - this capability cannot determine free space for an rclone mount or - use policy `mfs` (most free space) as a member of an rclone union - remote. +--gcs-auth-url - See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) +Auth server URL. - # Google Drive +Leave blank to use the provider defaults. - Paths are specified as `drive:path` +Properties: - Drive paths may be as deep as required, e.g. `drive:directory/subdirectory`. +- Config: auth_url +- Env Var: RCLONE_GCS_AUTH_URL +- Type: string +- Required: false - ## Configuration +--gcs-token-url - The initial setup for drive involves getting a token from Google drive - which you need to do in your browser. `rclone config` walks you - through it. +Token server url. - Here is an example of how to make a remote called `remote`. First run: +Leave blank to use the provider defaults. - rclone config +Properties: - This will guide you through an interactive setup process: +- Config: token_url +- Env Var: RCLONE_GCS_TOKEN_URL +- Type: string +- Required: false -No remotes found, make a new one? n) New remote r) Rename remote c) Copy -remote s) Set configuration password q) Quit config n/r/c/s/q> n name> -remote Type of storage to configure. Choose a number from below, or type -in your own value [snip] XX / Google Drive  "drive" [snip] Storage> -drive Google Application Client Id - leave blank normally. client_id> -Google Application Client Secret - leave blank normally. client_secret> -Scope that rclone should use when requesting access from drive. Choose a -number from below, or type in your own value 1 / Full access all files, -excluding Application Data Folder.  "drive" 2 / Read-only access to file -metadata and file contents.  "drive.readonly" / Access to files created -by rclone only. 3 | These are visible in the drive website. | File -authorization is revoked when the user deauthorizes the app. - "drive.file" / Allows read and write access to the Application Data -folder. 4 | This is not visible in the drive website.  "drive.appfolder" -/ Allows read-only access to file metadata but 5 | does not allow any -access to read or download file content.  "drive.metadata.readonly" -scope> 1 Service Account Credentials JSON file path - needed only if you -want use SA instead of interactive login. service_account_file> Remote -config Use web browser to automatically authenticate rclone with remote? -* Say Y if the machine running rclone has a web browser you can use * -Say N if running rclone on a (remote) machine without web browser access -If not sure try Y. If Y failed, try N. y) Yes n) No y/n> y If your -browser doesn't open automatically go to the following link: -http://127.0.0.1:53682/auth Log in and authorize rclone for access -Waiting for code... Got code Configure this as a Shared Drive (Team -Drive)? y) Yes n) No y/n> n -------------------- [remote] client_id = -client_secret = scope = drive root_folder_id = service_account_file = -token = -{"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2014-03-16T13:57:58.955387075Z"} --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y +--gcs-directory-markers +Upload an empty object with a trailing slash when a new directory is +created - See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a - machine with no Internet browser available. +Empty folders are unsupported for bucket based remotes, this option +creates an empty object ending with "/", to persist the folder. - Note that rclone runs a webserver on your local machine to collect the - token as returned from Google if using web browser to automatically - authenticate. This only - runs from the moment it opens your browser to the moment you get back - the verification code. This is on `http://127.0.0.1:53682/` and it - may require you to unblock it temporarily if you are running a host - firewall, or use manual mode. +Properties: - You can then use it like this, +- Config: directory_markers +- Env Var: RCLONE_GCS_DIRECTORY_MARKERS +- Type: bool +- Default: false - List directories in top level of your drive +--gcs-no-check-bucket - rclone lsd remote: +If set, don't attempt to check the bucket exists or create it. - List all the files in your drive +This can be useful when trying to minimise the number of transactions +rclone does if you know the bucket exists already. - rclone ls remote: +Properties: - To copy a local directory to a drive directory called backup +- Config: no_check_bucket +- Env Var: RCLONE_GCS_NO_CHECK_BUCKET +- Type: bool +- Default: false - rclone copy /home/source remote:backup +--gcs-decompress - ### Scopes +If set this will decompress gzip encoded objects. - Rclone allows you to select which scope you would like for rclone to - use. This changes what type of token is granted to rclone. [The - scopes are defined - here](https://developers.google.com/drive/v3/web/about-auth). +It is possible to upload objects to GCS with "Content-Encoding: gzip" +set. Normally rclone will download these files as compressed objects. - A comma-separated list is allowed e.g. `drive.readonly,drive.file`. +If this flag is set then rclone will decompress these files with +"Content-Encoding: gzip" as they are received. This means that rclone +can't check the size and hash but the file contents will be +decompressed. - The scope are +Properties: - #### drive +- Config: decompress +- Env Var: RCLONE_GCS_DECOMPRESS +- Type: bool +- Default: false - This is the default scope and allows full access to all files, except - for the Application Data Folder (see below). +--gcs-endpoint - Choose this one if you aren't sure. +Endpoint for the service. - #### drive.readonly +Leave blank normally. - This allows read only access to all files. Files may be listed and - downloaded but not uploaded, renamed or deleted. +Properties: - #### drive.file +- Config: endpoint +- Env Var: RCLONE_GCS_ENDPOINT +- Type: string +- Required: false - With this scope rclone can read/view/modify only those files and - folders it creates. +--gcs-encoding - So if you uploaded files to drive via the web interface (or any other - means) they will not be visible to rclone. +The encoding for the backend. - This can be useful if you are using rclone to backup data and you want - to be sure confidential data on your drive is not visible to rclone. +See the encoding section in the overview for more info. - Files created with this scope are visible in the web interface. +Properties: - #### drive.appfolder +- Config: encoding +- Env Var: RCLONE_GCS_ENCODING +- Type: Encoding +- Default: Slash,CrLf,InvalidUtf8,Dot - This gives rclone its own private area to store files. Rclone will - not be able to see any other files on your drive and you won't be able - to see rclone's files from the web interface either. - - #### drive.metadata.readonly - - This allows read only access to file names only. It does not allow - rclone to download or upload data, or rename or delete files or - directories. +--gcs-description - ### Root folder ID +Description of the remote. - This option has been moved to the advanced section. You can set the `root_folder_id` for rclone. This is the directory - (identified by its `Folder ID`) that rclone considers to be the root - of your drive. +Properties: + +- Config: description +- Env Var: RCLONE_GCS_DESCRIPTION +- Type: string +- Required: false + +Limitations + +rclone about is not supported by the Google Cloud Storage backend. +Backends without this capability cannot determine free space for an +rclone mount or use policy mfs (most free space) as a member of an +rclone union remote. + +See List of backends that do not support rclone about and rclone about + +Google Drive + +Paths are specified as drive:path + +Drive paths may be as deep as required, e.g. +drive:directory/subdirectory. + +Configuration + +The initial setup for drive involves getting a token from Google drive +which you need to do in your browser. rclone config walks you through +it. - Normally you will leave this blank and rclone will determine the - correct root to use itself. +Here is an example of how to make a remote called remote. First run: + + rclone config + +This will guide you through an interactive setup process: - However you can set this to restrict rclone to a specific folder - hierarchy or to access data within the "Computers" tab on the drive - web interface (where files from Google's Backup and Sync desktop - program go). + No remotes found, make a new one? + n) New remote + r) Rename remote + c) Copy remote + s) Set configuration password + q) Quit config + n/r/c/s/q> n + name> remote + Type of storage to configure. + Choose a number from below, or type in your own value + [snip] + XX / Google Drive + \ "drive" + [snip] + Storage> drive + Google Application Client Id - leave blank normally. + client_id> + Google Application Client Secret - leave blank normally. + client_secret> + Scope that rclone should use when requesting access from drive. + Choose a number from below, or type in your own value + 1 / Full access all files, excluding Application Data Folder. + \ "drive" + 2 / Read-only access to file metadata and file contents. + \ "drive.readonly" + / Access to files created by rclone only. + 3 | These are visible in the drive website. + | File authorization is revoked when the user deauthorizes the app. + \ "drive.file" + / Allows read and write access to the Application Data folder. + 4 | This is not visible in the drive website. + \ "drive.appfolder" + / Allows read-only access to file metadata but + 5 | does not allow any access to read or download file content. + \ "drive.metadata.readonly" + scope> 1 + Service Account Credentials JSON file path - needed only if you want use SA instead of interactive login. + service_account_file> + Remote config + Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access + If not sure try Y. If Y failed, try N. + y) Yes + n) No + y/n> y + If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth + Log in and authorize rclone for access + Waiting for code... + Got code + Configure this as a Shared Drive (Team Drive)? + y) Yes + n) No + y/n> n + -------------------- + [remote] + client_id = + client_secret = + scope = drive + root_folder_id = + service_account_file = + token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2014-03-16T13:57:58.955387075Z"} + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y + +See the remote setup docs for how to set it up on a machine with no +Internet browser available. + +Note that rclone runs a webserver on your local machine to collect the +token as returned from Google if using web browser to automatically +authenticate. This only runs from the moment it opens your browser to +the moment you get back the verification code. This is on +http://127.0.0.1:53682/ and it may require you to unblock it temporarily +if you are running a host firewall, or use manual mode. + +You can then use it like this, + +List directories in top level of your drive + + rclone lsd remote: + +List all the files in your drive + + rclone ls remote: + +To copy a local directory to a drive directory called backup + + rclone copy /home/source remote:backup + +Scopes + +Rclone allows you to select which scope you would like for rclone to +use. This changes what type of token is granted to rclone. The scopes +are defined here. + +A comma-separated list is allowed e.g. drive.readonly,drive.file. + +The scope are + +drive + +This is the default scope and allows full access to all files, except +for the Application Data Folder (see below). + +Choose this one if you aren't sure. + +drive.readonly + +This allows read only access to all files. Files may be listed and +downloaded but not uploaded, renamed or deleted. + +drive.file + +With this scope rclone can read/view/modify only those files and folders +it creates. + +So if you uploaded files to drive via the web interface (or any other +means) they will not be visible to rclone. + +This can be useful if you are using rclone to backup data and you want +to be sure confidential data on your drive is not visible to rclone. + +Files created with this scope are visible in the web interface. + +drive.appfolder + +This gives rclone its own private area to store files. Rclone will not +be able to see any other files on your drive and you won't be able to +see rclone's files from the web interface either. + +drive.metadata.readonly + +This allows read only access to file names only. It does not allow +rclone to download or upload data, or rename or delete files or +directories. - In order to do this you will have to find the `Folder ID` of the - directory you wish rclone to display. This will be the last segment - of the URL when you open the relevant folder in the drive web - interface. +Root folder ID - So if the folder you want rclone to use has a URL which looks like - `https://drive.google.com/drive/folders/1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh` - in the browser, then you use `1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh` as - the `root_folder_id` in the config. +This option has been moved to the advanced section. You can set the +root_folder_id for rclone. This is the directory (identified by its +Folder ID) that rclone considers to be the root of your drive. - **NB** folders under the "Computers" tab seem to be read only (drive - gives a 500 error) when using rclone. +Normally you will leave this blank and rclone will determine the correct +root to use itself. - There doesn't appear to be an API to discover the folder IDs of the - "Computers" tab - please contact us if you know otherwise! +However you can set this to restrict rclone to a specific folder +hierarchy or to access data within the "Computers" tab on the drive web +interface (where files from Google's Backup and Sync desktop program +go). - Note also that rclone can't access any data under the "Backups" tab on - the google drive web interface yet. +In order to do this you will have to find the Folder ID of the directory +you wish rclone to display. This will be the last segment of the URL +when you open the relevant folder in the drive web interface. - ### Service Account support +So if the folder you want rclone to use has a URL which looks like +https://drive.google.com/drive/folders/1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh +in the browser, then you use 1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh as the +root_folder_id in the config. - You can set up rclone with Google Drive in an unattended mode, - i.e. not tied to a specific end-user Google account. This is useful - when you want to synchronise files onto machines that don't have - actively logged-in users, for example build machines. +NB folders under the "Computers" tab seem to be read only (drive gives a +500 error) when using rclone. - To use a Service Account instead of OAuth2 token flow, enter the path - to your Service Account credentials at the `service_account_file` - prompt during `rclone config` and rclone won't use the browser based - authentication flow. If you'd rather stuff the contents of the - credentials file into the rclone config file, you can set - `service_account_credentials` with the actual contents of the file - instead, or set the equivalent environment variable. +There doesn't appear to be an API to discover the folder IDs of the +"Computers" tab - please contact us if you know otherwise! - #### Use case - Google Apps/G-suite account and individual Drive +Note also that rclone can't access any data under the "Backups" tab on +the google drive web interface yet. - Let's say that you are the administrator of a Google Apps (old) or - G-suite account. - The goal is to store data on an individual's Drive account, who IS - a member of the domain. - We'll call the domain **example.com**, and the user - **foo@example.com**. +Service Account support - There's a few steps we need to go through to accomplish this: +You can set up rclone with Google Drive in an unattended mode, i.e. not +tied to a specific end-user Google account. This is useful when you want +to synchronise files onto machines that don't have actively logged-in +users, for example build machines. - ##### 1. Create a service account for example.com - - To create a service account and obtain its credentials, go to the - [Google Developer Console](https://console.developers.google.com). - - You must have a project - create one if you don't. - - Then go to "IAM & admin" -> "Service Accounts". - - Use the "Create Service Account" button. Fill in "Service account name" - and "Service account ID" with something that identifies your client. - - Select "Create And Continue". Step 2 and 3 are optional. - - These credentials are what rclone will use for authentication. - If you ever need to remove access, press the "Delete service - account key" button. +To use a Service Account instead of OAuth2 token flow, enter the path to +your Service Account credentials at the service_account_file prompt +during rclone config and rclone won't use the browser based +authentication flow. If you'd rather stuff the contents of the +credentials file into the rclone config file, you can set +service_account_credentials with the actual contents of the file +instead, or set the equivalent environment variable. - ##### 2. Allowing API access to example.com Google Drive - - Go to example.com's admin console - - Go into "Security" (or use the search bar) - - Select "Show more" and then "Advanced settings" - - Select "Manage API client access" in the "Authentication" section - - In the "Client Name" field enter the service account's - "Client ID" - this can be found in the Developer Console under - "IAM & Admin" -> "Service Accounts", then "View Client ID" for - the newly created service account. - It is a ~21 character numerical string. - - In the next field, "One or More API Scopes", enter - `https://www.googleapis.com/auth/drive` - to grant access to Google Drive specifically. +Use case - Google Apps/G-suite account and individual Drive - ##### 3. Configure rclone, assuming a new install +Let's say that you are the administrator of a Google Apps (old) or +G-suite account. The goal is to store data on an individual's Drive +account, who IS a member of the domain. We'll call the domain +example.com, and the user foo@example.com. + +There's a few steps we need to go through to accomplish this: + +1. Create a service account for example.com + +- To create a service account and obtain its credentials, go to the + Google Developer Console. +- You must have a project - create one if you don't. +- Then go to "IAM & admin" -> "Service Accounts". +- Use the "Create Service Account" button. Fill in "Service account + name" and "Service account ID" with something that identifies your + client. +- Select "Create And Continue". Step 2 and 3 are optional. +- These credentials are what rclone will use for authentication. If + you ever need to remove access, press the "Delete service account + key" button. + +2. Allowing API access to example.com Google Drive + +- Go to example.com's admin console +- Go into "Security" (or use the search bar) +- Select "Show more" and then "Advanced settings" +- Select "Manage API client access" in the "Authentication" section +- In the "Client Name" field enter the service account's "Client ID" - + this can be found in the Developer Console under "IAM & Admin" -> + "Service Accounts", then "View Client ID" for the newly created + service account. It is a ~21 character numerical string. +- In the next field, "One or More API Scopes", enter + https://www.googleapis.com/auth/drive to grant access to Google + Drive specifically. + +3. Configure rclone, assuming a new install + + rclone config + + n/s/q> n # New + name>gdrive # Gdrive is an example name + Storage> # Select the number shown for Google Drive + client_id> # Can be left blank + client_secret> # Can be left blank + scope> # Select your scope, 1 for example + root_folder_id> # Can be left blank + service_account_file> /home/foo/myJSONfile.json # This is where the JSON file goes! + y/n> # Auto config, n + +4. Verify that it's working + +- rclone -v --drive-impersonate foo@example.com lsf gdrive:backup +- The arguments do: + - -v - verbose logging + - --drive-impersonate foo@example.com - this is what does the + magic, pretending to be user foo. + - lsf - list files in a parsing friendly way + - gdrive:backup - use the remote called gdrive, work in the folder + named backup. + +Note: in case you configured a specific root folder on gdrive and rclone +is unable to access the contents of that folder when using +--drive-impersonate, do this instead: - in the gdrive web interface, +share your root folder with the user/email of the new Service Account +you created/selected at step #1 - use rclone without specifying the +--drive-impersonate option, like this: rclone -v lsf gdrive:backup + +Shared drives (team drives) + +If you want to configure the remote to point to a Google Shared Drive +(previously known as Team Drives) then answer y to the question +Configure this as a Shared Drive (Team Drive)?. + +This will fetch the list of Shared Drives from google and allow you to +configure which one you want to use. You can also type in a Shared Drive +ID if you prefer. + +For example: + + Configure this as a Shared Drive (Team Drive)? + y) Yes + n) No + y/n> y + Fetching Shared Drive list... + Choose a number from below, or type in your own value + 1 / Rclone Test + \ "xxxxxxxxxxxxxxxxxxxx" + 2 / Rclone Test 2 + \ "yyyyyyyyyyyyyyyyyyyy" + 3 / Rclone Test 3 + \ "zzzzzzzzzzzzzzzzzzzz" + Enter a Shared Drive ID> 1 + -------------------- + [remote] + client_id = + client_secret = + token = {"AccessToken":"xxxx.x.xxxxx_xxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","RefreshToken":"1/xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxx","Expiry":"2014-03-16T13:57:58.955387075Z","Extra":null} + team_drive = xxxxxxxxxxxxxxxxxxxx + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y + +--fast-list + +This remote supports --fast-list which allows you to use fewer +transactions in exchange for more memory. See the rclone docs for more +details. + +It does this by combining multiple list calls into a single API request. + +This works by combining many '%s' in parents filters into one +expression. To list the contents of directories a, b and c, the +following requests will be send by the regular List function: + + trashed=false and 'a' in parents + trashed=false and 'b' in parents + trashed=false and 'c' in parents + +These can now be combined into a single request: + + trashed=false and ('a' in parents or 'b' in parents or 'c' in parents) + +The implementation of ListR will put up to 50 parents filters into one +request. It will use the --checkers value to specify the number of +requests to run in parallel. + +In tests, these batch requests were up to 20x faster than the regular +method. Running the following command against different sized folders +gives: + + rclone lsjson -vv -R --checkers=6 gdrive:folder + +small folder (220 directories, 700 files): + +- without --fast-list: 38s +- with --fast-list: 10s + +large folder (10600 directories, 39000 files): + +- without --fast-list: 22:05 min +- with --fast-list: 58s + +Modification times and hashes -rclone config +Google drive stores modification times accurate to 1 ms. -n/s/q> n # New name>gdrive # Gdrive is an example name Storage> # Select -the number shown for Google Drive client_id> # Can be left blank -client_secret> # Can be left blank scope> # Select your scope, 1 for -example root_folder_id> # Can be left blank service_account_file> -/home/foo/myJSONfile.json # This is where the JSON file goes! y/n> # -Auto config, n +Hash algorithms MD5, SHA1 and SHA256 are supported. Note, however, that +a small fraction of files uploaded may not have SHA1 or SHA256 hashes +especially if they were uploaded before 2018. + +Restricted filename characters +Only Invalid UTF-8 bytes will be replaced, as they can't be used in JSON +strings. - ##### 4. Verify that it's working - - `rclone -v --drive-impersonate foo@example.com lsf gdrive:backup` - - The arguments do: - - `-v` - verbose logging - - `--drive-impersonate foo@example.com` - this is what does - the magic, pretending to be user foo. - - `lsf` - list files in a parsing friendly way - - `gdrive:backup` - use the remote called gdrive, work in - the folder named backup. +In contrast to other backends, / can also be used in names and . or .. +are valid names. - Note: in case you configured a specific root folder on gdrive and rclone is unable to access the contents of that folder when using `--drive-impersonate`, do this instead: - - in the gdrive web interface, share your root folder with the user/email of the new Service Account you created/selected at step #1 - - use rclone without specifying the `--drive-impersonate` option, like this: - `rclone -v lsf gdrive:backup` +Revisions +Google drive stores revisions of files. When you upload a change to an +existing file to google drive using rclone it will create a new revision +of that file. - ### Shared drives (team drives) +Revisions follow the standard google policy which at time of writing was - If you want to configure the remote to point to a Google Shared Drive - (previously known as Team Drives) then answer `y` to the question - `Configure this as a Shared Drive (Team Drive)?`. +- They are deleted after 30 days or 100 revisions (whatever comes + first). +- They do not count towards a user storage quota. - This will fetch the list of Shared Drives from google and allow you to - configure which one you want to use. You can also type in a Shared - Drive ID if you prefer. +Deleting files - For example: +By default rclone will send all files to the trash when deleting files. +If deleting them permanently is required then use the +--drive-use-trash=false flag, or set the equivalent environment +variable. -Configure this as a Shared Drive (Team Drive)? y) Yes n) No y/n> y -Fetching Shared Drive list... Choose a number from below, or type in -your own value 1 / Rclone Test  "xxxxxxxxxxxxxxxxxxxx" 2 / Rclone Test 2 - "yyyyyyyyyyyyyyyyyyyy" 3 / Rclone Test 3  "zzzzzzzzzzzzzzzzzzzz" Enter -a Shared Drive ID> 1 -------------------- [remote] client_id = -client_secret = token = -{"AccessToken":"xxxx.x.xxxxx_xxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","RefreshToken":"1/xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxx","Expiry":"2014-03-16T13:57:58.955387075Z","Extra":null} -team_drive = xxxxxxxxxxxxxxxxxxxx -------------------- y) Yes this is OK -e) Edit this remote d) Delete this remote y/e/d> y +Shortcuts +In March 2020 Google introduced a new feature in Google Drive called +drive shortcuts (API). These will (by September 2020) replace the +ability for files or folders to be in multiple folders at once. - ### --fast-list +Shortcuts are files that link to other files on Google Drive somewhat +like a symlink in unix, except they point to the underlying file data +(e.g. the inode in unix terms) so they don't break if the source is +renamed or moved about. - This remote supports `--fast-list` which allows you to use fewer - transactions in exchange for more memory. See the [rclone - docs](https://rclone.org/docs/#fast-list) for more details. +By default rclone treats these as follows. - It does this by combining multiple `list` calls into a single API request. +For shortcuts pointing to files: - This works by combining many `'%s' in parents` filters into one expression. - To list the contents of directories a, b and c, the following requests will be send by the regular `List` function: +- When listing a file shortcut appears as the destination file. +- When downloading the contents of the destination file is downloaded. +- When updating shortcut file with a non shortcut file, the shortcut + is removed then a new file is uploaded in place of the shortcut. +- When server-side moving (renaming) the shortcut is renamed, not the + destination file. +- When server-side copying the shortcut is copied, not the contents of + the shortcut. (unless --drive-copy-shortcut-content is in use in + which case the contents of the shortcut gets copied). +- When deleting the shortcut is deleted not the linked file. +- When setting the modification time, the modification time of the + linked file will be set. -trashed=false and 'a' in parents trashed=false and 'b' in parents -trashed=false and 'c' in parents +For shortcuts pointing to folders: - These can now be combined into a single request: +- When listing the shortcut appears as a folder and that folder will + contain the contents of the linked folder appear (including any sub + folders) +- When downloading the contents of the linked folder and sub contents + are downloaded +- When uploading to a shortcut folder the file will be placed in the + linked folder +- When server-side moving (renaming) the shortcut is renamed, not the + destination folder +- When server-side copying the contents of the linked folder is + copied, not the shortcut. +- When deleting with rclone rmdir or rclone purge the shortcut is + deleted not the linked folder. +- NB When deleting with rclone remove or rclone mount the contents of + the linked folder will be deleted. -trashed=false and ('a' in parents or 'b' in parents or 'c' in parents) +The rclone backend command can be used to create shortcuts. +Shortcuts can be completely ignored with the --drive-skip-shortcuts flag +or the corresponding skip_shortcuts configuration setting. - The implementation of `ListR` will put up to 50 `parents` filters into one request. - It will use the `--checkers` value to specify the number of requests to run in parallel. +If you have shortcuts that lead to an infinite recursion in your drive +(e.g. a shortcut pointing to a parent folder), skip_shortcuts might be +mandatory to be able to copy the drive. - In tests, these batch requests were up to 20x faster than the regular method. - Running the following command against different sized folders gives: +Emptying trash -rclone lsjson -vv -R --checkers=6 gdrive:folder +If you wish to empty your trash you can use the rclone cleanup remote: +command which will permanently delete all your trashed files. This +command does not take any path arguments. +Note that Google Drive takes some time (minutes to days) to empty the +trash even though the command returns within a few seconds. No output is +echoed, so there will be no confirmation even using -v or -vv. - small folder (220 directories, 700 files): +Quota information - - without `--fast-list`: 38s - - with `--fast-list`: 10s +To view your current quota you can use the rclone about remote: command +which will display your usage limit (quota), the usage in Google Drive, +the size of all files in the Trash and the space used by other Google +services such as Gmail. This command does not take any path arguments. - large folder (10600 directories, 39000 files): +Import/Export of google documents - - without `--fast-list`: 22:05 min - - with `--fast-list`: 58s +Google documents can be exported from and uploaded to Google Drive. - ### Modification times and hashes +When rclone downloads a Google doc it chooses a format to download +depending upon the --drive-export-formats setting. By default the export +formats are docx,xlsx,pptx,svg which are a sensible default for an +editable document. - Google drive stores modification times accurate to 1 ms. +When choosing a format, rclone runs down the list provided in order and +chooses the first file format the doc can be exported as from the list. +If the file can't be exported to a format on the formats list, then +rclone will choose a format from the default list. - Hash algorithms MD5, SHA1 and SHA256 are supported. Note, however, - that a small fraction of files uploaded may not have SHA1 or SHA256 - hashes especially if they were uploaded before 2018. +If you prefer an archive copy then you might use +--drive-export-formats pdf, or if you prefer openoffice/libreoffice +formats you might use --drive-export-formats ods,odt,odp. - ### Restricted filename characters +Note that rclone adds the extension to the google doc, so if it is +called My Spreadsheet on google docs, it will be exported as +My Spreadsheet.xlsx or My Spreadsheet.pdf etc. - Only Invalid UTF-8 bytes will be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. +When importing files into Google Drive, rclone will convert all files +with an extension in --drive-import-formats to their associated document +type. rclone will not convert any files by default, since the conversion +is lossy process. - In contrast to other backends, `/` can also be used in names and `.` - or `..` are valid names. +The conversion must result in a file with the same extension when the +--drive-export-formats rules are applied to the uploaded document. - ### Revisions +Here are some examples for allowed and prohibited conversions. - Google drive stores revisions of files. When you upload a change to - an existing file to google drive using rclone it will create a new - revision of that file. + export-formats import-formats Upload Ext Document Ext Allowed + ---------------- ---------------- ------------ -------------- --------- + odt odt odt odt Yes + odt docx,odt odt odt Yes + docx docx docx Yes + odt odt docx No + odt,docx docx,odt docx odt No + docx,odt docx,odt docx docx Yes + docx,odt docx,odt odt docx No - Revisions follow the standard google policy which at time of writing - was +This limitation can be disabled by specifying +--drive-allow-import-name-change. When using this flag, rclone can +convert multiple files types resulting in the same document type at +once, e.g. with --drive-import-formats docx,odt,txt, all files having +these extension would result in a document represented as a docx file. +This brings the additional risk of overwriting a document, if multiple +files have the same stem. Many rclone operations will not handle this +name change in any way. They assume an equal name when copying files and +might copy the file again or delete them when the name changes. - * They are deleted after 30 days or 100 revisions (whatever comes first). - * They do not count towards a user storage quota. +Here are the possible export extensions with their corresponding mime +types. Most of these can also be used for importing, but there more that +are not listed here. Some of these additional ones might only be +available when the operating system provides the correct MIME type +entries. - ### Deleting files +This list can be changed by Google Drive at any time and might not +represent the currently available conversions. - By default rclone will send all files to the trash when deleting - files. If deleting them permanently is required then use the - `--drive-use-trash=false` flag, or set the equivalent environment - variable. + -------------------------------------------------------------------------------------------------------------------------- + Extension Mime Type Description + ------------------- --------------------------------------------------------------------------- -------------------------- + bmp image/bmp Windows Bitmap format - ### Shortcuts + csv text/csv Standard CSV format for + Spreadsheets - In March 2020 Google introduced a new feature in Google Drive called - [drive shortcuts](https://support.google.com/drive/answer/9700156) - ([API](https://developers.google.com/drive/api/v3/shortcuts)). These - will (by September 2020) [replace the ability for files or folders to - be in multiple folders at once](https://cloud.google.com/blog/products/g-suite/simplifying-google-drives-folder-structure-and-sharing-models). + doc application/msword Classic Word file - Shortcuts are files that link to other files on Google Drive somewhat - like a symlink in unix, except they point to the underlying file data - (e.g. the inode in unix terms) so they don't break if the source is - renamed or moved about. + docx application/vnd.openxmlformats-officedocument.wordprocessingml.document Microsoft Office Document - By default rclone treats these as follows. + epub application/epub+zip E-book format - For shortcuts pointing to files: + html text/html An HTML Document - - When listing a file shortcut appears as the destination file. - - When downloading the contents of the destination file is downloaded. - - When updating shortcut file with a non shortcut file, the shortcut is removed then a new file is uploaded in place of the shortcut. - - When server-side moving (renaming) the shortcut is renamed, not the destination file. - - When server-side copying the shortcut is copied, not the contents of the shortcut. (unless `--drive-copy-shortcut-content` is in use in which case the contents of the shortcut gets copied). - - When deleting the shortcut is deleted not the linked file. - - When setting the modification time, the modification time of the linked file will be set. + jpg image/jpeg A JPEG Image File - For shortcuts pointing to folders: + json application/vnd.google-apps.script+json JSON Text Format for + Google Apps scripts - - When listing the shortcut appears as a folder and that folder will contain the contents of the linked folder appear (including any sub folders) - - When downloading the contents of the linked folder and sub contents are downloaded - - When uploading to a shortcut folder the file will be placed in the linked folder - - When server-side moving (renaming) the shortcut is renamed, not the destination folder - - When server-side copying the contents of the linked folder is copied, not the shortcut. - - When deleting with `rclone rmdir` or `rclone purge` the shortcut is deleted not the linked folder. - - **NB** When deleting with `rclone remove` or `rclone mount` the contents of the linked folder will be deleted. + odp application/vnd.oasis.opendocument.presentation Openoffice Presentation - The [rclone backend](https://rclone.org/commands/rclone_backend/) command can be used to create shortcuts. + ods application/vnd.oasis.opendocument.spreadsheet Openoffice Spreadsheet - Shortcuts can be completely ignored with the `--drive-skip-shortcuts` flag - or the corresponding `skip_shortcuts` configuration setting. + ods application/x-vnd.oasis.opendocument.spreadsheet Openoffice Spreadsheet - ### Emptying trash + odt application/vnd.oasis.opendocument.text Openoffice Document - If you wish to empty your trash you can use the `rclone cleanup remote:` - command which will permanently delete all your trashed files. This command - does not take any path arguments. + pdf application/pdf Adobe PDF Format - Note that Google Drive takes some time (minutes to days) to empty the - trash even though the command returns within a few seconds. No output - is echoed, so there will be no confirmation even using -v or -vv. - - ### Quota information - - To view your current quota you can use the `rclone about remote:` - command which will display your usage limit (quota), the usage in Google - Drive, the size of all files in the Trash and the space used by other - Google services such as Gmail. This command does not take any path - arguments. - - #### Import/Export of google documents - - Google documents can be exported from and uploaded to Google Drive. - - When rclone downloads a Google doc it chooses a format to download - depending upon the `--drive-export-formats` setting. - By default the export formats are `docx,xlsx,pptx,svg` which are a - sensible default for an editable document. - - When choosing a format, rclone runs down the list provided in order - and chooses the first file format the doc can be exported as from the - list. If the file can't be exported to a format on the formats list, - then rclone will choose a format from the default list. - - If you prefer an archive copy then you might use `--drive-export-formats - pdf`, or if you prefer openoffice/libreoffice formats you might use - `--drive-export-formats ods,odt,odp`. - - Note that rclone adds the extension to the google doc, so if it is - called `My Spreadsheet` on google docs, it will be exported as `My - Spreadsheet.xlsx` or `My Spreadsheet.pdf` etc. - - When importing files into Google Drive, rclone will convert all - files with an extension in `--drive-import-formats` to their - associated document type. - rclone will not convert any files by default, since the conversion - is lossy process. - - The conversion must result in a file with the same extension when - the `--drive-export-formats` rules are applied to the uploaded document. - - Here are some examples for allowed and prohibited conversions. - - | export-formats | import-formats | Upload Ext | Document Ext | Allowed | - | -------------- | -------------- | ---------- | ------------ | ------- | - | odt | odt | odt | odt | Yes | - | odt | docx,odt | odt | odt | Yes | - | | docx | docx | docx | Yes | - | | odt | odt | docx | No | - | odt,docx | docx,odt | docx | odt | No | - | docx,odt | docx,odt | docx | docx | Yes | - | docx,odt | docx,odt | odt | docx | No | - - This limitation can be disabled by specifying `--drive-allow-import-name-change`. - When using this flag, rclone can convert multiple files types resulting - in the same document type at once, e.g. with `--drive-import-formats docx,odt,txt`, - all files having these extension would result in a document represented as a docx file. - This brings the additional risk of overwriting a document, if multiple files - have the same stem. Many rclone operations will not handle this name change - in any way. They assume an equal name when copying files and might copy the - file again or delete them when the name changes. - - Here are the possible export extensions with their corresponding mime types. - Most of these can also be used for importing, but there more that are not - listed here. Some of these additional ones might only be available when - the operating system provides the correct MIME type entries. - - This list can be changed by Google Drive at any time and might not - represent the currently available conversions. - - | Extension | Mime Type | Description | - | --------- |-----------| ------------| - | bmp | image/bmp | Windows Bitmap format | - | csv | text/csv | Standard CSV format for Spreadsheets | - | doc | application/msword | Classic Word file | - | docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Microsoft Office Document | - | epub | application/epub+zip | E-book format | - | html | text/html | An HTML Document | - | jpg | image/jpeg | A JPEG Image File | - | json | application/vnd.google-apps.script+json | JSON Text Format for Google Apps scripts | - | odp | application/vnd.oasis.opendocument.presentation | Openoffice Presentation | - | ods | application/vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet | - | ods | application/x-vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet | - | odt | application/vnd.oasis.opendocument.text | Openoffice Document | - | pdf | application/pdf | Adobe PDF Format | - | pjpeg | image/pjpeg | Progressive JPEG Image | - | png | image/png | PNG Image Format| - | pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | Microsoft Office Powerpoint | - | rtf | application/rtf | Rich Text Format | - | svg | image/svg+xml | Scalable Vector Graphics Format | - | tsv | text/tab-separated-values | Standard TSV format for spreadsheets | - | txt | text/plain | Plain Text | - | wmf | application/x-msmetafile | Windows Meta File | - | xls | application/vnd.ms-excel | Classic Excel file | - | xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Microsoft Office Spreadsheet | - | zip | application/zip | A ZIP file of HTML, Images CSS | - - Google documents can also be exported as link files. These files will - open a browser window for the Google Docs website of that document - when opened. The link file extension has to be specified as a - `--drive-export-formats` parameter. They will match all available - Google Documents. - - | Extension | Description | OS Support | - | --------- | ----------- | ---------- | - | desktop | freedesktop.org specified desktop entry | Linux | - | link.html | An HTML Document with a redirect | All | - | url | INI style link file | macOS, Windows | - | webloc | macOS specific XML format | macOS | - - - ### Standard options - - Here are the Standard options specific to drive (Google Drive). - - #### --drive-client-id - - Google Application Client Id - Setting your own is recommended. - See https://rclone.org/drive/#making-your-own-client-id for how to create your own. - If you leave this blank, it will use an internal key which is low performance. - - Properties: + pjpeg image/pjpeg Progressive JPEG Image - - Config: client_id - - Env Var: RCLONE_DRIVE_CLIENT_ID - - Type: string - - Required: false + png image/png PNG Image Format - #### --drive-client-secret + pptx application/vnd.openxmlformats-officedocument.presentationml.presentation Microsoft Office + Powerpoint - OAuth Client Secret. + rtf application/rtf Rich Text Format - Leave blank normally. + svg image/svg+xml Scalable Vector Graphics + Format - Properties: + tsv text/tab-separated-values Standard TSV format for + spreadsheets - - Config: client_secret - - Env Var: RCLONE_DRIVE_CLIENT_SECRET - - Type: string - - Required: false + txt text/plain Plain Text - #### --drive-scope + wmf application/x-msmetafile Windows Meta File - Comma separated list of scopes that rclone should use when requesting access from drive. + xls application/vnd.ms-excel Classic Excel file - Properties: + xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Microsoft Office + Spreadsheet - - Config: scope - - Env Var: RCLONE_DRIVE_SCOPE - - Type: string - - Required: false - - Examples: - - "drive" - - Full access all files, excluding Application Data Folder. - - "drive.readonly" - - Read-only access to file metadata and file contents. - - "drive.file" - - Access to files created by rclone only. - - These are visible in the drive website. - - File authorization is revoked when the user deauthorizes the app. - - "drive.appfolder" - - Allows read and write access to the Application Data folder. - - This is not visible in the drive website. - - "drive.metadata.readonly" - - Allows read-only access to file metadata but - - does not allow any access to read or download file content. + zip application/zip A ZIP file of HTML, Images + CSS + -------------------------------------------------------------------------------------------------------------------------- - #### --drive-service-account-file +Google documents can also be exported as link files. These files will +open a browser window for the Google Docs website of that document when +opened. The link file extension has to be specified as a +--drive-export-formats parameter. They will match all available Google +Documents. - Service Account Credentials JSON file path. + Extension Description OS Support + ----------- ----------------------------------------- ---------------- + desktop freedesktop.org specified desktop entry Linux + link.html An HTML Document with a redirect All + url INI style link file macOS, Windows + webloc macOS specific XML format macOS - Leave blank normally. - Needed only if you want use SA instead of interactive login. +Standard options - Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`. +Here are the Standard options specific to drive (Google Drive). - Properties: +--drive-client-id - - Config: service_account_file - - Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_FILE - - Type: string - - Required: false +Google Application Client Id Setting your own is recommended. See +https://rclone.org/drive/#making-your-own-client-id for how to create +your own. If you leave this blank, it will use an internal key which is +low performance. - #### --drive-alternate-export +Properties: - Deprecated: No longer needed. +- Config: client_id +- Env Var: RCLONE_DRIVE_CLIENT_ID +- Type: string +- Required: false - Properties: +--drive-client-secret - - Config: alternate_export - - Env Var: RCLONE_DRIVE_ALTERNATE_EXPORT - - Type: bool - - Default: false +OAuth Client Secret. - ### Advanced options +Leave blank normally. - Here are the Advanced options specific to drive (Google Drive). +Properties: - #### --drive-token +- Config: client_secret +- Env Var: RCLONE_DRIVE_CLIENT_SECRET +- Type: string +- Required: false - OAuth Access Token as a JSON blob. +--drive-scope - Properties: +Comma separated list of scopes that rclone should use when requesting +access from drive. - - Config: token - - Env Var: RCLONE_DRIVE_TOKEN - - Type: string - - Required: false +Properties: - #### --drive-auth-url +- Config: scope +- Env Var: RCLONE_DRIVE_SCOPE +- Type: string +- Required: false +- Examples: + - "drive" + - Full access all files, excluding Application Data Folder. + - "drive.readonly" + - Read-only access to file metadata and file contents. + - "drive.file" + - Access to files created by rclone only. + - These are visible in the drive website. + - File authorization is revoked when the user deauthorizes the + app. + - "drive.appfolder" + - Allows read and write access to the Application Data folder. + - This is not visible in the drive website. + - "drive.metadata.readonly" + - Allows read-only access to file metadata but + - does not allow any access to read or download file content. - Auth server URL. +--drive-service-account-file - Leave blank to use the provider defaults. +Service Account Credentials JSON file path. - Properties: +Leave blank normally. Needed only if you want use SA instead of +interactive login. - - Config: auth_url - - Env Var: RCLONE_DRIVE_AUTH_URL - - Type: string - - Required: false +Leading ~ will be expanded in the file name as will environment +variables such as ${RCLONE_CONFIG_DIR}. - #### --drive-token-url +Properties: - Token server url. +- Config: service_account_file +- Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_FILE +- Type: string +- Required: false - Leave blank to use the provider defaults. +--drive-alternate-export - Properties: +Deprecated: No longer needed. - - Config: token_url - - Env Var: RCLONE_DRIVE_TOKEN_URL - - Type: string - - Required: false +Properties: - #### --drive-root-folder-id +- Config: alternate_export +- Env Var: RCLONE_DRIVE_ALTERNATE_EXPORT +- Type: bool +- Default: false - ID of the root folder. - Leave blank normally. +Advanced options - Fill in to access "Computers" folders (see docs), or for rclone to use - a non root folder as its starting point. +Here are the Advanced options specific to drive (Google Drive). +--drive-token - Properties: +OAuth Access Token as a JSON blob. - - Config: root_folder_id - - Env Var: RCLONE_DRIVE_ROOT_FOLDER_ID - - Type: string - - Required: false +Properties: - #### --drive-service-account-credentials +- Config: token +- Env Var: RCLONE_DRIVE_TOKEN +- Type: string +- Required: false - Service Account Credentials JSON blob. +--drive-auth-url - Leave blank normally. - Needed only if you want use SA instead of interactive login. +Auth server URL. - Properties: +Leave blank to use the provider defaults. - - Config: service_account_credentials - - Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_CREDENTIALS - - Type: string - - Required: false +Properties: - #### --drive-team-drive +- Config: auth_url +- Env Var: RCLONE_DRIVE_AUTH_URL +- Type: string +- Required: false - ID of the Shared Drive (Team Drive). +--drive-token-url - Properties: +Token server url. - - Config: team_drive - - Env Var: RCLONE_DRIVE_TEAM_DRIVE - - Type: string - - Required: false +Leave blank to use the provider defaults. - #### --drive-auth-owner-only +Properties: - Only consider files owned by the authenticated user. +- Config: token_url +- Env Var: RCLONE_DRIVE_TOKEN_URL +- Type: string +- Required: false - Properties: +--drive-root-folder-id - - Config: auth_owner_only - - Env Var: RCLONE_DRIVE_AUTH_OWNER_ONLY - - Type: bool - - Default: false +ID of the root folder. Leave blank normally. - #### --drive-use-trash +Fill in to access "Computers" folders (see docs), or for rclone to use a +non root folder as its starting point. - Send files to the trash instead of deleting permanently. +Properties: - Defaults to true, namely sending files to the trash. - Use `--drive-use-trash=false` to delete files permanently instead. +- Config: root_folder_id +- Env Var: RCLONE_DRIVE_ROOT_FOLDER_ID +- Type: string +- Required: false - Properties: +--drive-service-account-credentials - - Config: use_trash - - Env Var: RCLONE_DRIVE_USE_TRASH - - Type: bool - - Default: true +Service Account Credentials JSON blob. - #### --drive-copy-shortcut-content +Leave blank normally. Needed only if you want use SA instead of +interactive login. - Server side copy contents of shortcuts instead of the shortcut. +Properties: - When doing server side copies, normally rclone will copy shortcuts as - shortcuts. +- Config: service_account_credentials +- Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_CREDENTIALS +- Type: string +- Required: false - If this flag is used then rclone will copy the contents of shortcuts - rather than shortcuts themselves when doing server side copies. +--drive-team-drive - Properties: +ID of the Shared Drive (Team Drive). - - Config: copy_shortcut_content - - Env Var: RCLONE_DRIVE_COPY_SHORTCUT_CONTENT - - Type: bool - - Default: false +Properties: - #### --drive-skip-gdocs +- Config: team_drive +- Env Var: RCLONE_DRIVE_TEAM_DRIVE +- Type: string +- Required: false - Skip google documents in all listings. +--drive-auth-owner-only - If given, gdocs practically become invisible to rclone. +Only consider files owned by the authenticated user. - Properties: +Properties: - - Config: skip_gdocs - - Env Var: RCLONE_DRIVE_SKIP_GDOCS - - Type: bool - - Default: false +- Config: auth_owner_only +- Env Var: RCLONE_DRIVE_AUTH_OWNER_ONLY +- Type: bool +- Default: false - #### --drive-show-all-gdocs +--drive-use-trash - Show all Google Docs including non-exportable ones in listings. +Send files to the trash instead of deleting permanently. - If you try a server side copy on a Google Form without this flag, you - will get this error: +Defaults to true, namely sending files to the trash. Use +--drive-use-trash=false to delete files permanently instead. - No export formats found for "application/vnd.google-apps.form" +Properties: - However adding this flag will allow the form to be server side copied. +- Config: use_trash +- Env Var: RCLONE_DRIVE_USE_TRASH +- Type: bool +- Default: true - Note that rclone doesn't add extensions to the Google Docs file names - in this mode. +--drive-copy-shortcut-content - Do **not** use this flag when trying to download Google Docs - rclone - will fail to download them. +Server side copy contents of shortcuts instead of the shortcut. +When doing server side copies, normally rclone will copy shortcuts as +shortcuts. - Properties: +If this flag is used then rclone will copy the contents of shortcuts +rather than shortcuts themselves when doing server side copies. - - Config: show_all_gdocs - - Env Var: RCLONE_DRIVE_SHOW_ALL_GDOCS - - Type: bool - - Default: false +Properties: - #### --drive-skip-checksum-gphotos +- Config: copy_shortcut_content +- Env Var: RCLONE_DRIVE_COPY_SHORTCUT_CONTENT +- Type: bool +- Default: false - Skip checksums on Google photos and videos only. +--drive-skip-gdocs - Use this if you get checksum errors when transferring Google photos or - videos. +Skip google documents in all listings. - Setting this flag will cause Google photos and videos to return a - blank checksums. +If given, gdocs practically become invisible to rclone. - Google photos are identified by being in the "photos" space. +Properties: - Corrupted checksums are caused by Google modifying the image/video but - not updating the checksum. +- Config: skip_gdocs +- Env Var: RCLONE_DRIVE_SKIP_GDOCS +- Type: bool +- Default: false - Properties: +--drive-show-all-gdocs - - Config: skip_checksum_gphotos - - Env Var: RCLONE_DRIVE_SKIP_CHECKSUM_GPHOTOS - - Type: bool - - Default: false +Show all Google Docs including non-exportable ones in listings. - #### --drive-shared-with-me +If you try a server side copy on a Google Form without this flag, you +will get this error: - Only show files that are shared with me. + No export formats found for "application/vnd.google-apps.form" - Instructs rclone to operate on your "Shared with me" folder (where - Google Drive lets you access the files and folders others have shared - with you). +However adding this flag will allow the form to be server side copied. - This works both with the "list" (lsd, lsl, etc.) and the "copy" - commands (copy, sync, etc.), and with all other commands too. +Note that rclone doesn't add extensions to the Google Docs file names in +this mode. - Properties: +Do not use this flag when trying to download Google Docs - rclone will +fail to download them. - - Config: shared_with_me - - Env Var: RCLONE_DRIVE_SHARED_WITH_ME - - Type: bool - - Default: false +Properties: - #### --drive-trashed-only +- Config: show_all_gdocs +- Env Var: RCLONE_DRIVE_SHOW_ALL_GDOCS +- Type: bool +- Default: false - Only show files that are in the trash. +--drive-skip-checksum-gphotos - This will show trashed files in their original directory structure. +Skip checksums on Google photos and videos only. - Properties: +Use this if you get checksum errors when transferring Google photos or +videos. - - Config: trashed_only - - Env Var: RCLONE_DRIVE_TRASHED_ONLY - - Type: bool - - Default: false +Setting this flag will cause Google photos and videos to return a blank +checksums. - #### --drive-starred-only +Google photos are identified by being in the "photos" space. - Only show files that are starred. +Corrupted checksums are caused by Google modifying the image/video but +not updating the checksum. - Properties: +Properties: - - Config: starred_only - - Env Var: RCLONE_DRIVE_STARRED_ONLY - - Type: bool - - Default: false +- Config: skip_checksum_gphotos +- Env Var: RCLONE_DRIVE_SKIP_CHECKSUM_GPHOTOS +- Type: bool +- Default: false - #### --drive-formats +--drive-shared-with-me - Deprecated: See export_formats. +Only show files that are shared with me. - Properties: +Instructs rclone to operate on your "Shared with me" folder (where +Google Drive lets you access the files and folders others have shared +with you). - - Config: formats - - Env Var: RCLONE_DRIVE_FORMATS - - Type: string - - Required: false +This works both with the "list" (lsd, lsl, etc.) and the "copy" commands +(copy, sync, etc.), and with all other commands too. - #### --drive-export-formats +Properties: - Comma separated list of preferred formats for downloading Google docs. +- Config: shared_with_me +- Env Var: RCLONE_DRIVE_SHARED_WITH_ME +- Type: bool +- Default: false - Properties: +--drive-trashed-only - - Config: export_formats - - Env Var: RCLONE_DRIVE_EXPORT_FORMATS - - Type: string - - Default: "docx,xlsx,pptx,svg" +Only show files that are in the trash. - #### --drive-import-formats +This will show trashed files in their original directory structure. - Comma separated list of preferred formats for uploading Google docs. +Properties: - Properties: +- Config: trashed_only +- Env Var: RCLONE_DRIVE_TRASHED_ONLY +- Type: bool +- Default: false - - Config: import_formats - - Env Var: RCLONE_DRIVE_IMPORT_FORMATS - - Type: string - - Required: false +--drive-starred-only - #### --drive-allow-import-name-change +Only show files that are starred. - Allow the filetype to change when uploading Google docs. +Properties: - E.g. file.doc to file.docx. This will confuse sync and reupload every time. +- Config: starred_only +- Env Var: RCLONE_DRIVE_STARRED_ONLY +- Type: bool +- Default: false - Properties: +--drive-formats - - Config: allow_import_name_change - - Env Var: RCLONE_DRIVE_ALLOW_IMPORT_NAME_CHANGE - - Type: bool - - Default: false +Deprecated: See export_formats. - #### --drive-use-created-date +Properties: - Use file created date instead of modified date. +- Config: formats +- Env Var: RCLONE_DRIVE_FORMATS +- Type: string +- Required: false - Useful when downloading data and you want the creation date used in - place of the last modified date. +--drive-export-formats - **WARNING**: This flag may have some unexpected consequences. +Comma separated list of preferred formats for downloading Google docs. - When uploading to your drive all files will be overwritten unless they - haven't been modified since their creation. And the inverse will occur - while downloading. This side effect can be avoided by using the - "--checksum" flag. +Properties: - This feature was implemented to retain photos capture date as recorded - by google photos. You will first need to check the "Create a Google - Photos folder" option in your google drive settings. You can then copy - or move the photos locally and use the date the image was taken - (created) set as the modification date. +- Config: export_formats +- Env Var: RCLONE_DRIVE_EXPORT_FORMATS +- Type: string +- Default: "docx,xlsx,pptx,svg" - Properties: +--drive-import-formats - - Config: use_created_date - - Env Var: RCLONE_DRIVE_USE_CREATED_DATE - - Type: bool - - Default: false +Comma separated list of preferred formats for uploading Google docs. - #### --drive-use-shared-date +Properties: - Use date file was shared instead of modified date. +- Config: import_formats +- Env Var: RCLONE_DRIVE_IMPORT_FORMATS +- Type: string +- Required: false - Note that, as with "--drive-use-created-date", this flag may have - unexpected consequences when uploading/downloading files. +--drive-allow-import-name-change - If both this flag and "--drive-use-created-date" are set, the created - date is used. +Allow the filetype to change when uploading Google docs. - Properties: +E.g. file.doc to file.docx. This will confuse sync and reupload every +time. - - Config: use_shared_date - - Env Var: RCLONE_DRIVE_USE_SHARED_DATE - - Type: bool - - Default: false +Properties: - #### --drive-list-chunk +- Config: allow_import_name_change +- Env Var: RCLONE_DRIVE_ALLOW_IMPORT_NAME_CHANGE +- Type: bool +- Default: false - Size of listing chunk 100-1000, 0 to disable. +--drive-use-created-date - Properties: +Use file created date instead of modified date. - - Config: list_chunk - - Env Var: RCLONE_DRIVE_LIST_CHUNK - - Type: int - - Default: 1000 +Useful when downloading data and you want the creation date used in +place of the last modified date. - #### --drive-impersonate +WARNING: This flag may have some unexpected consequences. - Impersonate this user when using a service account. +When uploading to your drive all files will be overwritten unless they +haven't been modified since their creation. And the inverse will occur +while downloading. This side effect can be avoided by using the +"--checksum" flag. - Properties: +This feature was implemented to retain photos capture date as recorded +by google photos. You will first need to check the "Create a Google +Photos folder" option in your google drive settings. You can then copy +or move the photos locally and use the date the image was taken +(created) set as the modification date. - - Config: impersonate - - Env Var: RCLONE_DRIVE_IMPERSONATE - - Type: string - - Required: false +Properties: - #### --drive-upload-cutoff +- Config: use_created_date +- Env Var: RCLONE_DRIVE_USE_CREATED_DATE +- Type: bool +- Default: false - Cutoff for switching to chunked upload. +--drive-use-shared-date - Properties: +Use date file was shared instead of modified date. - - Config: upload_cutoff - - Env Var: RCLONE_DRIVE_UPLOAD_CUTOFF - - Type: SizeSuffix - - Default: 8Mi +Note that, as with "--drive-use-created-date", this flag may have +unexpected consequences when uploading/downloading files. - #### --drive-chunk-size +If both this flag and "--drive-use-created-date" are set, the created +date is used. - Upload chunk size. +Properties: - Must a power of 2 >= 256k. +- Config: use_shared_date +- Env Var: RCLONE_DRIVE_USE_SHARED_DATE +- Type: bool +- Default: false - Making this larger will improve performance, but note that each chunk - is buffered in memory one per transfer. +--drive-list-chunk - Reducing this will reduce memory usage but decrease performance. +Size of listing chunk 100-1000, 0 to disable. - Properties: +Properties: - - Config: chunk_size - - Env Var: RCLONE_DRIVE_CHUNK_SIZE - - Type: SizeSuffix - - Default: 8Mi +- Config: list_chunk +- Env Var: RCLONE_DRIVE_LIST_CHUNK +- Type: int +- Default: 1000 - #### --drive-acknowledge-abuse +--drive-impersonate - Set to allow files which return cannotDownloadAbusiveFile to be downloaded. +Impersonate this user when using a service account. - If downloading a file returns the error "This file has been identified - as malware or spam and cannot be downloaded" with the error code - "cannotDownloadAbusiveFile" then supply this flag to rclone to - indicate you acknowledge the risks of downloading the file and rclone - will download it anyway. +Properties: - Note that if you are using service account it will need Manager - permission (not Content Manager) to for this flag to work. If the SA - does not have the right permission, Google will just ignore the flag. +- Config: impersonate +- Env Var: RCLONE_DRIVE_IMPERSONATE +- Type: string +- Required: false - Properties: +--drive-upload-cutoff - - Config: acknowledge_abuse - - Env Var: RCLONE_DRIVE_ACKNOWLEDGE_ABUSE - - Type: bool - - Default: false +Cutoff for switching to chunked upload. - #### --drive-keep-revision-forever +Properties: - Keep new head revision of each file forever. +- Config: upload_cutoff +- Env Var: RCLONE_DRIVE_UPLOAD_CUTOFF +- Type: SizeSuffix +- Default: 8Mi - Properties: +--drive-chunk-size - - Config: keep_revision_forever - - Env Var: RCLONE_DRIVE_KEEP_REVISION_FOREVER - - Type: bool - - Default: false +Upload chunk size. - #### --drive-size-as-quota +Must a power of 2 >= 256k. - Show sizes as storage quota usage, not actual size. +Making this larger will improve performance, but note that each chunk is +buffered in memory one per transfer. - Show the size of a file as the storage quota used. This is the - current version plus any older versions that have been set to keep - forever. +Reducing this will reduce memory usage but decrease performance. - **WARNING**: This flag may have some unexpected consequences. +Properties: - It is not recommended to set this flag in your config - the - recommended usage is using the flag form --drive-size-as-quota when - doing rclone ls/lsl/lsf/lsjson/etc only. +- Config: chunk_size +- Env Var: RCLONE_DRIVE_CHUNK_SIZE +- Type: SizeSuffix +- Default: 8Mi - If you do use this flag for syncing (not recommended) then you will - need to use --ignore size also. +--drive-acknowledge-abuse - Properties: +Set to allow files which return cannotDownloadAbusiveFile to be +downloaded. - - Config: size_as_quota - - Env Var: RCLONE_DRIVE_SIZE_AS_QUOTA - - Type: bool - - Default: false +If downloading a file returns the error "This file has been identified +as malware or spam and cannot be downloaded" with the error code +"cannotDownloadAbusiveFile" then supply this flag to rclone to indicate +you acknowledge the risks of downloading the file and rclone will +download it anyway. - #### --drive-v2-download-min-size +Note that if you are using service account it will need Manager +permission (not Content Manager) to for this flag to work. If the SA +does not have the right permission, Google will just ignore the flag. - If Object's are greater, use drive v2 API to download. +Properties: - Properties: +- Config: acknowledge_abuse +- Env Var: RCLONE_DRIVE_ACKNOWLEDGE_ABUSE +- Type: bool +- Default: false - - Config: v2_download_min_size - - Env Var: RCLONE_DRIVE_V2_DOWNLOAD_MIN_SIZE - - Type: SizeSuffix - - Default: off +--drive-keep-revision-forever - #### --drive-pacer-min-sleep +Keep new head revision of each file forever. - Minimum time to sleep between API calls. +Properties: - Properties: +- Config: keep_revision_forever +- Env Var: RCLONE_DRIVE_KEEP_REVISION_FOREVER +- Type: bool +- Default: false - - Config: pacer_min_sleep - - Env Var: RCLONE_DRIVE_PACER_MIN_SLEEP - - Type: Duration - - Default: 100ms +--drive-size-as-quota - #### --drive-pacer-burst +Show sizes as storage quota usage, not actual size. - Number of API calls to allow without sleeping. +Show the size of a file as the storage quota used. This is the current +version plus any older versions that have been set to keep forever. - Properties: +WARNING: This flag may have some unexpected consequences. - - Config: pacer_burst - - Env Var: RCLONE_DRIVE_PACER_BURST - - Type: int - - Default: 100 +It is not recommended to set this flag in your config - the recommended +usage is using the flag form --drive-size-as-quota when doing rclone +ls/lsl/lsf/lsjson/etc only. - #### --drive-server-side-across-configs +If you do use this flag for syncing (not recommended) then you will need +to use --ignore size also. - Deprecated: use --server-side-across-configs instead. +Properties: - Allow server-side operations (e.g. copy) to work across different drive configs. +- Config: size_as_quota +- Env Var: RCLONE_DRIVE_SIZE_AS_QUOTA +- Type: bool +- Default: false - This can be useful if you wish to do a server-side copy between two - different Google drives. Note that this isn't enabled by default - because it isn't easy to tell if it will work between any two - configurations. +--drive-v2-download-min-size - Properties: +If Object's are greater, use drive v2 API to download. - - Config: server_side_across_configs - - Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS - - Type: bool - - Default: false +Properties: - #### --drive-disable-http2 +- Config: v2_download_min_size +- Env Var: RCLONE_DRIVE_V2_DOWNLOAD_MIN_SIZE +- Type: SizeSuffix +- Default: off - Disable drive using http2. +--drive-pacer-min-sleep - There is currently an unsolved issue with the google drive backend and - HTTP/2. HTTP/2 is therefore disabled by default for the drive backend - but can be re-enabled here. When the issue is solved this flag will - be removed. +Minimum time to sleep between API calls. - See: https://github.com/rclone/rclone/issues/3631 +Properties: +- Config: pacer_min_sleep +- Env Var: RCLONE_DRIVE_PACER_MIN_SLEEP +- Type: Duration +- Default: 100ms +--drive-pacer-burst - Properties: +Number of API calls to allow without sleeping. - - Config: disable_http2 - - Env Var: RCLONE_DRIVE_DISABLE_HTTP2 - - Type: bool - - Default: true +Properties: - #### --drive-stop-on-upload-limit +- Config: pacer_burst +- Env Var: RCLONE_DRIVE_PACER_BURST +- Type: int +- Default: 100 - Make upload limit errors be fatal. +--drive-server-side-across-configs - At the time of writing it is only possible to upload 750 GiB of data to - Google Drive a day (this is an undocumented limit). When this limit is - reached Google Drive produces a slightly different error message. When - this flag is set it causes these errors to be fatal. These will stop - the in-progress sync. +Deprecated: use --server-side-across-configs instead. - Note that this detection is relying on error message strings which - Google don't document so it may break in the future. +Allow server-side operations (e.g. copy) to work across different drive +configs. - See: https://github.com/rclone/rclone/issues/3857 +This can be useful if you wish to do a server-side copy between two +different Google drives. Note that this isn't enabled by default because +it isn't easy to tell if it will work between any two configurations. +Properties: - Properties: +- Config: server_side_across_configs +- Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS +- Type: bool +- Default: false - - Config: stop_on_upload_limit - - Env Var: RCLONE_DRIVE_STOP_ON_UPLOAD_LIMIT - - Type: bool - - Default: false +--drive-disable-http2 - #### --drive-stop-on-download-limit +Disable drive using http2. - Make download limit errors be fatal. +There is currently an unsolved issue with the google drive backend and +HTTP/2. HTTP/2 is therefore disabled by default for the drive backend +but can be re-enabled here. When the issue is solved this flag will be +removed. - At the time of writing it is only possible to download 10 TiB of data from - Google Drive a day (this is an undocumented limit). When this limit is - reached Google Drive produces a slightly different error message. When - this flag is set it causes these errors to be fatal. These will stop - the in-progress sync. +See: https://github.com/rclone/rclone/issues/3631 - Note that this detection is relying on error message strings which - Google don't document so it may break in the future. +Properties: +- Config: disable_http2 +- Env Var: RCLONE_DRIVE_DISABLE_HTTP2 +- Type: bool +- Default: true - Properties: +--drive-stop-on-upload-limit - - Config: stop_on_download_limit - - Env Var: RCLONE_DRIVE_STOP_ON_DOWNLOAD_LIMIT - - Type: bool - - Default: false +Make upload limit errors be fatal. - #### --drive-skip-shortcuts +At the time of writing it is only possible to upload 750 GiB of data to +Google Drive a day (this is an undocumented limit). When this limit is +reached Google Drive produces a slightly different error message. When +this flag is set it causes these errors to be fatal. These will stop the +in-progress sync. - If set skip shortcut files. +Note that this detection is relying on error message strings which +Google don't document so it may break in the future. - Normally rclone dereferences shortcut files making them appear as if - they are the original file (see [the shortcuts section](#shortcuts)). - If this flag is set then rclone will ignore shortcut files completely. +See: https://github.com/rclone/rclone/issues/3857 +Properties: - Properties: +- Config: stop_on_upload_limit +- Env Var: RCLONE_DRIVE_STOP_ON_UPLOAD_LIMIT +- Type: bool +- Default: false - - Config: skip_shortcuts - - Env Var: RCLONE_DRIVE_SKIP_SHORTCUTS - - Type: bool - - Default: false +--drive-stop-on-download-limit - #### --drive-skip-dangling-shortcuts +Make download limit errors be fatal. - If set skip dangling shortcut files. +At the time of writing it is only possible to download 10 TiB of data +from Google Drive a day (this is an undocumented limit). When this limit +is reached Google Drive produces a slightly different error message. +When this flag is set it causes these errors to be fatal. These will +stop the in-progress sync. - If this is set then rclone will not show any dangling shortcuts in listings. +Note that this detection is relying on error message strings which +Google don't document so it may break in the future. +Properties: - Properties: +- Config: stop_on_download_limit +- Env Var: RCLONE_DRIVE_STOP_ON_DOWNLOAD_LIMIT +- Type: bool +- Default: false - - Config: skip_dangling_shortcuts - - Env Var: RCLONE_DRIVE_SKIP_DANGLING_SHORTCUTS - - Type: bool - - Default: false +--drive-skip-shortcuts - #### --drive-resource-key +If set skip shortcut files. - Resource key for accessing a link-shared file. +Normally rclone dereferences shortcut files making them appear as if +they are the original file (see the shortcuts section). If this flag is +set then rclone will ignore shortcut files completely. - If you need to access files shared with a link like this +Properties: - https://drive.google.com/drive/folders/XXX?resourcekey=YYY&usp=sharing +- Config: skip_shortcuts +- Env Var: RCLONE_DRIVE_SKIP_SHORTCUTS +- Type: bool +- Default: false - Then you will need to use the first part "XXX" as the "root_folder_id" - and the second part "YYY" as the "resource_key" otherwise you will get - 404 not found errors when trying to access the directory. +--drive-skip-dangling-shortcuts - See: https://developers.google.com/drive/api/guides/resource-keys +If set skip dangling shortcut files. - This resource key requirement only applies to a subset of old files. +If this is set then rclone will not show any dangling shortcuts in +listings. - Note also that opening the folder once in the web interface (with the - user you've authenticated rclone with) seems to be enough so that the - resource key is not needed. +Properties: +- Config: skip_dangling_shortcuts +- Env Var: RCLONE_DRIVE_SKIP_DANGLING_SHORTCUTS +- Type: bool +- Default: false - Properties: +--drive-resource-key - - Config: resource_key - - Env Var: RCLONE_DRIVE_RESOURCE_KEY - - Type: string - - Required: false +Resource key for accessing a link-shared file. - #### --drive-fast-list-bug-fix +If you need to access files shared with a link like this - Work around a bug in Google Drive listing. + https://drive.google.com/drive/folders/XXX?resourcekey=YYY&usp=sharing - Normally rclone will work around a bug in Google Drive when using - --fast-list (ListR) where the search "(A in parents) or (B in - parents)" returns nothing sometimes. See #3114, #4289 and - https://issuetracker.google.com/issues/149522397 +Then you will need to use the first part "XXX" as the "root_folder_id" +and the second part "YYY" as the "resource_key" otherwise you will get +404 not found errors when trying to access the directory. - Rclone detects this by finding no items in more than one directory - when listing and retries them as lists of individual directories. +See: https://developers.google.com/drive/api/guides/resource-keys - This means that if you have a lot of empty directories rclone will end - up listing them all individually and this can take many more API - calls. +This resource key requirement only applies to a subset of old files. - This flag allows the work-around to be disabled. This is **not** - recommended in normal use - only if you have a particular case you are - having trouble with like many empty directories. +Note also that opening the folder once in the web interface (with the +user you've authenticated rclone with) seems to be enough so that the +resource key is not needed. +Properties: - Properties: +- Config: resource_key +- Env Var: RCLONE_DRIVE_RESOURCE_KEY +- Type: string +- Required: false - - Config: fast_list_bug_fix - - Env Var: RCLONE_DRIVE_FAST_LIST_BUG_FIX - - Type: bool - - Default: true +--drive-fast-list-bug-fix - #### --drive-metadata-owner +Work around a bug in Google Drive listing. - Control whether owner should be read or written in metadata. +Normally rclone will work around a bug in Google Drive when using +--fast-list (ListR) where the search "(A in parents) or (B in parents)" +returns nothing sometimes. See #3114, #4289 and +https://issuetracker.google.com/issues/149522397 - Owner is a standard part of the file metadata so is easy to read. But it - isn't always desirable to set the owner from the metadata. +Rclone detects this by finding no items in more than one directory when +listing and retries them as lists of individual directories. - Note that you can't set the owner on Shared Drives, and that setting - ownership will generate an email to the new owner (this can't be - disabled), and you can't transfer ownership to someone outside your - organization. +This means that if you have a lot of empty directories rclone will end +up listing them all individually and this can take many more API calls. +This flag allows the work-around to be disabled. This is not recommended +in normal use - only if you have a particular case you are having +trouble with like many empty directories. - Properties: +Properties: - - Config: metadata_owner - - Env Var: RCLONE_DRIVE_METADATA_OWNER - - Type: Bits - - Default: read - - Examples: - - "off" - - Do not read or write the value - - "read" - - Read the value only - - "write" - - Write the value only - - "read,write" - - Read and Write the value. +- Config: fast_list_bug_fix +- Env Var: RCLONE_DRIVE_FAST_LIST_BUG_FIX +- Type: bool +- Default: true - #### --drive-metadata-permissions +--drive-metadata-owner - Control whether permissions should be read or written in metadata. +Control whether owner should be read or written in metadata. - Reading permissions metadata from files can be done quickly, but it - isn't always desirable to set the permissions from the metadata. +Owner is a standard part of the file metadata so is easy to read. But it +isn't always desirable to set the owner from the metadata. - Note that rclone drops any inherited permissions on Shared Drives and - any owner permission on My Drives as these are duplicated in the owner - metadata. +Note that you can't set the owner on Shared Drives, and that setting +ownership will generate an email to the new owner (this can't be +disabled), and you can't transfer ownership to someone outside your +organization. +Properties: - Properties: +- Config: metadata_owner +- Env Var: RCLONE_DRIVE_METADATA_OWNER +- Type: Bits +- Default: read +- Examples: + - "off" + - Do not read or write the value + - "read" + - Read the value only + - "write" + - Write the value only + - "failok" + - If writing fails log errors only, don't fail the transfer + - "read,write" + - Read and Write the value. - - Config: metadata_permissions - - Env Var: RCLONE_DRIVE_METADATA_PERMISSIONS - - Type: Bits - - Default: off - - Examples: - - "off" - - Do not read or write the value - - "read" - - Read the value only - - "write" - - Write the value only - - "read,write" - - Read and Write the value. +--drive-metadata-permissions - #### --drive-metadata-labels +Control whether permissions should be read or written in metadata. - Control whether labels should be read or written in metadata. +Reading permissions metadata from files can be done quickly, but it +isn't always desirable to set the permissions from the metadata. - Reading labels metadata from files takes an extra API transaction and - will slow down listings. It isn't always desirable to set the labels - from the metadata. +Note that rclone drops any inherited permissions on Shared Drives and +any owner permission on My Drives as these are duplicated in the owner +metadata. - The format of labels is documented in the drive API documentation at - https://developers.google.com/drive/api/reference/rest/v3/Label - - rclone just provides a JSON dump of this format. +Properties: - When setting labels, the label and fields must already exist - rclone - will not create them. This means that if you are transferring labels - from two different accounts you will have to create the labels in - advance and use the metadata mapper to translate the IDs between the - two accounts. +- Config: metadata_permissions +- Env Var: RCLONE_DRIVE_METADATA_PERMISSIONS +- Type: Bits +- Default: off +- Examples: + - "off" + - Do not read or write the value + - "read" + - Read the value only + - "write" + - Write the value only + - "failok" + - If writing fails log errors only, don't fail the transfer + - "read,write" + - Read and Write the value. +--drive-metadata-labels - Properties: +Control whether labels should be read or written in metadata. - - Config: metadata_labels - - Env Var: RCLONE_DRIVE_METADATA_LABELS - - Type: Bits - - Default: off - - Examples: - - "off" - - Do not read or write the value - - "read" - - Read the value only - - "write" - - Write the value only - - "read,write" - - Read and Write the value. +Reading labels metadata from files takes an extra API transaction and +will slow down listings. It isn't always desirable to set the labels +from the metadata. - #### --drive-encoding +The format of labels is documented in the drive API documentation at +https://developers.google.com/drive/api/reference/rest/v3/Label - rclone +just provides a JSON dump of this format. - The encoding for the backend. +When setting labels, the label and fields must already exist - rclone +will not create them. This means that if you are transferring labels +from two different accounts you will have to create the labels in +advance and use the metadata mapper to translate the IDs between the two +accounts. - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +Properties: - Properties: +- Config: metadata_labels +- Env Var: RCLONE_DRIVE_METADATA_LABELS +- Type: Bits +- Default: off +- Examples: + - "off" + - Do not read or write the value + - "read" + - Read the value only + - "write" + - Write the value only + - "failok" + - If writing fails log errors only, don't fail the transfer + - "read,write" + - Read and Write the value. + +--drive-encoding + +The encoding for the backend. + +See the encoding section in the overview for more info. + +Properties: + +- Config: encoding +- Env Var: RCLONE_DRIVE_ENCODING +- Type: Encoding +- Default: InvalidUtf8 + +--drive-env-auth + +Get IAM credentials from runtime (environment variables or instance meta +data if no env vars). + +Only applies if service_account_file and service_account_credentials is +blank. - - Config: encoding - - Env Var: RCLONE_DRIVE_ENCODING - - Type: Encoding - - Default: InvalidUtf8 +Properties: - #### --drive-env-auth +- Config: env_auth +- Env Var: RCLONE_DRIVE_ENV_AUTH +- Type: bool +- Default: false +- Examples: + - "false" + - Enter credentials in the next step. + - "true" + - Get GCP IAM credentials from the environment (env vars or + IAM). - Get IAM credentials from runtime (environment variables or instance meta data if no env vars). +--drive-description - Only applies if service_account_file and service_account_credentials is blank. +Description of the remote. - Properties: +Properties: - - Config: env_auth - - Env Var: RCLONE_DRIVE_ENV_AUTH - - Type: bool - - Default: false - - Examples: - - "false" - - Enter credentials in the next step. - - "true" - - Get GCP IAM credentials from the environment (env vars or IAM). +- Config: description +- Env Var: RCLONE_DRIVE_DESCRIPTION +- Type: string +- Required: false - #### --drive-description +Metadata - Description of the remote +User metadata is stored in the properties field of the drive object. - Properties: +Metadata is supported on files and directories. - - Config: description - - Env Var: RCLONE_DRIVE_DESCRIPTION - - Type: string - - Required: false +Here are the possible system metadata items for the drive backend. - ### Metadata + ---------------------------------------------------------------------------------------------------------------------------------- + Name Help Type Example Read Only + --------------------------------- ------------------------------- ----------- ------------------------------- -------------------- + btime Time of file birth (creation) RFC 3339 2006-01-02T15:04:05.999Z07:00 N + with mS accuracy. Note that + this is only writable on fresh + uploads - it can't be written + for updates. - User metadata is stored in the properties field of the drive object. + content-type The MIME type of the file. string text/plain N - Metadata is supported on files and directories. + copy-requires-writer-permission Whether the options to copy, boolean true N + print, or download this file, + should be disabled for readers + and commenters. - Here are the possible system metadata items for the drive backend. + description A short description of the string Contract for signing N + file. - | Name | Help | Type | Example | Read Only | - |------|------|------|---------|-----------| - | btime | Time of file birth (creation) with mS accuracy. Note that this is only writable on fresh uploads - it can't be written for updates. | RFC 3339 | 2006-01-02T15:04:05.999Z07:00 | N | - | content-type | The MIME type of the file. | string | text/plain | N | - | copy-requires-writer-permission | Whether the options to copy, print, or download this file, should be disabled for readers and commenters. | boolean | true | N | - | description | A short description of the file. | string | Contract for signing | N | - | folder-color-rgb | The color for a folder or a shortcut to a folder as an RGB hex string. | string | 881133 | N | - | labels | Labels attached to this file in a JSON dump of Googled drive format. Enable with --drive-metadata-labels. | JSON | [] | N | - | mtime | Time of last modification with mS accuracy. | RFC 3339 | 2006-01-02T15:04:05.999Z07:00 | N | - | owner | The owner of the file. Usually an email address. Enable with --drive-metadata-owner. | string | user@example.com | N | - | permissions | Permissions in a JSON dump of Google drive format. On shared drives these will only be present if they aren't inherited. Enable with --drive-metadata-permissions. | JSON | {} | N | - | starred | Whether the user has starred the file. | boolean | false | N | - | viewed-by-me | Whether the file has been viewed by this user. | boolean | true | **Y** | - | writers-can-share | Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. | boolean | false | N | + folder-color-rgb The color for a folder or a string 881133 N + shortcut to a folder as an RGB + hex string. - See the [metadata](https://rclone.org/docs/#metadata) docs for more info. + labels Labels attached to this file in JSON [] N + a JSON dump of Googled drive + format. Enable with + --drive-metadata-labels. - ## Backend commands + mtime Time of last modification with RFC 3339 2006-01-02T15:04:05.999Z07:00 N + mS accuracy. - Here are the commands specific to the drive backend. + owner The owner of the file. Usually string user@example.com N + an email address. Enable with + --drive-metadata-owner. - Run them with + permissions Permissions in a JSON dump of JSON {} N + Google drive format. On shared + drives these will only be + present if they aren't + inherited. Enable with + --drive-metadata-permissions. - rclone backend COMMAND remote: + starred Whether the user has starred boolean false N + the file. - The help below will explain what arguments each command takes. + viewed-by-me Whether the file has been boolean true Y + viewed by this user. - See the [backend](https://rclone.org/commands/rclone_backend/) command for more - info on how to pass options and arguments. + writers-can-share Whether users with only writer boolean false N + permission can modify the + file's permissions. Not + populated and ignored when + setting for items in shared + drives. + ---------------------------------------------------------------------------------------------------------------------------------- - These can be run on a running backend using the rc command - [backend/command](https://rclone.org/rc/#backend-command). +See the metadata docs for more info. - ### get +Backend commands - Get command for fetching the drive config parameters +Here are the commands specific to the drive backend. - rclone backend get remote: [options] [+] +Run them with - This is a get command which will be used to fetch the various drive config parameters + rclone backend COMMAND remote: - Usage Examples: +The help below will explain what arguments each command takes. - rclone backend get drive: [-o service_account_file] [-o chunk_size] - rclone rc backend/command command=get fs=drive: [-o service_account_file] [-o chunk_size] +See the backend command for more info on how to pass options and +arguments. +These can be run on a running backend using the rc command +backend/command. - Options: +get - - "chunk_size": show the current upload chunk size - - "service_account_file": show the current service account file +Get command for fetching the drive config parameters - ### set + rclone backend get remote: [options] [+] - Set command for updating the drive config parameters +This is a get command which will be used to fetch the various drive +config parameters - rclone backend set remote: [options] [+] +Usage Examples: - This is a set command which will be used to update the various drive config parameters + rclone backend get drive: [-o service_account_file] [-o chunk_size] + rclone rc backend/command command=get fs=drive: [-o service_account_file] [-o chunk_size] - Usage Examples: +Options: - rclone backend set drive: [-o service_account_file=sa.json] [-o chunk_size=67108864] - rclone rc backend/command command=set fs=drive: [-o service_account_file=sa.json] [-o chunk_size=67108864] +- "chunk_size": show the current upload chunk size +- "service_account_file": show the current service account file +set - Options: +Set command for updating the drive config parameters - - "chunk_size": update the current upload chunk size - - "service_account_file": update the current service account file + rclone backend set remote: [options] [+] - ### shortcut +This is a set command which will be used to update the various drive +config parameters - Create shortcuts from files or directories +Usage Examples: - rclone backend shortcut remote: [options] [+] + rclone backend set drive: [-o service_account_file=sa.json] [-o chunk_size=67108864] + rclone rc backend/command command=set fs=drive: [-o service_account_file=sa.json] [-o chunk_size=67108864] - This command creates shortcuts from files or directories. +Options: - Usage: +- "chunk_size": update the current upload chunk size +- "service_account_file": update the current service account file - rclone backend shortcut drive: source_item destination_shortcut - rclone backend shortcut drive: source_item -o target=drive2: destination_shortcut +shortcut - In the first example this creates a shortcut from the "source_item" - which can be a file or a directory to the "destination_shortcut". The - "source_item" and the "destination_shortcut" should be relative paths - from "drive:" +Create shortcuts from files or directories - In the second example this creates a shortcut from the "source_item" - relative to "drive:" to the "destination_shortcut" relative to - "drive2:". This may fail with a permission error if the user - authenticated with "drive2:" can't read files from "drive:". + rclone backend shortcut remote: [options] [+] +This command creates shortcuts from files or directories. - Options: +Usage: - - "target": optional target remote for the shortcut destination + rclone backend shortcut drive: source_item destination_shortcut + rclone backend shortcut drive: source_item -o target=drive2: destination_shortcut - ### drives +In the first example this creates a shortcut from the "source_item" +which can be a file or a directory to the "destination_shortcut". The +"source_item" and the "destination_shortcut" should be relative paths +from "drive:" - List the Shared Drives available to this account +In the second example this creates a shortcut from the "source_item" +relative to "drive:" to the "destination_shortcut" relative to +"drive2:". This may fail with a permission error if the user +authenticated with "drive2:" can't read files from "drive:". - rclone backend drives remote: [options] [+] +Options: - This command lists the Shared Drives (Team Drives) available to this - account. +- "target": optional target remote for the shortcut destination - Usage: +drives - rclone backend [-o config] drives drive: +List the Shared Drives available to this account - This will return a JSON list of objects like this + rclone backend drives remote: [options] [+] - [ - { - "id": "0ABCDEF-01234567890", - "kind": "drive#teamDrive", - "name": "My Drive" - }, - { - "id": "0ABCDEFabcdefghijkl", - "kind": "drive#teamDrive", - "name": "Test Drive" - } - ] +This command lists the Shared Drives (Team Drives) available to this +account. - With the -o config parameter it will output the list in a format - suitable for adding to a config file to make aliases for all the - drives found and a combined drive. +Usage: - [My Drive] - type = alias - remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=: + rclone backend [-o config] drives drive: - [Test Drive] - type = alias - remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=: - - [AllDrives] - type = combine - upstreams = "My Drive=My Drive:" "Test Drive=Test Drive:" - - Adding this to the rclone config file will cause those team drives to - be accessible with the aliases shown. Any illegal characters will be - substituted with "_" and duplicate names will have numbers suffixed. - It will also add a remote called AllDrives which shows all the shared - drives combined into one directory tree. - - - ### untrash - - Untrash files and directories - - rclone backend untrash remote: [options] [+] - - This command untrashes all the files and directories in the directory - passed in recursively. - - Usage: - - This takes an optional directory to trash which make this easier to - use via the API. - - rclone backend untrash drive:directory - rclone backend --interactive untrash drive:directory subdir - - Use the --interactive/-i or --dry-run flag to see what would be restored before restoring it. - - Result: +This will return a JSON list of objects like this + [ { - "Untrashed": 17, - "Errors": 0 + "id": "0ABCDEF-01234567890", + "kind": "drive#teamDrive", + "name": "My Drive" + }, + { + "id": "0ABCDEFabcdefghijkl", + "kind": "drive#teamDrive", + "name": "Test Drive" } + ] +With the -o config parameter it will output the list in a format +suitable for adding to a config file to make aliases for all the drives +found and a combined drive. - ### copyid + [My Drive] + type = alias + remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=: - Copy files by ID + [Test Drive] + type = alias + remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=: - rclone backend copyid remote: [options] [+] + [AllDrives] + type = combine + upstreams = "My Drive=My Drive:" "Test Drive=Test Drive:" - This command copies files by ID +Adding this to the rclone config file will cause those team drives to be +accessible with the aliases shown. Any illegal characters will be +substituted with "_" and duplicate names will have numbers suffixed. It +will also add a remote called AllDrives which shows all the shared +drives combined into one directory tree. - Usage: +untrash - rclone backend copyid drive: ID path - rclone backend copyid drive: ID1 path1 ID2 path2 +Untrash files and directories - It copies the drive file with ID given to the path (an rclone path which - will be passed internally to rclone copyto). The ID and path pairs can be - repeated. + rclone backend untrash remote: [options] [+] - The path should end with a / to indicate copy the file as named to - this directory. If it doesn't end with a / then the last path - component will be used as the file name. +This command untrashes all the files and directories in the directory +passed in recursively. - If the destination is a drive backend then server-side copying will be - attempted if possible. +Usage: - Use the --interactive/-i or --dry-run flag to see what would be copied before copying. +This takes an optional directory to trash which make this easier to use +via the API. + rclone backend untrash drive:directory + rclone backend --interactive untrash drive:directory subdir - ### exportformats +Use the --interactive/-i or --dry-run flag to see what would be restored +before restoring it. - Dump the export formats for debug purposes +Result: - rclone backend exportformats remote: [options] [+] + { + "Untrashed": 17, + "Errors": 0 + } - ### importformats +copyid - Dump the import formats for debug purposes +Copy files by ID - rclone backend importformats remote: [options] [+] + rclone backend copyid remote: [options] [+] +This command copies files by ID +Usage: - ## Limitations + rclone backend copyid drive: ID path + rclone backend copyid drive: ID1 path1 ID2 path2 - Drive has quite a lot of rate limiting. This causes rclone to be - limited to transferring about 2 files per second only. Individual - files may be transferred much faster at 100s of MiB/s but lots of - small files can take a long time. +It copies the drive file with ID given to the path (an rclone path which +will be passed internally to rclone copyto). The ID and path pairs can +be repeated. - Server side copies are also subject to a separate rate limit. If you - see User rate limit exceeded errors, wait at least 24 hours and retry. - You can disable server-side copies with `--disable copy` to download - and upload the files if you prefer. +The path should end with a / to indicate copy the file as named to this +directory. If it doesn't end with a / then the last path component will +be used as the file name. - ### Limitations of Google Docs +If the destination is a drive backend then server-side copying will be +attempted if possible. - Google docs will appear as size -1 in `rclone ls`, `rclone ncdu` etc, - and as size 0 in anything which uses the VFS layer, e.g. `rclone mount` - and `rclone serve`. When calculating directory totals, e.g. in - `rclone size` and `rclone ncdu`, they will be counted in as empty - files. +Use the --interactive/-i or --dry-run flag to see what would be copied +before copying. - This is because rclone can't find out the size of the Google docs - without downloading them. +exportformats - Google docs will transfer correctly with `rclone sync`, `rclone copy` - etc as rclone knows to ignore the size when doing the transfer. +Dump the export formats for debug purposes - However an unfortunate consequence of this is that you may not be able - to download Google docs using `rclone mount`. If it doesn't work you - will get a 0 sized file. If you try again the doc may gain its - correct size and be downloadable. Whether it will work on not depends - on the application accessing the mount and the OS you are running - - experiment to find out if it does work for you! + rclone backend exportformats remote: [options] [+] - ### Duplicated files +importformats - Sometimes, for no reason I've been able to track down, drive will - duplicate a file that rclone uploads. Drive unlike all the other - remotes can have duplicated files. +Dump the import formats for debug purposes - Duplicated files cause problems with the syncing and you will see - messages in the log about duplicates. + rclone backend importformats remote: [options] [+] - Use `rclone dedupe` to fix duplicated files. +query - Note that this isn't just a problem with rclone, even Google Photos on - Android duplicates files on drive sometimes. +List files using Google Drive query language - ### Rclone appears to be re-copying files it shouldn't + rclone backend query remote: [options] [+] - The most likely cause of this is the duplicated file issue above - run - `rclone dedupe` and check your logs for duplicate object or directory - messages. +This command lists files based on a query - This can also be caused by a delay/caching on google drive's end when - comparing directory listings. Specifically with team drives used in - combination with --fast-list. Files that were uploaded recently may - not appear on the directory list sent to rclone when using --fast-list. +Usage: - Waiting a moderate period of time between attempts (estimated to be - approximately 1 hour) and/or not using --fast-list both seem to be - effective in preventing the problem. + rclone backend query drive: query - ### SHA1 or SHA256 hashes may be missing +The query syntax is documented at Google Drive Search query terms and +operators. - All files have MD5 hashes, but a small fraction of files uploaded may - not have SHA1 or SHA256 hashes especially if they were uploaded before 2018. +For example: - ## Making your own client_id + rclone backend query drive: "'0ABc9DEFGHIJKLMNop0QRatUVW3X' in parents and name contains 'foo'" - When you use rclone with Google drive in its default configuration you - are using rclone's client_id. This is shared between all the rclone - users. There is a global rate limit on the number of queries per - second that each client_id can do set by Google. rclone already has a - high quota and I will continue to make sure it is high enough by - contacting Google. +If the query contains literal ' or  characters, these need to be escaped +with  characters. "'" becomes "'" and "" becomes "\", for example to +match a file named "foo ' .txt": - It is strongly recommended to use your own client ID as the default rclone ID is heavily used. If you have multiple services running, it is recommended to use an API key for each service. The default Google quota is 10 transactions per second so it is recommended to stay under that number as if you use more than that, it will cause rclone to rate limit and make things slower. + rclone backend query drive: "name = 'foo \' \\\.txt'" - Here is how to create your own Google Drive client ID for rclone: +The result is a JSON array of matches, for example: - 1. Log into the [Google API - Console](https://console.developers.google.com/) with your Google - account. It doesn't matter what Google account you use. (It need not - be the same account as the Google Drive you want to access) + [ + { + "createdTime": "2017-06-29T19:58:28.537Z", + "id": "0AxBe_CDEF4zkGHI4d0FjYko2QkD", + "md5Checksum": "68518d16be0c6fbfab918be61d658032", + "mimeType": "text/plain", + "modifiedTime": "2024-02-02T10:40:02.874Z", + "name": "foo ' \\.txt", + "parents": [ + "0BxAe_BCDE4zkFGZpcWJGek0xbzC" + ], + "resourceKey": "0-ABCDEFGHIXJQpIGqBJq3MC", + "sha1Checksum": "8f284fa768bfb4e45d076a579ab3905ab6bfa893", + "size": "311", + "webViewLink": "https://drive.google.com/file/d/0AxBe_CDEF4zkGHI4d0FjYko2QkD/view?usp=drivesdk\u0026resourcekey=0-ABCDEFGHIXJQpIGqBJq3MC" + } + ] - 2. Select a project or create a new project. +Limitations - 3. Under "ENABLE APIS AND SERVICES" search for "Drive", and enable the +Drive has quite a lot of rate limiting. This causes rclone to be limited +to transferring about 2 files per second only. Individual files may be +transferred much faster at 100s of MiB/s but lots of small files can +take a long time. + +Server side copies are also subject to a separate rate limit. If you see +User rate limit exceeded errors, wait at least 24 hours and retry. You +can disable server-side copies with --disable copy to download and +upload the files if you prefer. + +Limitations of Google Docs + +Google docs will appear as size -1 in rclone ls, rclone ncdu etc, and as +size 0 in anything which uses the VFS layer, e.g. rclone mount and +rclone serve. When calculating directory totals, e.g. in rclone size and +rclone ncdu, they will be counted in as empty files. + +This is because rclone can't find out the size of the Google docs +without downloading them. + +Google docs will transfer correctly with rclone sync, rclone copy etc as +rclone knows to ignore the size when doing the transfer. + +However an unfortunate consequence of this is that you may not be able +to download Google docs using rclone mount. If it doesn't work you will +get a 0 sized file. If you try again the doc may gain its correct size +and be downloadable. Whether it will work on not depends on the +application accessing the mount and the OS you are running - experiment +to find out if it does work for you! + +Duplicated files + +Sometimes, for no reason I've been able to track down, drive will +duplicate a file that rclone uploads. Drive unlike all the other remotes +can have duplicated files. + +Duplicated files cause problems with the syncing and you will see +messages in the log about duplicates. + +Use rclone dedupe to fix duplicated files. + +Note that this isn't just a problem with rclone, even Google Photos on +Android duplicates files on drive sometimes. + +Rclone appears to be re-copying files it shouldn't + +The most likely cause of this is the duplicated file issue above - run +rclone dedupe and check your logs for duplicate object or directory +messages. + +This can also be caused by a delay/caching on google drive's end when +comparing directory listings. Specifically with team drives used in +combination with --fast-list. Files that were uploaded recently may not +appear on the directory list sent to rclone when using --fast-list. + +Waiting a moderate period of time between attempts (estimated to be +approximately 1 hour) and/or not using --fast-list both seem to be +effective in preventing the problem. + +SHA1 or SHA256 hashes may be missing + +All files have MD5 hashes, but a small fraction of files uploaded may +not have SHA1 or SHA256 hashes especially if they were uploaded before +2018. + +Making your own client_id + +When you use rclone with Google drive in its default configuration you +are using rclone's client_id. This is shared between all the rclone +users. There is a global rate limit on the number of queries per second +that each client_id can do set by Google. rclone already has a high +quota and I will continue to make sure it is high enough by contacting +Google. + +It is strongly recommended to use your own client ID as the default +rclone ID is heavily used. If you have multiple services running, it is +recommended to use an API key for each service. The default Google quota +is 10 transactions per second so it is recommended to stay under that +number as if you use more than that, it will cause rclone to rate limit +and make things slower. + +Here is how to create your own Google Drive client ID for rclone: + +1. Log into the Google API Console with your Google account. It doesn't + matter what Google account you use. (It need not be the same account + as the Google Drive you want to access) + +2. Select a project or create a new project. + +3. Under "ENABLE APIS AND SERVICES" search for "Drive", and enable the "Google Drive API". - 4. Click "Credentials" in the left-side panel (not "Create +4. Click "Credentials" in the left-side panel (not "Create credentials", which opens the wizard). - 5. If you already configured an "Oauth Consent Screen", then skip - to the next step; if not, click on "CONFIGURE CONSENT SCREEN" button - (near the top right corner of the right panel), then select "External" - and click on "CREATE"; on the next screen, enter an "Application name" - ("rclone" is OK); enter "User Support Email" (your own email is OK); - enter "Developer Contact Email" (your own email is OK); then click on - "Save" (all other data is optional). You will also have to add some scopes, - including `.../auth/docs` and `.../auth/drive` in order to be able to edit, - create and delete files with RClone. You may also want to include the - `../auth/drive.metadata.readonly` scope. After adding scopes, click - "Save and continue" to add test users. Be sure to add your own account to - the test users. Once you've added yourself as a test user and saved the - changes, click again on "Credentials" on the left panel to go back to - the "Credentials" screen. +5. If you already configured an "Oauth Consent Screen", then skip to + the next step; if not, click on "CONFIGURE CONSENT SCREEN" button + (near the top right corner of the right panel), then select + "External" and click on "CREATE"; on the next screen, enter an + "Application name" ("rclone" is OK); enter "User Support Email" + (your own email is OK); enter "Developer Contact Email" (your own + email is OK); then click on "Save" (all other data is optional). You + will also have to add some scopes, including - (PS: if you are a GSuite user, you could also select "Internal" instead - of "External" above, but this will restrict API use to Google Workspace - users in your organisation). +- https://www.googleapis.com/auth/docs +- https://www.googleapis.com/auth/drive in order to be able to edit, + create and delete files with RClone. +- https://www.googleapis.com/auth/drive.metadata.readonly which you + may also want to add. +- If you want to add all at once, comma separated it would be + https://www.googleapis.com/auth/docs,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.metadata.readonly. - 6. Click on the "+ CREATE CREDENTIALS" button at the top of the screen, +6. After adding scopes, click "Save and continue" to add test users. Be + sure to add your own account to the test users. Once you've added + yourself as a test user and saved the changes, click again on + "Credentials" on the left panel to go back to the "Credentials" + screen. + + (PS: if you are a GSuite user, you could also select "Internal" + instead of "External" above, but this will restrict API use to + Google Workspace users in your organisation). + +7. Click on the "+ CREATE CREDENTIALS" button at the top of the screen, then select "OAuth client ID". - 7. Choose an application type of "Desktop app" and click "Create". (the default name is fine) +8. Choose an application type of "Desktop app" and click "Create". (the + default name is fine) - 8. It will show you a client ID and client secret. Make a note of these. - - (If you selected "External" at Step 5 continue to Step 9. - If you chose "Internal" you don't need to publish and can skip straight to - Step 10 but your destination drive must be part of the same Google Workspace.) +9. It will show you a client ID and client secret. Make a note of + these. - 9. Go to "Oauth consent screen" and then click "PUBLISH APP" button and confirm. - You will also want to add yourself as a test user. + (If you selected "External" at Step 5 continue to Step 9. If you + chose "Internal" you don't need to publish and can skip straight to + Step 10 but your destination drive must be part of the same Google + Workspace.) - 10. Provide the noted client ID and client secret to rclone. +10. Go to "Oauth consent screen" and then click "PUBLISH APP" button and + confirm. You will also want to add yourself as a test user. - Be aware that, due to the "enhanced security" recently introduced by - Google, you are theoretically expected to "submit your app for verification" - and then wait a few weeks(!) for their response; in practice, you can go right - ahead and use the client ID and client secret with rclone, the only issue will - be a very scary confirmation screen shown when you connect via your browser - for rclone to be able to get its token-id (but as this only happens during - the remote configuration, it's not such a big deal). Keeping the application in - "Testing" will work as well, but the limitation is that any grants will expire - after a week, which can be annoying to refresh constantly. If, for whatever - reason, a short grant time is not a problem, then keeping the application in - testing mode would also be sufficient. +11. Provide the noted client ID and client secret to rclone. - (Thanks to @balazer on github for these instructions.) +Be aware that, due to the "enhanced security" recently introduced by +Google, you are theoretically expected to "submit your app for +verification" and then wait a few weeks(!) for their response; in +practice, you can go right ahead and use the client ID and client secret +with rclone, the only issue will be a very scary confirmation screen +shown when you connect via your browser for rclone to be able to get its +token-id (but as this only happens during the remote configuration, it's +not such a big deal). Keeping the application in "Testing" will work as +well, but the limitation is that any grants will expire after a week, +which can be annoying to refresh constantly. If, for whatever reason, a +short grant time is not a problem, then keeping the application in +testing mode would also be sufficient. - Sometimes, creation of an OAuth consent in Google API Console fails due to an error message - “The request failed because changes to one of the field of the resource is not supported”. - As a convenient workaround, the necessary Google Drive API key can be created on the - [Python Quickstart](https://developers.google.com/drive/api/v3/quickstart/python) page. - Just push the Enable the Drive API button to receive the Client ID and Secret. - Note that it will automatically create a new project in the API Console. +(Thanks to @balazer on github for these instructions.) - # Google Photos +Sometimes, creation of an OAuth consent in Google API Console fails due +to an error message “The request failed because changes to one of the +field of the resource is not supported”. As a convenient workaround, the +necessary Google Drive API key can be created on the Python Quickstart +page. Just push the Enable the Drive API button to receive the Client ID +and Secret. Note that it will automatically create a new project in the +API Console. - The rclone backend for [Google Photos](https://www.google.com/photos/about/) is - a specialized backend for transferring photos and videos to and from - Google Photos. +Google Photos - **NB** The Google Photos API which rclone uses has quite a few - limitations, so please read the [limitations section](#limitations) - carefully to make sure it is suitable for your use. +The rclone backend for Google Photos is a specialized backend for +transferring photos and videos to and from Google Photos. - ## Configuration +NB The Google Photos API which rclone uses has quite a few limitations, +so please read the limitations section carefully to make sure it is +suitable for your use. - The initial setup for google cloud storage involves getting a token from Google Photos - which you need to do in your browser. `rclone config` walks you - through it. +Configuration - Here is an example of how to make a remote called `remote`. First run: +The initial setup for google cloud storage involves getting a token from +Google Photos which you need to do in your browser. rclone config walks +you through it. - rclone config +Here is an example of how to make a remote called remote. First run: - This will guide you through an interactive setup process: + rclone config -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. Enter a string value. Press Enter for the default (""). -Choose a number from below, or type in your own value [snip] XX / Google -Photos  "google photos" [snip] Storage> google photos ** See help for -google photos backend at: https://rclone.org/googlephotos/ ** +This will guide you through an interactive setup process: -Google Application Client Id Leave blank normally. Enter a string value. -Press Enter for the default (""). client_id> Google Application Client -Secret Leave blank normally. Enter a string value. Press Enter for the -default (""). client_secret> Set to make the Google Photos backend read -only. + 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. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + [snip] + XX / Google Photos + \ "google photos" + [snip] + Storage> google photos + ** See help for google photos backend at: https://rclone.org/googlephotos/ ** + + Google Application Client Id + Leave blank normally. + Enter a string value. Press Enter for the default (""). + client_id> + Google Application Client Secret + Leave blank normally. + Enter a string value. Press Enter for the default (""). + client_secret> + Set to make the Google Photos backend read only. + + If you choose read only then rclone will only request read only access + to your photos, otherwise rclone will request full access. + Enter a boolean value (true or false). Press Enter for the default ("false"). + read_only> + Edit advanced config? (y/n) + y) Yes + n) No + y/n> n + Remote config + Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access + If not sure try Y. If Y failed, try N. + y) Yes + n) No + y/n> y + If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth + Log in and authorize rclone for access + Waiting for code... + Got code + + *** IMPORTANT: All media items uploaded to Google Photos with rclone + *** are stored in full resolution at original quality. These uploads + *** will count towards storage in your Google Account. + + -------------------- + [remote] + type = google photos + token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2019-06-28T17:38:04.644930156+01:00"} + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y + +See the remote setup docs for how to set it up on a machine with no +Internet browser available. + +Note that rclone runs a webserver on your local machine to collect the +token as returned from Google if using web browser to automatically +authenticate. This only runs from the moment it opens your browser to +the moment you get back the verification code. This is on +http://127.0.0.1:53682/ and this may require you to unblock it +temporarily if you are running a host firewall, or use manual mode. + +This remote is called remote and can now be used like this + +See all the albums in your photos + + rclone lsd remote:album + +Make a new album + + rclone mkdir remote:album/newAlbum + +List the contents of an album + + rclone ls remote:album/newAlbum + +Sync /home/local/images to the Google Photos, removing any excess files +in the album. + + rclone sync --interactive /home/local/image remote:album/newAlbum + +Layout + +As Google Photos is not a general purpose cloud storage system, the +backend is laid out to help you navigate it. + +The directories under media show different ways of categorizing the +media. Each file will appear multiple times. So if you want to make a +backup of your google photos you might choose to backup +remote:media/by-month. (NB remote:media/by-day is rather slow at the +moment so avoid for syncing.) + +Note that all your photos and videos will appear somewhere under media, +but they may not appear under album unless you've put them into albums. + + / + - upload + - file1.jpg + - file2.jpg + - ... + - media + - all + - file1.jpg + - file2.jpg + - ... + - by-year + - 2000 + - file1.jpg + - ... + - 2001 + - file2.jpg + - ... + - ... + - by-month + - 2000 + - 2000-01 + - file1.jpg + - ... + - 2000-02 + - file2.jpg + - ... + - ... + - by-day + - 2000 + - 2000-01-01 + - file1.jpg + - ... + - 2000-01-02 + - file2.jpg + - ... + - ... + - album + - album name + - album name/sub + - shared-album + - album name + - album name/sub + - feature + - favorites + - file1.jpg + - file2.jpg + +There are two writable parts of the tree, the upload directory and sub +directories of the album directory. + +The upload directory is for uploading files you don't want to put into +albums. This will be empty to start with and will contain the files +you've uploaded for one rclone session only, becoming empty again when +you restart rclone. The use case for this would be if you have a load of +files you just want to once off dump into Google Photos. For repeated +syncing, uploading to album will work better. + +Directories within the album directory are also writeable and you may +create new directories (albums) under album. If you copy files with a +directory hierarchy in there then rclone will create albums with the / +character in them. For example if you do + + rclone copy /path/to/images remote:album/images + +and the images directory contains + + images + - file1.jpg + dir + file2.jpg + dir2 + dir3 + file3.jpg + +Then rclone will create the following albums with the following files in + +- images + - file1.jpg +- images/dir + - file2.jpg +- images/dir2/dir3 + - file3.jpg + +This means that you can use the album path pretty much like a normal +filesystem and it is a good target for repeated syncing. + +The shared-album directory shows albums shared with you or by you. This +is similar to the Sharing tab in the Google Photos web interface. + +Standard options + +Here are the Standard options specific to google photos (Google Photos). + +--gphotos-client-id + +OAuth Client Id. + +Leave blank normally. + +Properties: + +- Config: client_id +- Env Var: RCLONE_GPHOTOS_CLIENT_ID +- Type: string +- Required: false + +--gphotos-client-secret + +OAuth Client Secret. + +Leave blank normally. + +Properties: + +- Config: client_secret +- Env Var: RCLONE_GPHOTOS_CLIENT_SECRET +- Type: string +- Required: false + +--gphotos-read-only + +Set to make the Google Photos backend read only. If you choose read only then rclone will only request read only access -to your photos, otherwise rclone will request full access. Enter a -boolean value (true or false). Press Enter for the default ("false"). -read_only> Edit advanced config? (y/n) y) Yes n) No y/n> n Remote config -Use web browser to automatically authenticate rclone with remote? * Say -Y if the machine running rclone has a web browser you can use * Say N if -running rclone on a (remote) machine without web browser access If not -sure try Y. If Y failed, try N. y) Yes n) No y/n> y If your browser -doesn't open automatically go to the following link: -http://127.0.0.1:53682/auth Log in and authorize rclone for access -Waiting for code... Got code +to your photos, otherwise rclone will request full access. -*** IMPORTANT: All media items uploaded to Google Photos with rclone *** -are stored in full resolution at original quality. These uploads *** -will count towards storage in your Google Account. +Properties: - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - [remote] type = google photos token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2019-06-28T17:38:04.644930156+01:00"} - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y ``` +- Config: read_only +- Env Var: RCLONE_GPHOTOS_READ_ONLY +- Type: bool +- Default: false - See the remote setup docs for how to set it up on a machine with no Internet browser available. +Advanced options - Note that rclone runs a webserver on your local machine to collect the token as returned from Google if using web browser to automatically authenticate. This only runs from the moment it opens your browser to the moment you get back the verification code. This is on http://127.0.0.1:53682/ and this may require you to unblock it temporarily if you are running a host firewall, or use manual mode. +Here are the Advanced options specific to google photos (Google Photos). - This remote is called remote and can now be used like this +--gphotos-token - See all the albums in your photos +OAuth Access Token as a JSON blob. - rclone lsd remote:album +Properties: - Make a new album +- Config: token +- Env Var: RCLONE_GPHOTOS_TOKEN +- Type: string +- Required: false - rclone mkdir remote:album/newAlbum +--gphotos-auth-url - List the contents of an album +Auth server URL. - rclone ls remote:album/newAlbum +Leave blank to use the provider defaults. - Sync /home/local/images to the Google Photos, removing any excess files in the album. +Properties: - rclone sync --interactive /home/local/image remote:album/newAlbum +- Config: auth_url +- Env Var: RCLONE_GPHOTOS_AUTH_URL +- Type: string +- Required: false - ### Layout +--gphotos-token-url - As Google Photos is not a general purpose cloud storage system, the backend is laid out to help you navigate it. +Token server url. - The directories under media show different ways of categorizing the media. Each file will appear multiple times. So if you want to make a backup of your google photos you might choose to backup remote:media/by-month. (NB remote:media/by-day is rather slow at the moment so avoid for syncing.) +Leave blank to use the provider defaults. - Note that all your photos and videos will appear somewhere under media, but they may not appear under album unless you've put them into albums. +Properties: - / - upload - file1.jpg - file2.jpg - ... - media - all - file1.jpg - file2.jpg - ... - by-year - 2000 - file1.jpg - ... - 2001 - file2.jpg - ... - ... - by-month - 2000 - 2000-01 - file1.jpg - ... - 2000-02 - file2.jpg - ... - ... - by-day - 2000 - 2000-01-01 - file1.jpg - ... - 2000-01-02 - file2.jpg - ... - ... - album - album name - album name/sub - shared-album - album name - album name/sub - feature - favorites - file1.jpg - file2.jpg +- Config: token_url +- Env Var: RCLONE_GPHOTOS_TOKEN_URL +- Type: string +- Required: false - There are two writable parts of the tree, the upload directory and sub directories of the album directory. +--gphotos-read-size - The upload directory is for uploading files you don't want to put into albums. This will be empty to start with and will contain the files you've uploaded for one rclone session only, becoming empty again when you restart rclone. The use case for this would be if you have a load of files you just want to once off dump into Google Photos. For repeated syncing, uploading to album will work better. +Set to read the size of media items. - Directories within the album directory are also writeable and you may create new directories (albums) under album. If you copy files with a directory hierarchy in there then rclone will create albums with the / character in them. For example if you do +Normally rclone does not read the size of media items since this takes +another transaction. This isn't necessary for syncing. However rclone +mount needs to know the size of files in advance of reading them, so +setting this flag when using rclone mount is recommended if you want to +read the media. - rclone copy /path/to/images remote:album/images +Properties: - and the images directory contains +- Config: read_size +- Env Var: RCLONE_GPHOTOS_READ_SIZE +- Type: bool +- Default: false - images - file1.jpg dir file2.jpg dir2 dir3 file3.jpg +--gphotos-start-year - Then rclone will create the following albums with the following files in +Year limits the photos to be downloaded to those which are uploaded +after the given year. - - images - file1.jpg - images/dir - file2.jpg - images/dir2/dir3 - file3.jpg +Properties: - This means that you can use the album path pretty much like a normal filesystem and it is a good target for repeated syncing. +- Config: start_year +- Env Var: RCLONE_GPHOTOS_START_YEAR +- Type: int +- Default: 2000 - The shared-album directory shows albums shared with you or by you. This is similar to the Sharing tab in the Google Photos web interface. +--gphotos-include-archived - ### Standard options +Also view and download archived media. - Here are the Standard options specific to google photos (Google Photos). +By default, rclone does not request archived media. Thus, when syncing, +archived media is not visible in directory listings or transferred. - #### --gphotos-client-id +Note that media in albums is always visible and synced, no matter their +archive status. - OAuth Client Id. +With this flag, archived media are always visible in directory listings +and transferred. - Leave blank normally. +Without this flag, archived media will not be visible in directory +listings and won't be transferred. - Properties: +Properties: - - Config: client_id - Env Var: RCLONE_GPHOTOS_CLIENT_ID - Type: string - Required: false +- Config: include_archived +- Env Var: RCLONE_GPHOTOS_INCLUDE_ARCHIVED +- Type: bool +- Default: false - #### --gphotos-client-secret +--gphotos-encoding - OAuth Client Secret. +The encoding for the backend. - Leave blank normally. +See the encoding section in the overview for more info. - Properties: +Properties: - - Config: client_secret - Env Var: RCLONE_GPHOTOS_CLIENT_SECRET - Type: string - Required: false +- Config: encoding +- Env Var: RCLONE_GPHOTOS_ENCODING +- Type: Encoding +- Default: Slash,CrLf,InvalidUtf8,Dot - #### --gphotos-read-only +--gphotos-batch-mode - Set to make the Google Photos backend read only. +Upload file batching sync|async|off. - If you choose read only then rclone will only request read only access to your photos, otherwise rclone will request full access. +This sets the batch mode used by rclone. - Properties: +This has 3 possible values - - Config: read_only - Env Var: RCLONE_GPHOTOS_READ_ONLY - Type: bool - Default: false +- off - no batching +- sync - batch uploads and check completion (default) +- async - batch upload and don't check completion - ### Advanced options +Rclone will close any outstanding batches when it exits which may make a +delay on quit. - Here are the Advanced options specific to google photos (Google Photos). +Properties: - #### --gphotos-token +- Config: batch_mode +- Env Var: RCLONE_GPHOTOS_BATCH_MODE +- Type: string +- Default: "sync" - OAuth Access Token as a JSON blob. +--gphotos-batch-size - Properties: +Max number of files in upload batch. - - Config: token - Env Var: RCLONE_GPHOTOS_TOKEN - Type: string - Required: false +This sets the batch size of files to upload. It has to be less than 50. - #### --gphotos-auth-url +By default this is 0 which means rclone which calculate the batch size +depending on the setting of batch_mode. - Auth server URL. +- batch_mode: async - default batch_size is 50 +- batch_mode: sync - default batch_size is the same as --transfers +- batch_mode: off - not in use - Leave blank to use the provider defaults. +Rclone will close any outstanding batches when it exits which may make a +delay on quit. - Properties: +Setting this is a great idea if you are uploading lots of small files as +it will make them a lot quicker. You can use --transfers 32 to maximise +throughput. - - Config: auth_url - Env Var: RCLONE_GPHOTOS_AUTH_URL - Type: string - Required: false +Properties: - #### --gphotos-token-url +- Config: batch_size +- Env Var: RCLONE_GPHOTOS_BATCH_SIZE +- Type: int +- Default: 0 - Token server url. +--gphotos-batch-timeout - Leave blank to use the provider defaults. +Max time to allow an idle upload batch before uploading. - Properties: +If an upload batch is idle for more than this long then it will be +uploaded. - - Config: token_url - Env Var: RCLONE_GPHOTOS_TOKEN_URL - Type: string - Required: false +The default for this is 0 which means rclone will choose a sensible +default based on the batch_mode in use. - #### --gphotos-read-size +- batch_mode: async - default batch_timeout is 10s +- batch_mode: sync - default batch_timeout is 1s +- batch_mode: off - not in use - Set to read the size of media items. +Properties: - Normally rclone does not read the size of media items since this takes another transaction. This isn't necessary for syncing. However rclone mount needs to know the size of files in advance of reading them, so setting this flag when using rclone mount is recommended if you want to read the media. +- Config: batch_timeout +- Env Var: RCLONE_GPHOTOS_BATCH_TIMEOUT +- Type: Duration +- Default: 0s - Properties: +--gphotos-batch-commit-timeout - - Config: read_size - Env Var: RCLONE_GPHOTOS_READ_SIZE - Type: bool - Default: false +Max time to wait for a batch to finish committing - #### --gphotos-start-year +Properties: - Year limits the photos to be downloaded to those which are uploaded after the given year. +- Config: batch_commit_timeout +- Env Var: RCLONE_GPHOTOS_BATCH_COMMIT_TIMEOUT +- Type: Duration +- Default: 10m0s - Properties: +--gphotos-description - - Config: start_year - Env Var: RCLONE_GPHOTOS_START_YEAR - Type: int - Default: 2000 +Description of the remote. - #### --gphotos-include-archived +Properties: - Also view and download archived media. +- Config: description +- Env Var: RCLONE_GPHOTOS_DESCRIPTION +- Type: string +- Required: false - By default, rclone does not request archived media. Thus, when syncing, archived media is not visible in directory listings or transferred. +Limitations - Note that media in albums is always visible and synced, no matter their archive status. +Only images and videos can be uploaded. If you attempt to upload non +videos or images or formats that Google Photos doesn't understand, +rclone will upload the file, then Google Photos will give an error when +it is put turned into a media item. - With this flag, archived media are always visible in directory listings and transferred. +Note that all media items uploaded to Google Photos through the API are +stored in full resolution at "original quality" and will count towards +your storage quota in your Google Account. The API does not offer a way +to upload in "high quality" mode.. - Without this flag, archived media will not be visible in directory listings and won't be transferred. +rclone about is not supported by the Google Photos backend. Backends +without this capability cannot determine free space for an rclone mount +or use policy mfs (most free space) as a member of an rclone union +remote. - Properties: +See List of backends that do not support rclone about See rclone about - - Config: include_archived - Env Var: RCLONE_GPHOTOS_INCLUDE_ARCHIVED - Type: bool - Default: false +Downloading Images - #### --gphotos-encoding +When Images are downloaded this strips EXIF location (according to the +docs and my tests). This is a limitation of the Google Photos API and is +covered by bug #112096115. - The encoding for the backend. +The current google API does not allow photos to be downloaded at +original resolution. This is very important if you are, for example, +relying on "Google Photos" as a backup of your photos. You will not be +able to use rclone to redownload original images. You could use 'google +takeout' to recover the original photos as a last resort - See the encoding section in the overview for more info. +Downloading Videos - Properties: +When videos are downloaded they are downloaded in a really compressed +version of the video compared to downloading it via the Google Photos +web interface. This is covered by bug #113672044. - - Config: encoding - Env Var: RCLONE_GPHOTOS_ENCODING - Type: Encoding - Default: Slash,CrLf,InvalidUtf8,Dot +Duplicates - #### --gphotos-batch-mode +If a file name is duplicated in a directory then rclone will add the +file ID into its name. So two files called file.jpg would then appear as +file {123456}.jpg and file {ABCDEF}.jpg (the actual IDs are a lot longer +alas!). - Upload file batching sync|async|off. +If you upload the same image (with the same binary data) twice then +Google Photos will deduplicate it. However it will retain the filename +from the first upload which may confuse rclone. For example if you +uploaded an image to upload then uploaded the same image to +album/my_album the filename of the image in album/my_album will be what +it was uploaded with initially, not what you uploaded it with to album. +In practise this shouldn't cause too many problems. - This sets the batch mode used by rclone. +Modification times - This has 3 possible values +The date shown of media in Google Photos is the creation date as +determined by the EXIF information, or the upload date if that is not +known. - - off - no batching - sync - batch uploads and check completion (default) - async - batch upload and don't check completion +This is not changeable by rclone and is not the modification date of the +media on local disk. This means that rclone cannot use the dates from +Google Photos for syncing purposes. - Rclone will close any outstanding batches when it exits which may make a delay on quit. +Size - Properties: +The Google Photos API does not return the size of media. This means that +when syncing to Google Photos, rclone can only do a file existence +check. - - Config: batch_mode - Env Var: RCLONE_GPHOTOS_BATCH_MODE - Type: string - Default: "sync" +It is possible to read the size of the media, but this needs an extra +HTTP HEAD request per media item so is very slow and uses up a lot of +transactions. This can be enabled with the --gphotos-read-size option or +the read_size = true config parameter. - #### --gphotos-batch-size +If you want to use the backend with rclone mount you may need to enable +this flag (depending on your OS and application using the photos) +otherwise you may not be able to read media off the mount. You'll need +to experiment to see if it works for you without the flag. - Max number of files in upload batch. +Albums - This sets the batch size of files to upload. It has to be less than 50. +Rclone can only upload files to albums it created. This is a limitation +of the Google Photos API. - By default this is 0 which means rclone which calculate the batch size depending on the setting of batch_mode. +Rclone can remove files it uploaded from albums it created only. - - batch_mode: async - default batch_size is 50 - batch_mode: sync - default batch_size is the same as --transfers - batch_mode: off - not in use +Deleting files - Rclone will close any outstanding batches when it exits which may make a delay on quit. +Rclone can remove files from albums it created, but note that the Google +Photos API does not allow media to be deleted permanently so this media +will still remain. See bug #109759781. - Setting this is a great idea if you are uploading lots of small files as it will make them a lot quicker. You can use --transfers 32 to maximise throughput. +Rclone cannot delete files anywhere except under album. - Properties: +Deleting albums - - Config: batch_size - Env Var: RCLONE_GPHOTOS_BATCH_SIZE - Type: int - Default: 0 +The Google Photos API does not support deleting albums - see bug +#135714733. - #### --gphotos-batch-timeout +Hasher - Max time to allow an idle upload batch before uploading. +Hasher is a special overlay backend to create remotes which handle +checksums for other remotes. It's main functions include: - Emulate hash +types unimplemented by backends - Cache checksums to help with slow +hashing of large local or (S)FTP files - Warm up checksum cache from +external SUM files - If an upload batch is idle for more than this long then it will be uploaded. +Getting started - The default for this is 0 which means rclone will choose a sensible default based on the batch_mode in use. +To use Hasher, first set up the underlying remote following the +configuration instructions for that remote. You can also use a local +pathname instead of a remote. Check that your base remote is working. - - batch_mode: async - default batch_timeout is 10s - batch_mode: sync - default batch_timeout is 1s - batch_mode: off - not in use +Let's call the base remote myRemote:path here. Note that anything inside +myRemote:path will be handled by hasher and anything outside won't. This +means that if you are using a bucket based remote (S3, B2, Swift) then +you should put the bucket in the remote s3:bucket. - Properties: +Now proceed to interactive or manual configuration. - - Config: batch_timeout - Env Var: RCLONE_GPHOTOS_BATCH_TIMEOUT - Type: Duration - Default: 0s +Interactive configuration - #### --gphotos-batch-commit-timeout - - Max time to wait for a batch to finish committing - - Properties: - - - Config: batch_commit_timeout - Env Var: RCLONE_GPHOTOS_BATCH_COMMIT_TIMEOUT - Type: Duration - Default: 10m0s - - #### --gphotos-description - - Description of the remote - - Properties: - - - Config: description - Env Var: RCLONE_GPHOTOS_DESCRIPTION - Type: string - Required: false - - ## Limitations - - Only images and videos can be uploaded. If you attempt to upload non videos or images or formats that Google Photos doesn't understand, rclone will upload the file, then Google Photos will give an error when it is put turned into a media item. - - Note that all media items uploaded to Google Photos through the API are stored in full resolution at "original quality" and will count towards your storage quota in your Google Account. The API does not offer a way to upload in "high quality" mode.. - - rclone about is not supported by the Google Photos backend. Backends without this capability cannot determine free space for an rclone mount or use policy mfs (most free space) as a member of an rclone union remote. - - See List of backends that do not support rclone about See rclone about - - ### Downloading Images - - When Images are downloaded this strips EXIF location (according to the docs and my tests). This is a limitation of the Google Photos API and is covered by bug #112096115. - - The current google API does not allow photos to be downloaded at original resolution. This is very important if you are, for example, relying on "Google Photos" as a backup of your photos. You will not be able to use rclone to redownload original images. You could use 'google takeout' to recover the original photos as a last resort - - ### Downloading Videos - - When videos are downloaded they are downloaded in a really compressed version of the video compared to downloading it via the Google Photos web interface. This is covered by bug #113672044. - - ### Duplicates - - If a file name is duplicated in a directory then rclone will add the file ID into its name. So two files called file.jpg would then appear as file {123456}.jpg and file {ABCDEF}.jpg (the actual IDs are a lot longer alas!). - - If you upload the same image (with the same binary data) twice then Google Photos will deduplicate it. However it will retain the filename from the first upload which may confuse rclone. For example if you uploaded an image to upload then uploaded the same image to album/my_album the filename of the image in album/my_album will be what it was uploaded with initially, not what you uploaded it with to album. In practise this shouldn't cause - too many problems. - - ### Modification times - - The date shown of media in Google Photos is the creation date as determined by the EXIF information, or the upload date if that is not known. - - This is not changeable by rclone and is not the modification date of the media on local disk. This means that rclone cannot use the dates from Google Photos for syncing purposes. - - ### Size - - The Google Photos API does not return the size of media. This means that when syncing to Google Photos, rclone can only do a file existence check. - - It is possible to read the size of the media, but this needs an extra HTTP HEAD request per media item so is very slow and uses up a lot of transactions. This can be enabled with the --gphotos-read-size option or the read_size = true config parameter. - - If you want to use the backend with rclone mount you may need to enable this flag (depending on your OS and application using the photos) otherwise you may not be able to read media off the mount. You'll need to experiment to see if it works for you without the flag. - - ### Albums - - Rclone can only upload files to albums it created. This is a limitation of the Google Photos API. - - Rclone can remove files it uploaded from albums it created only. - - ### Deleting files - - Rclone can remove files from albums it created, but note that the Google Photos API does not allow media to be deleted permanently so this media will still remain. See bug #109759781. - - Rclone cannot delete files anywhere except under album. - - ### Deleting albums - - The Google Photos API does not support deleting albums - see bug #135714733. - - # Hasher - - Hasher is a special overlay backend to create remotes which handle checksums for other remotes. It's main functions include: - Emulate hash types unimplemented by backends - Cache checksums to help with slow hashing of large local or (S)FTP files - Warm up checksum cache from external SUM files - - ## Getting started - - To use Hasher, first set up the underlying remote following the configuration instructions for that remote. You can also use a local pathname instead of a remote. Check that your base remote is working. - - Let's call the base remote myRemote:path here. Note that anything inside myRemote:path will be handled by hasher and anything outside won't. This means that if you are using a bucket based remote (S3, B2, Swift) then you should put the bucket in the remote s3:bucket. - - Now proceed to interactive or manual configuration. - - ### Interactive configuration - - Run rclone config: ``` No remotes found, make a new one? n) New remote s) Set configuration password q) Quit config n/s/q> n name> Hasher1 Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / Handle checksums for other remotes  "hasher" [snip] Storage> hasher Remote to cache checksums for, like myremote:mypath. Enter a string value. Press Enter for the default (""). remote> myRemote:path Comma - separated list of supported checksum types. Enter a string value. Press Enter for the default ("md5,sha1"). hashsums> md5 Maximum time to keep checksums in cache. 0 = no cache, off = cache forever. max_age> off Edit advanced config? (y/n) y) Yes n) No y/n> n Remote config - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -[Hasher1] type = hasher remote = myRemote:path hashsums = md5 max_age = -off -------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y - - - ### Manual configuration - - Run `rclone config path` to see the path of current active config file, - usually `YOURHOME/.config/rclone/rclone.conf`. - Open it in your favorite text editor, find section for the base remote - and create new section for hasher like in the following examples: - -[Hasher1] type = hasher remote = myRemote:path hashes = md5 max_age = -off - -[Hasher2] type = hasher remote = /local/path hashes = dropbox,sha1 -max_age = 24h - - - Hasher takes basically the following parameters: - - `remote` is required, - - `hashes` is a comma separated list of supported checksums - (by default `md5,sha1`), - - `max_age` - maximum time to keep a checksum value in the cache, - `0` will disable caching completely, - `off` will cache "forever" (that is until the files get changed). - - Make sure the `remote` has `:` (colon) in. If you specify the remote without - a colon then rclone will use a local directory of that name. So if you use - a remote of `/local/path` then rclone will handle hashes for that directory. - If you use `remote = name` literally then rclone will put files - **in a directory called `name` located under current directory**. - - ## Usage - - ### Basic operations - - Now you can use it as `Hasher2:subdir/file` instead of base remote. - Hasher will transparently update cache with new checksums when a file - is fully read or overwritten, like: - -rclone copy External:path/file Hasher:dest/path - -rclone cat Hasher:path/to/file > /dev/null - - - The way to refresh **all** cached checksums (even unsupported by the base backend) - for a subtree is to **re-download** all files in the subtree. For example, - use `hashsum --download` using **any** supported hashsum on the command line - (we just care to re-read): - -rclone hashsum MD5 --download Hasher:path/to/subtree > /dev/null - -rclone backend dump Hasher:path/to/subtree - - - You can print or drop hashsum cache using custom backend commands: - -rclone backend dump Hasher:dir/subdir - -rclone backend drop Hasher: - - - ### Pre-Seed from a SUM File - - Hasher supports two backend commands: generic SUM file `import` and faster - but less consistent `stickyimport`. - -rclone backend import Hasher:dir/subdir SHA1 /path/to/SHA1SUM -[--checkers 4] - - - Instead of SHA1 it can be any hash supported by the remote. The last argument - can point to either a local or an `other-remote:path` text file in SUM format. - The command will parse the SUM file, then walk down the path given by the - first argument, snapshot current fingerprints and fill in the cache entries - correspondingly. - - Paths in the SUM file are treated as relative to `hasher:dir/subdir`. - - The command will **not** check that supplied values are correct. - You **must know** what you are doing. - - This is a one-time action. The SUM file will not get "attached" to the - remote. Cache entries can still be overwritten later, should the object's - fingerprint change. - - The tree walk can take long depending on the tree size. You can increase - `--checkers` to make it faster. Or use `stickyimport` if you don't care - about fingerprints and consistency. - -rclone backend stickyimport hasher:path/to/data sha1 -remote:/path/to/sum.sha1 - - - `stickyimport` is similar to `import` but works much faster because it - does not need to stat existing files and skips initial tree walk. - Instead of binding cache entries to file fingerprints it creates _sticky_ - entries bound to the file name alone ignoring size, modification time etc. - Such hash entries can be replaced only by `purge`, `delete`, `backend drop` - or by full re-read/re-write of the files. - - ## Configuration reference - - - ### Standard options - - Here are the Standard options specific to hasher (Better checksums for other remotes). - - #### --hasher-remote - - Remote to cache checksums for (e.g. myRemote:path). - - Properties: - - - Config: remote - - Env Var: RCLONE_HASHER_REMOTE - - Type: string - - Required: true - - #### --hasher-hashes +Run rclone config: + No remotes found, make a new one? + n) New remote + s) Set configuration password + q) Quit config + n/s/q> n + name> Hasher1 + Type of storage to configure. + Choose a number from below, or type in your own value + [snip] + XX / Handle checksums for other remotes + \ "hasher" + [snip] + Storage> hasher + Remote to cache checksums for, like myremote:mypath. + Enter a string value. Press Enter for the default (""). + remote> myRemote:path Comma separated list of supported checksum types. + Enter a string value. Press Enter for the default ("md5,sha1"). + hashsums> md5 + Maximum time to keep checksums in cache. 0 = no cache, off = cache forever. + max_age> off + Edit advanced config? (y/n) + y) Yes + n) No + y/n> n + Remote config + -------------------- + [Hasher1] + type = hasher + remote = myRemote:path + hashsums = md5 + max_age = off + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y - Properties: +Manual configuration - - Config: hashes - - Env Var: RCLONE_HASHER_HASHES - - Type: CommaSepList - - Default: md5,sha1 +Run rclone config path to see the path of current active config file, +usually YOURHOME/.config/rclone/rclone.conf. Open it in your favorite +text editor, find section for the base remote and create new section for +hasher like in the following examples: - #### --hasher-max-age + [Hasher1] + type = hasher + remote = myRemote:path + hashes = md5 + max_age = off - Maximum time to keep checksums in cache (0 = no cache, off = cache forever). + [Hasher2] + type = hasher + remote = /local/path + hashes = dropbox,sha1 + max_age = 24h - Properties: +Hasher takes basically the following parameters: - remote is required, - +hashes is a comma separated list of supported checksums (by default +md5,sha1), - max_age - maximum time to keep a checksum value in the +cache, 0 will disable caching completely, off will cache "forever" (that +is until the files get changed). - - Config: max_age - - Env Var: RCLONE_HASHER_MAX_AGE - - Type: Duration - - Default: off +Make sure the remote has : (colon) in. If you specify the remote without +a colon then rclone will use a local directory of that name. So if you +use a remote of /local/path then rclone will handle hashes for that +directory. If you use remote = name literally then rclone will put files +in a directory called name located under current directory. - ### Advanced options +Usage - Here are the Advanced options specific to hasher (Better checksums for other remotes). +Basic operations - #### --hasher-auto-size +Now you can use it as Hasher2:subdir/file instead of base remote. Hasher +will transparently update cache with new checksums when a file is fully +read or overwritten, like: - Auto-update checksum for files smaller than this size (disabled by default). + rclone copy External:path/file Hasher:dest/path - Properties: + rclone cat Hasher:path/to/file > /dev/null - - Config: auto_size - - Env Var: RCLONE_HASHER_AUTO_SIZE - - Type: SizeSuffix - - Default: 0 +The way to refresh all cached checksums (even unsupported by the base +backend) for a subtree is to re-download all files in the subtree. For +example, use hashsum --download using any supported hashsum on the +command line (we just care to re-read): - #### --hasher-description + rclone hashsum MD5 --download Hasher:path/to/subtree > /dev/null - Description of the remote + rclone backend dump Hasher:path/to/subtree - Properties: +You can print or drop hashsum cache using custom backend commands: - - Config: description - - Env Var: RCLONE_HASHER_DESCRIPTION - - Type: string - - Required: false + rclone backend dump Hasher:dir/subdir - ### Metadata + rclone backend drop Hasher: - Any metadata supported by the underlying remote is read and written. +Pre-Seed from a SUM File - See the [metadata](https://rclone.org/docs/#metadata) docs for more info. +Hasher supports two backend commands: generic SUM file import and faster +but less consistent stickyimport. - ## Backend commands + rclone backend import Hasher:dir/subdir SHA1 /path/to/SHA1SUM [--checkers 4] - Here are the commands specific to the hasher backend. +Instead of SHA1 it can be any hash supported by the remote. The last +argument can point to either a local or an other-remote:path text file +in SUM format. The command will parse the SUM file, then walk down the +path given by the first argument, snapshot current fingerprints and fill +in the cache entries correspondingly. - Paths in the SUM file are +treated as relative to hasher:dir/subdir. - The command will not check +that supplied values are correct. You must know what you are doing. - +This is a one-time action. The SUM file will not get "attached" to the +remote. Cache entries can still be overwritten later, should the +object's fingerprint change. - The tree walk can take long depending on +the tree size. You can increase --checkers to make it faster. Or use +stickyimport if you don't care about fingerprints and consistency. - Run them with + rclone backend stickyimport hasher:path/to/data sha1 remote:/path/to/sum.sha1 - rclone backend COMMAND remote: +stickyimport is similar to import but works much faster because it does +not need to stat existing files and skips initial tree walk. Instead of +binding cache entries to file fingerprints it creates sticky entries +bound to the file name alone ignoring size, modification time etc. Such +hash entries can be replaced only by purge, delete, backend drop or by +full re-read/re-write of the files. - The help below will explain what arguments each command takes. +Configuration reference - See the [backend](https://rclone.org/commands/rclone_backend/) command for more - info on how to pass options and arguments. +Standard options - These can be run on a running backend using the rc command - [backend/command](https://rclone.org/rc/#backend-command). +Here are the Standard options specific to hasher (Better checksums for +other remotes). - ### drop +--hasher-remote - Drop cache +Remote to cache checksums for (e.g. myRemote:path). - rclone backend drop remote: [options] [+] +Properties: - Completely drop checksum cache. - Usage Example: - rclone backend drop hasher: +- Config: remote +- Env Var: RCLONE_HASHER_REMOTE +- Type: string +- Required: true +--hasher-hashes - ### dump +Comma separated list of supported checksum types. - Dump the database +Properties: - rclone backend dump remote: [options] [+] +- Config: hashes +- Env Var: RCLONE_HASHER_HASHES +- Type: CommaSepList +- Default: md5,sha1 - Dump cache records covered by the current remote +--hasher-max-age - ### fulldump +Maximum time to keep checksums in cache (0 = no cache, off = cache +forever). - Full dump of the database +Properties: - rclone backend fulldump remote: [options] [+] +- Config: max_age +- Env Var: RCLONE_HASHER_MAX_AGE +- Type: Duration +- Default: off - Dump all cache records in the database +Advanced options - ### import +Here are the Advanced options specific to hasher (Better checksums for +other remotes). - Import a SUM file +--hasher-auto-size - rclone backend import remote: [options] [+] +Auto-update checksum for files smaller than this size (disabled by +default). - Amend hash cache from a SUM file and bind checksums to files by size/time. - Usage Example: - rclone backend import hasher:subdir md5 /path/to/sum.md5 +Properties: +- Config: auto_size +- Env Var: RCLONE_HASHER_AUTO_SIZE +- Type: SizeSuffix +- Default: 0 - ### stickyimport +--hasher-description - Perform fast import of a SUM file +Description of the remote. - rclone backend stickyimport remote: [options] [+] +Properties: - Fill hash cache from a SUM file without verifying file fingerprints. - Usage Example: - rclone backend stickyimport hasher:subdir md5 remote:path/to/sum.md5 +- Config: description +- Env Var: RCLONE_HASHER_DESCRIPTION +- Type: string +- Required: false +Metadata +Any metadata supported by the underlying remote is read and written. +See the metadata docs for more info. - ## Implementation details (advanced) +Backend commands - This section explains how various rclone operations work on a hasher remote. +Here are the commands specific to the hasher backend. - **Disclaimer. This section describes current implementation which can - change in future rclone versions!.** +Run them with - ### Hashsum command + rclone backend COMMAND remote: - The `rclone hashsum` (or `md5sum` or `sha1sum`) command will: +The help below will explain what arguments each command takes. - 1. if requested hash is supported by lower level, just pass it. - 2. if object size is below `auto_size` then download object and calculate - _requested_ hashes on the fly. - 3. if unsupported and the size is big enough, build object `fingerprint` - (including size, modtime if supported, first-found _other_ hash if any). - 4. if the strict match is found in cache for the requested remote, return - the stored hash. - 5. if remote found but fingerprint mismatched, then purge the entry and - proceed to step 6. - 6. if remote not found or had no requested hash type or after step 5: - download object, calculate all _supported_ hashes on the fly and store - in cache; return requested hash. +See the backend command for more info on how to pass options and +arguments. - ### Other operations +These can be run on a running backend using the rc command +backend/command. - - whenever a file is uploaded or downloaded **in full**, capture the stream - to calculate all supported hashes on the fly and update database - - server-side `move` will update keys of existing cache entries - - `deletefile` will remove a single cache entry - - `purge` will remove all cache entries under the purged path +drop - Note that setting `max_age = 0` will disable checksum caching completely. +Drop cache - If you set `max_age = off`, checksums in cache will never age, unless you - fully rewrite or delete the file. + rclone backend drop remote: [options] [+] - ### Cache storage +Completely drop checksum cache. Usage Example: rclone backend drop +hasher: - Cached checksums are stored as `bolt` database files under rclone cache - directory, usually `~/.cache/rclone/kv/`. Databases are maintained - one per _base_ backend, named like `BaseRemote~hasher.bolt`. - Checksums for multiple `alias`-es into a single base backend - will be stored in the single database. All local paths are treated as - aliases into the `local` backend (unless encrypted or chunked) and stored - in `~/.cache/rclone/kv/local~hasher.bolt`. - Databases can be shared between multiple rclone processes. +dump - # HDFS +Dump the database - [HDFS](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html) is a - distributed file-system, part of the [Apache Hadoop](https://hadoop.apache.org/) framework. + rclone backend dump remote: [options] [+] - Paths are specified as `remote:` or `remote:path/to/dir`. +Dump cache records covered by the current remote - ## Configuration +fulldump - Here is an example of how to make a remote called `remote`. First run: +Full dump of the database - rclone config + rclone backend fulldump remote: [options] [+] - This will guide you through an interactive setup process: +Dump all cache records in the database -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. Enter a string value. Press Enter for the default (""). -Choose a number from below, or type in your own value [skip] XX / Hadoop -distributed file system  "hdfs" [skip] Storage> hdfs ** See help for -hdfs backend at: https://rclone.org/hdfs/ ** +import -hadoop name node and port Enter a string value. Press Enter for the -default (""). Choose a number from below, or type in your own value 1 / -Connect to host namenode at port 8020  "namenode:8020" namenode> -namenode.hadoop:8020 hadoop user name Enter a string value. Press Enter -for the default (""). Choose a number from below, or type in your own -value 1 / Connect to hdfs as root  "root" username> root Edit advanced -config? (y/n) y) Yes n) No (default) y/n> n Remote config --------------------- [remote] type = hdfs namenode = -namenode.hadoop:8020 username = root -------------------- y) Yes this is -OK (default) e) Edit this remote d) Delete this remote y/e/d> y Current -remotes: +Import a SUM file -Name Type ==== ==== hadoop hdfs + rclone backend import remote: [options] [+] -e) Edit existing remote -f) New remote -g) Delete remote -h) Rename remote -i) Copy remote -j) Set configuration password -k) Quit config e/n/d/r/c/s/q> q +Amend hash cache from a SUM file and bind checksums to files by +size/time. Usage Example: rclone backend import hasher:subdir md5 +/path/to/sum.md5 +stickyimport - This remote is called `remote` and can now be used like this +Perform fast import of a SUM file - See all the top level directories + rclone backend stickyimport remote: [options] [+] - rclone lsd remote: +Fill hash cache from a SUM file without verifying file fingerprints. +Usage Example: rclone backend stickyimport hasher:subdir md5 +remote:path/to/sum.md5 - List the contents of a directory +Implementation details (advanced) - rclone ls remote:directory +This section explains how various rclone operations work on a hasher +remote. - Sync the remote `directory` to `/home/local/directory`, deleting any excess files. +Disclaimer. This section describes current implementation which can +change in future rclone versions!. - rclone sync --interactive remote:directory /home/local/directory +Hashsum command - ### Setting up your own HDFS instance for testing +The rclone hashsum (or md5sum or sha1sum) command will: - You may start with a [manual setup](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html) - or use the docker image from the tests: +1. if requested hash is supported by lower level, just pass it. +2. if object size is below auto_size then download object and calculate + requested hashes on the fly. +3. if unsupported and the size is big enough, build object fingerprint + (including size, modtime if supported, first-found other hash if + any). +4. if the strict match is found in cache for the requested remote, + return the stored hash. +5. if remote found but fingerprint mismatched, then purge the entry and + proceed to step 6. +6. if remote not found or had no requested hash type or after step 5: + download object, calculate all supported hashes on the fly and store + in cache; return requested hash. - If you want to build the docker image +Other operations -git clone https://github.com/rclone/rclone.git cd -rclone/fstest/testserver/images/test-hdfs docker build --rm -t -rclone/test-hdfs . +- whenever a file is uploaded or downloaded in full, capture the + stream to calculate all supported hashes on the fly and update + database +- server-side move will update keys of existing cache entries +- deletefile will remove a single cache entry +- purge will remove all cache entries under the purged path +Note that setting max_age = 0 will disable checksum caching completely. - Or you can just use the latest one pushed +If you set max_age = off, checksums in cache will never age, unless you +fully rewrite or delete the file. -docker run --rm --name "rclone-hdfs" -p 127.0.0.1:9866:9866 -p -127.0.0.1:8020:8020 --hostname "rclone-hdfs" rclone/test-hdfs +Cache storage +Cached checksums are stored as bolt database files under rclone cache +directory, usually ~/.cache/rclone/kv/. Databases are maintained one per +base backend, named like BaseRemote~hasher.bolt. Checksums for multiple +alias-es into a single base backend will be stored in the single +database. All local paths are treated as aliases into the local backend +(unless encrypted or chunked) and stored in +~/.cache/rclone/kv/local~hasher.bolt. Databases can be shared between +multiple rclone processes. - **NB** it need few seconds to startup. +HDFS - For this docker image the remote needs to be configured like this: +HDFS is a distributed file-system, part of the Apache Hadoop framework. -[remote] type = hdfs namenode = 127.0.0.1:8020 username = root +Paths are specified as remote: or remote:path/to/dir. +Configuration - You can stop this image with `docker kill rclone-hdfs` (**NB** it does not use volumes, so all data - uploaded will be lost.) +Here is an example of how to make a remote called remote. First run: - ### Modification times + rclone config - Time accurate to 1 second is stored. +This will guide you through an interactive setup process: - ### Checksum + 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. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + [skip] + XX / Hadoop distributed file system + \ "hdfs" + [skip] + Storage> hdfs + ** See help for hdfs backend at: https://rclone.org/hdfs/ ** - No checksums are implemented. + hadoop name node and port + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + 1 / Connect to host namenode at port 8020 + \ "namenode:8020" + namenode> namenode.hadoop:8020 + hadoop user name + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + 1 / Connect to hdfs as root + \ "root" + username> root + Edit advanced config? (y/n) + y) Yes + n) No (default) + y/n> n + Remote config + -------------------- + [remote] + type = hdfs + namenode = namenode.hadoop:8020 + username = root + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y + Current remotes: - ### Usage information + Name Type + ==== ==== + hadoop hdfs - You can use the `rclone about remote:` command which will display filesystem size and current usage. + 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 - ### Restricted filename characters +This remote is called remote and can now be used like this - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: +See all the top level directories - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | : | 0x3A | : | + rclone lsd remote: - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8). +List the contents of a directory + rclone ls remote:directory - ### Standard options +Sync the remote directory to /home/local/directory, deleting any excess +files. - Here are the Standard options specific to hdfs (Hadoop distributed file system). + rclone sync --interactive remote:directory /home/local/directory - #### --hdfs-namenode +Setting up your own HDFS instance for testing - Hadoop name nodes and ports. +You may start with a manual setup or use the docker image from the +tests: - E.g. "namenode-1:8020,namenode-2:8020,..." to connect to host namenodes at port 8020. +If you want to build the docker image - Properties: + git clone https://github.com/rclone/rclone.git + cd rclone/fstest/testserver/images/test-hdfs + docker build --rm -t rclone/test-hdfs . - - Config: namenode - - Env Var: RCLONE_HDFS_NAMENODE - - Type: CommaSepList - - Default: +Or you can just use the latest one pushed - #### --hdfs-username + docker run --rm --name "rclone-hdfs" -p 127.0.0.1:9866:9866 -p 127.0.0.1:8020:8020 --hostname "rclone-hdfs" rclone/test-hdfs - Hadoop user name. +NB it need few seconds to startup. - Properties: +For this docker image the remote needs to be configured like this: - - Config: username - - Env Var: RCLONE_HDFS_USERNAME - - Type: string - - Required: false - - Examples: - - "root" - - Connect to hdfs as root. + [remote] + type = hdfs + namenode = 127.0.0.1:8020 + username = root - ### Advanced options +You can stop this image with docker kill rclone-hdfs (NB it does not use +volumes, so all data uploaded will be lost.) - Here are the Advanced options specific to hdfs (Hadoop distributed file system). +Modification times - #### --hdfs-service-principal-name +Time accurate to 1 second is stored. - Kerberos service principal name for the namenode. +Checksum - Enables KERBEROS authentication. Specifies the Service Principal Name - (SERVICE/FQDN) for the namenode. E.g. \"hdfs/namenode.hadoop.docker\" - for namenode running as service 'hdfs' with FQDN 'namenode.hadoop.docker'. +No checksums are implemented. - Properties: +Usage information - - Config: service_principal_name - - Env Var: RCLONE_HDFS_SERVICE_PRINCIPAL_NAME - - Type: string - - Required: false +You can use the rclone about remote: command which will display +filesystem size and current usage. - #### --hdfs-data-transfer-protection +Restricted filename characters - Kerberos data transfer protection: authentication|integrity|privacy. +In addition to the default restricted characters set the following +characters are also replaced: - Specifies whether or not authentication, data signature integrity - checks, and wire encryption are required when communicating with - the datanodes. Possible values are 'authentication', 'integrity' - and 'privacy'. Used only with KERBEROS enabled. + Character Value Replacement + ----------- ------- ------------- + : 0x3A : - Properties: +Invalid UTF-8 bytes will also be replaced. - - Config: data_transfer_protection - - Env Var: RCLONE_HDFS_DATA_TRANSFER_PROTECTION - - Type: string - - Required: false - - Examples: - - "privacy" - - Ensure authentication, integrity and encryption enabled. +Standard options - #### --hdfs-encoding +Here are the Standard options specific to hdfs (Hadoop distributed file +system). - The encoding for the backend. +--hdfs-namenode - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +Hadoop name nodes and ports. - Properties: +E.g. "namenode-1:8020,namenode-2:8020,..." to connect to host namenodes +at port 8020. - - Config: encoding - - Env Var: RCLONE_HDFS_ENCODING - - Type: Encoding - - Default: Slash,Colon,Del,Ctl,InvalidUtf8,Dot +Properties: - #### --hdfs-description +- Config: namenode +- Env Var: RCLONE_HDFS_NAMENODE +- Type: CommaSepList +- Default: - Description of the remote +--hdfs-username - Properties: +Hadoop user name. - - Config: description - - Env Var: RCLONE_HDFS_DESCRIPTION - - Type: string - - Required: false +Properties: +- Config: username +- Env Var: RCLONE_HDFS_USERNAME +- Type: string +- Required: false +- Examples: + - "root" + - Connect to hdfs as root. +Advanced options - ## Limitations +Here are the Advanced options specific to hdfs (Hadoop distributed file +system). - - No server-side `Move` or `DirMove`. - - Checksums not implemented. +--hdfs-service-principal-name - # HiDrive +Kerberos service principal name for the namenode. - Paths are specified as `remote:path` +Enables KERBEROS authentication. Specifies the Service Principal Name +(SERVICE/FQDN) for the namenode. E.g. "hdfs/namenode.hadoop.docker" for +namenode running as service 'hdfs' with FQDN 'namenode.hadoop.docker'. - Paths may be as deep as required, e.g. `remote:directory/subdirectory`. +Properties: - The initial setup for hidrive involves getting a token from HiDrive - which you need to do in your browser. - `rclone config` walks you through it. +- Config: service_principal_name +- Env Var: RCLONE_HDFS_SERVICE_PRINCIPAL_NAME +- Type: string +- Required: false - ## Configuration +--hdfs-data-transfer-protection - Here is an example of how to make a remote called `remote`. First run: +Kerberos data transfer protection: authentication|integrity|privacy. - rclone config +Specifies whether or not authentication, data signature integrity +checks, and wire encryption are required when communicating with the +datanodes. Possible values are 'authentication', 'integrity' and +'privacy'. Used only with KERBEROS enabled. - This will guide you through an interactive setup process: +Properties: -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 [snip] -XX / HiDrive  "hidrive" [snip] Storage> hidrive OAuth Client Id - Leave -blank normally. client_id> OAuth Client Secret - Leave blank normally. -client_secret> Access permissions that rclone should use when requesting -access from HiDrive. Leave blank normally. scope_access> Edit advanced -config? y/n> n Use web browser to automatically authenticate rclone with -remote? * Say Y if the machine running rclone has a web browser you can -use * Say N if running rclone on a (remote) machine without web browser -access If not sure try Y. If Y failed, try N. y/n> y If your browser -doesn't open automatically go to the following link: -http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx Log in and -authorize rclone for access Waiting for code... Got code --------------------- [remote] type = hidrive token = -{"access_token":"xxxxxxxxxxxxxxxxxxxx","token_type":"Bearer","refresh_token":"xxxxxxxxxxxxxxxxxxxxxxx","expiry":"xxxxxxxxxxxxxxxxxxxxxxx"} --------------------- y) Yes this is OK (default) e) Edit this remote d) -Delete this remote y/e/d> y +- Config: data_transfer_protection +- Env Var: RCLONE_HDFS_DATA_TRANSFER_PROTECTION +- Type: string +- Required: false +- Examples: + - "privacy" + - Ensure authentication, integrity and encryption enabled. +--hdfs-encoding - **You should be aware that OAuth-tokens can be used to access your account - and hence should not be shared with other persons.** - See the [below section](#keeping-your-tokens-safe) for more information. +The encoding for the backend. - See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a - machine with no Internet browser available. +See the encoding section in the overview for more info. - Note that rclone runs a webserver on your local machine to collect the - token as returned from HiDrive. This only runs from the moment it opens - your browser to the moment you get back the verification code. - The webserver runs on `http://127.0.0.1:53682/`. - If local port `53682` is protected by a firewall you may need to temporarily - unblock the firewall to complete authorization. +Properties: - Once configured you can then use `rclone` like this, +- Config: encoding +- Env Var: RCLONE_HDFS_ENCODING +- Type: Encoding +- Default: Slash,Colon,Del,Ctl,InvalidUtf8,Dot - List directories in top level of your HiDrive root folder +--hdfs-description - rclone lsd remote: +Description of the remote. - List all the files in your HiDrive filesystem +Properties: - rclone ls remote: +- Config: description +- Env Var: RCLONE_HDFS_DESCRIPTION +- Type: string +- Required: false - To copy a local directory to a HiDrive directory called backup +Limitations - rclone copy /home/source remote:backup +- No server-side Move or DirMove. +- Checksums not implemented. - ### Keeping your tokens safe +HiDrive - Any OAuth-tokens will be stored by rclone in the remote's configuration file as unencrypted text. - Anyone can use a valid refresh-token to access your HiDrive filesystem without knowing your password. - Therefore you should make sure no one else can access your configuration. +Paths are specified as remote:path - It is possible to encrypt rclone's configuration file. - You can find information on securing your configuration file by viewing the [configuration encryption docs](https://rclone.org/docs/#configuration-encryption). +Paths may be as deep as required, e.g. remote:directory/subdirectory. - ### Invalid refresh token +The initial setup for hidrive involves getting a token from HiDrive +which you need to do in your browser. rclone config walks you through +it. - As can be verified [here](https://developer.hidrive.com/basics-flows/), - each `refresh_token` (for Native Applications) is valid for 60 days. - If used to access HiDrivei, its validity will be automatically extended. +Configuration - This means that if you +Here is an example of how to make a remote called remote. First run: - * Don't use the HiDrive remote for 60 days + rclone config - then rclone will return an error which includes a text - that implies the refresh token is *invalid* or *expired*. - - To fix this you will need to authorize rclone to access your HiDrive account again. - - Using - - rclone config reconnect remote: - - the process is very similar to the process of initial setup exemplified before. - - ### Modification times and hashes - - HiDrive allows modification times to be set on objects accurate to 1 second. - - HiDrive supports [its own hash type](https://static.hidrive.com/dev/0001) - which is used to verify the integrity of file contents after successful transfers. - - ### Restricted filename characters - - HiDrive cannot store files or folders that include - `/` (0x2F) or null-bytes (0x00) in their name. - Any other characters can be used in the names of files or folders. - Additionally, files or folders cannot be named either of the following: `.` or `..` - - Therefore rclone will automatically replace these characters, - if files or folders are stored or accessed with such names. - - You can read about how this filename encoding works in general - [here](overview/#restricted-filenames). - - Keep in mind that HiDrive only supports file or folder names - with a length of 255 characters or less. - - ### Transfers - - HiDrive limits file sizes per single request to a maximum of 2 GiB. - To allow storage of larger files and allow for better upload performance, - the hidrive backend will use a chunked transfer for files larger than 96 MiB. - Rclone will upload multiple parts/chunks of the file at the same time. - Chunks in the process of being uploaded are buffered in memory, - so you may want to restrict this behaviour on systems with limited resources. - - You can customize this behaviour using the following options: - - * `chunk_size`: size of file parts - * `upload_cutoff`: files larger or equal to this in size will use a chunked transfer - * `upload_concurrency`: number of file-parts to upload at the same time - - See the below section about configuration options for more details. - - ### Root folder - - You can set the root folder for rclone. - This is the directory that rclone considers to be the root of your HiDrive. - - Usually, you will leave this blank, and rclone will use the root of the account. - - However, you can set this to restrict rclone to a specific folder hierarchy. - - This works by prepending the contents of the `root_prefix` option - to any paths accessed by rclone. - For example, the following two ways to access the home directory are equivalent: - - rclone lsd --hidrive-root-prefix="/users/test/" remote:path - - rclone lsd remote:/users/test/path - - See the below section about configuration options for more details. - - ### Directory member count - - By default, rclone will know the number of directory members contained in a directory. - For example, `rclone lsd` uses this information. - - The acquisition of this information will result in additional time costs for HiDrive's API. - When dealing with large directory structures, it may be desirable to circumvent this time cost, - especially when this information is not explicitly needed. - For this, the `disable_fetching_member_count` option can be used. - - See the below section about configuration options for more details. - - - ### Standard options - - Here are the Standard options specific to hidrive (HiDrive). - - #### --hidrive-client-id - - OAuth Client Id. - - Leave blank normally. - - Properties: - - - Config: client_id - - Env Var: RCLONE_HIDRIVE_CLIENT_ID - - Type: string - - Required: false - - #### --hidrive-client-secret - - OAuth Client Secret. - - Leave blank normally. - - Properties: - - - Config: client_secret - - Env Var: RCLONE_HIDRIVE_CLIENT_SECRET - - Type: string - - Required: false - - #### --hidrive-scope-access +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 + [snip] + XX / HiDrive + \ "hidrive" + [snip] + Storage> hidrive + OAuth Client Id - Leave blank normally. + client_id> + OAuth Client Secret - Leave blank normally. + client_secret> Access permissions that rclone should use when requesting access from HiDrive. + Leave blank normally. + scope_access> + Edit advanced config? + y/n> n + Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access + If not sure try Y. If Y failed, try N. + y/n> y + If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx + Log in and authorize rclone for access + Waiting for code... + Got code + -------------------- + [remote] + type = hidrive + token = {"access_token":"xxxxxxxxxxxxxxxxxxxx","token_type":"Bearer","refresh_token":"xxxxxxxxxxxxxxxxxxxxxxx","expiry":"xxxxxxxxxxxxxxxxxxxxxxx"} + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y - Properties: +You should be aware that OAuth-tokens can be used to access your account +and hence should not be shared with other persons. See the below section +for more information. - - Config: scope_access - - Env Var: RCLONE_HIDRIVE_SCOPE_ACCESS - - Type: string - - Default: "rw" - - Examples: - - "rw" - - Read and write access to resources. - - "ro" - - Read-only access to resources. +See the remote setup docs for how to set it up on a machine with no +Internet browser available. - ### Advanced options +Note that rclone runs a webserver on your local machine to collect the +token as returned from HiDrive. This only runs from the moment it opens +your browser to the moment you get back the verification code. The +webserver runs on http://127.0.0.1:53682/. If local port 53682 is +protected by a firewall you may need to temporarily unblock the firewall +to complete authorization. - Here are the Advanced options specific to hidrive (HiDrive). +Once configured you can then use rclone like this, - #### --hidrive-token +List directories in top level of your HiDrive root folder - OAuth Access Token as a JSON blob. + rclone lsd remote: - Properties: +List all the files in your HiDrive filesystem - - Config: token - - Env Var: RCLONE_HIDRIVE_TOKEN - - Type: string - - Required: false + rclone ls remote: - #### --hidrive-auth-url +To copy a local directory to a HiDrive directory called backup - Auth server URL. + rclone copy /home/source remote:backup - Leave blank to use the provider defaults. +Keeping your tokens safe - Properties: +Any OAuth-tokens will be stored by rclone in the remote's configuration +file as unencrypted text. Anyone can use a valid refresh-token to access +your HiDrive filesystem without knowing your password. Therefore you +should make sure no one else can access your configuration. - - Config: auth_url - - Env Var: RCLONE_HIDRIVE_AUTH_URL - - Type: string - - Required: false +It is possible to encrypt rclone's configuration file. You can find +information on securing your configuration file by viewing the +configuration encryption docs. - #### --hidrive-token-url +Invalid refresh token - Token server url. +As can be verified here, each refresh_token (for Native Applications) is +valid for 60 days. If used to access HiDrivei, its validity will be +automatically extended. - Leave blank to use the provider defaults. +This means that if you - Properties: +- Don't use the HiDrive remote for 60 days - - Config: token_url - - Env Var: RCLONE_HIDRIVE_TOKEN_URL - - Type: string - - Required: false +then rclone will return an error which includes a text that implies the +refresh token is invalid or expired. - #### --hidrive-scope-role +To fix this you will need to authorize rclone to access your HiDrive +account again. - User-level that rclone should use when requesting access from HiDrive. +Using - Properties: + rclone config reconnect remote: - - Config: scope_role - - Env Var: RCLONE_HIDRIVE_SCOPE_ROLE - - Type: string - - Default: "user" - - Examples: - - "user" - - User-level access to management permissions. - - This will be sufficient in most cases. - - "admin" - - Extensive access to management permissions. - - "owner" - - Full access to management permissions. +the process is very similar to the process of initial setup exemplified +before. - #### --hidrive-root-prefix +Modification times and hashes - The root/parent folder for all paths. +HiDrive allows modification times to be set on objects accurate to 1 +second. - Fill in to use the specified folder as the parent for all paths given to the remote. - This way rclone can use any folder as its starting point. +HiDrive supports its own hash type which is used to verify the integrity +of file contents after successful transfers. - Properties: +Restricted filename characters - - Config: root_prefix - - Env Var: RCLONE_HIDRIVE_ROOT_PREFIX - - Type: string - - Default: "/" - - Examples: - - "/" - - The topmost directory accessible by rclone. - - This will be equivalent with "root" if rclone uses a regular HiDrive user account. - - "root" - - The topmost directory of the HiDrive user account - - "" - - This specifies that there is no root-prefix for your paths. - - When using this you will always need to specify paths to this remote with a valid parent e.g. "remote:/path/to/dir" or "remote:root/path/to/dir". +HiDrive cannot store files or folders that include / (0x2F) or +null-bytes (0x00) in their name. Any other characters can be used in the +names of files or folders. Additionally, files or folders cannot be +named either of the following: . or .. - #### --hidrive-endpoint +Therefore rclone will automatically replace these characters, if files +or folders are stored or accessed with such names. - Endpoint for the service. +You can read about how this filename encoding works in general here. - This is the URL that API-calls will be made to. +Keep in mind that HiDrive only supports file or folder names with a +length of 255 characters or less. - Properties: +Transfers - - Config: endpoint - - Env Var: RCLONE_HIDRIVE_ENDPOINT - - Type: string - - Default: "https://api.hidrive.strato.com/2.1" +HiDrive limits file sizes per single request to a maximum of 2 GiB. To +allow storage of larger files and allow for better upload performance, +the hidrive backend will use a chunked transfer for files larger than 96 +MiB. Rclone will upload multiple parts/chunks of the file at the same +time. Chunks in the process of being uploaded are buffered in memory, so +you may want to restrict this behaviour on systems with limited +resources. - #### --hidrive-disable-fetching-member-count +You can customize this behaviour using the following options: - Do not fetch number of objects in directories unless it is absolutely necessary. +- chunk_size: size of file parts +- upload_cutoff: files larger or equal to this in size will use a + chunked transfer +- upload_concurrency: number of file-parts to upload at the same time - Requests may be faster if the number of objects in subdirectories is not fetched. +See the below section about configuration options for more details. - Properties: +Root folder - - Config: disable_fetching_member_count - - Env Var: RCLONE_HIDRIVE_DISABLE_FETCHING_MEMBER_COUNT - - Type: bool - - Default: false +You can set the root folder for rclone. This is the directory that +rclone considers to be the root of your HiDrive. - #### --hidrive-chunk-size +Usually, you will leave this blank, and rclone will use the root of the +account. - Chunksize for chunked uploads. +However, you can set this to restrict rclone to a specific folder +hierarchy. - Any files larger than the configured cutoff (or files of unknown size) will be uploaded in chunks of this size. +This works by prepending the contents of the root_prefix option to any +paths accessed by rclone. For example, the following two ways to access +the home directory are equivalent: - The upper limit for this is 2147483647 bytes (about 2.000Gi). - That is the maximum amount of bytes a single upload-operation will support. - Setting this above the upper limit or to a negative value will cause uploads to fail. + rclone lsd --hidrive-root-prefix="/users/test/" remote:path - Setting this to larger values may increase the upload speed at the cost of using more memory. - It can be set to smaller values smaller to save on memory. + rclone lsd remote:/users/test/path - Properties: +See the below section about configuration options for more details. - - Config: chunk_size - - Env Var: RCLONE_HIDRIVE_CHUNK_SIZE - - Type: SizeSuffix - - Default: 48Mi +Directory member count - #### --hidrive-upload-cutoff +By default, rclone will know the number of directory members contained +in a directory. For example, rclone lsd uses this information. - Cutoff/Threshold for chunked uploads. +The acquisition of this information will result in additional time costs +for HiDrive's API. When dealing with large directory structures, it may +be desirable to circumvent this time cost, especially when this +information is not explicitly needed. For this, the +disable_fetching_member_count option can be used. - Any files larger than this will be uploaded in chunks of the configured chunksize. +See the below section about configuration options for more details. - The upper limit for this is 2147483647 bytes (about 2.000Gi). - That is the maximum amount of bytes a single upload-operation will support. - Setting this above the upper limit will cause uploads to fail. +Standard options - Properties: +Here are the Standard options specific to hidrive (HiDrive). - - Config: upload_cutoff - - Env Var: RCLONE_HIDRIVE_UPLOAD_CUTOFF - - Type: SizeSuffix - - Default: 96Mi +--hidrive-client-id - #### --hidrive-upload-concurrency +OAuth Client Id. - Concurrency for chunked uploads. +Leave blank normally. - This is the upper limit for how many transfers for the same file are running concurrently. - Setting this above to a value smaller than 1 will cause uploads to deadlock. +Properties: - If you are uploading small numbers of large files over high-speed links - and these uploads do not fully utilize your bandwidth, then increasing - this may help to speed up the transfers. +- Config: client_id +- Env Var: RCLONE_HIDRIVE_CLIENT_ID +- Type: string +- Required: false - Properties: +--hidrive-client-secret - - Config: upload_concurrency - - Env Var: RCLONE_HIDRIVE_UPLOAD_CONCURRENCY - - Type: int - - Default: 4 +OAuth Client Secret. - #### --hidrive-encoding +Leave blank normally. - The encoding for the backend. +Properties: - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +- Config: client_secret +- Env Var: RCLONE_HIDRIVE_CLIENT_SECRET +- Type: string +- Required: false - Properties: +--hidrive-scope-access - - Config: encoding - - Env Var: RCLONE_HIDRIVE_ENCODING - - Type: Encoding - - Default: Slash,Dot +Access permissions that rclone should use when requesting access from +HiDrive. - #### --hidrive-description +Properties: - Description of the remote +- Config: scope_access +- Env Var: RCLONE_HIDRIVE_SCOPE_ACCESS +- Type: string +- Default: "rw" +- Examples: + - "rw" + - Read and write access to resources. + - "ro" + - Read-only access to resources. - Properties: +Advanced options - - Config: description - - Env Var: RCLONE_HIDRIVE_DESCRIPTION - - Type: string - - Required: false +Here are the Advanced options specific to hidrive (HiDrive). +--hidrive-token +OAuth Access Token as a JSON blob. - ## Limitations +Properties: - ### Symbolic links +- Config: token +- Env Var: RCLONE_HIDRIVE_TOKEN +- Type: string +- Required: false - HiDrive is able to store symbolic links (*symlinks*) by design, - for example, when unpacked from a zip archive. +--hidrive-auth-url - There exists no direct mechanism to manage native symlinks in remotes. - As such this implementation has chosen to ignore any native symlinks present in the remote. - rclone will not be able to access or show any symlinks stored in the hidrive-remote. - This means symlinks cannot be individually removed, copied, or moved, - except when removing, copying, or moving the parent folder. +Auth server URL. - *This does not affect the `.rclonelink`-files - that rclone uses to encode and store symbolic links.* +Leave blank to use the provider defaults. - ### Sparse files +Properties: - It is possible to store sparse files in HiDrive. +- Config: auth_url +- Env Var: RCLONE_HIDRIVE_AUTH_URL +- Type: string +- Required: false - Note that copying a sparse file will expand the holes - into null-byte (0x00) regions that will then consume disk space. - Likewise, when downloading a sparse file, - the resulting file will have null-byte regions in the place of file holes. +--hidrive-token-url - # HTTP +Token server url. - The HTTP remote is a read only remote for reading files of a - webserver. The webserver should provide file listings which rclone - will read and turn into a remote. This has been tested with common - webservers such as Apache/Nginx/Caddy and will likely work with file - listings from most web servers. (If it doesn't then please file an - issue, or send a pull request!) +Leave blank to use the provider defaults. - Paths are specified as `remote:` or `remote:path`. +Properties: - The `remote:` represents the configured [url](#http-url), and any path following - it will be resolved relative to this url, according to the URL standard. This - means with remote url `https://beta.rclone.org/branch` and path `fix`, the - resolved URL will be `https://beta.rclone.org/branch/fix`, while with path - `/fix` the resolved URL will be `https://beta.rclone.org/fix` as the absolute - path is resolved from the root of the domain. +- Config: token_url +- Env Var: RCLONE_HIDRIVE_TOKEN_URL +- Type: string +- Required: false - If the path following the `remote:` ends with `/` it will be assumed to point - to a directory. If the path does not end with `/`, then a HEAD request is sent - and the response used to decide if it it is treated as a file or a directory - (run with `-vv` to see details). When [--http-no-head](#http-no-head) is - specified, a path without ending `/` is always assumed to be a file. If rclone - incorrectly assumes the path is a file, the solution is to specify the path with - ending `/`. When you know the path is a directory, ending it with `/` is always - better as it avoids the initial HEAD request. +--hidrive-scope-role - To just download a single file it is easier to use - [copyurl](https://rclone.org/commands/rclone_copyurl/). +User-level that rclone should use when requesting access from HiDrive. - ## Configuration +Properties: - Here is an example of how to make a remote called `remote`. First - run: +- Config: scope_role +- Env Var: RCLONE_HIDRIVE_SCOPE_ROLE +- Type: string +- Default: "user" +- Examples: + - "user" + - User-level access to management permissions. + - This will be sufficient in most cases. + - "admin" + - Extensive access to management permissions. + - "owner" + - Full access to management permissions. - rclone config +--hidrive-root-prefix - This will guide you through an interactive setup process: +The root/parent folder for all paths. -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 [snip] -XX / HTTP  "http" [snip] Storage> http URL of http host to connect to -Choose a number from below, or type in your own value 1 / Connect to -example.com  "https://example.com" url> https://beta.rclone.org Remote -config -------------------- [remote] url = https://beta.rclone.org --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y Current remotes: +Fill in to use the specified folder as the parent for all paths given to +the remote. This way rclone can use any folder as its starting point. -Name Type ==== ==== remote http +Properties: -e) Edit existing remote -f) New remote -g) Delete remote -h) Rename remote -i) Copy remote -j) Set configuration password -k) Quit config e/n/d/r/c/s/q> q +- Config: root_prefix +- Env Var: RCLONE_HIDRIVE_ROOT_PREFIX +- Type: string +- Default: "/" +- Examples: + - "/" + - The topmost directory accessible by rclone. + - This will be equivalent with "root" if rclone uses a regular + HiDrive user account. + - "root" + - The topmost directory of the HiDrive user account + - "" + - This specifies that there is no root-prefix for your paths. + - When using this you will always need to specify paths to + this remote with a valid parent e.g. "remote:/path/to/dir" + or "remote:root/path/to/dir". +--hidrive-endpoint - This remote is called `remote` and can now be used like this +Endpoint for the service. - See all the top level directories +This is the URL that API-calls will be made to. - rclone lsd remote: +Properties: - List the contents of a directory +- Config: endpoint +- Env Var: RCLONE_HIDRIVE_ENDPOINT +- Type: string +- Default: "https://api.hidrive.strato.com/2.1" - rclone ls remote:directory +--hidrive-disable-fetching-member-count - Sync the remote `directory` to `/home/local/directory`, deleting any excess files. +Do not fetch number of objects in directories unless it is absolutely +necessary. - rclone sync --interactive remote:directory /home/local/directory +Requests may be faster if the number of objects in subdirectories is not +fetched. - ### Read only +Properties: - This remote is read only - you can't upload files to an HTTP server. +- Config: disable_fetching_member_count +- Env Var: RCLONE_HIDRIVE_DISABLE_FETCHING_MEMBER_COUNT +- Type: bool +- Default: false - ### Modification times +--hidrive-chunk-size - Most HTTP servers store time accurate to 1 second. +Chunksize for chunked uploads. - ### Checksum +Any files larger than the configured cutoff (or files of unknown size) +will be uploaded in chunks of this size. - No checksums are stored. +The upper limit for this is 2147483647 bytes (about 2.000Gi). That is +the maximum amount of bytes a single upload-operation will support. +Setting this above the upper limit or to a negative value will cause +uploads to fail. - ### Usage without a config file +Setting this to larger values may increase the upload speed at the cost +of using more memory. It can be set to smaller values smaller to save on +memory. - Since the http remote only has one config parameter it is easy to use - without a config file: +Properties: - rclone lsd --http-url https://beta.rclone.org :http: +- Config: chunk_size +- Env Var: RCLONE_HIDRIVE_CHUNK_SIZE +- Type: SizeSuffix +- Default: 48Mi - or: +--hidrive-upload-cutoff - rclone lsd :http,url='https://beta.rclone.org': +Cutoff/Threshold for chunked uploads. +Any files larger than this will be uploaded in chunks of the configured +chunksize. - ### Standard options +The upper limit for this is 2147483647 bytes (about 2.000Gi). That is +the maximum amount of bytes a single upload-operation will support. +Setting this above the upper limit will cause uploads to fail. - Here are the Standard options specific to http (HTTP). +Properties: - #### --http-url +- Config: upload_cutoff +- Env Var: RCLONE_HIDRIVE_UPLOAD_CUTOFF +- Type: SizeSuffix +- Default: 96Mi - URL of HTTP host to connect to. +--hidrive-upload-concurrency - E.g. "https://example.com", or "https://user:pass@example.com" to use a username and password. +Concurrency for chunked uploads. - Properties: +This is the upper limit for how many transfers for the same file are +running concurrently. Setting this above to a value smaller than 1 will +cause uploads to deadlock. - - Config: url - - Env Var: RCLONE_HTTP_URL - - Type: string - - Required: true +If you are uploading small numbers of large files over high-speed links +and these uploads do not fully utilize your bandwidth, then increasing +this may help to speed up the transfers. - ### Advanced options +Properties: - Here are the Advanced options specific to http (HTTP). +- Config: upload_concurrency +- Env Var: RCLONE_HIDRIVE_UPLOAD_CONCURRENCY +- Type: int +- Default: 4 - #### --http-headers +--hidrive-encoding - Set HTTP headers for all transactions. +The encoding for the backend. - Use this to set additional HTTP headers for all transactions. +See the encoding section in the overview for more info. - The input format is comma separated list of key,value pairs. Standard - [CSV encoding](https://godoc.org/encoding/csv) may be used. +Properties: - For example, to set a Cookie use 'Cookie,name=value', or '"Cookie","name=value"'. +- Config: encoding +- Env Var: RCLONE_HIDRIVE_ENCODING +- Type: Encoding +- Default: Slash,Dot - You can set multiple headers, e.g. '"Cookie","name=value","Authorization","xxx"'. +--hidrive-description - Properties: +Description of the remote. - - Config: headers - - Env Var: RCLONE_HTTP_HEADERS - - Type: CommaSepList - - Default: +Properties: - #### --http-no-slash +- Config: description +- Env Var: RCLONE_HIDRIVE_DESCRIPTION +- Type: string +- Required: false - Set this if the site doesn't end directories with /. +Limitations - Use this if your target website does not use / on the end of - directories. +Symbolic links - A / on the end of a path is how rclone normally tells the difference - between files and directories. If this flag is set, then rclone will - treat all files with Content-Type: text/html as directories and read - URLs from them rather than downloading them. +HiDrive is able to store symbolic links (symlinks) by design, for +example, when unpacked from a zip archive. - Note that this may cause rclone to confuse genuine HTML files with - directories. +There exists no direct mechanism to manage native symlinks in remotes. +As such this implementation has chosen to ignore any native symlinks +present in the remote. rclone will not be able to access or show any +symlinks stored in the hidrive-remote. This means symlinks cannot be +individually removed, copied, or moved, except when removing, copying, +or moving the parent folder. - Properties: +This does not affect the .rclonelink-files that rclone uses to encode +and store symbolic links. - - Config: no_slash - - Env Var: RCLONE_HTTP_NO_SLASH - - Type: bool - - Default: false +Sparse files - #### --http-no-head +It is possible to store sparse files in HiDrive. - Don't use HEAD requests. +Note that copying a sparse file will expand the holes into null-byte +(0x00) regions that will then consume disk space. Likewise, when +downloading a sparse file, the resulting file will have null-byte +regions in the place of file holes. - HEAD requests are mainly used to find file sizes in dir listing. - If your site is being very slow to load then you can try this option. - Normally rclone does a HEAD request for each potential file in a - directory listing to: +HTTP - - find its size - - check it really exists - - check to see if it is a directory +The HTTP remote is a read only remote for reading files of a webserver. +The webserver should provide file listings which rclone will read and +turn into a remote. This has been tested with common webservers such as +Apache/Nginx/Caddy and will likely work with file listings from most web +servers. (If it doesn't then please file an issue, or send a pull +request!) - If you set this option, rclone will not do the HEAD request. This will mean - that directory listings are much quicker, but rclone won't have the times or - sizes of any files, and some files that don't exist may be in the listing. +Paths are specified as remote: or remote:path. - Properties: +The remote: represents the configured url, and any path following it +will be resolved relative to this url, according to the URL standard. +This means with remote url https://beta.rclone.org/branch and path fix, +the resolved URL will be https://beta.rclone.org/branch/fix, while with +path /fix the resolved URL will be https://beta.rclone.org/fix as the +absolute path is resolved from the root of the domain. - - Config: no_head - - Env Var: RCLONE_HTTP_NO_HEAD - - Type: bool - - Default: false +If the path following the remote: ends with / it will be assumed to +point to a directory. If the path does not end with /, then a HEAD +request is sent and the response used to decide if it it is treated as a +file or a directory (run with -vv to see details). When --http-no-head +is specified, a path without ending / is always assumed to be a file. If +rclone incorrectly assumes the path is a file, the solution is to +specify the path with ending /. When you know the path is a directory, +ending it with / is always better as it avoids the initial HEAD request. - #### --http-description +To just download a single file it is easier to use copyurl. - Description of the remote +Configuration - Properties: +Here is an example of how to make a remote called remote. First run: - - Config: description - - Env Var: RCLONE_HTTP_DESCRIPTION - - Type: string - - Required: false + rclone config - ## Backend commands +This will guide you through an interactive setup process: - Here are the commands specific to the http backend. + 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 + [snip] + XX / HTTP + \ "http" + [snip] + Storage> http + URL of http host to connect to + Choose a number from below, or type in your own value + 1 / Connect to example.com + \ "https://example.com" + url> https://beta.rclone.org + Remote config + -------------------- + [remote] + url = https://beta.rclone.org + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y + Current remotes: - Run them with + Name Type + ==== ==== + remote http - rclone backend COMMAND remote: + 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 - The help below will explain what arguments each command takes. +This remote is called remote and can now be used like this - See the [backend](https://rclone.org/commands/rclone_backend/) command for more - info on how to pass options and arguments. +See all the top level directories - These can be run on a running backend using the rc command - [backend/command](https://rclone.org/rc/#backend-command). + rclone lsd remote: - ### set +List the contents of a directory - Set command for updating the config parameters. + rclone ls remote:directory - rclone backend set remote: [options] [+] +Sync the remote directory to /home/local/directory, deleting any excess +files. - This set command can be used to update the config parameters - for a running http backend. + rclone sync --interactive remote:directory /home/local/directory - Usage Examples: +Read only - rclone backend set remote: [-o opt_name=opt_value] [-o opt_name2=opt_value2] - rclone rc backend/command command=set fs=remote: [-o opt_name=opt_value] [-o opt_name2=opt_value2] - rclone rc backend/command command=set fs=remote: -o url=https://example.com +This remote is read only - you can't upload files to an HTTP server. - The option keys are named as they are in the config file. +Modification times - This rebuilds the connection to the http backend when it is called with - the new parameters. Only new parameters need be passed as the values - will default to those currently in use. +Most HTTP servers store time accurate to 1 second. - It doesn't return anything. +Checksum +No checksums are stored. +Usage without a config file +Since the http remote only has one config parameter it is easy to use +without a config file: - ## Limitations + rclone lsd --http-url https://beta.rclone.org :http: - `rclone about` is not supported by the HTTP backend. Backends without - this capability cannot determine free space for an rclone mount or - use policy `mfs` (most free space) as a member of an rclone union - remote. +or: - See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) + rclone lsd :http,url='https://beta.rclone.org': - # ImageKit - This is a backend for the [ImageKit.io](https://imagekit.io/) storage service. +Standard options - #### About ImageKit - [ImageKit.io](https://imagekit.io/) provides real-time image and video optimizations, transformations, and CDN delivery. Over 1,000 businesses and 70,000 developers trust ImageKit with their images and videos on the web. +Here are the Standard options specific to http (HTTP). +--http-url - #### Accounts & Pricing +URL of HTTP host to connect to. - To use this backend, you need to [create an account](https://imagekit.io/registration/) on ImageKit. Start with a free plan with generous usage limits. Then, as your requirements grow, upgrade to a plan that best fits your needs. See [the pricing details](https://imagekit.io/plans). +E.g. "https://example.com", or "https://user:pass@example.com" to use a +username and password. - ## Configuration +Properties: - Here is an example of making an imagekit configuration. +- Config: url +- Env Var: RCLONE_HTTP_URL +- Type: string +- Required: true - Firstly create a [ImageKit.io](https://imagekit.io/) account and choose a plan. +--http-no-escape - You will need to log in and get the `publicKey` and `privateKey` for your account from the developer section. +Do not escape URL metacharacters in path names. - Now run +Properties: -rclone config +- Config: no_escape +- Env Var: RCLONE_HTTP_NO_ESCAPE +- Type: bool +- Default: false +Advanced options - This will guide you through an interactive setup process: +Here are the Advanced options specific to http (HTTP). -No remotes found, make a new one? n) New remote s) Set configuration -password q) Quit config n/s/q> n +--http-headers -Enter the name for the new remote. name> imagekit-media-library +Set HTTP headers for all transactions. -Option Storage. Type of storage to configure. Choose a number from -below, or type in your own value. [snip] XX / ImageKit.io  (imagekit) -[snip] Storage> imagekit +Use this to set additional HTTP headers for all transactions. -Option endpoint. You can find your ImageKit.io URL endpoint in your -dashboard Enter a value. endpoint> https://ik.imagekit.io/imagekit_id +The input format is comma separated list of key,value pairs. Standard +CSV encoding may be used. -Option public_key. You can find your ImageKit.io public key in your -dashboard Enter a value. public_key> public_**************************** +For example, to set a Cookie use 'Cookie,name=value', or +'"Cookie","name=value"'. -Option private_key. You can find your ImageKit.io private key in your -dashboard Enter a value. private_key> -private_**************************** +You can set multiple headers, e.g. +'"Cookie","name=value","Authorization","xxx"'. -Edit advanced config? y) Yes n) No (default) y/n> n +Properties: -Configuration complete. Options: - type: imagekit - endpoint: -https://ik.imagekit.io/imagekit_id - public_key: -public_**************************** - private_key: -private_**************************** +- Config: headers +- Env Var: RCLONE_HTTP_HEADERS +- Type: CommaSepList +- Default: -Keep this "imagekit-media-library" remote? y) Yes this is OK (default) -e) Edit this remote d) Delete this remote y/e/d> y +--http-no-slash - List directories in the top level of your Media Library +Set this if the site doesn't end directories with /. -rclone lsd imagekit-media-library: +Use this if your target website does not use / on the end of +directories. - Make a new directory. +A / on the end of a path is how rclone normally tells the difference +between files and directories. If this flag is set, then rclone will +treat all files with Content-Type: text/html as directories and read +URLs from them rather than downloading them. -rclone mkdir imagekit-media-library:directory +Note that this may cause rclone to confuse genuine HTML files with +directories. - List the contents of a directory. +Properties: -rclone ls imagekit-media-library:directory +- Config: no_slash +- Env Var: RCLONE_HTTP_NO_SLASH +- Type: bool +- Default: false +--http-no-head - ### Modified time and hashes +Don't use HEAD requests. - ImageKit does not support modification times or hashes yet. +HEAD requests are mainly used to find file sizes in dir listing. If your +site is being very slow to load then you can try this option. Normally +rclone does a HEAD request for each potential file in a directory +listing to: - ### Checksums +- find its size +- check it really exists +- check to see if it is a directory - No checksums are supported. +If you set this option, rclone will not do the HEAD request. This will +mean that directory listings are much quicker, but rclone won't have the +times or sizes of any files, and some files that don't exist may be in +the listing. +Properties: - ### Standard options +- Config: no_head +- Env Var: RCLONE_HTTP_NO_HEAD +- Type: bool +- Default: false - Here are the Standard options specific to imagekit (ImageKit.io). +--http-description - #### --imagekit-endpoint +Description of the remote. +Properties: + +- Config: description +- Env Var: RCLONE_HTTP_DESCRIPTION +- Type: string +- Required: false + +Backend commands + +Here are the commands specific to the http backend. + +Run them with + + rclone backend COMMAND remote: + +The help below will explain what arguments each command takes. + +See the backend command for more info on how to pass options and +arguments. + +These can be run on a running backend using the rc command +backend/command. + +set + +Set command for updating the config parameters. + + rclone backend set remote: [options] [+] + +This set command can be used to update the config parameters for a +running http backend. + +Usage Examples: + + rclone backend set remote: [-o opt_name=opt_value] [-o opt_name2=opt_value2] + rclone rc backend/command command=set fs=remote: [-o opt_name=opt_value] [-o opt_name2=opt_value2] + rclone rc backend/command command=set fs=remote: -o url=https://example.com + +The option keys are named as they are in the config file. + +This rebuilds the connection to the http backend when it is called with +the new parameters. Only new parameters need be passed as the values +will default to those currently in use. + +It doesn't return anything. + +Limitations + +rclone about is not supported by the HTTP backend. Backends without this +capability cannot determine free space for an rclone mount or use policy +mfs (most free space) as a member of an rclone union remote. + +See List of backends that do not support rclone about and rclone about + +ImageKit + +This is a backend for the ImageKit.io storage service. + +About ImageKit + +ImageKit.io provides real-time image and video optimizations, +transformations, and CDN delivery. Over 1,000 businesses and 70,000 +developers trust ImageKit with their images and videos on the web. + +Accounts & Pricing + +To use this backend, you need to create an account on ImageKit. Start +with a free plan with generous usage limits. Then, as your requirements +grow, upgrade to a plan that best fits your needs. See the pricing +details. + +Configuration + +Here is an example of making an imagekit configuration. + +Firstly create a ImageKit.io account and choose a plan. + +You will need to log in and get the publicKey and privateKey for your +account from the developer section. + +Now 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 + + Enter the name for the new remote. + name> imagekit-media-library + + Option Storage. + Type of storage to configure. + Choose a number from below, or type in your own value. + [snip] + XX / ImageKit.io + \ (imagekit) + [snip] + Storage> imagekit + + Option endpoint. You can find your ImageKit.io URL endpoint in your [dashboard](https://imagekit.io/dashboard/developer/api-keys) + Enter a value. + endpoint> https://ik.imagekit.io/imagekit_id - Properties: - - - Config: endpoint - - Env Var: RCLONE_IMAGEKIT_ENDPOINT - - Type: string - - Required: true - - #### --imagekit-public-key - + Option public_key. You can find your ImageKit.io public key in your [dashboard](https://imagekit.io/dashboard/developer/api-keys) + Enter a value. + public_key> public_**************************** - Properties: - - - Config: public_key - - Env Var: RCLONE_IMAGEKIT_PUBLIC_KEY - - Type: string - - Required: true - - #### --imagekit-private-key - + Option private_key. You can find your ImageKit.io private key in your [dashboard](https://imagekit.io/dashboard/developer/api-keys) + Enter a value. + private_key> private_**************************** - Properties: + Edit advanced config? + y) Yes + n) No (default) + y/n> n - - Config: private_key - - Env Var: RCLONE_IMAGEKIT_PRIVATE_KEY - - Type: string - - Required: true + Configuration complete. + Options: + - type: imagekit + - endpoint: https://ik.imagekit.io/imagekit_id + - public_key: public_**************************** + - private_key: private_**************************** - ### Advanced options + Keep this "imagekit-media-library" remote? + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y - Here are the Advanced options specific to imagekit (ImageKit.io). +List directories in the top level of your Media Library - #### --imagekit-only-signed + rclone lsd imagekit-media-library: - If you have configured `Restrict unsigned image URLs` in your dashboard settings, set this to true. +Make a new directory. - Properties: + rclone mkdir imagekit-media-library:directory - - Config: only_signed - - Env Var: RCLONE_IMAGEKIT_ONLY_SIGNED - - Type: bool - - Default: false +List the contents of a directory. - #### --imagekit-versions + rclone ls imagekit-media-library:directory - Include old versions in directory listings. +Modified time and hashes - Properties: +ImageKit does not support modification times or hashes yet. - - Config: versions - - Env Var: RCLONE_IMAGEKIT_VERSIONS - - Type: bool - - Default: false +Checksums - #### --imagekit-upload-tags +No checksums are supported. - Tags to add to the uploaded files, e.g. "tag1,tag2". +Standard options - Properties: +Here are the Standard options specific to imagekit (ImageKit.io). - - Config: upload_tags - - Env Var: RCLONE_IMAGEKIT_UPLOAD_TAGS - - Type: string - - Required: false +--imagekit-endpoint - #### --imagekit-encoding +You can find your ImageKit.io URL endpoint in your dashboard - The encoding for the backend. +Properties: - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +- Config: endpoint +- Env Var: RCLONE_IMAGEKIT_ENDPOINT +- Type: string +- Required: true - Properties: +--imagekit-public-key - - Config: encoding - - Env Var: RCLONE_IMAGEKIT_ENCODING - - Type: Encoding - - Default: Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket +You can find your ImageKit.io public key in your dashboard - #### --imagekit-description +Properties: - Description of the remote +- Config: public_key +- Env Var: RCLONE_IMAGEKIT_PUBLIC_KEY +- Type: string +- Required: true - Properties: +--imagekit-private-key - - Config: description - - Env Var: RCLONE_IMAGEKIT_DESCRIPTION - - Type: string - - Required: false +You can find your ImageKit.io private key in your dashboard - ### Metadata +Properties: - Any metadata supported by the underlying remote is read and written. +- Config: private_key +- Env Var: RCLONE_IMAGEKIT_PRIVATE_KEY +- Type: string +- Required: true - Here are the possible system metadata items for the imagekit backend. +Advanced options - | Name | Help | Type | Example | Read Only | - |------|------|------|---------|-----------| - | aws-tags | AI generated tags by AWS Rekognition associated with the image | string | tag1,tag2 | **Y** | - | btime | Time of file birth (creation) read from Last-Modified header | RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | **Y** | - | custom-coordinates | Custom coordinates of the file | string | 0,0,100,100 | **Y** | - | file-type | Type of the file | string | image | **Y** | - | google-tags | AI generated tags by Google Cloud Vision associated with the image | string | tag1,tag2 | **Y** | - | has-alpha | Whether the image has alpha channel or not | bool | | **Y** | - | height | Height of the image or video in pixels | int | | **Y** | - | is-private-file | Whether the file is private or not | bool | | **Y** | - | size | Size of the object in bytes | int64 | | **Y** | - | tags | Tags associated with the file | string | tag1,tag2 | **Y** | - | width | Width of the image or video in pixels | int | | **Y** | +Here are the Advanced options specific to imagekit (ImageKit.io). - See the [metadata](https://rclone.org/docs/#metadata) docs for more info. +--imagekit-only-signed +If you have configured Restrict unsigned image URLs in your dashboard +settings, set this to true. +Properties: - # Internet Archive +- Config: only_signed +- Env Var: RCLONE_IMAGEKIT_ONLY_SIGNED +- Type: bool +- Default: false - The Internet Archive backend utilizes Items on [archive.org](https://archive.org/) +--imagekit-versions - Refer to [IAS3 API documentation](https://archive.org/services/docs/api/ias3.html) for the API this backend uses. +Include old versions in directory listings. - Paths are specified as `remote:bucket` (or `remote:` for the `lsd` - command.) You may put subdirectories in too, e.g. `remote:item/path/to/dir`. +Properties: - Unlike S3, listing up all items uploaded by you isn't supported. +- Config: versions +- Env Var: RCLONE_IMAGEKIT_VERSIONS +- Type: bool +- Default: false - Once you have made a remote, you can use it like this: +--imagekit-upload-tags - Make a new item +Tags to add to the uploaded files, e.g. "tag1,tag2". - rclone mkdir remote:item +Properties: - List the contents of a item +- Config: upload_tags +- Env Var: RCLONE_IMAGEKIT_UPLOAD_TAGS +- Type: string +- Required: false - rclone ls remote:item +--imagekit-encoding - Sync `/home/local/directory` to the remote item, deleting any excess - files in the item. +The encoding for the backend. - rclone sync --interactive /home/local/directory remote:item +See the encoding section in the overview for more info. - ## Notes - Because of Internet Archive's architecture, it enqueues write operations (and extra post-processings) in a per-item queue. You can check item's queue at https://catalogd.archive.org/history/item-name-here . Because of that, all uploads/deletes will not show up immediately and takes some time to be available. - The per-item queue is enqueued to an another queue, Item Deriver Queue. [You can check the status of Item Deriver Queue here.](https://catalogd.archive.org/catalog.php?whereami=1) This queue has a limit, and it may block you from uploading, or even deleting. You should avoid uploading a lot of small files for better behavior. +Properties: - You can optionally wait for the server's processing to finish, by setting non-zero value to `wait_archive` key. - By making it wait, rclone can do normal file comparison. - Make sure to set a large enough value (e.g. `30m0s` for smaller files) as it can take a long time depending on server's queue. +- Config: encoding +- Env Var: RCLONE_IMAGEKIT_ENCODING +- Type: Encoding +- Default: + Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket - ## About metadata - This backend supports setting, updating and reading metadata of each file. - The metadata will appear as file metadata on Internet Archive. - However, some fields are reserved by both Internet Archive and rclone. +--imagekit-description - The following are reserved by Internet Archive: - - `name` - - `source` - - `size` - - `md5` - - `crc32` - - `sha1` - - `format` - - `old_version` - - `viruscheck` - - `summation` +Description of the remote. - Trying to set values to these keys is ignored with a warning. - Only setting `mtime` is an exception. Doing so make it the identical behavior as setting ModTime. +Properties: - rclone reserves all the keys starting with `rclone-`. Setting value for these keys will give you warnings, but values are set according to request. +- Config: description +- Env Var: RCLONE_IMAGEKIT_DESCRIPTION +- Type: string +- Required: false - If there are multiple values for a key, only the first one is returned. - This is a limitation of rclone, that supports one value per one key. - It can be triggered when you did a server-side copy. +Metadata - Reading metadata will also provide custom (non-standard nor reserved) ones. +Any metadata supported by the underlying remote is read and written. - ## Filtering auto generated files +Here are the possible system metadata items for the imagekit backend. - The Internet Archive automatically creates metadata files after - upload. These can cause problems when doing an `rclone sync` as rclone - will try, and fail, to delete them. These metadata files are not - changeable, as they are created by the Internet Archive automatically. + ----------------------------------------------------------------------------------------------------------- + Name Help Type Example Read Only + -------------------- --------------- ----------- ------------------------------------- -------------------- + aws-tags AI generated string tag1,tag2 Y + tags by AWS + Rekognition + associated with + the image - These auto-created files can be excluded from the sync using [metadata - filtering](https://rclone.org/filtering/#metadata). + btime Time of file RFC 3339 2006-01-02T15:04:05.999999999Z07:00 Y + birth + (creation) read + from + Last-Modified + header - rclone sync ... --metadata-exclude "source=metadata" --metadata-exclude "format=Metadata" + custom-coordinates Custom string 0,0,100,100 Y + coordinates of + the file - Which excludes from the sync any files which have the - `source=metadata` or `format=Metadata` flags which are added to - Internet Archive auto-created files. + file-type Type of the string image Y + file - ## Configuration + google-tags AI generated string tag1,tag2 Y + tags by Google + Cloud Vision + associated with + the image - Here is an example of making an internetarchive configuration. - Most applies to the other providers as well, any differences are described [below](#providers). + has-alpha Whether the bool Y + image has alpha + channel or not - First run + height Height of the int Y + image or video + in pixels - rclone config + is-private-file Whether the bool Y + file is private + or not - This will guide you through an interactive setup process. + size Size of the int64 Y + object in bytes -No remotes found, make a new one? n) New remote s) Set configuration -password q) Quit config n/s/q> n name> remote Option Storage. Type of -storage to configure. Choose a number from below, or type in your own -value. XX / InternetArchive Items  (internetarchive) Storage> -internetarchive Option access_key_id. IAS3 Access Key. Leave blank for -anonymous access. You can find one here: -https://archive.org/account/s3.php Enter a value. Press Enter to leave -empty. access_key_id> XXXX Option secret_access_key. IAS3 Secret Key -(password). Leave blank for anonymous access. Enter a value. Press Enter -to leave empty. secret_access_key> XXXX Edit advanced config? y) Yes n) -No (default) y/n> y Option endpoint. IAS3 Endpoint. Leave blank for -default value. Enter a string value. Press Enter for the default -(https://s3.us.archive.org). endpoint> Option front_endpoint. Host of -InternetArchive Frontend. Leave blank for default value. Enter a string -value. Press Enter for the default (https://archive.org). -front_endpoint> Option disable_checksum. Don't store MD5 checksum with -object metadata. Normally rclone will calculate the MD5 checksum of the -input before uploading it so it can ask the server to check the object -against checksum. This is great for data integrity checking but can -cause long delays for large files to start uploading. Enter a boolean -value (true or false). Press Enter for the default (true). -disable_checksum> true Option encoding. The encoding for the backend. -See the encoding section in the overview for more info. Enter a -encoder.MultiEncoder value. Press Enter for the default -(Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot). encoding> Edit -advanced config? y) Yes n) No (default) y/n> n -------------------- -[remote] type = internetarchive access_key_id = XXXX secret_access_key = -XXXX -------------------- y) Yes this is OK (default) e) Edit this -remote d) Delete this remote y/e/d> y + tags Tags associated string tag1,tag2 Y + with the file + width Width of the int Y + image or video + in pixels + ----------------------------------------------------------------------------------------------------------- +See the metadata docs for more info. - ### Standard options +Internet Archive - Here are the Standard options specific to internetarchive (Internet Archive). +The Internet Archive backend utilizes Items on archive.org - #### --internetarchive-access-key-id +Refer to IAS3 API documentation for the API this backend uses. +Paths are specified as remote:bucket (or remote: for the lsd command.) +You may put subdirectories in too, e.g. remote:item/path/to/dir. + +Unlike S3, listing up all items uploaded by you isn't supported. + +Once you have made a remote, you can use it like this: + +Make a new item + + rclone mkdir remote:item + +List the contents of a item + + rclone ls remote:item + +Sync /home/local/directory to the remote item, deleting any excess files +in the item. + + rclone sync --interactive /home/local/directory remote:item + +Notes + +Because of Internet Archive's architecture, it enqueues write operations +(and extra post-processings) in a per-item queue. You can check item's +queue at https://catalogd.archive.org/history/item-name-here . Because +of that, all uploads/deletes will not show up immediately and takes some +time to be available. The per-item queue is enqueued to an another +queue, Item Deriver Queue. You can check the status of Item Deriver +Queue here. This queue has a limit, and it may block you from uploading, +or even deleting. You should avoid uploading a lot of small files for +better behavior. + +You can optionally wait for the server's processing to finish, by +setting non-zero value to wait_archive key. By making it wait, rclone +can do normal file comparison. Make sure to set a large enough value +(e.g. 30m0s for smaller files) as it can take a long time depending on +server's queue. + +About metadata + +This backend supports setting, updating and reading metadata of each +file. The metadata will appear as file metadata on Internet Archive. +However, some fields are reserved by both Internet Archive and rclone. + +The following are reserved by Internet Archive: - name - source - size - +md5 - crc32 - sha1 - format - old_version - viruscheck - summation + +Trying to set values to these keys is ignored with a warning. Only +setting mtime is an exception. Doing so make it the identical behavior +as setting ModTime. + +rclone reserves all the keys starting with rclone-. Setting value for +these keys will give you warnings, but values are set according to +request. + +If there are multiple values for a key, only the first one is returned. +This is a limitation of rclone, that supports one value per one key. It +can be triggered when you did a server-side copy. + +Reading metadata will also provide custom (non-standard nor reserved) +ones. + +Filtering auto generated files + +The Internet Archive automatically creates metadata files after upload. +These can cause problems when doing an rclone sync as rclone will try, +and fail, to delete them. These metadata files are not changeable, as +they are created by the Internet Archive automatically. + +These auto-created files can be excluded from the sync using metadata +filtering. + + rclone sync ... --metadata-exclude "source=metadata" --metadata-exclude "format=Metadata" + +Which excludes from the sync any files which have the source=metadata or +format=Metadata flags which are added to Internet Archive auto-created +files. + +Configuration + +Here is an example of making an internetarchive configuration. Most +applies to the other providers as well, any differences are described +below. + +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 + Option Storage. + Type of storage to configure. + Choose a number from below, or type in your own value. + XX / InternetArchive Items + \ (internetarchive) + Storage> internetarchive + Option access_key_id. IAS3 Access Key. - Leave blank for anonymous access. You can find one here: https://archive.org/account/s3.php - - Properties: - - - Config: access_key_id - - Env Var: RCLONE_INTERNETARCHIVE_ACCESS_KEY_ID - - Type: string - - Required: false - - #### --internetarchive-secret-access-key - + Enter a value. Press Enter to leave empty. + access_key_id> XXXX + Option secret_access_key. IAS3 Secret Key (password). - Leave blank for anonymous access. - - Properties: - - - Config: secret_access_key - - Env Var: RCLONE_INTERNETARCHIVE_SECRET_ACCESS_KEY - - Type: string - - Required: false - - ### Advanced options - - Here are the Advanced options specific to internetarchive (Internet Archive). - - #### --internetarchive-endpoint - + Enter a value. Press Enter to leave empty. + secret_access_key> XXXX + Edit advanced config? + y) Yes + n) No (default) + y/n> y + Option endpoint. IAS3 Endpoint. - Leave blank for default value. - - Properties: - - - Config: endpoint - - Env Var: RCLONE_INTERNETARCHIVE_ENDPOINT - - Type: string - - Default: "https://s3.us.archive.org" - - #### --internetarchive-front-endpoint - + Enter a string value. Press Enter for the default (https://s3.us.archive.org). + endpoint> + Option front_endpoint. Host of InternetArchive Frontend. - Leave blank for default value. - - Properties: - - - Config: front_endpoint - - Env Var: RCLONE_INTERNETARCHIVE_FRONT_ENDPOINT - - Type: string - - Default: "https://archive.org" - - #### --internetarchive-disable-checksum - - Don't ask the server to test against MD5 checksum calculated by rclone. + Enter a string value. Press Enter for the default (https://archive.org). + front_endpoint> + Option disable_checksum. + Don't store MD5 checksum with object metadata. Normally rclone will calculate the MD5 checksum of the input before uploading it so it can ask the server to check the object against checksum. This is great for data integrity checking but can cause long delays for large files to start uploading. - - Properties: - - - Config: disable_checksum - - Env Var: RCLONE_INTERNETARCHIVE_DISABLE_CHECKSUM - - Type: bool - - Default: true - - #### --internetarchive-wait-archive - - Timeout for waiting the server's processing tasks (specifically archive and book_op) to finish. - Only enable if you need to be guaranteed to be reflected after write operations. - 0 to disable waiting. No errors to be thrown in case of timeout. - - Properties: - - - Config: wait_archive - - Env Var: RCLONE_INTERNETARCHIVE_WAIT_ARCHIVE - - Type: Duration - - Default: 0s - - #### --internetarchive-encoding - + Enter a boolean value (true or false). Press Enter for the default (true). + disable_checksum> true + Option encoding. The encoding for the backend. - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. + Enter a encoder.MultiEncoder value. Press Enter for the default (Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot). + encoding> + Edit advanced config? + y) Yes + n) No (default) + y/n> n + -------------------- + [remote] + type = internetarchive + access_key_id = XXXX + secret_access_key = XXXX + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y - Properties: +Standard options - - Config: encoding - - Env Var: RCLONE_INTERNETARCHIVE_ENCODING - - Type: Encoding - - Default: Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot +Here are the Standard options specific to internetarchive (Internet +Archive). - #### --internetarchive-description +--internetarchive-access-key-id - Description of the remote +IAS3 Access Key. - Properties: +Leave blank for anonymous access. You can find one here: +https://archive.org/account/s3.php - - Config: description - - Env Var: RCLONE_INTERNETARCHIVE_DESCRIPTION - - Type: string - - Required: false +Properties: - ### Metadata +- Config: access_key_id +- Env Var: RCLONE_INTERNETARCHIVE_ACCESS_KEY_ID +- Type: string +- Required: false - Metadata fields provided by Internet Archive. - If there are multiple values for a key, only the first one is returned. - This is a limitation of Rclone, that supports one value per one key. +--internetarchive-secret-access-key - Owner is able to add custom keys. Metadata feature grabs all the keys including them. +IAS3 Secret Key (password). - Here are the possible system metadata items for the internetarchive backend. +Leave blank for anonymous access. - | Name | Help | Type | Example | Read Only | - |------|------|------|---------|-----------| - | crc32 | CRC32 calculated by Internet Archive | string | 01234567 | **Y** | - | format | Name of format identified by Internet Archive | string | Comma-Separated Values | **Y** | - | md5 | MD5 hash calculated by Internet Archive | string | 01234567012345670123456701234567 | **Y** | - | mtime | Time of last modification, managed by Rclone | RFC 3339 | 2006-01-02T15:04:05.999999999Z | **Y** | - | name | Full file path, without the bucket part | filename | backend/internetarchive/internetarchive.go | **Y** | - | old_version | Whether the file was replaced and moved by keep-old-version flag | boolean | true | **Y** | - | rclone-ia-mtime | Time of last modification, managed by Internet Archive | RFC 3339 | 2006-01-02T15:04:05.999999999Z | N | - | rclone-mtime | Time of last modification, managed by Rclone | RFC 3339 | 2006-01-02T15:04:05.999999999Z | N | - | rclone-update-track | Random value used by Rclone for tracking changes inside Internet Archive | string | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | N | - | sha1 | SHA1 hash calculated by Internet Archive | string | 0123456701234567012345670123456701234567 | **Y** | - | size | File size in bytes | decimal number | 123456 | **Y** | - | source | The source of the file | string | original | **Y** | - | summation | Check https://forum.rclone.org/t/31922 for how it is used | string | md5 | **Y** | - | viruscheck | The last time viruscheck process was run for the file (?) | unixtime | 1654191352 | **Y** | +Properties: - See the [metadata](https://rclone.org/docs/#metadata) docs for more info. +- Config: secret_access_key +- Env Var: RCLONE_INTERNETARCHIVE_SECRET_ACCESS_KEY +- Type: string +- Required: false +Advanced options +Here are the Advanced options specific to internetarchive (Internet +Archive). - # Jottacloud +--internetarchive-endpoint - Jottacloud is a cloud storage service provider from a Norwegian company, using its own datacenters - in Norway. In addition to the official service at [jottacloud.com](https://www.jottacloud.com/), - it also provides white-label solutions to different companies, such as: - * Telia - * Telia Cloud (cloud.telia.se) - * Telia Sky (sky.telia.no) - * Tele2 - * Tele2 Cloud (mittcloud.tele2.se) - * Onlime - * Onlime Cloud Storage (onlime.dk) - * Elkjøp (with subsidiaries): - * Elkjøp Cloud (cloud.elkjop.no) - * Elgiganten Sweden (cloud.elgiganten.se) - * Elgiganten Denmark (cloud.elgiganten.dk) - * Giganti Cloud (cloud.gigantti.fi) - * ELKO Cloud (cloud.elko.is) +IAS3 Endpoint. - Most of the white-label versions are supported by this backend, although may require different - authentication setup - described below. - - Paths are specified as `remote:path` - - Paths may be as deep as required, e.g. `remote:directory/subdirectory`. - - ## Authentication types - - Some of the whitelabel versions uses a different authentication method than the official service, - and you have to choose the correct one when setting up the remote. - - ### Standard authentication - - The standard authentication method used by the official service (jottacloud.com), as well as - some of the whitelabel services, requires you to generate a single-use personal login token - from the account security settings in the service's web interface. Log in to your account, - go to "Settings" and then "Security", or use the direct link presented to you by rclone when - configuring the remote: . Scroll down to the section - "Personal login token", and click the "Generate" button. Note that if you are using a - whitelabel service you probably can't use the direct link, you need to find the same page in - their dedicated web interface, and also it may be in a different location than described above. - - To access your account from multiple instances of rclone, you need to configure each of them - with a separate personal login token. E.g. you create a Jottacloud remote with rclone in one - location, and copy the configuration file to a second location where you also want to run - rclone and access the same remote. Then you need to replace the token for one of them, using - the [config reconnect](https://rclone.org/commands/rclone_config_reconnect/) command, which - requires you to generate a new personal login token and supply as input. If you do not - do this, the token may easily end up being invalidated, resulting in both instances failing - with an error message something along the lines of: - - oauth2: cannot fetch token: 400 Bad Request - Response: {"error":"invalid_grant","error_description":"Stale token"} - - When this happens, you need to replace the token as described above to be able to use your - remote again. - - All personal login tokens you have taken into use will be listed in the web interface under - "My logged in devices", and from the right side of that list you can click the "X" button to - revoke individual tokens. - - ### Legacy authentication - - If you are using one of the whitelabel versions (e.g. from Elkjøp) you may not have the option - to generate a CLI token. In this case you'll have to use the legacy authentication. To do this select - yes when the setup asks for legacy authentication and enter your username and password. - The rest of the setup is identical to the default setup. - - ### Telia Cloud authentication - - Similar to other whitelabel versions Telia Cloud doesn't offer the option of creating a CLI token, and - additionally uses a separate authentication flow where the username is generated internally. To setup - rclone to use Telia Cloud, choose Telia Cloud authentication in the setup. The rest of the setup is - identical to the default setup. - - ### Tele2 Cloud authentication - - As Tele2-Com Hem merger was completed this authentication can be used for former Com Hem Cloud and - Tele2 Cloud customers as no support for creating a CLI token exists, and additionally uses a separate - authentication flow where the username is generated internally. To setup rclone to use Tele2 Cloud, - choose Tele2 Cloud authentication in the setup. The rest of the setup is identical to the default setup. - - ### Onlime Cloud Storage authentication - - Onlime has sold access to Jottacloud proper, while providing localized support to Danish Customers, but - have recently set up their own hosting, transferring their customers from Jottacloud servers to their - own ones. - - This, of course, necessitates using their servers for authentication, but otherwise functionality and - architecture seems equivalent to Jottacloud. - - To setup rclone to use Onlime Cloud Storage, choose Onlime Cloud authentication in the setup. The rest - of the setup is identical to the default setup. - - ## Configuration +Leave blank for default value. - Here is an example of how to make a remote called `remote` with the default setup. 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 Option Storage. Type of -storage to configure. Choose a number from below, or type in your own -value. [snip] XX / Jottacloud  (jottacloud) [snip] Storage> jottacloud -Edit advanced config? y) Yes n) No (default) y/n> n Option config_type. -Select authentication type. Choose a number from below, or type in an -existing string value. Press Enter for the default (standard). / -Standard authentication. 1 | Use this if you're a normal Jottacloud -user.  (standard) / Legacy authentication. 2 | This is only required for -certain whitelabel versions of Jottacloud and not recommended for normal -users.  (legacy) / Telia Cloud authentication. 3 | Use this if you are -using Telia Cloud.  (telia) / Tele2 Cloud authentication. 4 | Use this -if you are using Tele2 Cloud.  (tele2) / Onlime Cloud authentication. 5 -| Use this if you are using Onlime Cloud.  (onlime) config_type> 1 -Personal login token. Generate here: -https://www.jottacloud.com/web/secure Login Token> Use a non-standard -device/mountpoint? Choosing no, the default, will let you access the -storage used for the archive section of the official Jottacloud client. -If you instead want to access the sync or the backup section, for -example, you must choose yes. y) Yes n) No (default) y/n> y Option -config_device. The device to use. In standard setup the built-in Jotta -device is used, which contains predefined mountpoints for archive, sync -etc. All other devices are treated as backup devices by the official -Jottacloud client. You may create a new by entering a unique name. -Choose a number from below, or type in your own string value. Press -Enter for the default (DESKTOP-3H31129). 1 > DESKTOP-3H31129 2 > Jotta -config_device> 2 Option config_mountpoint. The mountpoint to use for the -built-in device Jotta. The standard setup is to use the Archive -mountpoint. Most other mountpoints have very limited support in rclone -and should generally be avoided. Choose a number from below, or type in -an existing string value. Press Enter for the default (Archive). 1 > -Archive 2 > Shared 3 > Sync config_mountpoint> 1 -------------------- -[remote] type = jottacloud configVersion = 1 client_id = jottacli -client_secret = tokenURL = -https://id.jottacloud.com/auth/realms/jottacloud/protocol/openid-connect/token -token = {........} username = 2940e57271a93d987d6f8a21 device = Jotta -mountpoint = Archive -------------------- y) Yes this is OK (default) e) -Edit this remote d) Delete this remote y/e/d> y - - - Once configured you can then use `rclone` like this, - - List directories in top level of your Jottacloud - - rclone lsd remote: - - List all the files in your Jottacloud +Properties: - rclone ls remote: - - To copy a local directory to an Jottacloud directory called backup +- Config: endpoint +- Env Var: RCLONE_INTERNETARCHIVE_ENDPOINT +- Type: string +- Default: "https://s3.us.archive.org" - rclone copy /home/source remote:backup +--internetarchive-front-endpoint - ### Devices and Mountpoints +Host of InternetArchive Frontend. - The official Jottacloud client registers a device for each computer you install - it on, and shows them in the backup section of the user interface. For each - folder you select for backup it will create a mountpoint within this device. - A built-in device called Jotta is special, and contains mountpoints Archive, - Sync and some others, used for corresponding features in official clients. +Leave blank for default value. - With rclone you'll want to use the standard Jotta/Archive device/mountpoint in - most cases. However, you may for example want to access files from the sync or - backup functionality provided by the official clients, and rclone therefore - provides the option to select other devices and mountpoints during config. +Properties: - You are allowed to create new devices and mountpoints. All devices except the - built-in Jotta device are treated as backup devices by official Jottacloud - clients, and the mountpoints on them are individual backup sets. +- Config: front_endpoint +- Env Var: RCLONE_INTERNETARCHIVE_FRONT_ENDPOINT +- Type: string +- Default: "https://archive.org" - With the built-in Jotta device, only existing, built-in, mountpoints can be - selected. In addition to the mentioned Archive and Sync, it may contain - several other mountpoints such as: Latest, Links, Shared and Trash. All of - these are special mountpoints with a different internal representation than - the "regular" mountpoints. Rclone will only to a very limited degree support - them. Generally you should avoid these, unless you know what you are doing. +--internetarchive-disable-checksum - ### --fast-list +Don't ask the server to test against MD5 checksum calculated by rclone. +Normally rclone will calculate the MD5 checksum of the input before +uploading it so it can ask the server to check the object against +checksum. This is great for data integrity checking but can cause long +delays for large files to start uploading. - This backend supports `--fast-list` which allows you to use fewer - transactions in exchange for more memory. See the [rclone - docs](https://rclone.org/docs/#fast-list) for more details. +Properties: - Note that the implementation in Jottacloud always uses only a single - API request to get the entire list, so for large folders this could - lead to long wait time before the first results are shown. +- Config: disable_checksum +- Env Var: RCLONE_INTERNETARCHIVE_DISABLE_CHECKSUM +- Type: bool +- Default: true - Note also that with rclone version 1.58 and newer, information about - [MIME types](https://rclone.org/overview/#mime-type) and metadata item [utime](#metadata) - are not available when using `--fast-list`. +--internetarchive-wait-archive - ### Modification times and hashes +Timeout for waiting the server's processing tasks (specifically archive +and book_op) to finish. Only enable if you need to be guaranteed to be +reflected after write operations. 0 to disable waiting. No errors to be +thrown in case of timeout. - Jottacloud allows modification times to be set on objects accurate to 1 - second. These will be used to detect whether objects need syncing or - not. +Properties: - Jottacloud supports MD5 type hashes, so you can use the `--checksum` - flag. +- Config: wait_archive +- Env Var: RCLONE_INTERNETARCHIVE_WAIT_ARCHIVE +- Type: Duration +- Default: 0s - Note that Jottacloud requires the MD5 hash before upload so if the - source does not have an MD5 checksum then the file will be cached - temporarily on disk (in location given by - [--temp-dir](https://rclone.org/docs/#temp-dir-dir)) before it is uploaded. - Small files will be cached in memory - see the - [--jottacloud-md5-memory-limit](#jottacloud-md5-memory-limit) flag. - When uploading from local disk the source checksum is always available, - so this does not apply. Starting with rclone version 1.52 the same is - true for encrypted remotes (in older versions the crypt backend would not - calculate hashes for uploads from local disk, so the Jottacloud - backend had to do it as described above). +--internetarchive-encoding - ### Restricted filename characters +The encoding for the backend. - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: +See the encoding section in the overview for more info. - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | " | 0x22 | " | - | * | 0x2A | * | - | : | 0x3A | : | - | < | 0x3C | < | - | > | 0x3E | > | - | ? | 0x3F | ? | - | \| | 0x7C | | | +Properties: - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in XML strings. +- Config: encoding +- Env Var: RCLONE_INTERNETARCHIVE_ENCODING +- Type: Encoding +- Default: Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot - ### Deleting files +--internetarchive-description - By default, rclone will send all files to the trash when deleting files. They will be permanently - deleted automatically after 30 days. You may bypass the trash and permanently delete files immediately - by using the [--jottacloud-hard-delete](#jottacloud-hard-delete) flag, or set the equivalent environment variable. - Emptying the trash is supported by the [cleanup](https://rclone.org/commands/rclone_cleanup/) command. +Description of the remote. - ### Versions +Properties: - Jottacloud supports file versioning. When rclone uploads a new version of a file it creates a new version of it. - Currently rclone only supports retrieving the current version but older versions can be accessed via the Jottacloud Website. +- Config: description +- Env Var: RCLONE_INTERNETARCHIVE_DESCRIPTION +- Type: string +- Required: false - Versioning can be disabled by `--jottacloud-no-versions` option. This is achieved by deleting the remote file prior to uploading - a new version. If the upload the fails no version of the file will be available in the remote. +Metadata - ### Quota information +Metadata fields provided by Internet Archive. If there are multiple +values for a key, only the first one is returned. This is a limitation +of Rclone, that supports one value per one key. - To view your current quota you can use the `rclone about remote:` - command which will display your usage limit (unless it is unlimited) - and the current usage. +Owner is able to add custom keys. Metadata feature grabs all the keys +including them. +Here are the possible system metadata items for the internetarchive +backend. - ### Standard options + -------------------------------------------------------------------------------------------------------------------------------------- + Name Help Type Example Read Only + --------------------- ---------------------------------- ----------- -------------------------------------------- -------------------- + crc32 CRC32 calculated by Internet string 01234567 Y + Archive - Here are the Standard options specific to jottacloud (Jottacloud). + format Name of format identified by string Comma-Separated Values Y + Internet Archive - #### --jottacloud-client-id + md5 MD5 hash calculated by Internet string 01234567012345670123456701234567 Y + Archive - OAuth Client Id. + mtime Time of last modification, managed RFC 3339 2006-01-02T15:04:05.999999999Z Y + by Rclone - Leave blank normally. + name Full file path, without the bucket filename backend/internetarchive/internetarchive.go Y + part - Properties: + old_version Whether the file was replaced and boolean true Y + moved by keep-old-version flag - - Config: client_id - - Env Var: RCLONE_JOTTACLOUD_CLIENT_ID - - Type: string - - Required: false + rclone-ia-mtime Time of last modification, managed RFC 3339 2006-01-02T15:04:05.999999999Z N + by Internet Archive - #### --jottacloud-client-secret + rclone-mtime Time of last modification, managed RFC 3339 2006-01-02T15:04:05.999999999Z N + by Rclone - OAuth Client Secret. + rclone-update-track Random value used by Rclone for string aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa N + tracking changes inside Internet + Archive - Leave blank normally. + sha1 SHA1 hash calculated by Internet string 0123456701234567012345670123456701234567 Y + Archive - Properties: + size File size in bytes decimal 123456 Y + number - - Config: client_secret - - Env Var: RCLONE_JOTTACLOUD_CLIENT_SECRET - - Type: string - - Required: false + source The source of the file string original Y - ### Advanced options + summation Check string md5 Y + https://forum.rclone.org/t/31922 + for how it is used - Here are the Advanced options specific to jottacloud (Jottacloud). + viruscheck The last time viruscheck process unixtime 1654191352 Y + was run for the file (?) + -------------------------------------------------------------------------------------------------------------------------------------- - #### --jottacloud-token +See the metadata docs for more info. - OAuth Access Token as a JSON blob. +Jottacloud - Properties: +Jottacloud is a cloud storage service provider from a Norwegian company, +using its own datacenters in Norway. In addition to the official service +at jottacloud.com, it also provides white-label solutions to different +companies, such as: * Telia * Telia Cloud (cloud.telia.se) * Telia Sky +(sky.telia.no) * Tele2 * Tele2 Cloud (mittcloud.tele2.se) * Onlime * +Onlime Cloud Storage (onlime.dk) * Elkjøp (with subsidiaries): * Elkjøp +Cloud (cloud.elkjop.no) * Elgiganten Sweden (cloud.elgiganten.se) * +Elgiganten Denmark (cloud.elgiganten.dk) * Giganti Cloud +(cloud.gigantti.fi) * ELKO Cloud (cloud.elko.is) - - Config: token - - Env Var: RCLONE_JOTTACLOUD_TOKEN - - Type: string - - Required: false +Most of the white-label versions are supported by this backend, although +may require different authentication setup - described below. - #### --jottacloud-auth-url +Paths are specified as remote:path - Auth server URL. +Paths may be as deep as required, e.g. remote:directory/subdirectory. - Leave blank to use the provider defaults. +Authentication types - Properties: +Some of the whitelabel versions uses a different authentication method +than the official service, and you have to choose the correct one when +setting up the remote. - - Config: auth_url - - Env Var: RCLONE_JOTTACLOUD_AUTH_URL - - Type: string - - Required: false +Standard authentication - #### --jottacloud-token-url +The standard authentication method used by the official service +(jottacloud.com), as well as some of the whitelabel services, requires +you to generate a single-use personal login token from the account +security settings in the service's web interface. Log in to your +account, go to "Settings" and then "Security", or use the direct link +presented to you by rclone when configuring the remote: +https://www.jottacloud.com/web/secure. Scroll down to the section +"Personal login token", and click the "Generate" button. Note that if +you are using a whitelabel service you probably can't use the direct +link, you need to find the same page in their dedicated web interface, +and also it may be in a different location than described above. + +To access your account from multiple instances of rclone, you need to +configure each of them with a separate personal login token. E.g. you +create a Jottacloud remote with rclone in one location, and copy the +configuration file to a second location where you also want to run +rclone and access the same remote. Then you need to replace the token +for one of them, using the config reconnect command, which requires you +to generate a new personal login token and supply as input. If you do +not do this, the token may easily end up being invalidated, resulting in +both instances failing with an error message something along the lines +of: + + oauth2: cannot fetch token: 400 Bad Request + Response: {"error":"invalid_grant","error_description":"Stale token"} + +When this happens, you need to replace the token as described above to +be able to use your remote again. + +All personal login tokens you have taken into use will be listed in the +web interface under "My logged in devices", and from the right side of +that list you can click the "X" button to revoke individual tokens. + +Legacy authentication + +If you are using one of the whitelabel versions (e.g. from Elkjøp) you +may not have the option to generate a CLI token. In this case you'll +have to use the legacy authentication. To do this select yes when the +setup asks for legacy authentication and enter your username and +password. The rest of the setup is identical to the default setup. + +Telia Cloud authentication + +Similar to other whitelabel versions Telia Cloud doesn't offer the +option of creating a CLI token, and additionally uses a separate +authentication flow where the username is generated internally. To setup +rclone to use Telia Cloud, choose Telia Cloud authentication in the +setup. The rest of the setup is identical to the default setup. + +Tele2 Cloud authentication + +As Tele2-Com Hem merger was completed this authentication can be used +for former Com Hem Cloud and Tele2 Cloud customers as no support for +creating a CLI token exists, and additionally uses a separate +authentication flow where the username is generated internally. To setup +rclone to use Tele2 Cloud, choose Tele2 Cloud authentication in the +setup. The rest of the setup is identical to the default setup. + +Onlime Cloud Storage authentication + +Onlime has sold access to Jottacloud proper, while providing localized +support to Danish Customers, but have recently set up their own hosting, +transferring their customers from Jottacloud servers to their own ones. + +This, of course, necessitates using their servers for authentication, +but otherwise functionality and architecture seems equivalent to +Jottacloud. + +To setup rclone to use Onlime Cloud Storage, choose Onlime Cloud +authentication in the setup. The rest of the setup is identical to the +default setup. + +Configuration + +Here is an example of how to make a remote called remote with the +default setup. 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 + Option Storage. + Type of storage to configure. + Choose a number from below, or type in your own value. + [snip] + XX / Jottacloud + \ (jottacloud) + [snip] + Storage> jottacloud + Edit advanced config? + y) Yes + n) No (default) + y/n> n + Option config_type. + Select authentication type. + Choose a number from below, or type in an existing string value. + Press Enter for the default (standard). + / Standard authentication. + 1 | Use this if you're a normal Jottacloud user. + \ (standard) + / Legacy authentication. + 2 | This is only required for certain whitelabel versions of Jottacloud and not recommended for normal users. + \ (legacy) + / Telia Cloud authentication. + 3 | Use this if you are using Telia Cloud. + \ (telia) + / Tele2 Cloud authentication. + 4 | Use this if you are using Tele2 Cloud. + \ (tele2) + / Onlime Cloud authentication. + 5 | Use this if you are using Onlime Cloud. + \ (onlime) + config_type> 1 + Personal login token. + Generate here: https://www.jottacloud.com/web/secure + Login Token> + Use a non-standard device/mountpoint? + Choosing no, the default, will let you access the storage used for the archive + section of the official Jottacloud client. If you instead want to access the + sync or the backup section, for example, you must choose yes. + y) Yes + n) No (default) + y/n> y + Option config_device. + The device to use. In standard setup the built-in Jotta device is used, + which contains predefined mountpoints for archive, sync etc. All other devices + are treated as backup devices by the official Jottacloud client. You may create + a new by entering a unique name. + Choose a number from below, or type in your own string value. + Press Enter for the default (DESKTOP-3H31129). + 1 > DESKTOP-3H31129 + 2 > Jotta + config_device> 2 + Option config_mountpoint. + The mountpoint to use for the built-in device Jotta. + The standard setup is to use the Archive mountpoint. Most other mountpoints + have very limited support in rclone and should generally be avoided. + Choose a number from below, or type in an existing string value. + Press Enter for the default (Archive). + 1 > Archive + 2 > Shared + 3 > Sync + config_mountpoint> 1 + -------------------- + [remote] + type = jottacloud + configVersion = 1 + client_id = jottacli + client_secret = + tokenURL = https://id.jottacloud.com/auth/realms/jottacloud/protocol/openid-connect/token + token = {........} + username = 2940e57271a93d987d6f8a21 + device = Jotta + mountpoint = Archive + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y + +Once configured you can then use rclone like this, + +List directories in top level of your Jottacloud + + rclone lsd remote: + +List all the files in your Jottacloud + + rclone ls remote: + +To copy a local directory to an Jottacloud directory called backup + + rclone copy /home/source remote:backup + +Devices and Mountpoints + +The official Jottacloud client registers a device for each computer you +install it on, and shows them in the backup section of the user +interface. For each folder you select for backup it will create a +mountpoint within this device. A built-in device called Jotta is +special, and contains mountpoints Archive, Sync and some others, used +for corresponding features in official clients. + +With rclone you'll want to use the standard Jotta/Archive +device/mountpoint in most cases. However, you may for example want to +access files from the sync or backup functionality provided by the +official clients, and rclone therefore provides the option to select +other devices and mountpoints during config. + +You are allowed to create new devices and mountpoints. All devices +except the built-in Jotta device are treated as backup devices by +official Jottacloud clients, and the mountpoints on them are individual +backup sets. + +With the built-in Jotta device, only existing, built-in, mountpoints can +be selected. In addition to the mentioned Archive and Sync, it may +contain several other mountpoints such as: Latest, Links, Shared and +Trash. All of these are special mountpoints with a different internal +representation than the "regular" mountpoints. Rclone will only to a +very limited degree support them. Generally you should avoid these, +unless you know what you are doing. + +--fast-list + +This backend supports --fast-list which allows you to use fewer +transactions in exchange for more memory. See the rclone docs for more +details. + +Note that the implementation in Jottacloud always uses only a single API +request to get the entire list, so for large folders this could lead to +long wait time before the first results are shown. + +Note also that with rclone version 1.58 and newer, information about +MIME types and metadata item utime are not available when using +--fast-list. + +Modification times and hashes + +Jottacloud allows modification times to be set on objects accurate to 1 +second. These will be used to detect whether objects need syncing or +not. + +Jottacloud supports MD5 type hashes, so you can use the --checksum flag. - Token server url. +Note that Jottacloud requires the MD5 hash before upload so if the +source does not have an MD5 checksum then the file will be cached +temporarily on disk (in location given by --temp-dir) before it is +uploaded. Small files will be cached in memory - see the +--jottacloud-md5-memory-limit flag. When uploading from local disk the +source checksum is always available, so this does not apply. Starting +with rclone version 1.52 the same is true for encrypted remotes (in +older versions the crypt backend would not calculate hashes for uploads +from local disk, so the Jottacloud backend had to do it as described +above). - Leave blank to use the provider defaults. +Restricted filename characters - Properties: +In addition to the default restricted characters set the following +characters are also replaced: - - Config: token_url - - Env Var: RCLONE_JOTTACLOUD_TOKEN_URL - - Type: string - - Required: false + Character Value Replacement + ----------- ------- ------------- + " 0x22 " + * 0x2A * + : 0x3A : + < 0x3C < + > 0x3E > + ? 0x3F ? + | 0x7C | - #### --jottacloud-md5-memory-limit +Invalid UTF-8 bytes will also be replaced, as they can't be used in XML +strings. - Files bigger than this will be cached on disk to calculate the MD5 if required. +Deleting files - Properties: +By default, rclone will send all files to the trash when deleting files. +They will be permanently deleted automatically after 30 days. You may +bypass the trash and permanently delete files immediately by using the +--jottacloud-hard-delete flag, or set the equivalent environment +variable. Emptying the trash is supported by the cleanup command. - - Config: md5_memory_limit - - Env Var: RCLONE_JOTTACLOUD_MD5_MEMORY_LIMIT - - Type: SizeSuffix - - Default: 10Mi +Versions - #### --jottacloud-trashed-only +Jottacloud supports file versioning. When rclone uploads a new version +of a file it creates a new version of it. Currently rclone only supports +retrieving the current version but older versions can be accessed via +the Jottacloud Website. - Only show files that are in the trash. +Versioning can be disabled by --jottacloud-no-versions option. This is +achieved by deleting the remote file prior to uploading a new version. +If the upload the fails no version of the file will be available in the +remote. - This will show trashed files in their original directory structure. +Quota information - Properties: +To view your current quota you can use the rclone about remote: command +which will display your usage limit (unless it is unlimited) and the +current usage. - - Config: trashed_only - - Env Var: RCLONE_JOTTACLOUD_TRASHED_ONLY - - Type: bool - - Default: false +Standard options - #### --jottacloud-hard-delete +Here are the Standard options specific to jottacloud (Jottacloud). - Delete files permanently rather than putting them into the trash. +--jottacloud-client-id - Properties: +OAuth Client Id. - - Config: hard_delete - - Env Var: RCLONE_JOTTACLOUD_HARD_DELETE - - Type: bool - - Default: false +Leave blank normally. - #### --jottacloud-upload-resume-limit +Properties: - Files bigger than this can be resumed if the upload fail's. +- Config: client_id +- Env Var: RCLONE_JOTTACLOUD_CLIENT_ID +- Type: string +- Required: false - Properties: +--jottacloud-client-secret - - Config: upload_resume_limit - - Env Var: RCLONE_JOTTACLOUD_UPLOAD_RESUME_LIMIT - - Type: SizeSuffix - - Default: 10Mi +OAuth Client Secret. - #### --jottacloud-no-versions +Leave blank normally. - Avoid server side versioning by deleting files and recreating files instead of overwriting them. +Properties: - Properties: +- Config: client_secret +- Env Var: RCLONE_JOTTACLOUD_CLIENT_SECRET +- Type: string +- Required: false - - Config: no_versions - - Env Var: RCLONE_JOTTACLOUD_NO_VERSIONS - - Type: bool - - Default: false +Advanced options - #### --jottacloud-encoding +Here are the Advanced options specific to jottacloud (Jottacloud). - The encoding for the backend. +--jottacloud-token - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +OAuth Access Token as a JSON blob. - Properties: +Properties: - - Config: encoding - - Env Var: RCLONE_JOTTACLOUD_ENCODING - - Type: Encoding - - Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot +- Config: token +- Env Var: RCLONE_JOTTACLOUD_TOKEN +- Type: string +- Required: false - #### --jottacloud-description +--jottacloud-auth-url - Description of the remote +Auth server URL. - Properties: +Leave blank to use the provider defaults. - - Config: description - - Env Var: RCLONE_JOTTACLOUD_DESCRIPTION - - Type: string - - Required: false +Properties: - ### Metadata +- Config: auth_url +- Env Var: RCLONE_JOTTACLOUD_AUTH_URL +- Type: string +- Required: false - Jottacloud has limited support for metadata, currently an extended set of timestamps. +--jottacloud-token-url - Here are the possible system metadata items for the jottacloud backend. +Token server url. - | Name | Help | Type | Example | Read Only | - |------|------|------|---------|-----------| - | btime | Time of file birth (creation), read from rclone metadata | RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | N | - | content-type | MIME type, also known as media type | string | text/plain | **Y** | - | mtime | Time of last modification, read from rclone metadata | RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | N | - | utime | Time of last upload, when current revision was created, generated by backend | RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | **Y** | +Leave blank to use the provider defaults. - See the [metadata](https://rclone.org/docs/#metadata) docs for more info. +Properties: +- Config: token_url +- Env Var: RCLONE_JOTTACLOUD_TOKEN_URL +- Type: string +- Required: false +--jottacloud-md5-memory-limit - ## Limitations +Files bigger than this will be cached on disk to calculate the MD5 if +required. - Note that Jottacloud is case insensitive so you can't have a file called - "Hello.doc" and one called "hello.doc". +Properties: - There are quite a few characters that can't be in Jottacloud file names. Rclone will map these names to and from an identical - looking unicode equivalent. For example if a file has a ? in it will be mapped to ? instead. +- Config: md5_memory_limit +- Env Var: RCLONE_JOTTACLOUD_MD5_MEMORY_LIMIT +- Type: SizeSuffix +- Default: 10Mi - Jottacloud only supports filenames up to 255 characters in length. +--jottacloud-trashed-only - ## Troubleshooting +Only show files that are in the trash. - Jottacloud exhibits some inconsistent behaviours regarding deleted files and folders which may cause Copy, Move and DirMove - operations to previously deleted paths to fail. Emptying the trash should help in such cases. +This will show trashed files in their original directory structure. - # Koofr +Properties: - Paths are specified as `remote:path` +- Config: trashed_only +- Env Var: RCLONE_JOTTACLOUD_TRASHED_ONLY +- Type: bool +- Default: false - Paths may be as deep as required, e.g. `remote:directory/subdirectory`. +--jottacloud-hard-delete - ## Configuration +Delete files permanently rather than putting them into the trash. - The initial setup for Koofr involves creating an application password for - rclone. You can do that by opening the Koofr - [web application](https://app.koofr.net/app/admin/preferences/password), - giving the password a nice name like `rclone` and clicking on generate. +Properties: - Here is an example of how to make a remote called `koofr`. First run: +- Config: hard_delete +- Env Var: RCLONE_JOTTACLOUD_HARD_DELETE +- Type: bool +- Default: false - rclone config +--jottacloud-upload-resume-limit - This will guide you through an interactive setup process: +Files bigger than this can be resumed if the upload fail's. -No remotes found, make a new one? n) New remote s) Set configuration -password q) Quit config n/s/q> n name> koofr Option Storage. Type of -storage to configure. Choose a number from below, or type in your own -value. [snip] 22 / Koofr, Digi Storage and other Koofr-compatible -storage providers  (koofr) [snip] Storage> koofr Option provider. Choose -your storage provider. Choose a number from below, or type in your own -value. Press Enter to leave empty. 1 / Koofr, https://app.koofr.net/ - (koofr) 2 / Digi Storage, https://storage.rcs-rds.ro/  (digistorage) 3 -/ Any other Koofr API compatible storage service  (other) provider> 1 -Option user. Your user name. Enter a value. user> USERNAME Option -password. Your password for rclone (generate one at -https://app.koofr.net/app/admin/preferences/password). Choose an -alternative below. y) Yes, type in my own password g) Generate random -password y/g> y Enter the password: password: Confirm the password: -password: Edit advanced config? y) Yes n) No (default) y/n> n Remote -config -------------------- [koofr] type = koofr provider = koofr user = -USERNAME password = *** ENCRYPTED *** -------------------- y) Yes this -is OK (default) e) Edit this remote d) Delete this remote y/e/d> y +Properties: +- Config: upload_resume_limit +- Env Var: RCLONE_JOTTACLOUD_UPLOAD_RESUME_LIMIT +- Type: SizeSuffix +- Default: 10Mi - You can choose to edit advanced config in order to enter your own service URL - if you use an on-premise or white label Koofr instance, or choose an alternative - mount instead of your primary storage. +--jottacloud-no-versions - Once configured you can then use `rclone` like this, +Avoid server side versioning by deleting files and recreating files +instead of overwriting them. - List directories in top level of your Koofr +Properties: - rclone lsd koofr: +- Config: no_versions +- Env Var: RCLONE_JOTTACLOUD_NO_VERSIONS +- Type: bool +- Default: false - List all the files in your Koofr +--jottacloud-encoding - rclone ls koofr: +The encoding for the backend. - To copy a local directory to an Koofr directory called backup +See the encoding section in the overview for more info. - rclone copy /home/source koofr:backup +Properties: - ### Restricted filename characters +- Config: encoding +- Env Var: RCLONE_JOTTACLOUD_ENCODING +- Type: Encoding +- Default: + Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: +--jottacloud-description - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | \ | 0x5C | \ | +Description of the remote. - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in XML strings. +Properties: +- Config: description +- Env Var: RCLONE_JOTTACLOUD_DESCRIPTION +- Type: string +- Required: false - ### Standard options +Metadata - Here are the Standard options specific to koofr (Koofr, Digi Storage and other Koofr-compatible storage providers). +Jottacloud has limited support for metadata, currently an extended set +of timestamps. - #### --koofr-provider +Here are the possible system metadata items for the jottacloud backend. + ----------------------------------------------------------------------------------------------------- + Name Help Type Example Read Only + -------------- --------------- ----------- ------------------------------------- -------------------- + btime Time of file RFC 3339 2006-01-02T15:04:05.999999999Z07:00 N + birth + (creation), + read from + rclone metadata + + content-type MIME type, also string text/plain Y + known as media + type + + mtime Time of last RFC 3339 2006-01-02T15:04:05.999999999Z07:00 N + modification, + read from + rclone metadata + + utime Time of last RFC 3339 2006-01-02T15:04:05.999999999Z07:00 Y + upload, when + current + revision was + created, + generated by + backend + ----------------------------------------------------------------------------------------------------- + +See the metadata docs for more info. + +Limitations + +Note that Jottacloud is case insensitive so you can't have a file called +"Hello.doc" and one called "hello.doc". + +There are quite a few characters that can't be in Jottacloud file names. +Rclone will map these names to and from an identical looking unicode +equivalent. For example if a file has a ? in it will be mapped to ? +instead. + +Jottacloud only supports filenames up to 255 characters in length. + +Troubleshooting + +Jottacloud exhibits some inconsistent behaviours regarding deleted files +and folders which may cause Copy, Move and DirMove operations to +previously deleted paths to fail. Emptying the trash should help in such +cases. + +Koofr + +Paths are specified as remote:path + +Paths may be as deep as required, e.g. remote:directory/subdirectory. + +Configuration + +The initial setup for Koofr involves creating an application password +for rclone. You can do that by opening the Koofr web application, giving +the password a nice name like rclone and clicking on generate. + +Here is an example of how to make a remote called koofr. 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> koofr + Option Storage. + Type of storage to configure. + Choose a number from below, or type in your own value. + [snip] + 22 / Koofr, Digi Storage and other Koofr-compatible storage providers + \ (koofr) + [snip] + Storage> koofr + Option provider. Choose your storage provider. - - Properties: - - - Config: provider - - Env Var: RCLONE_KOOFR_PROVIDER - - Type: string - - Required: false - - Examples: - - "koofr" - - Koofr, https://app.koofr.net/ - - "digistorage" - - Digi Storage, https://storage.rcs-rds.ro/ - - "other" - - Any other Koofr API compatible storage service - - #### --koofr-endpoint - - The Koofr API endpoint to use. - - Properties: - - - Config: endpoint - - Env Var: RCLONE_KOOFR_ENDPOINT - - Provider: other - - Type: string - - Required: true - - #### --koofr-user - + Choose a number from below, or type in your own value. + Press Enter to leave empty. + 1 / Koofr, https://app.koofr.net/ + \ (koofr) + 2 / Digi Storage, https://storage.rcs-rds.ro/ + \ (digistorage) + 3 / Any other Koofr API compatible storage service + \ (other) + provider> 1 + Option user. Your user name. - - Properties: - - - Config: user - - Env Var: RCLONE_KOOFR_USER - - Type: string - - Required: true - - #### --koofr-password - + Enter a value. + user> USERNAME + Option password. Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password). + Choose an alternative below. + y) Yes, type in my own password + g) Generate random password + y/g> y + Enter the password: + password: + Confirm the password: + password: + Edit advanced config? + y) Yes + n) No (default) + y/n> n + Remote config + -------------------- + [koofr] + type = koofr + provider = koofr + user = USERNAME + password = *** ENCRYPTED *** + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). +You can choose to edit advanced config in order to enter your own +service URL if you use an on-premise or white label Koofr instance, or +choose an alternative mount instead of your primary storage. - Properties: +Once configured you can then use rclone like this, - - Config: password - - Env Var: RCLONE_KOOFR_PASSWORD - - Provider: koofr - - Type: string - - Required: true +List directories in top level of your Koofr - ### Advanced options + rclone lsd koofr: - Here are the Advanced options specific to koofr (Koofr, Digi Storage and other Koofr-compatible storage providers). +List all the files in your Koofr - #### --koofr-mountid + rclone ls koofr: - Mount ID of the mount to use. +To copy a local directory to an Koofr directory called backup - If omitted, the primary mount is used. + rclone copy /home/source koofr:backup - Properties: +Restricted filename characters - - Config: mountid - - Env Var: RCLONE_KOOFR_MOUNTID - - Type: string - - Required: false +In addition to the default restricted characters set the following +characters are also replaced: - #### --koofr-setmtime + Character Value Replacement + ----------- ------- ------------- + \ 0x5C \ - Does the backend support setting modification time. +Invalid UTF-8 bytes will also be replaced, as they can't be used in XML +strings. - Set this to false if you use a mount ID that points to a Dropbox or Amazon Drive backend. +Standard options - Properties: +Here are the Standard options specific to koofr (Koofr, Digi Storage and +other Koofr-compatible storage providers). - - Config: setmtime - - Env Var: RCLONE_KOOFR_SETMTIME - - Type: bool - - Default: true +--koofr-provider - #### --koofr-encoding +Choose your storage provider. - The encoding for the backend. +Properties: - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +- Config: provider +- Env Var: RCLONE_KOOFR_PROVIDER +- Type: string +- Required: false +- Examples: + - "koofr" + - Koofr, https://app.koofr.net/ + - "digistorage" + - Digi Storage, https://storage.rcs-rds.ro/ + - "other" + - Any other Koofr API compatible storage service - Properties: +--koofr-endpoint - - Config: encoding - - Env Var: RCLONE_KOOFR_ENCODING - - Type: Encoding - - Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot +The Koofr API endpoint to use. - #### --koofr-description +Properties: - Description of the remote +- Config: endpoint +- Env Var: RCLONE_KOOFR_ENDPOINT +- Provider: other +- Type: string +- Required: true - Properties: +--koofr-user - - Config: description - - Env Var: RCLONE_KOOFR_DESCRIPTION - - Type: string - - Required: false +Your user name. +Properties: +- Config: user +- Env Var: RCLONE_KOOFR_USER +- Type: string +- Required: true - ## Limitations +--koofr-password - Note that Koofr is case insensitive so you can't have a file called - "Hello.doc" and one called "hello.doc". +Your password for rclone generate one at +https://app.koofr.net/app/admin/preferences/password. - ## Providers +NB Input to this must be obscured - see rclone obscure. - ### Koofr +Properties: - This is the original [Koofr](https://koofr.eu) storage provider used as main example and described in the [configuration](#configuration) section above. +- Config: password +- Env Var: RCLONE_KOOFR_PASSWORD +- Provider: koofr +- Type: string +- Required: true - ### Digi Storage +Advanced options - [Digi Storage](https://www.digi.ro/servicii/online/digi-storage) is a cloud storage service run by [Digi.ro](https://www.digi.ro/) that - provides a Koofr API. +Here are the Advanced options specific to koofr (Koofr, Digi Storage and +other Koofr-compatible storage providers). - Here is an example of how to make a remote called `ds`. First run: +--koofr-mountid - rclone config +Mount ID of the mount to use. - This will guide you through an interactive setup process: +If omitted, the primary mount is used. -No remotes found, make a new one? n) New remote s) Set configuration -password q) Quit config n/s/q> n name> ds Option Storage. Type of -storage to configure. Choose a number from below, or type in your own -value. [snip] 22 / Koofr, Digi Storage and other Koofr-compatible -storage providers  (koofr) [snip] Storage> koofr Option provider. Choose -your storage provider. Choose a number from below, or type in your own -value. Press Enter to leave empty. 1 / Koofr, https://app.koofr.net/ - (koofr) 2 / Digi Storage, https://storage.rcs-rds.ro/  (digistorage) 3 -/ Any other Koofr API compatible storage service  (other) provider> 2 -Option user. Your user name. Enter a value. user> USERNAME Option -password. Your password for rclone (generate one at -https://storage.rcs-rds.ro/app/admin/preferences/password). Choose an -alternative below. y) Yes, type in my own password g) Generate random -password y/g> y Enter the password: password: Confirm the password: -password: Edit advanced config? y) Yes n) No (default) y/n> n --------------------- [ds] type = koofr provider = digistorage user = -USERNAME password = *** ENCRYPTED *** -------------------- y) Yes this -is OK (default) e) Edit this remote d) Delete this remote y/e/d> y +Properties: +- Config: mountid +- Env Var: RCLONE_KOOFR_MOUNTID +- Type: string +- Required: false - ### Other +--koofr-setmtime - You may also want to use another, public or private storage provider that runs a Koofr API compatible service, by simply providing the base URL to connect to. +Does the backend support setting modification time. - Here is an example of how to make a remote called `other`. First run: +Set this to false if you use a mount ID that points to a Dropbox or +Amazon Drive backend. - rclone config +Properties: - This will guide you through an interactive setup process: +- Config: setmtime +- Env Var: RCLONE_KOOFR_SETMTIME +- Type: bool +- Default: true -No remotes found, make a new one? n) New remote s) Set configuration -password q) Quit config n/s/q> n name> other Option Storage. Type of -storage to configure. Choose a number from below, or type in your own -value. [snip] 22 / Koofr, Digi Storage and other Koofr-compatible -storage providers  (koofr) [snip] Storage> koofr Option provider. Choose -your storage provider. Choose a number from below, or type in your own -value. Press Enter to leave empty. 1 / Koofr, https://app.koofr.net/ - (koofr) 2 / Digi Storage, https://storage.rcs-rds.ro/  (digistorage) 3 -/ Any other Koofr API compatible storage service  (other) provider> 3 -Option endpoint. The Koofr API endpoint to use. Enter a value. endpoint> -https://koofr.other.org Option user. Your user name. Enter a value. -user> USERNAME Option password. Your password for rclone (generate one -at your service's settings page). Choose an alternative below. y) Yes, -type in my own password g) Generate random password y/g> y Enter the -password: password: Confirm the password: password: Edit advanced -config? y) Yes n) No (default) y/n> n -------------------- [other] type -= koofr provider = other endpoint = https://koofr.other.org user = -USERNAME password = *** ENCRYPTED *** -------------------- y) Yes this -is OK (default) e) Edit this remote d) Delete this remote y/e/d> y +--koofr-encoding +The encoding for the backend. - # Linkbox +See the encoding section in the overview for more info. - Linkbox is [a private cloud drive](https://linkbox.to/). +Properties: - ## Configuration +- Config: encoding +- Env Var: RCLONE_KOOFR_ENCODING +- Type: Encoding +- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot - Here is an example of making a remote for Linkbox. +--koofr-description - First run: +Description of the remote. - rclone config +Properties: - This will guide you through an interactive setup process: +- Config: description +- Env Var: RCLONE_KOOFR_DESCRIPTION +- Type: string +- Required: false -No remotes found, make a new one? n) New remote s) Set configuration -password q) Quit config n/s/q> n +Limitations -Enter name for new remote. name> remote +Note that Koofr is case insensitive so you can't have a file called +"Hello.doc" and one called "hello.doc". -Option Storage. Type of storage to configure. Choose a number from -below, or type in your own value. XX / Linkbox  (linkbox) Storage> XX +Providers -Option token. Token from https://www.linkbox.to/admin/account Enter a -value. token> testFromCLToken +Koofr -Configuration complete. Options: - type: linkbox - token: XXXXXXXXXXX -Keep this "linkbox" remote? y) Yes this is OK (default) e) Edit this -remote d) Delete this remote y/e/d> y +This is the original Koofr storage provider used as main example and +described in the configuration section above. +Digi Storage +Digi Storage is a cloud storage service run by Digi.ro that provides a +Koofr API. - ### Standard options +Here is an example of how to make a remote called ds. First run: - Here are the Standard options specific to linkbox (Linkbox). + rclone config - #### --linkbox-token +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> ds + Option Storage. + Type of storage to configure. + Choose a number from below, or type in your own value. + [snip] + 22 / Koofr, Digi Storage and other Koofr-compatible storage providers + \ (koofr) + [snip] + Storage> koofr + Option provider. + Choose your storage provider. + Choose a number from below, or type in your own value. + Press Enter to leave empty. + 1 / Koofr, https://app.koofr.net/ + \ (koofr) + 2 / Digi Storage, https://storage.rcs-rds.ro/ + \ (digistorage) + 3 / Any other Koofr API compatible storage service + \ (other) + provider> 2 + Option user. + Your user name. + Enter a value. + user> USERNAME + Option password. + Your password for rclone (generate one at https://storage.rcs-rds.ro/app/admin/preferences/password). + Choose an alternative below. + y) Yes, type in my own password + g) Generate random password + y/g> y + Enter the password: + password: + Confirm the password: + password: + Edit advanced config? + y) Yes + n) No (default) + y/n> n + -------------------- + [ds] + type = koofr + provider = digistorage + user = USERNAME + password = *** ENCRYPTED *** + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y + +Other + +You may also want to use another, public or private storage provider +that runs a Koofr API compatible service, by simply providing the base +URL to connect to. + +Here is an example of how to make a remote called other. 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> other + Option Storage. + Type of storage to configure. + Choose a number from below, or type in your own value. + [snip] + 22 / Koofr, Digi Storage and other Koofr-compatible storage providers + \ (koofr) + [snip] + Storage> koofr + Option provider. + Choose your storage provider. + Choose a number from below, or type in your own value. + Press Enter to leave empty. + 1 / Koofr, https://app.koofr.net/ + \ (koofr) + 2 / Digi Storage, https://storage.rcs-rds.ro/ + \ (digistorage) + 3 / Any other Koofr API compatible storage service + \ (other) + provider> 3 + Option endpoint. + The Koofr API endpoint to use. + Enter a value. + endpoint> https://koofr.other.org + Option user. + Your user name. + Enter a value. + user> USERNAME + Option password. + Your password for rclone (generate one at your service's settings page). + Choose an alternative below. + y) Yes, type in my own password + g) Generate random password + y/g> y + Enter the password: + password: + Confirm the password: + password: + Edit advanced config? + y) Yes + n) No (default) + y/n> n + -------------------- + [other] + type = koofr + provider = other + endpoint = https://koofr.other.org + user = USERNAME + password = *** ENCRYPTED *** + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y + +Linkbox + +Linkbox is a private cloud drive. + +Configuration + +Here is an example of making a remote for Linkbox. + +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 + + Enter name for new remote. + name> remote + + Option Storage. + Type of storage to configure. + Choose a number from below, or type in your own value. + XX / Linkbox + \ (linkbox) + Storage> XX + + Option token. Token from https://www.linkbox.to/admin/account + Enter a value. + token> testFromCLToken - Properties: + Configuration complete. + Options: + - type: linkbox + - token: XXXXXXXXXXX + Keep this "linkbox" remote? + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y - - Config: token - - Env Var: RCLONE_LINKBOX_TOKEN - - Type: string - - Required: true +Standard options - ### Advanced options +Here are the Standard options specific to linkbox (Linkbox). - Here are the Advanced options specific to linkbox (Linkbox). +--linkbox-token - #### --linkbox-description +Token from https://www.linkbox.to/admin/account - Description of the remote +Properties: - Properties: +- Config: token +- Env Var: RCLONE_LINKBOX_TOKEN +- Type: string +- Required: true - - Config: description - - Env Var: RCLONE_LINKBOX_DESCRIPTION - - Type: string - - Required: false +Advanced options +Here are the Advanced options specific to linkbox (Linkbox). +--linkbox-description - ## Limitations +Description of the remote. - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. +Properties: - # Mail.ru Cloud +- Config: description +- Env Var: RCLONE_LINKBOX_DESCRIPTION +- Type: string +- Required: false - [Mail.ru Cloud](https://cloud.mail.ru/) is a cloud storage provided by a Russian internet company [Mail.Ru Group](https://mail.ru). The official desktop client is [Disk-O:](https://disk-o.cloud/en), available on Windows and Mac OS. +Limitations - ## Features highlights +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - - Paths may be as deep as required, e.g. `remote:directory/subdirectory` - - Files have a `last modified time` property, directories don't - - Deleted files are by default moved to the trash - - Files and directories can be shared via public links - - Partial uploads or streaming are not supported, file size must be known before upload - - Maximum file size is limited to 2G for a free account, unlimited for paid accounts - - Storage keeps hash for all files and performs transparent deduplication, - the hash algorithm is a modified SHA1 - - If a particular file is already present in storage, one can quickly submit file hash - instead of long file upload (this optimization is supported by rclone) +Mail.ru Cloud - ## Configuration +Mail.ru Cloud is a cloud storage provided by a Russian internet company +Mail.Ru Group. The official desktop client is Disk-O:, available on +Windows and Mac OS. - Here is an example of making a mailru configuration. +Features highlights - First create a Mail.ru Cloud account and choose a tariff. +- Paths may be as deep as required, e.g. remote:directory/subdirectory +- Files have a last modified time property, directories don't +- Deleted files are by default moved to the trash +- Files and directories can be shared via public links +- Partial uploads or streaming are not supported, file size must be + known before upload +- Maximum file size is limited to 2G for a free account, unlimited for + paid accounts +- Storage keeps hash for all files and performs transparent + deduplication, the hash algorithm is a modified SHA1 +- If a particular file is already present in storage, one can quickly + submit file hash instead of long file upload (this optimization is + supported by rclone) - You will need to log in and create an app password for rclone. Rclone - **will not work** with your normal username and password - it will - give an error like `oauth2: server response missing access_token`. +Configuration - - Click on your user icon in the top right - - Go to Security / "Пароль и безопасность" - - Click password for apps / "Пароли для внешних приложений" - - Add the password - give it a name - eg "rclone" - - Copy the password and use this password below - your normal login password won't work. +Here is an example of making a mailru configuration. - Now run +First create a Mail.ru Cloud account and choose a tariff. - rclone config +You will need to log in and create an app password for rclone. Rclone +will not work with your normal username and password - it will give an +error like oauth2: server response missing access_token. - This will guide you through an interactive setup process: +- Click on your user icon in the top right +- Go to Security / "Пароль и безопасность" +- Click password for apps / "Пароли для внешних приложений" +- Add the password - give it a name - eg "rclone" +- Copy the password and use this password below - your normal login + password won't work. -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. Type of storage to configure. Enter a string value. Press -Enter for the default (""). Choose a number from below, or type in your -own value [snip] XX / Mail.ru Cloud  "mailru" [snip] Storage> mailru -User name (usually email) Enter a string value. Press Enter for the -default (""). user> username@mail.ru Password +Now run -This must be an app password - rclone will not work with your normal -password. See the Configuration section in the docs for how to make an -app password. y) Yes type in my own password g) Generate random password -y/g> y Enter the password: password: Confirm the password: password: -Skip full upload if there is another file with same data hash. This -feature is called "speedup" or "put by hash". It is especially efficient -in case of generally available files like popular books, video or audio -clips [snip] Enter a boolean value (true or false). Press Enter for the -default ("true"). Choose a number from below, or type in your own value -1 / Enable  "true" 2 / Disable  "false" speedup_enable> 1 Edit advanced -config? (y/n) y) Yes n) No y/n> n Remote config -------------------- -[remote] type = mailru user = username@mail.ru pass = *** ENCRYPTED *** -speedup_enable = true -------------------- y) Yes this is OK e) Edit -this remote d) Delete this remote y/e/d> y + rclone config +This will guide you through an interactive setup process: - Configuration of this backend does not require a local web browser. - You can use the configured backend as shown below: - - See top level directories - - rclone lsd remote: - - Make a new directory - - rclone mkdir remote:directory - - List the contents of a directory - - rclone ls remote:directory - - Sync `/home/local/directory` to the remote path, deleting any - excess files in the path. - - rclone sync --interactive /home/local/directory remote:directory - - ### Modification times and hashes - - Files support a modification time attribute with up to 1 second precision. - Directories do not have a modification time, which is shown as "Jan 1 1970". - - File hashes are supported, with a custom Mail.ru algorithm based on SHA1. - If file size is less than or equal to the SHA1 block size (20 bytes), - its hash is simply its data right-padded with zero bytes. - Hashes of a larger file is computed as a SHA1 of the file data - bytes concatenated with a decimal representation of the data length. - - ### Emptying Trash - - Removing a file or directory actually moves it to the trash, which is not - visible to rclone but can be seen in a web browser. The trashed file - still occupies part of total quota. If you wish to empty your trash - and free some quota, you can use the `rclone cleanup remote:` command, - which will permanently delete all your trashed files. - This command does not take any path arguments. - - ### Quota information - - To view your current quota you can use the `rclone about remote:` - command which will display your usage limit (quota) and the current usage. - - ### Restricted filename characters - - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | " | 0x22 | " | - | * | 0x2A | * | - | : | 0x3A | : | - | < | 0x3C | < | - | > | 0x3E | > | - | ? | 0x3F | ? | - | \ | 0x5C | \ | - | \| | 0x7C | | | - - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. - - - ### Standard options - - Here are the Standard options specific to mailru (Mail.ru Cloud). - - #### --mailru-client-id - - OAuth Client Id. - - Leave blank normally. - - Properties: - - - Config: client_id - - Env Var: RCLONE_MAILRU_CLIENT_ID - - Type: string - - Required: false - - #### --mailru-client-secret - - OAuth Client Secret. - - Leave blank normally. - - Properties: - - - Config: client_secret - - Env Var: RCLONE_MAILRU_CLIENT_SECRET - - Type: string - - Required: false - - #### --mailru-user - - User name (usually email). - - Properties: - - - Config: user - - Env Var: RCLONE_MAILRU_USER - - Type: string - - Required: true - - #### --mailru-pass - - Password. + 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. + Type of storage to configure. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + [snip] + XX / Mail.ru Cloud + \ "mailru" + [snip] + Storage> mailru + User name (usually email) + Enter a string value. Press Enter for the default (""). + user> username@mail.ru + Password This must be an app password - rclone will not work with your normal password. See the Configuration section in the docs for how to make an app password. - - - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - - Properties: - - - Config: pass - - Env Var: RCLONE_MAILRU_PASS - - Type: string - - Required: true - - #### --mailru-speedup-enable - + y) Yes type in my own password + g) Generate random password + y/g> y + Enter the password: + password: + Confirm the password: + password: Skip full upload if there is another file with same data hash. - This feature is called "speedup" or "put by hash". It is especially efficient - in case of generally available files like popular books, video or audio clips, - because files are searched by hash in all accounts of all mailru users. - It is meaningless and ineffective if source file is unique or encrypted. - Please note that rclone may need local memory and disk space to calculate - content hash in advance and decide whether full upload is required. - Also, if rclone does not know file size in advance (e.g. in case of - streaming or partial uploads), it will not even try this optimization. + in case of generally available files like popular books, video or audio clips + [snip] + Enter a boolean value (true or false). Press Enter for the default ("true"). + Choose a number from below, or type in your own value + 1 / Enable + \ "true" + 2 / Disable + \ "false" + speedup_enable> 1 + Edit advanced config? (y/n) + y) Yes + n) No + y/n> n + Remote config + -------------------- + [remote] + type = mailru + user = username@mail.ru + pass = *** ENCRYPTED *** + speedup_enable = true + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y - Properties: +Configuration of this backend does not require a local web browser. You +can use the configured backend as shown below: - - Config: speedup_enable - - Env Var: RCLONE_MAILRU_SPEEDUP_ENABLE - - Type: bool - - Default: true - - Examples: - - "true" - - Enable - - "false" - - Disable +See top level directories - ### Advanced options + rclone lsd remote: - Here are the Advanced options specific to mailru (Mail.ru Cloud). +Make a new directory - #### --mailru-token + rclone mkdir remote:directory - OAuth Access Token as a JSON blob. +List the contents of a directory - Properties: + rclone ls remote:directory - - Config: token - - Env Var: RCLONE_MAILRU_TOKEN - - Type: string - - Required: false +Sync /home/local/directory to the remote path, deleting any excess files +in the path. - #### --mailru-auth-url + rclone sync --interactive /home/local/directory remote:directory - Auth server URL. +Modification times and hashes - Leave blank to use the provider defaults. +Files support a modification time attribute with up to 1 second +precision. Directories do not have a modification time, which is shown +as "Jan 1 1970". - Properties: +File hashes are supported, with a custom Mail.ru algorithm based on +SHA1. If file size is less than or equal to the SHA1 block size (20 +bytes), its hash is simply its data right-padded with zero bytes. Hashes +of a larger file is computed as a SHA1 of the file data bytes +concatenated with a decimal representation of the data length. - - Config: auth_url - - Env Var: RCLONE_MAILRU_AUTH_URL - - Type: string - - Required: false +Emptying Trash - #### --mailru-token-url +Removing a file or directory actually moves it to the trash, which is +not visible to rclone but can be seen in a web browser. The trashed file +still occupies part of total quota. If you wish to empty your trash and +free some quota, you can use the rclone cleanup remote: command, which +will permanently delete all your trashed files. This command does not +take any path arguments. - Token server url. +Quota information - Leave blank to use the provider defaults. +To view your current quota you can use the rclone about remote: command +which will display your usage limit (quota) and the current usage. - Properties: +Restricted filename characters - - Config: token_url - - Env Var: RCLONE_MAILRU_TOKEN_URL - - Type: string - - Required: false +In addition to the default restricted characters set the following +characters are also replaced: - #### --mailru-speedup-file-patterns + Character Value Replacement + ----------- ------- ------------- + " 0x22 " + * 0x2A * + : 0x3A : + < 0x3C < + > 0x3E > + ? 0x3F ? + \ 0x5C \ + | 0x7C | - Comma separated list of file name patterns eligible for speedup (put by hash). +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - Patterns are case insensitive and can contain '*' or '?' meta characters. +Standard options - Properties: +Here are the Standard options specific to mailru (Mail.ru Cloud). - - Config: speedup_file_patterns - - Env Var: RCLONE_MAILRU_SPEEDUP_FILE_PATTERNS - - Type: string - - Default: "*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf" - - Examples: - - "" - - Empty list completely disables speedup (put by hash). - - "*" - - All files will be attempted for speedup. - - "*.mkv,*.avi,*.mp4,*.mp3" - - Only common audio/video files will be tried for put by hash. - - "*.zip,*.gz,*.rar,*.pdf" - - Only common archives or PDF books will be tried for speedup. +--mailru-client-id - #### --mailru-speedup-max-disk +OAuth Client Id. - This option allows you to disable speedup (put by hash) for large files. +Leave blank normally. - Reason is that preliminary hashing can exhaust your RAM or disk space. +Properties: - Properties: +- Config: client_id +- Env Var: RCLONE_MAILRU_CLIENT_ID +- Type: string +- Required: false - - Config: speedup_max_disk - - Env Var: RCLONE_MAILRU_SPEEDUP_MAX_DISK - - Type: SizeSuffix - - Default: 3Gi - - Examples: - - "0" - - Completely disable speedup (put by hash). - - "1G" - - Files larger than 1Gb will be uploaded directly. - - "3G" - - Choose this option if you have less than 3Gb free on local disk. +--mailru-client-secret - #### --mailru-speedup-max-memory +OAuth Client Secret. - Files larger than the size given below will always be hashed on disk. +Leave blank normally. - Properties: +Properties: - - Config: speedup_max_memory - - Env Var: RCLONE_MAILRU_SPEEDUP_MAX_MEMORY - - Type: SizeSuffix - - Default: 32Mi - - Examples: - - "0" - - Preliminary hashing will always be done in a temporary disk location. - - "32M" - - Do not dedicate more than 32Mb RAM for preliminary hashing. - - "256M" - - You have at most 256Mb RAM free for hash calculations. +- Config: client_secret +- Env Var: RCLONE_MAILRU_CLIENT_SECRET +- Type: string +- Required: false - #### --mailru-check-hash +--mailru-user - What should copy do if file checksum is mismatched or invalid. +User name (usually email). - Properties: +Properties: - - Config: check_hash - - Env Var: RCLONE_MAILRU_CHECK_HASH - - Type: bool - - Default: true - - Examples: - - "true" - - Fail with error. - - "false" - - Ignore and continue. +- Config: user +- Env Var: RCLONE_MAILRU_USER +- Type: string +- Required: true - #### --mailru-user-agent +--mailru-pass - HTTP user agent used internally by client. +Password. - Defaults to "rclone/VERSION" or "--user-agent" provided on command line. +This must be an app password - rclone will not work with your normal +password. See the Configuration section in the docs for how to make an +app password. - Properties: +NB Input to this must be obscured - see rclone obscure. - - Config: user_agent - - Env Var: RCLONE_MAILRU_USER_AGENT - - Type: string - - Required: false +Properties: - #### --mailru-quirks +- Config: pass +- Env Var: RCLONE_MAILRU_PASS +- Type: string +- Required: true - Comma separated list of internal maintenance flags. +--mailru-speedup-enable - This option must not be used by an ordinary user. It is intended only to - facilitate remote troubleshooting of backend issues. Strict meaning of - flags is not documented and not guaranteed to persist between releases. - Quirks will be removed when the backend grows stable. - Supported quirks: atomicmkdir binlist unknowndirs +Skip full upload if there is another file with same data hash. - Properties: +This feature is called "speedup" or "put by hash". It is especially +efficient in case of generally available files like popular books, video +or audio clips, because files are searched by hash in all accounts of +all mailru users. It is meaningless and ineffective if source file is +unique or encrypted. Please note that rclone may need local memory and +disk space to calculate content hash in advance and decide whether full +upload is required. Also, if rclone does not know file size in advance +(e.g. in case of streaming or partial uploads), it will not even try +this optimization. - - Config: quirks - - Env Var: RCLONE_MAILRU_QUIRKS - - Type: string - - Required: false +Properties: - #### --mailru-encoding +- Config: speedup_enable +- Env Var: RCLONE_MAILRU_SPEEDUP_ENABLE +- Type: bool +- Default: true +- Examples: + - "true" + - Enable + - "false" + - Disable - The encoding for the backend. +Advanced options - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +Here are the Advanced options specific to mailru (Mail.ru Cloud). - Properties: +--mailru-token - - Config: encoding - - Env Var: RCLONE_MAILRU_ENCODING - - Type: Encoding - - Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot +OAuth Access Token as a JSON blob. - #### --mailru-description +Properties: - Description of the remote +- Config: token +- Env Var: RCLONE_MAILRU_TOKEN +- Type: string +- Required: false - Properties: +--mailru-auth-url - - Config: description - - Env Var: RCLONE_MAILRU_DESCRIPTION - - Type: string - - Required: false +Auth server URL. +Leave blank to use the provider defaults. +Properties: - ## Limitations +- Config: auth_url +- Env Var: RCLONE_MAILRU_AUTH_URL +- Type: string +- Required: false - File size limits depend on your account. A single file size is limited by 2G - for a free account and unlimited for paid tariffs. Please refer to the Mail.ru - site for the total uploaded size limits. +--mailru-token-url - Note that Mailru is case insensitive so you can't have a file called - "Hello.doc" and one called "hello.doc". +Token server url. - # Mega +Leave blank to use the provider defaults. - [Mega](https://mega.nz/) is a cloud storage and file hosting service - known for its security feature where all files are encrypted locally - before they are uploaded. This prevents anyone (including employees of - Mega) from accessing the files without knowledge of the key used for - encryption. +Properties: - This is an rclone backend for Mega which supports the file transfer - features of Mega using the same client side encryption. +- Config: token_url +- Env Var: RCLONE_MAILRU_TOKEN_URL +- Type: string +- Required: false - Paths are specified as `remote:path` +--mailru-speedup-file-patterns - Paths may be as deep as required, e.g. `remote:directory/subdirectory`. +Comma separated list of file name patterns eligible for speedup (put by +hash). - ## Configuration +Patterns are case insensitive and can contain '*' or '?' meta +characters. - Here is an example of how to make a remote called `remote`. First run: +Properties: - rclone config +- Config: speedup_file_patterns +- Env Var: RCLONE_MAILRU_SPEEDUP_FILE_PATTERNS +- Type: string +- Default: ".mkv,.avi,.mp4,.mp3,.zip,.gz,.rar,.pdf" +- Examples: + - "" + - Empty list completely disables speedup (put by hash). + - "*" + - All files will be attempted for speedup. + - ".mkv,.avi,.mp4,.mp3" + - Only common audio/video files will be tried for put by hash. + - ".zip,.gz,.rar,.pdf" + - Only common archives or PDF books will be tried for speedup. - This will guide you through an interactive setup process: +--mailru-speedup-max-disk -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 [snip] -XX / Mega  "mega" [snip] Storage> mega User name user> you@example.com -Password. y) Yes type in my own password g) Generate random password n) -No leave this optional password blank y/g/n> y Enter the password: -password: Confirm the password: password: Remote config --------------------- [remote] type = mega user = you@example.com pass = -*** ENCRYPTED *** -------------------- y) Yes this is OK e) Edit this -remote d) Delete this remote y/e/d> y +This option allows you to disable speedup (put by hash) for large files. +Reason is that preliminary hashing can exhaust your RAM or disk space. - **NOTE:** The encryption keys need to have been already generated after a regular login - via the browser, otherwise attempting to use the credentials in `rclone` will fail. +Properties: - Once configured you can then use `rclone` like this, +- Config: speedup_max_disk +- Env Var: RCLONE_MAILRU_SPEEDUP_MAX_DISK +- Type: SizeSuffix +- Default: 3Gi +- Examples: + - "0" + - Completely disable speedup (put by hash). + - "1G" + - Files larger than 1Gb will be uploaded directly. + - "3G" + - Choose this option if you have less than 3Gb free on local + disk. - List directories in top level of your Mega +--mailru-speedup-max-memory - rclone lsd remote: +Files larger than the size given below will always be hashed on disk. - List all the files in your Mega +Properties: - rclone ls remote: +- Config: speedup_max_memory +- Env Var: RCLONE_MAILRU_SPEEDUP_MAX_MEMORY +- Type: SizeSuffix +- Default: 32Mi +- Examples: + - "0" + - Preliminary hashing will always be done in a temporary disk + location. + - "32M" + - Do not dedicate more than 32Mb RAM for preliminary hashing. + - "256M" + - You have at most 256Mb RAM free for hash calculations. - To copy a local directory to an Mega directory called backup +--mailru-check-hash - rclone copy /home/source remote:backup +What should copy do if file checksum is mismatched or invalid. - ### Modification times and hashes +Properties: - Mega does not support modification times or hashes yet. +- Config: check_hash +- Env Var: RCLONE_MAILRU_CHECK_HASH +- Type: bool +- Default: true +- Examples: + - "true" + - Fail with error. + - "false" + - Ignore and continue. - ### Restricted filename characters +--mailru-user-agent - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | NUL | 0x00 | ␀ | - | / | 0x2F | / | +HTTP user agent used internally by client. - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. +Defaults to "rclone/VERSION" or "--user-agent" provided on command line. - ### Duplicated files +Properties: - Mega can have two files with exactly the same name and path (unlike a - normal file system). +- Config: user_agent +- Env Var: RCLONE_MAILRU_USER_AGENT +- Type: string +- Required: false - Duplicated files cause problems with the syncing and you will see - messages in the log about duplicates. +--mailru-quirks - Use `rclone dedupe` to fix duplicated files. +Comma separated list of internal maintenance flags. - ### Failure to log-in +This option must not be used by an ordinary user. It is intended only to +facilitate remote troubleshooting of backend issues. Strict meaning of +flags is not documented and not guaranteed to persist between releases. +Quirks will be removed when the backend grows stable. Supported quirks: +atomicmkdir binlist unknowndirs - #### Object not found +Properties: - If you are connecting to your Mega remote for the first time, - to test access and synchronization, you may receive an error such as +- Config: quirks +- Env Var: RCLONE_MAILRU_QUIRKS +- Type: string +- Required: false -Failed to create file system for "my-mega-remote:": couldn't login: -Object (typically, node or user) not found +--mailru-encoding +The encoding for the backend. - The diagnostic steps often recommended in the [rclone forum](https://forum.rclone.org/search?q=mega) - start with the **MEGAcmd** utility. Note that this refers to - the official C++ command from https://github.com/meganz/MEGAcmd - and not the go language built command from t3rm1n4l/megacmd - that is no longer maintained. +See the encoding section in the overview for more info. - Follow the instructions for installing MEGAcmd and try accessing - your remote as they recommend. You can establish whether or not - you can log in using MEGAcmd, and obtain diagnostic information - to help you, and search or work with others in the forum. +Properties: -MEGA CMD> login me@example.com Password: Fetching nodes ... Loading -transfers from local cache Login complete as me@example.com -me@example.com:/$ +- Config: encoding +- Env Var: RCLONE_MAILRU_ENCODING +- Type: Encoding +- Default: + Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot +--mailru-description - Note that some have found issues with passwords containing special - characters. If you can not log on with rclone, but MEGAcmd logs on - just fine, then consider changing your password temporarily to - pure alphanumeric characters, in case that helps. +Description of the remote. +Properties: - #### Repeated commands blocks access +- Config: description +- Env Var: RCLONE_MAILRU_DESCRIPTION +- Type: string +- Required: false - Mega remotes seem to get blocked (reject logins) under "heavy use". - We haven't worked out the exact blocking rules but it seems to be - related to fast paced, successive rclone commands. +Limitations - For example, executing this command 90 times in a row `rclone link - remote:file` will cause the remote to become "blocked". This is not an - abnormal situation, for example if you wish to get the public links of - a directory with hundred of files... After more or less a week, the - remote will remote accept rclone logins normally again. +File size limits depend on your account. A single file size is limited +by 2G for a free account and unlimited for paid tariffs. Please refer to +the Mail.ru site for the total uploaded size limits. - You can mitigate this issue by mounting the remote it with `rclone - mount`. This will log-in when mounting and a log-out when unmounting - only. You can also run `rclone rcd` and then use `rclone rc` to run - the commands over the API to avoid logging in each time. +Note that Mailru is case insensitive so you can't have a file called +"Hello.doc" and one called "hello.doc". - Rclone does not currently close mega sessions (you can see them in the - web interface), however closing the sessions does not solve the issue. +Mega - If you space rclone commands by 3 seconds it will avoid blocking the - remote. We haven't identified the exact blocking rules, so perhaps one - could execute the command 80 times without waiting and avoid blocking - by waiting 3 seconds, then continuing... +Mega is a cloud storage and file hosting service known for its security +feature where all files are encrypted locally before they are uploaded. +This prevents anyone (including employees of Mega) from accessing the +files without knowledge of the key used for encryption. - Note that this has been observed by trial and error and might not be - set in stone. +This is an rclone backend for Mega which supports the file transfer +features of Mega using the same client side encryption. - Other tools seem not to produce this blocking effect, as they use a - different working approach (state-based, using sessionIDs instead of - log-in) which isn't compatible with the current stateless rclone - approach. +Paths are specified as remote:path - Note that once blocked, the use of other tools (such as megacmd) is - not a sure workaround: following megacmd login times have been - observed in succession for blocked remote: 7 minutes, 20 min, 30min, 30 - min, 30min. Web access looks unaffected though. +Paths may be as deep as required, e.g. remote:directory/subdirectory. - Investigation is continuing in relation to workarounds based on - timeouts, pacers, retrials and tpslimits - if you discover something - relevant, please post on the forum. +Configuration - So, if rclone was working nicely and suddenly you are unable to log-in - and you are sure the user and the password are correct, likely you - have got the remote blocked for a while. +Here is an example of how to make a remote called remote. First run: + rclone config - ### Standard options - - Here are the Standard options specific to mega (Mega). - - #### --mega-user - - User name. - - Properties: - - - Config: user - - Env Var: RCLONE_MEGA_USER - - Type: string - - Required: true - - #### --mega-pass +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 + [snip] + XX / Mega + \ "mega" + [snip] + Storage> mega + User name + user> you@example.com Password. + y) Yes type in my own password + g) Generate random password + n) No leave this optional password blank + y/g/n> y + Enter the password: + password: + Confirm the password: + password: + Remote config + -------------------- + [remote] + type = mega + user = you@example.com + pass = *** ENCRYPTED *** + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). +NOTE: The encryption keys need to have been already generated after a +regular login via the browser, otherwise attempting to use the +credentials in rclone will fail. - Properties: +Once configured you can then use rclone like this, - - Config: pass - - Env Var: RCLONE_MEGA_PASS - - Type: string - - Required: true +List directories in top level of your Mega - ### Advanced options + rclone lsd remote: - Here are the Advanced options specific to mega (Mega). +List all the files in your Mega - #### --mega-debug + rclone ls remote: - Output more debug from Mega. +To copy a local directory to an Mega directory called backup - If this flag is set (along with -vv) it will print further debugging - information from the mega backend. + rclone copy /home/source remote:backup - Properties: +Modification times and hashes - - Config: debug - - Env Var: RCLONE_MEGA_DEBUG - - Type: bool - - Default: false +Mega does not support modification times or hashes yet. - #### --mega-hard-delete +Restricted filename characters - Delete files permanently rather than putting them into the trash. + Character Value Replacement + ----------- ------- ------------- + NUL 0x00 ␀ + / 0x2F / - Normally the mega backend will put all deletions into the trash rather - than permanently deleting them. If you specify this then rclone will - permanently delete objects instead. +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - Properties: +Duplicated files - - Config: hard_delete - - Env Var: RCLONE_MEGA_HARD_DELETE - - Type: bool - - Default: false +Mega can have two files with exactly the same name and path (unlike a +normal file system). - #### --mega-use-https +Duplicated files cause problems with the syncing and you will see +messages in the log about duplicates. - Use HTTPS for transfers. +Use rclone dedupe to fix duplicated files. - MEGA uses plain text HTTP connections by default. - Some ISPs throttle HTTP connections, this causes transfers to become very slow. - Enabling this will force MEGA to use HTTPS for all transfers. - HTTPS is normally not necessary since all data is already encrypted anyway. - Enabling it will increase CPU usage and add network overhead. +Failure to log-in - Properties: +Object not found - - Config: use_https - - Env Var: RCLONE_MEGA_USE_HTTPS - - Type: bool - - Default: false +If you are connecting to your Mega remote for the first time, to test +access and synchronization, you may receive an error such as - #### --mega-encoding + Failed to create file system for "my-mega-remote:": + couldn't login: Object (typically, node or user) not found - The encoding for the backend. +The diagnostic steps often recommended in the rclone forum start with +the MEGAcmd utility. Note that this refers to the official C++ command +from https://github.com/meganz/MEGAcmd and not the go language built +command from t3rm1n4l/megacmd that is no longer maintained. - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +Follow the instructions for installing MEGAcmd and try accessing your +remote as they recommend. You can establish whether or not you can log +in using MEGAcmd, and obtain diagnostic information to help you, and +search or work with others in the forum. - Properties: + MEGA CMD> login me@example.com + Password: + Fetching nodes ... + Loading transfers from local cache + Login complete as me@example.com + me@example.com:/$ - - Config: encoding - - Env Var: RCLONE_MEGA_ENCODING - - Type: Encoding - - Default: Slash,InvalidUtf8,Dot +Note that some have found issues with passwords containing special +characters. If you can not log on with rclone, but MEGAcmd logs on just +fine, then consider changing your password temporarily to pure +alphanumeric characters, in case that helps. - #### --mega-description +Repeated commands blocks access - Description of the remote +Mega remotes seem to get blocked (reject logins) under "heavy use". We +haven't worked out the exact blocking rules but it seems to be related +to fast paced, successive rclone commands. - Properties: +For example, executing this command 90 times in a row +rclone link remote:file will cause the remote to become "blocked". This +is not an abnormal situation, for example if you wish to get the public +links of a directory with hundred of files... After more or less a week, +the remote will remote accept rclone logins normally again. - - Config: description - - Env Var: RCLONE_MEGA_DESCRIPTION - - Type: string - - Required: false +You can mitigate this issue by mounting the remote it with rclone mount. +This will log-in when mounting and a log-out when unmounting only. You +can also run rclone rcd and then use rclone rc to run the commands over +the API to avoid logging in each time. +Rclone does not currently close mega sessions (you can see them in the +web interface), however closing the sessions does not solve the issue. +If you space rclone commands by 3 seconds it will avoid blocking the +remote. We haven't identified the exact blocking rules, so perhaps one +could execute the command 80 times without waiting and avoid blocking by +waiting 3 seconds, then continuing... - ### Process `killed` +Note that this has been observed by trial and error and might not be set +in stone. - On accounts with large files or something else, memory usage can significantly increase when executing list/sync instructions. When running on cloud providers (like AWS with EC2), check if the instance type has sufficient memory/CPU to execute the commands. Use the resource monitoring tools to inspect after sending the commands. Look [at this issue](https://forum.rclone.org/t/rclone-with-mega-appears-to-work-only-in-some-accounts/40233/4). +Other tools seem not to produce this blocking effect, as they use a +different working approach (state-based, using sessionIDs instead of +log-in) which isn't compatible with the current stateless rclone +approach. - ## Limitations +Note that once blocked, the use of other tools (such as megacmd) is not +a sure workaround: following megacmd login times have been observed in +succession for blocked remote: 7 minutes, 20 min, 30min, 30 min, 30min. +Web access looks unaffected though. - This backend uses the [go-mega go library](https://github.com/t3rm1n4l/go-mega) which is an opensource - go library implementing the Mega API. There doesn't appear to be any - documentation for the mega protocol beyond the [mega C++ SDK](https://github.com/meganz/sdk) source code - so there are likely quite a few errors still remaining in this library. +Investigation is continuing in relation to workarounds based on +timeouts, pacers, retrials and tpslimits - if you discover something +relevant, please post on the forum. - Mega allows duplicate files which may confuse rclone. +So, if rclone was working nicely and suddenly you are unable to log-in +and you are sure the user and the password are correct, likely you have +got the remote blocked for a while. - # Memory +Standard options - The memory backend is an in RAM backend. It does not persist its - data - use the local backend for that. +Here are the Standard options specific to mega (Mega). - The memory backend behaves like a bucket-based remote (e.g. like - s3). Because it has no parameters you can just use it with the - `:memory:` remote name. +--mega-user - ## Configuration +User name. - You can configure it as a remote like this with `rclone config` too if - you want to: +Properties: -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. Enter a string value. Press Enter for the default (""). -Choose a number from below, or type in your own value [snip] XX / Memory - "memory" [snip] Storage> memory ** See help for memory backend at: -https://rclone.org/memory/ ** +- Config: user +- Env Var: RCLONE_MEGA_USER +- Type: string +- Required: true -Remote config +--mega-pass - --------------- - [remote] - type = memory - --------------- +Password. -y) Yes this is OK (default) -z) Edit this remote -a) Delete this remote y/e/d> y +NB Input to this must be obscured - see rclone obscure. +Properties: - Because the memory backend isn't persistent it is most useful for - testing or with an rclone server or rclone mount, e.g. +- Config: pass +- Env Var: RCLONE_MEGA_PASS +- Type: string +- Required: true - rclone mount :memory: /mnt/tmp - rclone serve webdav :memory: - rclone serve sftp :memory: +Advanced options - ### Modification times and hashes +Here are the Advanced options specific to mega (Mega). - The memory backend supports MD5 hashes and modification times accurate to 1 nS. +--mega-debug - ### Restricted filename characters +Output more debug from Mega. - The memory backend replaces the [default restricted characters - set](https://rclone.org/overview/#restricted-characters). +If this flag is set (along with -vv) it will print further debugging +information from the mega backend. +Properties: - ### Advanced options +- Config: debug +- Env Var: RCLONE_MEGA_DEBUG +- Type: bool +- Default: false - Here are the Advanced options specific to memory (In memory object storage system.). +--mega-hard-delete - #### --memory-description +Delete files permanently rather than putting them into the trash. - Description of the remote +Normally the mega backend will put all deletions into the trash rather +than permanently deleting them. If you specify this then rclone will +permanently delete objects instead. - Properties: +Properties: - - Config: description - - Env Var: RCLONE_MEMORY_DESCRIPTION - - Type: string - - Required: false +- Config: hard_delete +- Env Var: RCLONE_MEGA_HARD_DELETE +- Type: bool +- Default: false +--mega-use-https +Use HTTPS for transfers. - # Akamai NetStorage +MEGA uses plain text HTTP connections by default. Some ISPs throttle +HTTP connections, this causes transfers to become very slow. Enabling +this will force MEGA to use HTTPS for all transfers. HTTPS is normally +not necessary since all data is already encrypted anyway. Enabling it +will increase CPU usage and add network overhead. - Paths are specified as `remote:` - You may put subdirectories in too, e.g. `remote:/path/to/dir`. - If you have a CP code you can use that as the folder after the domain such as \\/\\/\. +Properties: - For example, this is commonly configured with or without a CP code: - * **With a CP code**. `[your-domain-prefix]-nsu.akamaihd.net/123456/subdirectory/` - * **Without a CP code**. `[your-domain-prefix]-nsu.akamaihd.net` +- Config: use_https +- Env Var: RCLONE_MEGA_USE_HTTPS +- Type: bool +- Default: false +--mega-encoding - See all buckets - rclone lsd remote: - The initial setup for Netstorage involves getting an account and secret. Use `rclone config` to walk you through the setup process. +The encoding for the backend. - ## Configuration +See the encoding section in the overview for more info. - Here's an example of how to make a remote called `ns1`. +Properties: - 1. To begin the interactive configuration process, enter this command: +- Config: encoding +- Env Var: RCLONE_MEGA_ENCODING +- Type: Encoding +- Default: Slash,InvalidUtf8,Dot -rclone config +--mega-description +Description of the remote. - 2. Type `n` to create a new remote. +Properties: -n) New remote -o) Delete remote -p) Quit config e/n/d/q> n +- Config: description +- Env Var: RCLONE_MEGA_DESCRIPTION +- Type: string +- Required: false +Process killed - 3. For this example, enter `ns1` when you reach the name> prompt. +On accounts with large files or something else, memory usage can +significantly increase when executing list/sync instructions. When +running on cloud providers (like AWS with EC2), check if the instance +type has sufficient memory/CPU to execute the commands. Use the resource +monitoring tools to inspect after sending the commands. Look at this +issue. -name> ns1 +Limitations +This backend uses the go-mega go library which is an opensource go +library implementing the Mega API. There doesn't appear to be any +documentation for the mega protocol beyond the mega C++ SDK source code +so there are likely quite a few errors still remaining in this library. - 4. Enter `netstorage` as the type of storage to configure. +Mega allows duplicate files which may confuse rclone. -Type of storage to configure. Enter a string value. Press Enter for the -default (""). Choose a number from below, or type in your own value XX / -NetStorage  "netstorage" Storage> netstorage +Memory +The memory backend is an in RAM backend. It does not persist its data - +use the local backend for that. - 5. Select between the HTTP or HTTPS protocol. Most users should choose HTTPS, which is the default. HTTP is provided primarily for debugging purposes. +The memory backend behaves like a bucket-based remote (e.g. like s3). +Because it has no parameters you can just use it with the :memory: +remote name. -Enter a string value. Press Enter for the default (""). Choose a number -from below, or type in your own value 1 / HTTP protocol  "http" 2 / -HTTPS protocol  "https" protocol> 1 +Configuration +You can configure it as a remote like this with rclone config too if you +want to: - 6. Specify your NetStorage host, CP code, and any necessary content paths using this format: `///` + 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. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + [snip] + XX / Memory + \ "memory" + [snip] + Storage> memory + ** See help for memory backend at: https://rclone.org/memory/ ** -Enter a string value. Press Enter for the default (""). host> -baseball-nsu.akamaihd.net/123456/content/ + Remote config + -------------------- + [remote] + type = memory + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y - 7. Set the netstorage account name +Because the memory backend isn't persistent it is most useful for +testing or with an rclone server or rclone mount, e.g. -Enter a string value. Press Enter for the default (""). account> -username + rclone mount :memory: /mnt/tmp + rclone serve webdav :memory: + rclone serve sftp :memory: +Modification times and hashes - 8. Set the Netstorage account secret/G2O key which will be used for authentication purposes. Select the `y` option to set your own password then enter your secret. - Note: The secret is stored in the `rclone.conf` file with hex-encoded encryption. +The memory backend supports MD5 hashes and modification times accurate +to 1 nS. -y) Yes type in my own password -z) Generate random password y/g> y Enter the password: password: - Confirm the password: password: +Restricted filename characters +The memory backend replaces the default restricted characters set. - 9. View the summary and confirm your remote configuration. +Advanced options -[ns1] type = netstorage protocol = http host = -baseball-nsu.akamaihd.net/123456/content/ account = username secret = -*** ENCRYPTED *** -------------------- y) Yes this is OK (default) e) -Edit this remote d) Delete this remote y/e/d> y +Here are the Advanced options specific to memory (In memory object +storage system.). +--memory-description - This remote is called `ns1` and can now be used. +Description of the remote. - ## Example operations +Properties: - Get started with rclone and NetStorage with these examples. For additional rclone commands, visit https://rclone.org/commands/. +- Config: description +- Env Var: RCLONE_MEMORY_DESCRIPTION +- Type: string +- Required: false - ### See contents of a directory in your project +Akamai NetStorage - rclone lsd ns1:/974012/testing/ +Paths are specified as remote: You may put subdirectories in too, e.g. +remote:/path/to/dir. If you have a CP code you can use that as the +folder after the domain such as //. - ### Sync the contents local with remote +For example, this is commonly configured with or without a CP code: * +With a CP code. +[your-domain-prefix]-nsu.akamaihd.net/123456/subdirectory/ * Without a +CP code. [your-domain-prefix]-nsu.akamaihd.net - rclone sync . ns1:/974012/testing/ +See all buckets rclone lsd remote: The initial setup for Netstorage +involves getting an account and secret. Use rclone config to walk you +through the setup process. - ### Upload local content to remote - rclone copy notes.txt ns1:/974012/testing/ +Configuration - ### Delete content on remote - rclone delete ns1:/974012/testing/notes.txt +Here's an example of how to make a remote called ns1. - ### Move or copy content between CP codes. +1. To begin the interactive configuration process, enter this command: - Your credentials must have access to two CP codes on the same remote. You can't perform operations between different remotes. + rclone config - rclone move ns1:/974012/testing/notes.txt ns1:/974450/testing2/ +2. Type n to create a new remote. - ## Features + n) New remote + d) Delete remote + q) Quit config + e/n/d/q> n - ### Symlink Support +3. For this example, enter ns1 when you reach the name> prompt. - The Netstorage backend changes the rclone `--links, -l` behavior. When uploading, instead of creating the .rclonelink file, use the "symlink" API in order to create the corresponding symlink on the remote. The .rclonelink file will not be created, the upload will be intercepted and only the symlink file that matches the source file name with no suffix will be created on the remote. + name> ns1 - This will effectively allow commands like copy/copyto, move/moveto and sync to upload from local to remote and download from remote to local directories with symlinks. Due to internal rclone limitations, it is not possible to upload an individual symlink file to any remote backend. You can always use the "backend symlink" command to create a symlink on the NetStorage server, refer to "symlink" section below. +4. Enter netstorage as the type of storage to configure. - Individual symlink files on the remote can be used with the commands like "cat" to print the destination name, or "delete" to delete symlink, or copy, copy/to and move/moveto to download from the remote to local. Note: individual symlink files on the remote should be specified including the suffix .rclonelink. + Type of storage to configure. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + XX / NetStorage + \ "netstorage" + Storage> netstorage - **Note**: No file with the suffix .rclonelink should ever exist on the server since it is not possible to actually upload/create a file with .rclonelink suffix with rclone, it can only exist if it is manually created through a non-rclone method on the remote. +5. Select between the HTTP or HTTPS protocol. Most users should choose + HTTPS, which is the default. HTTP is provided primarily for + debugging purposes. - ### Implicit vs. Explicit Directories + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + 1 / HTTP protocol + \ "http" + 2 / HTTPS protocol + \ "https" + protocol> 1 - With NetStorage, directories can exist in one of two forms: +6. Specify your NetStorage host, CP code, and any necessary content + paths using this format: /// - 1. **Explicit Directory**. This is an actual, physical directory that you have created in a storage group. - 2. **Implicit Directory**. This refers to a directory within a path that has not been physically created. For example, during upload of a file, nonexistent subdirectories can be specified in the target path. NetStorage creates these as "implicit." While the directories aren't physically created, they exist implicitly and the noted path is connected with the uploaded file. + Enter a string value. Press Enter for the default (""). + host> baseball-nsu.akamaihd.net/123456/content/ - Rclone will intercept all file uploads and mkdir commands for the NetStorage remote and will explicitly issue the mkdir command for each directory in the uploading path. This will help with the interoperability with the other Akamai services such as SFTP and the Content Management Shell (CMShell). Rclone will not guarantee correctness of operations with implicit directories which might have been created as a result of using an upload API directly. +7. Set the netstorage account name - ### `--fast-list` / ListR support + Enter a string value. Press Enter for the default (""). + account> username - NetStorage remote supports the ListR feature by using the "list" NetStorage API action to return a lexicographical list of all objects within the specified CP code, recursing into subdirectories as they're encountered. +8. Set the Netstorage account secret/G2O key which will be used for + authentication purposes. Select the y option to set your own + password then enter your secret. Note: The secret is stored in the + rclone.conf file with hex-encoded encryption. - * **Rclone will use the ListR method for some commands by default**. Commands such as `lsf -R` will use ListR by default. To disable this, include the `--disable listR` option to use the non-recursive method of listing objects. + y) Yes type in my own password + g) Generate random password + y/g> y + Enter the password: + password: + Confirm the password: + password: - * **Rclone will not use the ListR method for some commands**. Commands such as `sync` don't use ListR by default. To force using the ListR method, include the `--fast-list` option. +9. View the summary and confirm your remote configuration. - There are pros and cons of using the ListR method, refer to [rclone documentation](https://rclone.org/docs/#fast-list). In general, the sync command over an existing deep tree on the remote will run faster with the "--fast-list" flag but with extra memory usage as a side effect. It might also result in higher CPU utilization but the whole task can be completed faster. + [ns1] + type = netstorage + protocol = http + host = baseball-nsu.akamaihd.net/123456/content/ + account = username + secret = *** ENCRYPTED *** + -------------------- + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y - **Note**: There is a known limitation that "lsf -R" will display number of files in the directory and directory size as -1 when ListR method is used. The workaround is to pass "--disable listR" flag if these numbers are important in the output. +This remote is called ns1 and can now be used. - ### Purge +Example operations - NetStorage remote supports the purge feature by using the "quick-delete" NetStorage API action. The quick-delete action is disabled by default for security reasons and can be enabled for the account through the Akamai portal. Rclone will first try to use quick-delete action for the purge command and if this functionality is disabled then will fall back to a standard delete method. +Get started with rclone and NetStorage with these examples. For +additional rclone commands, visit https://rclone.org/commands/. - **Note**: Read the [NetStorage Usage API](https://learn.akamai.com/en-us/webhelp/netstorage/netstorage-http-api-developer-guide/GUID-15836617-9F50-405A-833C-EA2556756A30.html) for considerations when using "quick-delete". In general, using quick-delete method will not delete the tree immediately and objects targeted for quick-delete may still be accessible. +See contents of a directory in your project + rclone lsd ns1:/974012/testing/ - ### Standard options +Sync the contents local with remote - Here are the Standard options specific to netstorage (Akamai NetStorage). + rclone sync . ns1:/974012/testing/ - #### --netstorage-host +Upload local content to remote - Domain+path of NetStorage host to connect to. + rclone copy notes.txt ns1:/974012/testing/ - Format should be `/` +Delete content on remote - Properties: + rclone delete ns1:/974012/testing/notes.txt - - Config: host - - Env Var: RCLONE_NETSTORAGE_HOST - - Type: string - - Required: true +Move or copy content between CP codes. - #### --netstorage-account +Your credentials must have access to two CP codes on the same remote. +You can't perform operations between different remotes. - Set the NetStorage account name + rclone move ns1:/974012/testing/notes.txt ns1:/974450/testing2/ - Properties: +Features - - Config: account - - Env Var: RCLONE_NETSTORAGE_ACCOUNT - - Type: string - - Required: true +Symlink Support - #### --netstorage-secret +The Netstorage backend changes the rclone --links, -l behavior. When +uploading, instead of creating the .rclonelink file, use the "symlink" +API in order to create the corresponding symlink on the remote. The +.rclonelink file will not be created, the upload will be intercepted and +only the symlink file that matches the source file name with no suffix +will be created on the remote. - Set the NetStorage account secret/G2O key for authentication. +This will effectively allow commands like copy/copyto, move/moveto and +sync to upload from local to remote and download from remote to local +directories with symlinks. Due to internal rclone limitations, it is not +possible to upload an individual symlink file to any remote backend. You +can always use the "backend symlink" command to create a symlink on the +NetStorage server, refer to "symlink" section below. - Please choose the 'y' option to set your own password then enter your secret. +Individual symlink files on the remote can be used with the commands +like "cat" to print the destination name, or "delete" to delete symlink, +or copy, copy/to and move/moveto to download from the remote to local. +Note: individual symlink files on the remote should be specified +including the suffix .rclonelink. - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). +Note: No file with the suffix .rclonelink should ever exist on the +server since it is not possible to actually upload/create a file with +.rclonelink suffix with rclone, it can only exist if it is manually +created through a non-rclone method on the remote. - Properties: +Implicit vs. Explicit Directories - - Config: secret - - Env Var: RCLONE_NETSTORAGE_SECRET - - Type: string - - Required: true +With NetStorage, directories can exist in one of two forms: - ### Advanced options +1. Explicit Directory. This is an actual, physical directory that you + have created in a storage group. +2. Implicit Directory. This refers to a directory within a path that + has not been physically created. For example, during upload of a + file, nonexistent subdirectories can be specified in the target + path. NetStorage creates these as "implicit." While the directories + aren't physically created, they exist implicitly and the noted path + is connected with the uploaded file. - Here are the Advanced options specific to netstorage (Akamai NetStorage). +Rclone will intercept all file uploads and mkdir commands for the +NetStorage remote and will explicitly issue the mkdir command for each +directory in the uploading path. This will help with the +interoperability with the other Akamai services such as SFTP and the +Content Management Shell (CMShell). Rclone will not guarantee +correctness of operations with implicit directories which might have +been created as a result of using an upload API directly. - #### --netstorage-protocol +--fast-list / ListR support - Select between HTTP or HTTPS protocol. +NetStorage remote supports the ListR feature by using the "list" +NetStorage API action to return a lexicographical list of all objects +within the specified CP code, recursing into subdirectories as they're +encountered. - Most users should choose HTTPS, which is the default. - HTTP is provided primarily for debugging purposes. +- Rclone will use the ListR method for some commands by default. + Commands such as lsf -R will use ListR by default. To disable this, + include the --disable listR option to use the non-recursive method + of listing objects. - Properties: +- Rclone will not use the ListR method for some commands. Commands + such as sync don't use ListR by default. To force using the ListR + method, include the --fast-list option. - - Config: protocol - - Env Var: RCLONE_NETSTORAGE_PROTOCOL - - Type: string - - Default: "https" - - Examples: - - "http" - - HTTP protocol - - "https" - - HTTPS protocol +There are pros and cons of using the ListR method, refer to rclone +documentation. In general, the sync command over an existing deep tree +on the remote will run faster with the "--fast-list" flag but with extra +memory usage as a side effect. It might also result in higher CPU +utilization but the whole task can be completed faster. - #### --netstorage-description +Note: There is a known limitation that "lsf -R" will display number of +files in the directory and directory size as -1 when ListR method is +used. The workaround is to pass "--disable listR" flag if these numbers +are important in the output. - Description of the remote +Purge - Properties: +NetStorage remote supports the purge feature by using the "quick-delete" +NetStorage API action. The quick-delete action is disabled by default +for security reasons and can be enabled for the account through the +Akamai portal. Rclone will first try to use quick-delete action for the +purge command and if this functionality is disabled then will fall back +to a standard delete method. - - Config: description - - Env Var: RCLONE_NETSTORAGE_DESCRIPTION - - Type: string - - Required: false +Note: Read the NetStorage Usage API for considerations when using +"quick-delete". In general, using quick-delete method will not delete +the tree immediately and objects targeted for quick-delete may still be +accessible. - ## Backend commands +Standard options - Here are the commands specific to the netstorage backend. +Here are the Standard options specific to netstorage (Akamai +NetStorage). - Run them with +--netstorage-host - rclone backend COMMAND remote: +Domain+path of NetStorage host to connect to. - The help below will explain what arguments each command takes. +Format should be / - See the [backend](https://rclone.org/commands/rclone_backend/) command for more - info on how to pass options and arguments. +Properties: - These can be run on a running backend using the rc command - [backend/command](https://rclone.org/rc/#backend-command). +- Config: host +- Env Var: RCLONE_NETSTORAGE_HOST +- Type: string +- Required: true - ### du +--netstorage-account - Return disk usage information for a specified directory +Set the NetStorage account name - rclone backend du remote: [options] [+] +Properties: - The usage information returned, includes the targeted directory as well as all - files stored in any sub-directories that may exist. +- Config: account +- Env Var: RCLONE_NETSTORAGE_ACCOUNT +- Type: string +- Required: true - ### symlink +--netstorage-secret - You can create a symbolic link in ObjectStore with the symlink action. +Set the NetStorage account secret/G2O key for authentication. - rclone backend symlink remote: [options] [+] +Please choose the 'y' option to set your own password then enter your +secret. - The desired path location (including applicable sub-directories) ending in - the object that will be the target of the symlink (for example, /links/mylink). - Include the file extension for the object, if applicable. - `rclone backend symlink ` +NB Input to this must be obscured - see rclone obscure. +Properties: +- Config: secret +- Env Var: RCLONE_NETSTORAGE_SECRET +- Type: string +- Required: true - # Microsoft Azure Blob Storage +Advanced options - Paths are specified as `remote:container` (or `remote:` for the `lsd` - command.) You may put subdirectories in too, e.g. - `remote:container/path/to/dir`. +Here are the Advanced options specific to netstorage (Akamai +NetStorage). - ## Configuration +--netstorage-protocol - Here is an example of making a Microsoft Azure Blob Storage - configuration. For a remote called `remote`. First run: +Select between HTTP or HTTPS protocol. - rclone config +Most users should choose HTTPS, which is the default. HTTP is provided +primarily for debugging purposes. - This will guide you through an interactive setup process: +Properties: -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 [snip] -XX / Microsoft Azure Blob Storage  "azureblob" [snip] Storage> azureblob -Storage Account Name account> account_name Storage Account Key key> -base64encodedkey== Endpoint for the service - leave blank normally. -endpoint> Remote config -------------------- [remote] account = -account_name key = base64encodedkey== endpoint = -------------------- y) -Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y +- Config: protocol +- Env Var: RCLONE_NETSTORAGE_PROTOCOL +- Type: string +- Default: "https" +- Examples: + - "http" + - HTTP protocol + - "https" + - HTTPS protocol +--netstorage-description - See all containers +Description of the remote. - rclone lsd remote: +Properties: - Make a new container +- Config: description +- Env Var: RCLONE_NETSTORAGE_DESCRIPTION +- Type: string +- Required: false - rclone mkdir remote:container +Backend commands - List the contents of a container +Here are the commands specific to the netstorage backend. - rclone ls remote:container +Run them with - Sync `/home/local/directory` to the remote container, deleting any excess - files in the container. + rclone backend COMMAND remote: - rclone sync --interactive /home/local/directory remote:container +The help below will explain what arguments each command takes. - ### --fast-list +See the backend command for more info on how to pass options and +arguments. - This remote supports `--fast-list` which allows you to use fewer - transactions in exchange for more memory. See the [rclone - docs](https://rclone.org/docs/#fast-list) for more details. +These can be run on a running backend using the rc command +backend/command. - ### Modification times and hashes +du - The modification time is stored as metadata on the object with the - `mtime` key. It is stored using RFC3339 Format time with nanosecond - precision. The metadata is supplied during directory listings so - there is no performance overhead to using it. +Return disk usage information for a specified directory - If you wish to use the Azure standard `LastModified` time stored on - the object as the modified time, then use the `--use-server-modtime` - flag. Note that rclone can't set `LastModified`, so using the - `--update` flag when syncing is recommended if using - `--use-server-modtime`. + rclone backend du remote: [options] [+] - MD5 hashes are stored with blobs. However blobs that were uploaded in - chunks only have an MD5 if the source remote was capable of MD5 - hashes, e.g. the local disk. +The usage information returned, includes the targeted directory as well +as all files stored in any sub-directories that may exist. - ### Performance +symlink - When uploading large files, increasing the value of - `--azureblob-upload-concurrency` will increase performance at the cost - of using more memory. The default of 16 is set quite conservatively to - use less memory. It maybe be necessary raise it to 64 or higher to - fully utilize a 1 GBit/s link with a single file transfer. +You can create a symbolic link in ObjectStore with the symlink action. - ### Restricted filename characters + rclone backend symlink remote: [options] [+] - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: +The desired path location (including applicable sub-directories) ending +in the object that will be the target of the symlink (for example, +/links/mylink). Include the file extension for the object, if +applicable. rclone backend symlink - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | / | 0x2F | / | - | \ | 0x5C | \ | +Microsoft Azure Blob Storage - File names can also not end with the following characters. - These only get replaced if they are the last character in the name: +Paths are specified as remote:container (or remote: for the lsd +command.) You may put subdirectories in too, e.g. +remote:container/path/to/dir. - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | . | 0x2E | . | +Configuration - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. +Here is an example of making a Microsoft Azure Blob Storage +configuration. For a remote called remote. First run: - ### Authentication {#authentication} + rclone config - There are a number of ways of supplying credentials for Azure Blob - Storage. Rclone tries them in the order of the sections below. +This will guide you through an interactive setup process: - #### Env Auth + 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 + [snip] + XX / Microsoft Azure Blob Storage + \ "azureblob" + [snip] + Storage> azureblob + Storage Account Name + account> account_name + Storage Account Key + key> base64encodedkey== + Endpoint for the service - leave blank normally. + endpoint> + Remote config + -------------------- + [remote] + account = account_name + key = base64encodedkey== + endpoint = + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y - If the `env_auth` config parameter is `true` then rclone will pull - credentials from the environment or runtime. +See all containers - It tries these authentication methods in this order: + rclone lsd remote: - 1. Environment Variables - 2. Managed Service Identity Credentials - 3. Azure CLI credentials (as used by the az tool) +Make a new container - These are described in the following sections + rclone mkdir remote:container - ##### Env Auth: 1. Environment Variables +List the contents of a container - If `env_auth` is set and environment variables are present rclone - authenticates a service principal with a secret or certificate, or a - user with a password, depending on which environment variable are set. - It reads configuration from these variables, in the following order: + rclone ls remote:container - 1. Service principal with client secret - - `AZURE_TENANT_ID`: ID of the service principal's tenant. Also called its "directory" ID. - - `AZURE_CLIENT_ID`: the service principal's client ID - - `AZURE_CLIENT_SECRET`: one of the service principal's client secrets - 2. Service principal with certificate - - `AZURE_TENANT_ID`: ID of the service principal's tenant. Also called its "directory" ID. - - `AZURE_CLIENT_ID`: the service principal's client ID - - `AZURE_CLIENT_CERTIFICATE_PATH`: path to a PEM or PKCS12 certificate file including the private key. - - `AZURE_CLIENT_CERTIFICATE_PASSWORD`: (optional) password for the certificate file. - - `AZURE_CLIENT_SEND_CERTIFICATE_CHAIN`: (optional) Specifies whether an authentication request will include an x5c header to support subject name / issuer based authentication. When set to "true" or "1", authentication requests include the x5c header. - 3. User with username and password - - `AZURE_TENANT_ID`: (optional) tenant to authenticate in. Defaults to "organizations". - - `AZURE_CLIENT_ID`: client ID of the application the user will authenticate to - - `AZURE_USERNAME`: a username (usually an email address) - - `AZURE_PASSWORD`: the user's password - 4. Workload Identity - - `AZURE_TENANT_ID`: Tenant to authenticate in. - - `AZURE_CLIENT_ID`: Client ID of the application the user will authenticate to. - - `AZURE_FEDERATED_TOKEN_FILE`: Path to projected service account token file. - - `AZURE_AUTHORITY_HOST`: Authority of an Azure Active Directory endpoint (default: login.microsoftonline.com). +Sync /home/local/directory to the remote container, deleting any excess +files in the container. + rclone sync --interactive /home/local/directory remote:container - ##### Env Auth: 2. Managed Service Identity Credentials +--fast-list - When using Managed Service Identity if the VM(SS) on which this - program is running has a system-assigned identity, it will be used by - default. If the resource has no system-assigned but exactly one - user-assigned identity, the user-assigned identity will be used by - default. +This remote supports --fast-list which allows you to use fewer +transactions in exchange for more memory. See the rclone docs for more +details. - If the resource has multiple user-assigned identities you will need to - unset `env_auth` and set `use_msi` instead. See the [`use_msi` - section](#use_msi). +Modification times and hashes - ##### Env Auth: 3. Azure CLI credentials (as used by the az tool) +The modification time is stored as metadata on the object with the mtime +key. It is stored using RFC3339 Format time with nanosecond precision. +The metadata is supplied during directory listings so there is no +performance overhead to using it. - Credentials created with the `az` tool can be picked up using `env_auth`. +If you wish to use the Azure standard LastModified time stored on the +object as the modified time, then use the --use-server-modtime flag. +Note that rclone can't set LastModified, so using the --update flag when +syncing is recommended if using --use-server-modtime. + +MD5 hashes are stored with blobs. However blobs that were uploaded in +chunks only have an MD5 if the source remote was capable of MD5 hashes, +e.g. the local disk. + +Performance + +When uploading large files, increasing the value of +--azureblob-upload-concurrency will increase performance at the cost of +using more memory. The default of 16 is set quite conservatively to use +less memory. It maybe be necessary raise it to 64 or higher to fully +utilize a 1 GBit/s link with a single file transfer. - For example if you were to login with a service principal like this: +Restricted filename characters - az login --service-principal -u XXX -p XXX --tenant XXX +In addition to the default restricted characters set the following +characters are also replaced: - Then you could access rclone resources like this: + Character Value Replacement + ----------- ------- ------------- + / 0x2F / + \ 0x5C \ - rclone lsf :azureblob,env_auth,account=ACCOUNT:CONTAINER +File names can also not end with the following characters. These only +get replaced if they are the last character in the name: - Or + Character Value Replacement + ----------- ------- ------------- + . 0x2E . - rclone lsf --azureblob-env-auth --azureblob-account=ACCOUNT :azureblob:CONTAINER +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. - Which is analogous to using the `az` tool: +Authentication - az storage blob list --container-name CONTAINER --account-name ACCOUNT --auth-mode login +There are a number of ways of supplying credentials for Azure Blob +Storage. Rclone tries them in the order of the sections below. - #### Account and Shared Key +Env Auth - This is the most straight forward and least flexible way. Just fill - in the `account` and `key` lines and leave the rest blank. +If the env_auth config parameter is true then rclone will pull +credentials from the environment or runtime. - #### SAS URL +It tries these authentication methods in this order: - This can be an account level SAS URL or container level SAS URL. +1. Environment Variables +2. Managed Service Identity Credentials +3. Azure CLI credentials (as used by the az tool) - To use it leave `account` and `key` blank and fill in `sas_url`. +These are described in the following sections - An account level SAS URL or container level SAS URL can be obtained - from the Azure portal or the Azure Storage Explorer. To get a - container level SAS URL right click on a container in the Azure Blob - explorer in the Azure portal. +Env Auth: 1. Environment Variables - If you use a container level SAS URL, rclone operations are permitted - only on a particular container, e.g. +If env_auth is set and environment variables are present rclone +authenticates a service principal with a secret or certificate, or a +user with a password, depending on which environment variable are set. +It reads configuration from these variables, in the following order: - rclone ls azureblob:container +1. Service principal with client secret + - AZURE_TENANT_ID: ID of the service principal's tenant. Also + called its "directory" ID. + - AZURE_CLIENT_ID: the service principal's client ID + - AZURE_CLIENT_SECRET: one of the service principal's client + secrets +2. Service principal with certificate + - AZURE_TENANT_ID: ID of the service principal's tenant. Also + called its "directory" ID. + - AZURE_CLIENT_ID: the service principal's client ID + - AZURE_CLIENT_CERTIFICATE_PATH: path to a PEM or PKCS12 + certificate file including the private key. + - AZURE_CLIENT_CERTIFICATE_PASSWORD: (optional) password for the + certificate file. + - AZURE_CLIENT_SEND_CERTIFICATE_CHAIN: (optional) Specifies + whether an authentication request will include an x5c header to + support subject name / issuer based authentication. When set to + "true" or "1", authentication requests include the x5c header. +3. User with username and password + - AZURE_TENANT_ID: (optional) tenant to authenticate in. Defaults + to "organizations". + - AZURE_CLIENT_ID: client ID of the application the user will + authenticate to + - AZURE_USERNAME: a username (usually an email address) + - AZURE_PASSWORD: the user's password +4. Workload Identity + - AZURE_TENANT_ID: Tenant to authenticate in. + - AZURE_CLIENT_ID: Client ID of the application the user will + authenticate to. + - AZURE_FEDERATED_TOKEN_FILE: Path to projected service account + token file. + - AZURE_AUTHORITY_HOST: Authority of an Azure Active Directory + endpoint (default: login.microsoftonline.com). - You can also list the single container from the root. This will only - show the container specified by the SAS URL. +Env Auth: 2. Managed Service Identity Credentials - $ rclone lsd azureblob: - container/ +When using Managed Service Identity if the VM(SS) on which this program +is running has a system-assigned identity, it will be used by default. +If the resource has no system-assigned but exactly one user-assigned +identity, the user-assigned identity will be used by default. - Note that you can't see or access any other containers - this will - fail +If the resource has multiple user-assigned identities you will need to +unset env_auth and set use_msi instead. See the use_msi section. - rclone ls azureblob:othercontainer +Env Auth: 3. Azure CLI credentials (as used by the az tool) - Container level SAS URLs are useful for temporarily allowing third - parties access to a single container or putting credentials into an - untrusted environment such as a CI build server. +Credentials created with the az tool can be picked up using env_auth. - #### Service principal with client secret +For example if you were to login with a service principal like this: - If these variables are set, rclone will authenticate with a service principal with a client secret. + az login --service-principal -u XXX -p XXX --tenant XXX - - `tenant`: ID of the service principal's tenant. Also called its "directory" ID. - - `client_id`: the service principal's client ID - - `client_secret`: one of the service principal's client secrets +Then you could access rclone resources like this: - The credentials can also be placed in a file using the - `service_principal_file` configuration option. + rclone lsf :azureblob,env_auth,account=ACCOUNT:CONTAINER - #### Service principal with certificate +Or - If these variables are set, rclone will authenticate with a service principal with certificate. + rclone lsf --azureblob-env-auth --azureblob-account=ACCOUNT :azureblob:CONTAINER - - `tenant`: ID of the service principal's tenant. Also called its "directory" ID. - - `client_id`: the service principal's client ID - - `client_certificate_path`: path to a PEM or PKCS12 certificate file including the private key. - - `client_certificate_password`: (optional) password for the certificate file. - - `client_send_certificate_chain`: (optional) Specifies whether an authentication request will include an x5c header to support subject name / issuer based authentication. When set to "true" or "1", authentication requests include the x5c header. +Which is analogous to using the az tool: - **NB** `client_certificate_password` must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). + az storage blob list --container-name CONTAINER --account-name ACCOUNT --auth-mode login - #### User with username and password +Account and Shared Key - If these variables are set, rclone will authenticate with username and password. +This is the most straight forward and least flexible way. Just fill in +the account and key lines and leave the rest blank. - - `tenant`: (optional) tenant to authenticate in. Defaults to "organizations". - - `client_id`: client ID of the application the user will authenticate to - - `username`: a username (usually an email address) - - `password`: the user's password +SAS URL - Microsoft doesn't recommend this kind of authentication, because it's - less secure than other authentication flows. This method is not - interactive, so it isn't compatible with any form of multi-factor - authentication, and the application must already have user or admin - consent. This credential can only authenticate work and school - accounts; it can't authenticate Microsoft accounts. +This can be an account level SAS URL or container level SAS URL. - **NB** `password` must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). +To use it leave account and key blank and fill in sas_url. - #### Managed Service Identity Credentials {#use_msi} +An account level SAS URL or container level SAS URL can be obtained from +the Azure portal or the Azure Storage Explorer. To get a container level +SAS URL right click on a container in the Azure Blob explorer in the +Azure portal. - If `use_msi` is set then managed service identity credentials are - used. This authentication only works when running in an Azure service. - `env_auth` needs to be unset to use this. +If you use a container level SAS URL, rclone operations are permitted +only on a particular container, e.g. - However if you have multiple user identities to choose from these must - be explicitly specified using exactly one of the `msi_object_id`, - `msi_client_id`, or `msi_mi_res_id` parameters. + rclone ls azureblob:container - If none of `msi_object_id`, `msi_client_id`, or `msi_mi_res_id` is - set, this is is equivalent to using `env_auth`. +You can also list the single container from the root. This will only +show the container specified by the SAS URL. + $ rclone lsd azureblob: + container/ - ### Standard options +Note that you can't see or access any other containers - this will fail - Here are the Standard options specific to azureblob (Microsoft Azure Blob Storage). + rclone ls azureblob:othercontainer - #### --azureblob-account +Container level SAS URLs are useful for temporarily allowing third +parties access to a single container or putting credentials into an +untrusted environment such as a CI build server. - Azure Storage Account Name. +Service principal with client secret - Set this to the Azure Storage Account Name in use. +If these variables are set, rclone will authenticate with a service +principal with a client secret. - Leave blank to use SAS URL or Emulator, otherwise it needs to be set. +- tenant: ID of the service principal's tenant. Also called its + "directory" ID. +- client_id: the service principal's client ID +- client_secret: one of the service principal's client secrets - If this is blank and if env_auth is set it will be read from the - environment variable `AZURE_STORAGE_ACCOUNT_NAME` if possible. +The credentials can also be placed in a file using the +service_principal_file configuration option. +Service principal with certificate - Properties: +If these variables are set, rclone will authenticate with a service +principal with certificate. - - Config: account - - Env Var: RCLONE_AZUREBLOB_ACCOUNT - - Type: string - - Required: false - - #### --azureblob-env-auth - - Read credentials from runtime (environment variables, CLI or MSI). - - See the [authentication docs](/azureblob#authentication) for full info. - - Properties: - - - Config: env_auth - - Env Var: RCLONE_AZUREBLOB_ENV_AUTH - - Type: bool - - Default: false - - #### --azureblob-key - - Storage Account Shared Key. - - Leave blank to use SAS URL or Emulator. - - Properties: - - - Config: key - - Env Var: RCLONE_AZUREBLOB_KEY - - Type: string - - Required: false - - #### --azureblob-sas-url - - SAS URL for container level access only. - - Leave blank if using account/key or Emulator. - - Properties: - - - Config: sas_url - - Env Var: RCLONE_AZUREBLOB_SAS_URL - - Type: string - - Required: false - - #### --azureblob-tenant - - ID of the service principal's tenant. Also called its directory ID. - - Set this if using - - Service principal with client secret - - Service principal with certificate - - User with username and password - - - Properties: - - - Config: tenant - - Env Var: RCLONE_AZUREBLOB_TENANT - - Type: string - - Required: false - - #### --azureblob-client-id - - The ID of the client in use. - - Set this if using - - Service principal with client secret - - Service principal with certificate - - User with username and password - - - Properties: - - - Config: client_id - - Env Var: RCLONE_AZUREBLOB_CLIENT_ID - - Type: string - - Required: false - - #### --azureblob-client-secret - - One of the service principal's client secrets - - Set this if using - - Service principal with client secret - - - Properties: - - - Config: client_secret - - Env Var: RCLONE_AZUREBLOB_CLIENT_SECRET - - Type: string - - Required: false - - #### --azureblob-client-certificate-path - - Path to a PEM or PKCS12 certificate file including the private key. - - Set this if using - - Service principal with certificate - - - Properties: - - - Config: client_certificate_path - - Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PATH - - Type: string - - Required: false - - #### --azureblob-client-certificate-password - - Password for the certificate file (optional). - - Optionally set this if using - - Service principal with certificate - - And the certificate has a password. - - - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - - Properties: - - - Config: client_certificate_password - - Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PASSWORD - - Type: string - - Required: false - - ### Advanced options - - Here are the Advanced options specific to azureblob (Microsoft Azure Blob Storage). - - #### --azureblob-client-send-certificate-chain - - Send the certificate chain when using certificate auth. - - Specifies whether an authentication request will include an x5c header - to support subject name / issuer based authentication. When set to - true, authentication requests include the x5c header. - - Optionally set this if using - - Service principal with certificate - - - Properties: - - - Config: client_send_certificate_chain - - Env Var: RCLONE_AZUREBLOB_CLIENT_SEND_CERTIFICATE_CHAIN - - Type: bool - - Default: false - - #### --azureblob-username - - User name (usually an email address) - - Set this if using - - User with username and password - - - Properties: - - - Config: username - - Env Var: RCLONE_AZUREBLOB_USERNAME - - Type: string - - Required: false - - #### --azureblob-password - - The user's password - - Set this if using - - User with username and password - - - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - - Properties: - - - Config: password - - Env Var: RCLONE_AZUREBLOB_PASSWORD - - Type: string - - Required: false - - #### --azureblob-service-principal-file - - Path to file containing credentials for use with a service principal. - - Leave blank normally. Needed only if you want to use a service principal instead of interactive login. - - $ az ad sp create-for-rbac --name "" \ - --role "Storage Blob Data Owner" \ - --scopes "/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts//blobServices/default/containers/" \ - > azure-principal.json - - See ["Create an Azure service principal"](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli) and ["Assign an Azure role for access to blob data"](https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli) pages for more details. - - It may be more convenient to put the credentials directly into the - rclone config file under the `client_id`, `tenant` and `client_secret` - keys instead of setting `service_principal_file`. - - - Properties: - - - Config: service_principal_file - - Env Var: RCLONE_AZUREBLOB_SERVICE_PRINCIPAL_FILE - - Type: string - - Required: false - - #### --azureblob-use-msi - - Use a managed service identity to authenticate (only works in Azure). - - When true, use a [managed service identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/) - to authenticate to Azure Storage instead of a SAS token or account key. - - If the VM(SS) on which this program is running has a system-assigned identity, it will - be used by default. If the resource has no system-assigned but exactly one user-assigned identity, - the user-assigned identity will be used by default. If the resource has multiple user-assigned - identities, the identity to use must be explicitly specified using exactly one of the msi_object_id, - msi_client_id, or msi_mi_res_id parameters. - - Properties: - - - Config: use_msi - - Env Var: RCLONE_AZUREBLOB_USE_MSI - - Type: bool - - Default: false - - #### --azureblob-msi-object-id - - Object ID of the user-assigned MSI to use, if any. - - Leave blank if msi_client_id or msi_mi_res_id specified. - - Properties: - - - Config: msi_object_id - - Env Var: RCLONE_AZUREBLOB_MSI_OBJECT_ID - - Type: string - - Required: false - - #### --azureblob-msi-client-id - - Object ID of the user-assigned MSI to use, if any. - - Leave blank if msi_object_id or msi_mi_res_id specified. - - Properties: - - - Config: msi_client_id - - Env Var: RCLONE_AZUREBLOB_MSI_CLIENT_ID - - Type: string - - Required: false - - #### --azureblob-msi-mi-res-id - - Azure resource ID of the user-assigned MSI to use, if any. - - Leave blank if msi_client_id or msi_object_id specified. - - Properties: - - - Config: msi_mi_res_id - - Env Var: RCLONE_AZUREBLOB_MSI_MI_RES_ID - - Type: string - - Required: false - - #### --azureblob-use-emulator - - Uses local storage emulator if provided as 'true'. - - Leave blank if using real azure storage endpoint. - - Properties: - - - Config: use_emulator - - Env Var: RCLONE_AZUREBLOB_USE_EMULATOR - - Type: bool - - Default: false - - #### --azureblob-endpoint - - Endpoint for the service. - - Leave blank normally. - - Properties: - - - Config: endpoint - - Env Var: RCLONE_AZUREBLOB_ENDPOINT - - Type: string - - Required: false - - #### --azureblob-upload-cutoff - - Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). - - Properties: - - - Config: upload_cutoff - - Env Var: RCLONE_AZUREBLOB_UPLOAD_CUTOFF - - Type: string - - Required: false - - #### --azureblob-chunk-size - - Upload chunk size. - - Note that this is stored in memory and there may be up to - "--transfers" * "--azureblob-upload-concurrency" chunks stored at once - in memory. - - Properties: - - - Config: chunk_size - - Env Var: RCLONE_AZUREBLOB_CHUNK_SIZE - - Type: SizeSuffix - - Default: 4Mi - - #### --azureblob-upload-concurrency - - Concurrency for multipart uploads. - - This is the number of chunks of the same file that are uploaded - concurrently. - - If you are uploading small numbers of large files over high-speed - links and these uploads do not fully utilize your bandwidth, then - increasing this may help to speed up the transfers. - - In tests, upload speed increases almost linearly with upload - concurrency. For example to fill a gigabit pipe it may be necessary to - raise this to 64. Note that this will use more memory. - - Note that chunks are stored in memory and there may be up to - "--transfers" * "--azureblob-upload-concurrency" chunks stored at once - in memory. - - Properties: - - - Config: upload_concurrency - - Env Var: RCLONE_AZUREBLOB_UPLOAD_CONCURRENCY - - Type: int - - Default: 16 - - #### --azureblob-list-chunk - - Size of blob list. - - This sets the number of blobs requested in each listing chunk. Default - is the maximum, 5000. "List blobs" requests are permitted 2 minutes - per megabyte to complete. If an operation is taking longer than 2 - minutes per megabyte on average, it will time out ( - [source](https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations#exceptions-to-default-timeout-interval) - ). This can be used to limit the number of blobs items to return, to - avoid the time out. - - Properties: - - - Config: list_chunk - - Env Var: RCLONE_AZUREBLOB_LIST_CHUNK - - Type: int - - Default: 5000 - - #### --azureblob-access-tier - - Access tier of blob: hot, cool, cold or archive. - - Archived blobs can be restored by setting access tier to hot, cool or - cold. Leave blank if you intend to use default access tier, which is - set at account level - - If there is no "access tier" specified, rclone doesn't apply any tier. - rclone performs "Set Tier" operation on blobs while uploading, if objects - are not modified, specifying "access tier" to new one will have no effect. - If blobs are in "archive tier" at remote, trying to perform data transfer - operations from remote will not be allowed. User should first restore by - tiering blob to "Hot", "Cool" or "Cold". - - Properties: - - - Config: access_tier - - Env Var: RCLONE_AZUREBLOB_ACCESS_TIER - - Type: string - - Required: false - - #### --azureblob-archive-tier-delete - - Delete archive tier blobs before overwriting. - - Archive tier blobs cannot be updated. So without this flag, if you - attempt to update an archive tier blob, then rclone will produce the - error: - - can't update archive tier blob without --azureblob-archive-tier-delete - - With this flag set then before rclone attempts to overwrite an archive - tier blob, it will delete the existing blob before uploading its - replacement. This has the potential for data loss if the upload fails - (unlike updating a normal blob) and also may cost more since deleting - archive tier blobs early may be chargable. - - - Properties: - - - Config: archive_tier_delete - - Env Var: RCLONE_AZUREBLOB_ARCHIVE_TIER_DELETE - - Type: bool - - Default: false - - #### --azureblob-disable-checksum - - Don't store MD5 checksum with object metadata. - - Normally rclone will calculate the MD5 checksum of the input before - uploading it so it can add it to metadata on the object. This is great - for data integrity checking but can cause long delays for large files - to start uploading. - - Properties: - - - Config: disable_checksum - - Env Var: RCLONE_AZUREBLOB_DISABLE_CHECKSUM - - Type: bool - - Default: false - - #### --azureblob-memory-pool-flush-time - - How often internal memory buffer pools will be flushed. (no longer used) - - Properties: - - - Config: memory_pool_flush_time - - Env Var: RCLONE_AZUREBLOB_MEMORY_POOL_FLUSH_TIME - - Type: Duration - - Default: 1m0s - - #### --azureblob-memory-pool-use-mmap - - Whether to use mmap buffers in internal memory pool. (no longer used) - - Properties: - - - Config: memory_pool_use_mmap - - Env Var: RCLONE_AZUREBLOB_MEMORY_POOL_USE_MMAP - - Type: bool - - Default: false - - #### --azureblob-encoding - - The encoding for the backend. - - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - - Properties: - - - Config: encoding - - Env Var: RCLONE_AZUREBLOB_ENCODING - - Type: Encoding - - Default: Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8 - - #### --azureblob-public-access - - Public access level of a container: blob or container. - - Properties: - - - Config: public_access - - Env Var: RCLONE_AZUREBLOB_PUBLIC_ACCESS - - Type: string - - Required: false - - Examples: - - "" - - The container and its blobs can be accessed only with an authorized request. - - It's a default value. - - "blob" - - Blob data within this container can be read via anonymous request. - - "container" - - Allow full public read access for container and blob data. - - #### --azureblob-directory-markers - - Upload an empty object with a trailing slash when a new directory is created - - Empty folders are unsupported for bucket based remotes, this option - creates an empty object ending with "/", to persist the folder. - - This object also has the metadata "hdi_isfolder = true" to conform to - the Microsoft standard. - - - Properties: - - - Config: directory_markers - - Env Var: RCLONE_AZUREBLOB_DIRECTORY_MARKERS - - Type: bool - - Default: false - - #### --azureblob-no-check-container - - If set, don't attempt to check the container exists or create it. - - This can be useful when trying to minimise the number of transactions - rclone does if you know the container exists already. - - - Properties: - - - Config: no_check_container - - Env Var: RCLONE_AZUREBLOB_NO_CHECK_CONTAINER - - Type: bool - - Default: false - - #### --azureblob-no-head-object - - If set, do not do HEAD before GET when getting objects. - - Properties: - - - Config: no_head_object - - Env Var: RCLONE_AZUREBLOB_NO_HEAD_OBJECT - - Type: bool - - Default: false - - #### --azureblob-delete-snapshots - - Set to specify how to deal with snapshots on blob deletion. - - Properties: - - - Config: delete_snapshots - - Env Var: RCLONE_AZUREBLOB_DELETE_SNAPSHOTS - - Type: string - - Required: false - - Choices: - - "" - - By default, the delete operation fails if a blob has snapshots - - "include" - - Specify 'include' to remove the root blob and all its snapshots - - "only" - - Specify 'only' to remove only the snapshots but keep the root blob. - - #### --azureblob-description - - Description of the remote - - Properties: - - - Config: description - - Env Var: RCLONE_AZUREBLOB_DESCRIPTION - - Type: string - - Required: false - - - - ### Custom upload headers - - You can set custom upload headers with the `--header-upload` flag. - - - Cache-Control - - Content-Disposition - - Content-Encoding - - Content-Language - - Content-Type - - Eg `--header-upload "Content-Type: text/potato"` - - ## Limitations - - MD5 sums are only uploaded with chunked files if the source has an MD5 - sum. This will always be the case for a local to azure copy. - - `rclone about` is not supported by the Microsoft Azure Blob storage backend. Backends without - this capability cannot determine free space for an rclone mount or - use policy `mfs` (most free space) as a member of an rclone union - remote. - - See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - - ## Azure Storage Emulator Support - - You can run rclone with the storage emulator (usually _azurite_). - - To do this, just set up a new remote with `rclone config` following - the instructions in the introduction and set `use_emulator` in the - advanced settings as `true`. You do not need to provide a default - account name nor an account key. But you can override them in the - `account` and `key` options. (Prior to v1.61 they were hard coded to - _azurite_'s `devstoreaccount1`.) - - Also, if you want to access a storage emulator instance running on a - different machine, you can override the `endpoint` parameter in the - advanced settings, setting it to - `http(s)://:/devstoreaccount1` - (e.g. `http://10.254.2.5:10000/devstoreaccount1`). - - # Microsoft Azure Files Storage - - Paths are specified as `remote:` You may put subdirectories in too, - e.g. `remote:path/to/dir`. - - ## Configuration - - Here is an example of making a Microsoft Azure Files Storage - configuration. For a remote called `remote`. 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 [snip] -XX / Microsoft Azure Files Storage  "azurefiles" [snip] - -Option account. Azure Storage Account Name. Set this to the Azure -Storage Account Name in use. Leave blank to use SAS URL or connection -string, otherwise it needs to be set. If this is blank and if env_auth -is set it will be read from the environment variable -AZURE_STORAGE_ACCOUNT_NAME if possible. Enter a value. Press Enter to -leave empty. account> account_name - -Option share_name. Azure Files Share Name. This is required and is the -name of the share to access. Enter a value. Press Enter to leave empty. -share_name> share_name - -Option env_auth. Read credentials from runtime (environment variables, -CLI or MSI). See the authentication docs for full info. Enter a boolean -value (true or false). Press Enter for the default (false). env_auth> - -Option key. Storage Account Shared Key. Leave blank to use SAS URL or -connection string. Enter a value. Press Enter to leave empty. key> -base64encodedkey== - -Option sas_url. SAS URL. Leave blank if using account/key or connection -string. Enter a value. Press Enter to leave empty. sas_url> - -Option connection_string. Azure Files Connection String. Enter a value. -Press Enter to leave empty. connection_string> [snip] - -Configuration complete. Options: - type: azurefiles - account: -account_name - share_name: share_name - key: base64encodedkey== Keep -this "remote" remote? y) Yes this is OK (default) e) Edit this remote d) -Delete this remote y/e/d> - - - Once configured you can use rclone. - - See all files in the top level: - - rclone lsf remote: - - Make a new directory in the root: - - rclone mkdir remote:dir - - Recursively List the contents: - - rclone ls remote: - - Sync `/home/local/directory` to the remote directory, deleting any - excess files in the directory. - - rclone sync --interactive /home/local/directory remote:dir - - ### Modified time - - The modified time is stored as Azure standard `LastModified` time on - files - - ### Performance - - When uploading large files, increasing the value of - `--azurefiles-upload-concurrency` will increase performance at the cost - of using more memory. The default of 16 is set quite conservatively to - use less memory. It maybe be necessary raise it to 64 or higher to - fully utilize a 1 GBit/s link with a single file transfer. - - ### Restricted filename characters - - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | " | 0x22 | " | - | * | 0x2A | * | - | : | 0x3A | : | - | < | 0x3C | < | - | > | 0x3E | > | - | ? | 0x3F | ? | - | \ | 0x5C | \ | - | \| | 0x7C | | | - - File names can also not end with the following characters. - These only get replaced if they are the last character in the name: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | . | 0x2E | . | - - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. - - ### Hashes - - MD5 hashes are stored with files. Not all files will have MD5 hashes - as these have to be uploaded with the file. - - ### Authentication {#authentication} - - There are a number of ways of supplying credentials for Azure Files - Storage. Rclone tries them in the order of the sections below. - - #### Env Auth - - If the `env_auth` config parameter is `true` then rclone will pull - credentials from the environment or runtime. - - It tries these authentication methods in this order: - - 1. Environment Variables - 2. Managed Service Identity Credentials - 3. Azure CLI credentials (as used by the az tool) - - These are described in the following sections - - ##### Env Auth: 1. Environment Variables - - If `env_auth` is set and environment variables are present rclone - authenticates a service principal with a secret or certificate, or a - user with a password, depending on which environment variable are set. - It reads configuration from these variables, in the following order: - - 1. Service principal with client secret - - `AZURE_TENANT_ID`: ID of the service principal's tenant. Also called its "directory" ID. - - `AZURE_CLIENT_ID`: the service principal's client ID - - `AZURE_CLIENT_SECRET`: one of the service principal's client secrets - 2. Service principal with certificate - - `AZURE_TENANT_ID`: ID of the service principal's tenant. Also called its "directory" ID. - - `AZURE_CLIENT_ID`: the service principal's client ID - - `AZURE_CLIENT_CERTIFICATE_PATH`: path to a PEM or PKCS12 certificate file including the private key. - - `AZURE_CLIENT_CERTIFICATE_PASSWORD`: (optional) password for the certificate file. - - `AZURE_CLIENT_SEND_CERTIFICATE_CHAIN`: (optional) Specifies whether an authentication request will include an x5c header to support subject name / issuer based authentication. When set to "true" or "1", authentication requests include the x5c header. - 3. User with username and password - - `AZURE_TENANT_ID`: (optional) tenant to authenticate in. Defaults to "organizations". - - `AZURE_CLIENT_ID`: client ID of the application the user will authenticate to - - `AZURE_USERNAME`: a username (usually an email address) - - `AZURE_PASSWORD`: the user's password - 4. Workload Identity - - `AZURE_TENANT_ID`: Tenant to authenticate in. - - `AZURE_CLIENT_ID`: Client ID of the application the user will authenticate to. - - `AZURE_FEDERATED_TOKEN_FILE`: Path to projected service account token file. - - `AZURE_AUTHORITY_HOST`: Authority of an Azure Active Directory endpoint (default: login.microsoftonline.com). - - - ##### Env Auth: 2. Managed Service Identity Credentials - - When using Managed Service Identity if the VM(SS) on which this - program is running has a system-assigned identity, it will be used by - default. If the resource has no system-assigned but exactly one - user-assigned identity, the user-assigned identity will be used by - default. - - If the resource has multiple user-assigned identities you will need to - unset `env_auth` and set `use_msi` instead. See the [`use_msi` - section](#use_msi). - - ##### Env Auth: 3. Azure CLI credentials (as used by the az tool) - - Credentials created with the `az` tool can be picked up using `env_auth`. - - For example if you were to login with a service principal like this: - - az login --service-principal -u XXX -p XXX --tenant XXX - - Then you could access rclone resources like this: - - rclone lsf :azurefiles,env_auth,account=ACCOUNT: - - Or - - rclone lsf --azurefiles-env-auth --azurefiles-account=ACCOUNT :azurefiles: - - #### Account and Shared Key - - This is the most straight forward and least flexible way. Just fill - in the `account` and `key` lines and leave the rest blank. - - #### SAS URL - - To use it leave `account`, `key` and `connection_string` blank and fill in `sas_url`. - - #### Connection String - - To use it leave `account`, `key` and "sas_url" blank and fill in `connection_string`. - - #### Service principal with client secret - - If these variables are set, rclone will authenticate with a service principal with a client secret. - - - `tenant`: ID of the service principal's tenant. Also called its "directory" ID. - - `client_id`: the service principal's client ID - - `client_secret`: one of the service principal's client secrets - - The credentials can also be placed in a file using the - `service_principal_file` configuration option. - - #### Service principal with certificate - - If these variables are set, rclone will authenticate with a service principal with certificate. - - - `tenant`: ID of the service principal's tenant. Also called its "directory" ID. - - `client_id`: the service principal's client ID - - `client_certificate_path`: path to a PEM or PKCS12 certificate file including the private key. - - `client_certificate_password`: (optional) password for the certificate file. - - `client_send_certificate_chain`: (optional) Specifies whether an authentication request will include an x5c header to support subject name / issuer based authentication. When set to "true" or "1", authentication requests include the x5c header. - - **NB** `client_certificate_password` must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - - #### User with username and password - - If these variables are set, rclone will authenticate with username and password. - - - `tenant`: (optional) tenant to authenticate in. Defaults to "organizations". - - `client_id`: client ID of the application the user will authenticate to - - `username`: a username (usually an email address) - - `password`: the user's password - - Microsoft doesn't recommend this kind of authentication, because it's - less secure than other authentication flows. This method is not - interactive, so it isn't compatible with any form of multi-factor - authentication, and the application must already have user or admin - consent. This credential can only authenticate work and school - accounts; it can't authenticate Microsoft accounts. - - **NB** `password` must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - - #### Managed Service Identity Credentials {#use_msi} - - If `use_msi` is set then managed service identity credentials are - used. This authentication only works when running in an Azure service. - `env_auth` needs to be unset to use this. - - However if you have multiple user identities to choose from these must - be explicitly specified using exactly one of the `msi_object_id`, - `msi_client_id`, or `msi_mi_res_id` parameters. - - If none of `msi_object_id`, `msi_client_id`, or `msi_mi_res_id` is - set, this is is equivalent to using `env_auth`. - - - ### Standard options - - Here are the Standard options specific to azurefiles (Microsoft Azure Files). - - #### --azurefiles-account - - Azure Storage Account Name. - - Set this to the Azure Storage Account Name in use. - - Leave blank to use SAS URL or connection string, otherwise it needs to be set. - - If this is blank and if env_auth is set it will be read from the - environment variable `AZURE_STORAGE_ACCOUNT_NAME` if possible. - - - Properties: - - - Config: account - - Env Var: RCLONE_AZUREFILES_ACCOUNT - - Type: string - - Required: false - - #### --azurefiles-share-name - - Azure Files Share Name. - - This is required and is the name of the share to access. - - - Properties: - - - Config: share_name - - Env Var: RCLONE_AZUREFILES_SHARE_NAME - - Type: string - - Required: false - - #### --azurefiles-env-auth - - Read credentials from runtime (environment variables, CLI or MSI). - - See the [authentication docs](/azurefiles#authentication) for full info. - - Properties: - - - Config: env_auth - - Env Var: RCLONE_AZUREFILES_ENV_AUTH - - Type: bool - - Default: false - - #### --azurefiles-key - - Storage Account Shared Key. - - Leave blank to use SAS URL or connection string. - - Properties: - - - Config: key - - Env Var: RCLONE_AZUREFILES_KEY - - Type: string - - Required: false - - #### --azurefiles-sas-url - - SAS URL. - - Leave blank if using account/key or connection string. - - Properties: - - - Config: sas_url - - Env Var: RCLONE_AZUREFILES_SAS_URL - - Type: string - - Required: false - - #### --azurefiles-connection-string - - Azure Files Connection String. - - Properties: - - - Config: connection_string - - Env Var: RCLONE_AZUREFILES_CONNECTION_STRING - - Type: string - - Required: false - - #### --azurefiles-tenant - - ID of the service principal's tenant. Also called its directory ID. - - Set this if using - - Service principal with client secret - - Service principal with certificate - - User with username and password - - - Properties: - - - Config: tenant - - Env Var: RCLONE_AZUREFILES_TENANT - - Type: string - - Required: false - - #### --azurefiles-client-id - - The ID of the client in use. - - Set this if using - - Service principal with client secret - - Service principal with certificate - - User with username and password - - - Properties: - - - Config: client_id - - Env Var: RCLONE_AZUREFILES_CLIENT_ID - - Type: string - - Required: false - - #### --azurefiles-client-secret - - One of the service principal's client secrets - - Set this if using - - Service principal with client secret - - - Properties: - - - Config: client_secret - - Env Var: RCLONE_AZUREFILES_CLIENT_SECRET - - Type: string - - Required: false - - #### --azurefiles-client-certificate-path - - Path to a PEM or PKCS12 certificate file including the private key. - - Set this if using - - Service principal with certificate - - - Properties: - - - Config: client_certificate_path - - Env Var: RCLONE_AZUREFILES_CLIENT_CERTIFICATE_PATH - - Type: string - - Required: false - - #### --azurefiles-client-certificate-password - - Password for the certificate file (optional). - - Optionally set this if using - - Service principal with certificate - - And the certificate has a password. - - - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - - Properties: - - - Config: client_certificate_password - - Env Var: RCLONE_AZUREFILES_CLIENT_CERTIFICATE_PASSWORD - - Type: string - - Required: false - - ### Advanced options - - Here are the Advanced options specific to azurefiles (Microsoft Azure Files). - - #### --azurefiles-client-send-certificate-chain - - Send the certificate chain when using certificate auth. - - Specifies whether an authentication request will include an x5c header - to support subject name / issuer based authentication. When set to - true, authentication requests include the x5c header. - - Optionally set this if using - - Service principal with certificate - - - Properties: - - - Config: client_send_certificate_chain - - Env Var: RCLONE_AZUREFILES_CLIENT_SEND_CERTIFICATE_CHAIN - - Type: bool - - Default: false - - #### --azurefiles-username - - User name (usually an email address) - - Set this if using - - User with username and password - - - Properties: - - - Config: username - - Env Var: RCLONE_AZUREFILES_USERNAME - - Type: string - - Required: false - - #### --azurefiles-password - - The user's password - - Set this if using - - User with username and password - - - **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - - Properties: - - - Config: password - - Env Var: RCLONE_AZUREFILES_PASSWORD - - Type: string - - Required: false - - #### --azurefiles-service-principal-file - - Path to file containing credentials for use with a service principal. - - Leave blank normally. Needed only if you want to use a service principal instead of interactive login. - - $ az ad sp create-for-rbac --name "" \ - --role "Storage Files Data Owner" \ - --scopes "/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts//blobServices/default/containers/" \ - > azure-principal.json - - See ["Create an Azure service principal"](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli) and ["Assign an Azure role for access to files data"](https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli) pages for more details. - - **NB** this section needs updating for Azure Files - pull requests appreciated! - - It may be more convenient to put the credentials directly into the - rclone config file under the `client_id`, `tenant` and `client_secret` - keys instead of setting `service_principal_file`. - - - Properties: - - - Config: service_principal_file - - Env Var: RCLONE_AZUREFILES_SERVICE_PRINCIPAL_FILE - - Type: string - - Required: false - - #### --azurefiles-use-msi - - Use a managed service identity to authenticate (only works in Azure). - - When true, use a [managed service identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/) - to authenticate to Azure Storage instead of a SAS token or account key. - - If the VM(SS) on which this program is running has a system-assigned identity, it will - be used by default. If the resource has no system-assigned but exactly one user-assigned identity, - the user-assigned identity will be used by default. If the resource has multiple user-assigned - identities, the identity to use must be explicitly specified using exactly one of the msi_object_id, - msi_client_id, or msi_mi_res_id parameters. - - Properties: - - - Config: use_msi - - Env Var: RCLONE_AZUREFILES_USE_MSI - - Type: bool - - Default: false - - #### --azurefiles-msi-object-id - - Object ID of the user-assigned MSI to use, if any. - - Leave blank if msi_client_id or msi_mi_res_id specified. - - Properties: - - - Config: msi_object_id - - Env Var: RCLONE_AZUREFILES_MSI_OBJECT_ID - - Type: string - - Required: false - - #### --azurefiles-msi-client-id - - Object ID of the user-assigned MSI to use, if any. - - Leave blank if msi_object_id or msi_mi_res_id specified. - - Properties: - - - Config: msi_client_id - - Env Var: RCLONE_AZUREFILES_MSI_CLIENT_ID - - Type: string - - Required: false - - #### --azurefiles-msi-mi-res-id - - Azure resource ID of the user-assigned MSI to use, if any. - - Leave blank if msi_client_id or msi_object_id specified. - - Properties: - - - Config: msi_mi_res_id - - Env Var: RCLONE_AZUREFILES_MSI_MI_RES_ID - - Type: string - - Required: false - - #### --azurefiles-endpoint - - Endpoint for the service. - - Leave blank normally. - - Properties: - - - Config: endpoint - - Env Var: RCLONE_AZUREFILES_ENDPOINT - - Type: string - - Required: false - - #### --azurefiles-chunk-size - - Upload chunk size. - - Note that this is stored in memory and there may be up to - "--transfers" * "--azurefile-upload-concurrency" chunks stored at once - in memory. - - Properties: - - - Config: chunk_size - - Env Var: RCLONE_AZUREFILES_CHUNK_SIZE - - Type: SizeSuffix - - Default: 4Mi - - #### --azurefiles-upload-concurrency - - Concurrency for multipart uploads. - - This is the number of chunks of the same file that are uploaded - concurrently. - - If you are uploading small numbers of large files over high-speed - links and these uploads do not fully utilize your bandwidth, then - increasing this may help to speed up the transfers. - - Note that chunks are stored in memory and there may be up to - "--transfers" * "--azurefile-upload-concurrency" chunks stored at once - in memory. - - Properties: - - - Config: upload_concurrency - - Env Var: RCLONE_AZUREFILES_UPLOAD_CONCURRENCY - - Type: int - - Default: 16 - - #### --azurefiles-max-stream-size - - Max size for streamed files. - - Azure files needs to know in advance how big the file will be. When - rclone doesn't know it uses this value instead. - - This will be used when rclone is streaming data, the most common uses are: - - - Uploading files with `--vfs-cache-mode off` with `rclone mount` - - Using `rclone rcat` - - Copying files with unknown length - - You will need this much free space in the share as the file will be this size temporarily. - - - Properties: - - - Config: max_stream_size - - Env Var: RCLONE_AZUREFILES_MAX_STREAM_SIZE - - Type: SizeSuffix - - Default: 10Gi - - #### --azurefiles-encoding - - The encoding for the backend. - - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - - Properties: - - - Config: encoding - - Env Var: RCLONE_AZUREFILES_ENCODING - - Type: Encoding - - Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8,Dot - - #### --azurefiles-description - - Description of the remote - - Properties: - - - Config: description - - Env Var: RCLONE_AZUREFILES_DESCRIPTION - - Type: string - - Required: false - - - - ### Custom upload headers - - You can set custom upload headers with the `--header-upload` flag. - - - Cache-Control - - Content-Disposition - - Content-Encoding - - Content-Language - - Content-Type - - Eg `--header-upload "Content-Type: text/potato"` - - ## Limitations - - MD5 sums are only uploaded with chunked files if the source has an MD5 - sum. This will always be the case for a local to azure copy. - - # Microsoft OneDrive - - Paths are specified as `remote:path` - - Paths may be as deep as required, e.g. `remote:directory/subdirectory`. - - ## Configuration - - The initial setup for OneDrive involves getting a token from - Microsoft which you need to do in your browser. `rclone config` walks - you through it. - - Here is an example of how to make a remote called `remote`. First run: - - rclone config - - This will guide you through an interactive setup process: - -e) Edit existing remote -f) New remote -g) Delete remote -h) Rename remote -i) Copy remote -j) Set configuration password -k) Quit config e/n/d/r/c/s/q> n name> remote Type of storage to - configure. Enter a string value. Press Enter for the default (""). - Choose a number from below, or type in your own value [snip] XX / - Microsoft OneDrive  "onedrive" [snip] Storage> onedrive Microsoft - App Client Id Leave blank normally. Enter a string value. Press - Enter for the default (""). client_id> Microsoft App Client Secret - Leave blank normally. Enter a string value. Press Enter for the - default (""). client_secret> Edit advanced config? (y/n) -l) Yes -m) No y/n> n Remote config Use web browser to automatically - authenticate rclone with remote? - -- Say Y if the machine running rclone has a web browser you can use -- Say N if running rclone on a (remote) machine without web browser - access If not sure try Y. If Y failed, try N. - -y) Yes -z) No y/n> y If your browser doesn't open automatically go to the - following link: http://127.0.0.1:53682/auth Log in and authorize - rclone for access Waiting for code... Got code Choose a number from - below, or type in an existing value 1 / OneDrive Personal or - Business  "onedrive" 2 / Sharepoint site  "sharepoint" 3 / Type in - driveID  "driveid" 4 / Type in SiteID  "siteid" 5 / Search a - Sharepoint site  "search" Your choice> 1 Found 1 drives, please - select the one you want to use: 0: OneDrive (business) - id=b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk Chose - drive to use:> 0 Found drive 'root' of type 'business', URL: - https://org-my.sharepoint.com/personal/you/Documents Is that okay? -a) Yes -b) No y/n> y -------------------- [remote] type = onedrive token = - {"access_token":"youraccesstoken","token_type":"Bearer","refresh_token":"yourrefreshtoken","expiry":"2018-08-26T22:39:52.486512262+08:00"} - drive_id = - b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk - drive_type = business -------------------- -c) Yes this is OK -d) Edit this remote -e) Delete this remote y/e/d> y - - - See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a - machine with no Internet browser available. - - Note that rclone runs a webserver on your local machine to collect the - token as returned from Microsoft. This only runs from the moment it - opens your browser to the moment you get back the verification - code. This is on `http://127.0.0.1:53682/` and this it may require - you to unblock it temporarily if you are running a host firewall. - - Once configured you can then use `rclone` like this, - - List directories in top level of your OneDrive - - rclone lsd remote: - - List all the files in your OneDrive - - rclone ls remote: - - To copy a local directory to an OneDrive directory called backup - - rclone copy /home/source remote:backup - - ### Getting your own Client ID and Key - - rclone uses a default Client ID when talking to OneDrive, unless a custom `client_id` is specified in the config. - The default Client ID and Key are shared by all rclone users when performing requests. - - You may choose to create and use your own Client ID, in case the default one does not work well for you. - For example, you might see throttling. - - #### Creating Client ID for OneDrive Personal - - To create your own Client ID, please follow these steps: - - 1. Open https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade and then click `New registration`. - 2. Enter a name for your app, choose account type `Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)`, select `Web` in `Redirect URI`, then type (do not copy and paste) `http://localhost:53682/` and click Register. Copy and keep the `Application (client) ID` under the app name for later use. - 3. Under `manage` select `Certificates & secrets`, click `New client secret`. Enter a description (can be anything) and set `Expires` to 24 months. Copy and keep that secret _Value_ for later use (you _won't_ be able to see this value afterwards). - 4. Under `manage` select `API permissions`, click `Add a permission` and select `Microsoft Graph` then select `delegated permissions`. - 5. Search and select the following permissions: `Files.Read`, `Files.ReadWrite`, `Files.Read.All`, `Files.ReadWrite.All`, `offline_access`, `User.Read` and `Sites.Read.All` (if custom access scopes are configured, select the permissions accordingly). Once selected click `Add permissions` at the bottom. - - Now the application is complete. Run `rclone config` to create or edit a OneDrive remote. - Supply the app ID and password as Client ID and Secret, respectively. rclone will walk you through the remaining steps. - - The access_scopes option allows you to configure the permissions requested by rclone. - See [Microsoft Docs](https://docs.microsoft.com/en-us/graph/permissions-reference#files-permissions) for more information about the different scopes. - - The `Sites.Read.All` permission is required if you need to [search SharePoint sites when configuring the remote](https://github.com/rclone/rclone/pull/5883). However, if that permission is not assigned, you need to exclude `Sites.Read.All` from your access scopes or set `disable_site_permission` option to true in the advanced options. - - #### Creating Client ID for OneDrive Business - - The steps for OneDrive Personal may or may not work for OneDrive Business, depending on the security settings of the organization. - A common error is that the publisher of the App is not verified. - - You may try to [verify you account](https://docs.microsoft.com/en-us/azure/active-directory/develop/publisher-verification-overview), or try to limit the App to your organization only, as shown below. - - 1. Make sure to create the App with your business account. - 2. Follow the steps above to create an App. However, we need a different account type here: `Accounts in this organizational directory only (*** - Single tenant)`. Note that you can also change the account type after creating the App. - 3. Find the [tenant ID](https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-to-find-tenant) of your organization. - 4. In the rclone config, set `auth_url` to `https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/authorize`. - 5. In the rclone config, set `token_url` to `https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/token`. - - Note: If you have a special region, you may need a different host in step 4 and 5. Here are [some hints](https://github.com/rclone/rclone/blob/bc23bf11db1c78c6ebbf8ea538fbebf7058b4176/backend/onedrive/onedrive.go#L86). - - - ### Modification times and hashes - - OneDrive allows modification times to be set on objects accurate to 1 - second. These will be used to detect whether objects need syncing or - not. - - OneDrive Personal, OneDrive for Business and Sharepoint Server support - [QuickXorHash](https://docs.microsoft.com/en-us/onedrive/developer/code-snippets/quickxorhash). - - Before rclone 1.62 the default hash for Onedrive Personal was `SHA1`. - For rclone 1.62 and above the default for all Onedrive backends is - `QuickXorHash`. - - Starting from July 2023 `SHA1` support is being phased out in Onedrive - Personal in favour of `QuickXorHash`. If necessary the - `--onedrive-hash-type` flag (or `hash_type` config option) can be used - to select `SHA1` during the transition period if this is important - your workflow. - - For all types of OneDrive you can use the `--checksum` flag. - - ### --fast-list - - This remote supports `--fast-list` which allows you to use fewer - transactions in exchange for more memory. See the [rclone - docs](https://rclone.org/docs/#fast-list) for more details. - - This must be enabled with the `--onedrive-delta` flag (or `delta = - true` in the config file) as it can cause performance degradation. - - It does this by using the delta listing facilities of OneDrive which - returns all the files in the remote very efficiently. This is much - more efficient than listing directories recursively and is Microsoft's - recommended way of reading all the file information from a drive. - - This can be useful with `rclone mount` and [rclone rc vfs/refresh - recursive=true](https://rclone.org/rc/#vfs-refresh)) to very quickly fill the mount with - information about all the files. - - The API used for the recursive listing (`ListR`) only supports listing - from the root of the drive. This will become increasingly inefficient - the further away you get from the root as rclone will have to discard - files outside of the directory you are using. - - Some commands (like `rclone lsf -R`) will use `ListR` by default - you - can turn this off with `--disable ListR` if you need to. - - ### Restricted filename characters - - In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) - the following characters are also replaced: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | " | 0x22 | " | - | * | 0x2A | * | - | : | 0x3A | : | - | < | 0x3C | < | - | > | 0x3E | > | - | ? | 0x3F | ? | - | \ | 0x5C | \ | - | \| | 0x7C | | | - - File names can also not end with the following characters. - These only get replaced if they are the last character in the name: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | SP | 0x20 | ␠ | - | . | 0x2E | . | - - File names can also not begin with the following characters. - These only get replaced if they are the first character in the name: - - | Character | Value | Replacement | - | --------- |:-----:|:-----------:| - | SP | 0x20 | ␠ | - | ~ | 0x7E | ~ | - - Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), - as they can't be used in JSON strings. - - ### Deleting files - - Any files you delete with rclone will end up in the trash. Microsoft - doesn't provide an API to permanently delete files, nor to empty the - trash, so you will have to do that with one of Microsoft's apps or via - the OneDrive website. - - - ### Standard options - - Here are the Standard options specific to onedrive (Microsoft OneDrive). - - #### --onedrive-client-id - - OAuth Client Id. - - Leave blank normally. - - Properties: - - - Config: client_id - - Env Var: RCLONE_ONEDRIVE_CLIENT_ID - - Type: string - - Required: false - - #### --onedrive-client-secret - - OAuth Client Secret. - - Leave blank normally. - - Properties: - - - Config: client_secret - - Env Var: RCLONE_ONEDRIVE_CLIENT_SECRET - - Type: string - - Required: false - - #### --onedrive-region - - Choose national cloud region for OneDrive. - - Properties: - - - Config: region - - Env Var: RCLONE_ONEDRIVE_REGION - - Type: string - - Default: "global" - - Examples: - - "global" - - Microsoft Cloud Global - - "us" - - Microsoft Cloud for US Government - - "de" - - Microsoft Cloud Germany - - "cn" - - Azure and Office 365 operated by Vnet Group in China - - ### Advanced options - - Here are the Advanced options specific to onedrive (Microsoft OneDrive). - - #### --onedrive-token - - OAuth Access Token as a JSON blob. - - Properties: - - - Config: token - - Env Var: RCLONE_ONEDRIVE_TOKEN - - Type: string - - Required: false - - #### --onedrive-auth-url - - Auth server URL. - - Leave blank to use the provider defaults. - - Properties: - - - Config: auth_url - - Env Var: RCLONE_ONEDRIVE_AUTH_URL - - Type: string - - Required: false - - #### --onedrive-token-url - - Token server url. - - Leave blank to use the provider defaults. - - Properties: - - - Config: token_url - - Env Var: RCLONE_ONEDRIVE_TOKEN_URL - - Type: string - - Required: false - - #### --onedrive-chunk-size - - Chunk size to upload files with - must be multiple of 320k (327,680 bytes). - - Above this size files will be chunked - must be multiple of 320k (327,680 bytes) and - should not exceed 250M (262,144,000 bytes) else you may encounter \"Microsoft.SharePoint.Client.InvalidClientQueryException: The request message is too big.\" - Note that the chunks will be buffered into memory. - - Properties: - - - Config: chunk_size - - Env Var: RCLONE_ONEDRIVE_CHUNK_SIZE - - Type: SizeSuffix - - Default: 10Mi - - #### --onedrive-drive-id - - The ID of the drive to use. - - Properties: - - - Config: drive_id - - Env Var: RCLONE_ONEDRIVE_DRIVE_ID - - Type: string - - Required: false - - #### --onedrive-drive-type - - The type of the drive (personal | business | documentLibrary). - - Properties: - - - Config: drive_type - - Env Var: RCLONE_ONEDRIVE_DRIVE_TYPE - - Type: string - - Required: false - - #### --onedrive-root-folder-id - - ID of the root folder. - - This isn't normally needed, but in special circumstances you might - know the folder ID that you wish to access but not be able to get - there through a path traversal. - - - Properties: - - - Config: root_folder_id - - Env Var: RCLONE_ONEDRIVE_ROOT_FOLDER_ID - - Type: string - - Required: false - - #### --onedrive-access-scopes - - Set scopes to be requested by rclone. - - Choose or manually enter a custom space separated list with all scopes, that rclone should request. - - - Properties: - - - Config: access_scopes - - Env Var: RCLONE_ONEDRIVE_ACCESS_SCOPES - - Type: SpaceSepList - - Default: Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access - - Examples: - - "Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access" - - Read and write access to all resources - - "Files.Read Files.Read.All Sites.Read.All offline_access" - - Read only access to all resources - - "Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All offline_access" - - Read and write access to all resources, without the ability to browse SharePoint sites. - - Same as if disable_site_permission was set to true - - #### --onedrive-disable-site-permission - - Disable the request for Sites.Read.All permission. - - If set to true, you will no longer be able to search for a SharePoint site when - configuring drive ID, because rclone will not request Sites.Read.All permission. - Set it to true if your organization didn't assign Sites.Read.All permission to the - application, and your organization disallows users to consent app permission - request on their own. - - Properties: - - - Config: disable_site_permission - - Env Var: RCLONE_ONEDRIVE_DISABLE_SITE_PERMISSION - - Type: bool - - Default: false - - #### --onedrive-expose-onenote-files - - Set to make OneNote files show up in directory listings. - - By default, rclone will hide OneNote files in directory listings because - operations like "Open" and "Update" won't work on them. But this - behaviour may also prevent you from deleting them. If you want to - delete OneNote files or otherwise want them to show up in directory - listing, set this option. - - Properties: - - - Config: expose_onenote_files - - Env Var: RCLONE_ONEDRIVE_EXPOSE_ONENOTE_FILES - - Type: bool - - Default: false - - #### --onedrive-server-side-across-configs - - Deprecated: use --server-side-across-configs instead. - - Allow server-side operations (e.g. copy) to work across different onedrive configs. - - This will only work if you are copying between two OneDrive *Personal* drives AND - the files to copy are already shared between them. In other cases, rclone will - fall back to normal copy (which will be slightly slower). - - Properties: - - - Config: server_side_across_configs - - Env Var: RCLONE_ONEDRIVE_SERVER_SIDE_ACROSS_CONFIGS - - Type: bool - - Default: false - - #### --onedrive-list-chunk - - Size of listing chunk. - - Properties: - - - Config: list_chunk - - Env Var: RCLONE_ONEDRIVE_LIST_CHUNK - - Type: int - - Default: 1000 - - #### --onedrive-no-versions - - Remove all versions on modifying operations. - - Onedrive for business creates versions when rclone uploads new files - overwriting an existing one and when it sets the modification time. - - These versions take up space out of the quota. - - This flag checks for versions after file upload and setting - modification time and removes all but the last version. - - **NB** Onedrive personal can't currently delete versions so don't use - this flag there. - - - Properties: - - - Config: no_versions - - Env Var: RCLONE_ONEDRIVE_NO_VERSIONS - - Type: bool - - Default: false - - #### --onedrive-link-scope - - Set the scope of the links created by the link command. - - Properties: - - - Config: link_scope - - Env Var: RCLONE_ONEDRIVE_LINK_SCOPE - - Type: string - - Default: "anonymous" - - Examples: - - "anonymous" - - Anyone with the link has access, without needing to sign in. - - This may include people outside of your organization. - - Anonymous link support may be disabled by an administrator. - - "organization" - - Anyone signed into your organization (tenant) can use the link to get access. - - Only available in OneDrive for Business and SharePoint. - - #### --onedrive-link-type - - Set the type of the links created by the link command. - - Properties: - - - Config: link_type - - Env Var: RCLONE_ONEDRIVE_LINK_TYPE - - Type: string - - Default: "view" - - Examples: - - "view" - - Creates a read-only link to the item. - - "edit" - - Creates a read-write link to the item. - - "embed" - - Creates an embeddable link to the item. - - #### --onedrive-link-password - - Set the password for links created by the link command. - - At the time of writing this only works with OneDrive personal paid accounts. - - - Properties: - - - Config: link_password - - Env Var: RCLONE_ONEDRIVE_LINK_PASSWORD - - Type: string - - Required: false - - #### --onedrive-hash-type - - Specify the hash in use for the backend. - - This specifies the hash type in use. If set to "auto" it will use the - default hash which is QuickXorHash. - - Before rclone 1.62 an SHA1 hash was used by default for Onedrive - Personal. For 1.62 and later the default is to use a QuickXorHash for - all onedrive types. If an SHA1 hash is desired then set this option - accordingly. - - From July 2023 QuickXorHash will be the only available hash for - both OneDrive for Business and OneDriver Personal. - - This can be set to "none" to not use any hashes. - - If the hash requested does not exist on the object, it will be - returned as an empty string which is treated as a missing hash by - rclone. - - - Properties: - - - Config: hash_type - - Env Var: RCLONE_ONEDRIVE_HASH_TYPE - - Type: string - - Default: "auto" - - Examples: - - "auto" - - Rclone chooses the best hash - - "quickxor" - - QuickXor - - "sha1" - - SHA1 - - "sha256" - - SHA256 - - "crc32" - - CRC32 - - "none" - - None - don't use any hashes - - #### --onedrive-av-override - - Allows download of files the server thinks has a virus. - - The onedrive/sharepoint server may check files uploaded with an Anti - Virus checker. If it detects any potential viruses or malware it will - block download of the file. - - In this case you will see a message like this - - server reports this file is infected with a virus - use --onedrive-av-override to download anyway: Infected (name of virus): 403 Forbidden: - - If you are 100% sure you want to download this file anyway then use - the --onedrive-av-override flag, or av_override = true in the config +- tenant: ID of the service principal's tenant. Also called its + "directory" ID. +- client_id: the service principal's client ID +- client_certificate_path: path to a PEM or PKCS12 certificate file + including the private key. +- client_certificate_password: (optional) password for the certificate file. +- client_send_certificate_chain: (optional) Specifies whether an + authentication request will include an x5c header to support subject + name / issuer based authentication. When set to "true" or "1", + authentication requests include the x5c header. +NB client_certificate_password must be obscured - see rclone obscure. - Properties: +User with username and password - - Config: av_override - - Env Var: RCLONE_ONEDRIVE_AV_OVERRIDE - - Type: bool - - Default: false +If these variables are set, rclone will authenticate with username and +password. - #### --onedrive-delta +- tenant: (optional) tenant to authenticate in. Defaults to + "organizations". +- client_id: client ID of the application the user will authenticate + to +- username: a username (usually an email address) +- password: the user's password - If set rclone will use delta listing to implement recursive listings. +Microsoft doesn't recommend this kind of authentication, because it's +less secure than other authentication flows. This method is not +interactive, so it isn't compatible with any form of multi-factor +authentication, and the application must already have user or admin +consent. This credential can only authenticate work and school accounts; +it can't authenticate Microsoft accounts. - If this flag is set the onedrive backend will advertise `ListR` - support for recursive listings. +NB password must be obscured - see rclone obscure. - Setting this flag speeds up these things greatly: +Managed Service Identity Credentials - rclone lsf -R onedrive: - rclone size onedrive: - rclone rc vfs/refresh recursive=true +If use_msi is set then managed service identity credentials are used. +This authentication only works when running in an Azure service. +env_auth needs to be unset to use this. - **However** the delta listing API **only** works at the root of the - drive. If you use it not at the root then it recurses from the root - and discards all the data that is not under the directory you asked - for. So it will be correct but may not be very efficient. +However if you have multiple user identities to choose from these must +be explicitly specified using exactly one of the msi_object_id, +msi_client_id, or msi_mi_res_id parameters. - This is why this flag is not set as the default. +If none of msi_object_id, msi_client_id, or msi_mi_res_id is set, this +is is equivalent to using env_auth. - As a rule of thumb if nearly all of your data is under rclone's root - directory (the `root/directory` in `onedrive:root/directory`) then - using this flag will be be a big performance win. If your data is - mostly not under the root then using this flag will be a big - performance loss. +Standard options - It is recommended if you are mounting your onedrive at the root - (or near the root when using crypt) and using rclone `rc vfs/refresh`. +Here are the Standard options specific to azureblob (Microsoft Azure +Blob Storage). +--azureblob-account - Properties: +Azure Storage Account Name. - - Config: delta - - Env Var: RCLONE_ONEDRIVE_DELTA - - Type: bool - - Default: false +Set this to the Azure Storage Account Name in use. - #### --onedrive-metadata-permissions +Leave blank to use SAS URL or Emulator, otherwise it needs to be set. - Control whether permissions should be read or written in metadata. +If this is blank and if env_auth is set it will be read from the +environment variable AZURE_STORAGE_ACCOUNT_NAME if possible. - Reading permissions metadata from files can be done quickly, but it - isn't always desirable to set the permissions from the metadata. +Properties: +- Config: account +- Env Var: RCLONE_AZUREBLOB_ACCOUNT +- Type: string +- Required: false - Properties: +--azureblob-env-auth - - Config: metadata_permissions - - Env Var: RCLONE_ONEDRIVE_METADATA_PERMISSIONS - - Type: Bits - - Default: off - - Examples: - - "off" - - Do not read or write the value - - "read" - - Read the value only - - "write" - - Write the value only - - "read,write" - - Read and Write the value. +Read credentials from runtime (environment variables, CLI or MSI). - #### --onedrive-encoding +See the authentication docs for full info. - The encoding for the backend. +Properties: - See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +- Config: env_auth +- Env Var: RCLONE_AZUREBLOB_ENV_AUTH +- Type: bool +- Default: false - Properties: +--azureblob-key - - Config: encoding - - Env Var: RCLONE_ONEDRIVE_ENCODING - - Type: Encoding - - Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot +Storage Account Shared Key. - #### --onedrive-description +Leave blank to use SAS URL or Emulator. - Description of the remote +Properties: - Properties: +- Config: key +- Env Var: RCLONE_AZUREBLOB_KEY +- Type: string +- Required: false - - Config: description - - Env Var: RCLONE_ONEDRIVE_DESCRIPTION - - Type: string - - Required: false +--azureblob-sas-url - ### Metadata +SAS URL for container level access only. - OneDrive supports System Metadata (not User Metadata, as of this writing) for - both files and directories. Much of the metadata is read-only, and there are some - differences between OneDrive Personal and Business (see table below for - details). +Leave blank if using account/key or Emulator. - Permissions are also supported, if `--onedrive-metadata-permissions` is set. The - accepted values for `--onedrive-metadata-permissions` are `read`, `write`, - `read,write`, and `off` (the default). `write` supports adding new permissions, - updating the "role" of existing permissions, and removing permissions. Updating - and removing require the Permission ID to be known, so it is recommended to use - `read,write` instead of `write` if you wish to update/remove permissions. +Properties: - Permissions are read/written in JSON format using the same schema as the - [OneDrive API](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/permission?view=odsp-graph-online), - which differs slightly between OneDrive Personal and Business. +- Config: sas_url +- Env Var: RCLONE_AZUREBLOB_SAS_URL +- Type: string +- Required: false + +--azureblob-tenant + +ID of the service principal's tenant. Also called its directory ID. + +Set this if using - Service principal with client secret - Service +principal with certificate - User with username and password + +Properties: + +- Config: tenant +- Env Var: RCLONE_AZUREBLOB_TENANT +- Type: string +- Required: false + +--azureblob-client-id + +The ID of the client in use. + +Set this if using - Service principal with client secret - Service +principal with certificate - User with username and password + +Properties: + +- Config: client_id +- Env Var: RCLONE_AZUREBLOB_CLIENT_ID +- Type: string +- Required: false + +--azureblob-client-secret + +One of the service principal's client secrets + +Set this if using - Service principal with client secret + +Properties: + +- Config: client_secret +- Env Var: RCLONE_AZUREBLOB_CLIENT_SECRET +- Type: string +- Required: false + +--azureblob-client-certificate-path + +Path to a PEM or PKCS12 certificate file including the private key. + +Set this if using - Service principal with certificate + +Properties: + +- Config: client_certificate_path +- Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PATH +- Type: string +- Required: false + +--azureblob-client-certificate-password + +Password for the certificate file (optional). + +Optionally set this if using - Service principal with certificate + +And the certificate has a password. + +NB Input to this must be obscured - see rclone obscure. + +Properties: + +- Config: client_certificate_password +- Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PASSWORD +- Type: string +- Required: false + +Advanced options + +Here are the Advanced options specific to azureblob (Microsoft Azure +Blob Storage). + +--azureblob-client-send-certificate-chain + +Send the certificate chain when using certificate auth. + +Specifies whether an authentication request will include an x5c header +to support subject name / issuer based authentication. When set to true, +authentication requests include the x5c header. + +Optionally set this if using - Service principal with certificate + +Properties: + +- Config: client_send_certificate_chain +- Env Var: RCLONE_AZUREBLOB_CLIENT_SEND_CERTIFICATE_CHAIN +- Type: bool +- Default: false + +--azureblob-username + +User name (usually an email address) + +Set this if using - User with username and password + +Properties: + +- Config: username +- Env Var: RCLONE_AZUREBLOB_USERNAME +- Type: string +- Required: false + +--azureblob-password + +The user's password + +Set this if using - User with username and password + +NB Input to this must be obscured - see rclone obscure. + +Properties: + +- Config: password +- Env Var: RCLONE_AZUREBLOB_PASSWORD +- Type: string +- Required: false + +--azureblob-service-principal-file + +Path to file containing credentials for use with a service principal. + +Leave blank normally. Needed only if you want to use a service principal +instead of interactive login. + + $ az ad sp create-for-rbac --name "" \ + --role "Storage Blob Data Owner" \ + --scopes "/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts//blobServices/default/containers/" \ + > azure-principal.json + +See "Create an Azure service principal" and "Assign an Azure role for +access to blob data" pages for more details. + +It may be more convenient to put the credentials directly into the +rclone config file under the client_id, tenant and client_secret keys +instead of setting service_principal_file. + +Properties: + +- Config: service_principal_file +- Env Var: RCLONE_AZUREBLOB_SERVICE_PRINCIPAL_FILE +- Type: string +- Required: false + +--azureblob-use-msi + +Use a managed service identity to authenticate (only works in Azure). + +When true, use a managed service identity to authenticate to Azure +Storage instead of a SAS token or account key. + +If the VM(SS) on which this program is running has a system-assigned +identity, it will be used by default. If the resource has no +system-assigned but exactly one user-assigned identity, the +user-assigned identity will be used by default. If the resource has +multiple user-assigned identities, the identity to use must be +explicitly specified using exactly one of the msi_object_id, +msi_client_id, or msi_mi_res_id parameters. + +Properties: + +- Config: use_msi +- Env Var: RCLONE_AZUREBLOB_USE_MSI +- Type: bool +- Default: false + +--azureblob-msi-object-id + +Object ID of the user-assigned MSI to use, if any. + +Leave blank if msi_client_id or msi_mi_res_id specified. + +Properties: + +- Config: msi_object_id +- Env Var: RCLONE_AZUREBLOB_MSI_OBJECT_ID +- Type: string +- Required: false + +--azureblob-msi-client-id + +Object ID of the user-assigned MSI to use, if any. + +Leave blank if msi_object_id or msi_mi_res_id specified. + +Properties: + +- Config: msi_client_id +- Env Var: RCLONE_AZUREBLOB_MSI_CLIENT_ID +- Type: string +- Required: false + +--azureblob-msi-mi-res-id + +Azure resource ID of the user-assigned MSI to use, if any. + +Leave blank if msi_client_id or msi_object_id specified. + +Properties: + +- Config: msi_mi_res_id +- Env Var: RCLONE_AZUREBLOB_MSI_MI_RES_ID +- Type: string +- Required: false + +--azureblob-use-emulator + +Uses local storage emulator if provided as 'true'. + +Leave blank if using real azure storage endpoint. + +Properties: + +- Config: use_emulator +- Env Var: RCLONE_AZUREBLOB_USE_EMULATOR +- Type: bool +- Default: false + +--azureblob-endpoint + +Endpoint for the service. + +Leave blank normally. + +Properties: + +- Config: endpoint +- Env Var: RCLONE_AZUREBLOB_ENDPOINT +- Type: string +- Required: false + +--azureblob-upload-cutoff + +Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). + +Properties: + +- Config: upload_cutoff +- Env Var: RCLONE_AZUREBLOB_UPLOAD_CUTOFF +- Type: string +- Required: false + +--azureblob-chunk-size + +Upload chunk size. + +Note that this is stored in memory and there may be up to "--transfers" +* "--azureblob-upload-concurrency" chunks stored at once in memory. + +Properties: + +- Config: chunk_size +- Env Var: RCLONE_AZUREBLOB_CHUNK_SIZE +- Type: SizeSuffix +- Default: 4Mi + +--azureblob-upload-concurrency + +Concurrency for multipart uploads. + +This is the number of chunks of the same file that are uploaded +concurrently. + +If you are uploading small numbers of large files over high-speed links +and these uploads do not fully utilize your bandwidth, then increasing +this may help to speed up the transfers. + +In tests, upload speed increases almost linearly with upload +concurrency. For example to fill a gigabit pipe it may be necessary to +raise this to 64. Note that this will use more memory. + +Note that chunks are stored in memory and there may be up to +"--transfers" * "--azureblob-upload-concurrency" chunks stored at once +in memory. + +Properties: + +- Config: upload_concurrency +- Env Var: RCLONE_AZUREBLOB_UPLOAD_CONCURRENCY +- Type: int +- Default: 16 + +--azureblob-list-chunk + +Size of blob list. + +This sets the number of blobs requested in each listing chunk. Default +is the maximum, 5000. "List blobs" requests are permitted 2 minutes per +megabyte to complete. If an operation is taking longer than 2 minutes +per megabyte on average, it will time out ( source ). This can be used +to limit the number of blobs items to return, to avoid the time out. + +Properties: + +- Config: list_chunk +- Env Var: RCLONE_AZUREBLOB_LIST_CHUNK +- Type: int +- Default: 5000 + +--azureblob-access-tier + +Access tier of blob: hot, cool, cold or archive. + +Archived blobs can be restored by setting access tier to hot, cool or +cold. Leave blank if you intend to use default access tier, which is set +at account level + +If there is no "access tier" specified, rclone doesn't apply any tier. +rclone performs "Set Tier" operation on blobs while uploading, if +objects are not modified, specifying "access tier" to new one will have +no effect. If blobs are in "archive tier" at remote, trying to perform +data transfer operations from remote will not be allowed. User should +first restore by tiering blob to "Hot", "Cool" or "Cold". + +Properties: + +- Config: access_tier +- Env Var: RCLONE_AZUREBLOB_ACCESS_TIER +- Type: string +- Required: false + +--azureblob-archive-tier-delete + +Delete archive tier blobs before overwriting. + +Archive tier blobs cannot be updated. So without this flag, if you +attempt to update an archive tier blob, then rclone will produce the +error: + + can't update archive tier blob without --azureblob-archive-tier-delete + +With this flag set then before rclone attempts to overwrite an archive +tier blob, it will delete the existing blob before uploading its +replacement. This has the potential for data loss if the upload fails +(unlike updating a normal blob) and also may cost more since deleting +archive tier blobs early may be chargable. + +Properties: + +- Config: archive_tier_delete +- Env Var: RCLONE_AZUREBLOB_ARCHIVE_TIER_DELETE +- Type: bool +- Default: false + +--azureblob-disable-checksum + +Don't store MD5 checksum with object metadata. + +Normally rclone will calculate the MD5 checksum of the input before +uploading it so it can add it to metadata on the object. This is great +for data integrity checking but can cause long delays for large files to +start uploading. + +Properties: + +- Config: disable_checksum +- Env Var: RCLONE_AZUREBLOB_DISABLE_CHECKSUM +- Type: bool +- Default: false + +--azureblob-memory-pool-flush-time + +How often internal memory buffer pools will be flushed. (no longer used) + +Properties: + +- Config: memory_pool_flush_time +- Env Var: RCLONE_AZUREBLOB_MEMORY_POOL_FLUSH_TIME +- Type: Duration +- Default: 1m0s + +--azureblob-memory-pool-use-mmap + +Whether to use mmap buffers in internal memory pool. (no longer used) + +Properties: + +- Config: memory_pool_use_mmap +- Env Var: RCLONE_AZUREBLOB_MEMORY_POOL_USE_MMAP +- Type: bool +- Default: false + +--azureblob-encoding + +The encoding for the backend. + +See the encoding section in the overview for more info. + +Properties: + +- Config: encoding +- Env Var: RCLONE_AZUREBLOB_ENCODING +- Type: Encoding +- Default: Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8 + +--azureblob-public-access + +Public access level of a container: blob or container. + +Properties: + +- Config: public_access +- Env Var: RCLONE_AZUREBLOB_PUBLIC_ACCESS +- Type: string +- Required: false +- Examples: + - "" + - The container and its blobs can be accessed only with an + authorized request. + - It's a default value. + - "blob" + - Blob data within this container can be read via anonymous + request. + - "container" + - Allow full public read access for container and blob data. + +--azureblob-directory-markers + +Upload an empty object with a trailing slash when a new directory is +created + +Empty folders are unsupported for bucket based remotes, this option +creates an empty object ending with "/", to persist the folder. + +This object also has the metadata "hdi_isfolder = true" to conform to +the Microsoft standard. + +Properties: + +- Config: directory_markers +- Env Var: RCLONE_AZUREBLOB_DIRECTORY_MARKERS +- Type: bool +- Default: false + +--azureblob-no-check-container + +If set, don't attempt to check the container exists or create it. + +This can be useful when trying to minimise the number of transactions +rclone does if you know the container exists already. + +Properties: + +- Config: no_check_container +- Env Var: RCLONE_AZUREBLOB_NO_CHECK_CONTAINER +- Type: bool +- Default: false + +--azureblob-no-head-object + +If set, do not do HEAD before GET when getting objects. + +Properties: + +- Config: no_head_object +- Env Var: RCLONE_AZUREBLOB_NO_HEAD_OBJECT +- Type: bool +- Default: false + +--azureblob-delete-snapshots + +Set to specify how to deal with snapshots on blob deletion. + +Properties: + +- Config: delete_snapshots +- Env Var: RCLONE_AZUREBLOB_DELETE_SNAPSHOTS +- Type: string +- Required: false +- Choices: + - "" + - By default, the delete operation fails if a blob has + snapshots + - "include" + - Specify 'include' to remove the root blob and all its + snapshots + - "only" + - Specify 'only' to remove only the snapshots but keep the + root blob. + +--azureblob-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_AZUREBLOB_DESCRIPTION +- Type: string +- Required: false + +Custom upload headers + +You can set custom upload headers with the --header-upload flag. + +- Cache-Control +- Content-Disposition +- Content-Encoding +- Content-Language +- Content-Type + +Eg --header-upload "Content-Type: text/potato" + +Limitations + +MD5 sums are only uploaded with chunked files if the source has an MD5 +sum. This will always be the case for a local to azure copy. + +rclone about is not supported by the Microsoft Azure Blob storage +backend. Backends without this capability cannot determine free space +for an rclone mount or use policy mfs (most free space) as a member of +an rclone union remote. + +See List of backends that do not support rclone about and rclone about + +Azure Storage Emulator Support + +You can run rclone with the storage emulator (usually azurite). + +To do this, just set up a new remote with rclone config following the +instructions in the introduction and set use_emulator in the advanced +settings as true. You do not need to provide a default account name nor +an account key. But you can override them in the account and key +options. (Prior to v1.61 they were hard coded to azurite's +devstoreaccount1.) + +Also, if you want to access a storage emulator instance running on a +different machine, you can override the endpoint parameter in the +advanced settings, setting it to +http(s)://:/devstoreaccount1 (e.g. +http://10.254.2.5:10000/devstoreaccount1). + +Microsoft Azure Files Storage + +Paths are specified as remote: You may put subdirectories in too, e.g. +remote:path/to/dir. + +Configuration + +Here is an example of making a Microsoft Azure Files Storage +configuration. For a remote called remote. 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 + [snip] + XX / Microsoft Azure Files Storage + \ "azurefiles" + [snip] + + Option account. + Azure Storage Account Name. + Set this to the Azure Storage Account Name in use. + Leave blank to use SAS URL or connection string, otherwise it needs to be set. + If this is blank and if env_auth is set it will be read from the + environment variable `AZURE_STORAGE_ACCOUNT_NAME` if possible. + Enter a value. Press Enter to leave empty. + account> account_name + + Option share_name. + Azure Files Share Name. + This is required and is the name of the share to access. + Enter a value. Press Enter to leave empty. + share_name> share_name + + Option env_auth. + Read credentials from runtime (environment variables, CLI or MSI). + See the [authentication docs](/azurefiles#authentication) for full info. + Enter a boolean value (true or false). Press Enter for the default (false). + env_auth> + + Option key. + Storage Account Shared Key. + Leave blank to use SAS URL or connection string. + Enter a value. Press Enter to leave empty. + key> base64encodedkey== + + Option sas_url. + SAS URL. + Leave blank if using account/key or connection string. + Enter a value. Press Enter to leave empty. + sas_url> + + Option connection_string. + Azure Files Connection String. + Enter a value. Press Enter to leave empty. + connection_string> + [snip] + + Configuration complete. + Options: + - type: azurefiles + - account: account_name + - share_name: share_name + - key: base64encodedkey== + Keep this "remote" remote? + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> + +Once configured you can use rclone. + +See all files in the top level: + + rclone lsf remote: + +Make a new directory in the root: + + rclone mkdir remote:dir + +Recursively List the contents: + + rclone ls remote: + +Sync /home/local/directory to the remote directory, deleting any excess +files in the directory. + + rclone sync --interactive /home/local/directory remote:dir + +Modified time + +The modified time is stored as Azure standard LastModified time on files + +Performance + +When uploading large files, increasing the value of +--azurefiles-upload-concurrency will increase performance at the cost of +using more memory. The default of 16 is set quite conservatively to use +less memory. It maybe be necessary raise it to 64 or higher to fully +utilize a 1 GBit/s link with a single file transfer. + +Restricted filename characters + +In addition to the default restricted characters set the following +characters are also replaced: + + Character Value Replacement + ----------- ------- ------------- + " 0x22 " + * 0x2A * + : 0x3A : + < 0x3C < + > 0x3E > + ? 0x3F ? + \ 0x5C \ + | 0x7C | + +File names can also not end with the following characters. These only +get replaced if they are the last character in the name: + + Character Value Replacement + ----------- ------- ------------- + . 0x2E . + +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. + +Hashes + +MD5 hashes are stored with files. Not all files will have MD5 hashes as +these have to be uploaded with the file. + +Authentication + +There are a number of ways of supplying credentials for Azure Files +Storage. Rclone tries them in the order of the sections below. + +Env Auth + +If the env_auth config parameter is true then rclone will pull +credentials from the environment or runtime. + +It tries these authentication methods in this order: + +1. Environment Variables +2. Managed Service Identity Credentials +3. Azure CLI credentials (as used by the az tool) + +These are described in the following sections + +Env Auth: 1. Environment Variables + +If env_auth is set and environment variables are present rclone +authenticates a service principal with a secret or certificate, or a +user with a password, depending on which environment variable are set. +It reads configuration from these variables, in the following order: + +1. Service principal with client secret + - AZURE_TENANT_ID: ID of the service principal's tenant. Also + called its "directory" ID. + - AZURE_CLIENT_ID: the service principal's client ID + - AZURE_CLIENT_SECRET: one of the service principal's client + secrets +2. Service principal with certificate + - AZURE_TENANT_ID: ID of the service principal's tenant. Also + called its "directory" ID. + - AZURE_CLIENT_ID: the service principal's client ID + - AZURE_CLIENT_CERTIFICATE_PATH: path to a PEM or PKCS12 + certificate file including the private key. + - AZURE_CLIENT_CERTIFICATE_PASSWORD: (optional) password for the + certificate file. + - AZURE_CLIENT_SEND_CERTIFICATE_CHAIN: (optional) Specifies + whether an authentication request will include an x5c header to + support subject name / issuer based authentication. When set to + "true" or "1", authentication requests include the x5c header. +3. User with username and password + - AZURE_TENANT_ID: (optional) tenant to authenticate in. Defaults + to "organizations". + - AZURE_CLIENT_ID: client ID of the application the user will + authenticate to + - AZURE_USERNAME: a username (usually an email address) + - AZURE_PASSWORD: the user's password +4. Workload Identity + - AZURE_TENANT_ID: Tenant to authenticate in. + - AZURE_CLIENT_ID: Client ID of the application the user will + authenticate to. + - AZURE_FEDERATED_TOKEN_FILE: Path to projected service account + token file. + - AZURE_AUTHORITY_HOST: Authority of an Azure Active Directory + endpoint (default: login.microsoftonline.com). + +Env Auth: 2. Managed Service Identity Credentials + +When using Managed Service Identity if the VM(SS) on which this program +is running has a system-assigned identity, it will be used by default. +If the resource has no system-assigned but exactly one user-assigned +identity, the user-assigned identity will be used by default. + +If the resource has multiple user-assigned identities you will need to +unset env_auth and set use_msi instead. See the use_msi section. + +Env Auth: 3. Azure CLI credentials (as used by the az tool) + +Credentials created with the az tool can be picked up using env_auth. + +For example if you were to login with a service principal like this: + + az login --service-principal -u XXX -p XXX --tenant XXX + +Then you could access rclone resources like this: + + rclone lsf :azurefiles,env_auth,account=ACCOUNT: + +Or + + rclone lsf --azurefiles-env-auth --azurefiles-account=ACCOUNT :azurefiles: + +Account and Shared Key + +This is the most straight forward and least flexible way. Just fill in +the account and key lines and leave the rest blank. + +SAS URL + +To use it leave account, key and connection_string blank and fill in +sas_url. + +Connection String + +To use it leave account, key and "sas_url" blank and fill in +connection_string. + +Service principal with client secret + +If these variables are set, rclone will authenticate with a service +principal with a client secret. + +- tenant: ID of the service principal's tenant. Also called its + "directory" ID. +- client_id: the service principal's client ID +- client_secret: one of the service principal's client secrets + +The credentials can also be placed in a file using the +service_principal_file configuration option. + +Service principal with certificate + +If these variables are set, rclone will authenticate with a service +principal with certificate. + +- tenant: ID of the service principal's tenant. Also called its + "directory" ID. +- client_id: the service principal's client ID +- client_certificate_path: path to a PEM or PKCS12 certificate file + including the private key. +- client_certificate_password: (optional) password for the certificate + file. +- client_send_certificate_chain: (optional) Specifies whether an + authentication request will include an x5c header to support subject + name / issuer based authentication. When set to "true" or "1", + authentication requests include the x5c header. + +NB client_certificate_password must be obscured - see rclone obscure. + +User with username and password + +If these variables are set, rclone will authenticate with username and +password. + +- tenant: (optional) tenant to authenticate in. Defaults to + "organizations". +- client_id: client ID of the application the user will authenticate + to +- username: a username (usually an email address) +- password: the user's password + +Microsoft doesn't recommend this kind of authentication, because it's +less secure than other authentication flows. This method is not +interactive, so it isn't compatible with any form of multi-factor +authentication, and the application must already have user or admin +consent. This credential can only authenticate work and school accounts; +it can't authenticate Microsoft accounts. + +NB password must be obscured - see rclone obscure. + +Managed Service Identity Credentials + +If use_msi is set then managed service identity credentials are used. +This authentication only works when running in an Azure service. +env_auth needs to be unset to use this. + +However if you have multiple user identities to choose from these must +be explicitly specified using exactly one of the msi_object_id, +msi_client_id, or msi_mi_res_id parameters. + +If none of msi_object_id, msi_client_id, or msi_mi_res_id is set, this +is is equivalent to using env_auth. + +Standard options + +Here are the Standard options specific to azurefiles (Microsoft Azure +Files). + +--azurefiles-account + +Azure Storage Account Name. + +Set this to the Azure Storage Account Name in use. + +Leave blank to use SAS URL or connection string, otherwise it needs to +be set. + +If this is blank and if env_auth is set it will be read from the +environment variable AZURE_STORAGE_ACCOUNT_NAME if possible. + +Properties: + +- Config: account +- Env Var: RCLONE_AZUREFILES_ACCOUNT +- Type: string +- Required: false + +--azurefiles-share-name + +Azure Files Share Name. + +This is required and is the name of the share to access. + +Properties: + +- Config: share_name +- Env Var: RCLONE_AZUREFILES_SHARE_NAME +- Type: string +- Required: false + +--azurefiles-env-auth + +Read credentials from runtime (environment variables, CLI or MSI). + +See the authentication docs for full info. + +Properties: + +- Config: env_auth +- Env Var: RCLONE_AZUREFILES_ENV_AUTH +- Type: bool +- Default: false + +--azurefiles-key + +Storage Account Shared Key. + +Leave blank to use SAS URL or connection string. + +Properties: + +- Config: key +- Env Var: RCLONE_AZUREFILES_KEY +- Type: string +- Required: false + +--azurefiles-sas-url + +SAS URL. + +Leave blank if using account/key or connection string. + +Properties: + +- Config: sas_url +- Env Var: RCLONE_AZUREFILES_SAS_URL +- Type: string +- Required: false + +--azurefiles-connection-string + +Azure Files Connection String. + +Properties: + +- Config: connection_string +- Env Var: RCLONE_AZUREFILES_CONNECTION_STRING +- Type: string +- Required: false + +--azurefiles-tenant + +ID of the service principal's tenant. Also called its directory ID. + +Set this if using - Service principal with client secret - Service +principal with certificate - User with username and password + +Properties: + +- Config: tenant +- Env Var: RCLONE_AZUREFILES_TENANT +- Type: string +- Required: false + +--azurefiles-client-id + +The ID of the client in use. + +Set this if using - Service principal with client secret - Service +principal with certificate - User with username and password + +Properties: + +- Config: client_id +- Env Var: RCLONE_AZUREFILES_CLIENT_ID +- Type: string +- Required: false + +--azurefiles-client-secret + +One of the service principal's client secrets + +Set this if using - Service principal with client secret + +Properties: + +- Config: client_secret +- Env Var: RCLONE_AZUREFILES_CLIENT_SECRET +- Type: string +- Required: false + +--azurefiles-client-certificate-path + +Path to a PEM or PKCS12 certificate file including the private key. + +Set this if using - Service principal with certificate + +Properties: + +- Config: client_certificate_path +- Env Var: RCLONE_AZUREFILES_CLIENT_CERTIFICATE_PATH +- Type: string +- Required: false + +--azurefiles-client-certificate-password + +Password for the certificate file (optional). + +Optionally set this if using - Service principal with certificate + +And the certificate has a password. + +NB Input to this must be obscured - see rclone obscure. + +Properties: + +- Config: client_certificate_password +- Env Var: RCLONE_AZUREFILES_CLIENT_CERTIFICATE_PASSWORD +- Type: string +- Required: false + +Advanced options + +Here are the Advanced options specific to azurefiles (Microsoft Azure +Files). + +--azurefiles-client-send-certificate-chain + +Send the certificate chain when using certificate auth. + +Specifies whether an authentication request will include an x5c header +to support subject name / issuer based authentication. When set to true, +authentication requests include the x5c header. + +Optionally set this if using - Service principal with certificate + +Properties: + +- Config: client_send_certificate_chain +- Env Var: RCLONE_AZUREFILES_CLIENT_SEND_CERTIFICATE_CHAIN +- Type: bool +- Default: false + +--azurefiles-username + +User name (usually an email address) + +Set this if using - User with username and password + +Properties: + +- Config: username +- Env Var: RCLONE_AZUREFILES_USERNAME +- Type: string +- Required: false + +--azurefiles-password + +The user's password + +Set this if using - User with username and password + +NB Input to this must be obscured - see rclone obscure. + +Properties: + +- Config: password +- Env Var: RCLONE_AZUREFILES_PASSWORD +- Type: string +- Required: false + +--azurefiles-service-principal-file + +Path to file containing credentials for use with a service principal. + +Leave blank normally. Needed only if you want to use a service principal +instead of interactive login. + + $ az ad sp create-for-rbac --name "" \ + --role "Storage Files Data Owner" \ + --scopes "/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts//blobServices/default/containers/" \ + > azure-principal.json + +See "Create an Azure service principal" and "Assign an Azure role for +access to files data" pages for more details. + +NB this section needs updating for Azure Files - pull requests +appreciated! + +It may be more convenient to put the credentials directly into the +rclone config file under the client_id, tenant and client_secret keys +instead of setting service_principal_file. + +Properties: + +- Config: service_principal_file +- Env Var: RCLONE_AZUREFILES_SERVICE_PRINCIPAL_FILE +- Type: string +- Required: false + +--azurefiles-use-msi + +Use a managed service identity to authenticate (only works in Azure). + +When true, use a managed service identity to authenticate to Azure +Storage instead of a SAS token or account key. + +If the VM(SS) on which this program is running has a system-assigned +identity, it will be used by default. If the resource has no +system-assigned but exactly one user-assigned identity, the +user-assigned identity will be used by default. If the resource has +multiple user-assigned identities, the identity to use must be +explicitly specified using exactly one of the msi_object_id, +msi_client_id, or msi_mi_res_id parameters. + +Properties: + +- Config: use_msi +- Env Var: RCLONE_AZUREFILES_USE_MSI +- Type: bool +- Default: false + +--azurefiles-msi-object-id + +Object ID of the user-assigned MSI to use, if any. + +Leave blank if msi_client_id or msi_mi_res_id specified. + +Properties: + +- Config: msi_object_id +- Env Var: RCLONE_AZUREFILES_MSI_OBJECT_ID +- Type: string +- Required: false + +--azurefiles-msi-client-id + +Object ID of the user-assigned MSI to use, if any. + +Leave blank if msi_object_id or msi_mi_res_id specified. + +Properties: + +- Config: msi_client_id +- Env Var: RCLONE_AZUREFILES_MSI_CLIENT_ID +- Type: string +- Required: false + +--azurefiles-msi-mi-res-id + +Azure resource ID of the user-assigned MSI to use, if any. + +Leave blank if msi_client_id or msi_object_id specified. + +Properties: + +- Config: msi_mi_res_id +- Env Var: RCLONE_AZUREFILES_MSI_MI_RES_ID +- Type: string +- Required: false + +--azurefiles-endpoint + +Endpoint for the service. + +Leave blank normally. + +Properties: + +- Config: endpoint +- Env Var: RCLONE_AZUREFILES_ENDPOINT +- Type: string +- Required: false + +--azurefiles-chunk-size + +Upload chunk size. + +Note that this is stored in memory and there may be up to "--transfers" +* "--azurefile-upload-concurrency" chunks stored at once in memory. + +Properties: + +- Config: chunk_size +- Env Var: RCLONE_AZUREFILES_CHUNK_SIZE +- Type: SizeSuffix +- Default: 4Mi + +--azurefiles-upload-concurrency + +Concurrency for multipart uploads. + +This is the number of chunks of the same file that are uploaded +concurrently. + +If you are uploading small numbers of large files over high-speed links +and these uploads do not fully utilize your bandwidth, then increasing +this may help to speed up the transfers. + +Note that chunks are stored in memory and there may be up to +"--transfers" * "--azurefile-upload-concurrency" chunks stored at once +in memory. + +Properties: + +- Config: upload_concurrency +- Env Var: RCLONE_AZUREFILES_UPLOAD_CONCURRENCY +- Type: int +- Default: 16 + +--azurefiles-max-stream-size + +Max size for streamed files. + +Azure files needs to know in advance how big the file will be. When +rclone doesn't know it uses this value instead. + +This will be used when rclone is streaming data, the most common uses +are: + +- Uploading files with --vfs-cache-mode off with rclone mount +- Using rclone rcat +- Copying files with unknown length + +You will need this much free space in the share as the file will be this +size temporarily. + +Properties: + +- Config: max_stream_size +- Env Var: RCLONE_AZUREFILES_MAX_STREAM_SIZE +- Type: SizeSuffix +- Default: 10Gi + +--azurefiles-encoding + +The encoding for the backend. + +See the encoding section in the overview for more info. + +Properties: + +- Config: encoding +- Env Var: RCLONE_AZUREFILES_ENCODING +- Type: Encoding +- Default: + Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8,Dot + +--azurefiles-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_AZUREFILES_DESCRIPTION +- Type: string +- Required: false + +Custom upload headers + +You can set custom upload headers with the --header-upload flag. + +- Cache-Control +- Content-Disposition +- Content-Encoding +- Content-Language +- Content-Type + +Eg --header-upload "Content-Type: text/potato" + +Limitations + +MD5 sums are only uploaded with chunked files if the source has an MD5 +sum. This will always be the case for a local to azure copy. + +Microsoft OneDrive + +Paths are specified as remote:path + +Paths may be as deep as required, e.g. remote:directory/subdirectory. + +Configuration + +The initial setup for OneDrive involves getting a token from Microsoft +which you need to do in your browser. rclone config walks you through +it. + +Here is an example of how to make a remote called remote. First run: + + rclone config + +This will guide you through an interactive setup process: + + 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> n + name> remote + Type of storage to configure. + Enter a string value. Press Enter for the default (""). + Choose a number from below, or type in your own value + [snip] + XX / Microsoft OneDrive + \ "onedrive" + [snip] + Storage> onedrive + Microsoft App Client Id + Leave blank normally. + Enter a string value. Press Enter for the default (""). + client_id> + Microsoft App Client Secret + Leave blank normally. + Enter a string value. Press Enter for the default (""). + client_secret> + Edit advanced config? (y/n) + y) Yes + n) No + y/n> n + Remote config + Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access + If not sure try Y. If Y failed, try N. + y) Yes + n) No + y/n> y + If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth + Log in and authorize rclone for access + Waiting for code... + Got code + Choose a number from below, or type in an existing value + 1 / OneDrive Personal or Business + \ "onedrive" + 2 / Sharepoint site + \ "sharepoint" + 3 / Type in driveID + \ "driveid" + 4 / Type in SiteID + \ "siteid" + 5 / Search a Sharepoint site + \ "search" + Your choice> 1 + Found 1 drives, please select the one you want to use: + 0: OneDrive (business) id=b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk + Chose drive to use:> 0 + Found drive 'root' of type 'business', URL: https://org-my.sharepoint.com/personal/you/Documents + Is that okay? + y) Yes + n) No + y/n> y + -------------------- + [remote] + type = onedrive + token = {"access_token":"youraccesstoken","token_type":"Bearer","refresh_token":"yourrefreshtoken","expiry":"2018-08-26T22:39:52.486512262+08:00"} + drive_id = b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk + drive_type = business + -------------------- + y) Yes this is OK + e) Edit this remote + d) Delete this remote + y/e/d> y + +See the remote setup docs for how to set it up on a machine with no +Internet browser available. + +Note that rclone runs a webserver on your local machine to collect the +token as returned from Microsoft. This only runs from the moment it +opens your browser to the moment you get back the verification code. +This is on http://127.0.0.1:53682/ and this it may require you to +unblock it temporarily if you are running a host firewall. + +Once configured you can then use rclone like this, + +List directories in top level of your OneDrive + + rclone lsd remote: + +List all the files in your OneDrive + + rclone ls remote: + +To copy a local directory to an OneDrive directory called backup + + rclone copy /home/source remote:backup + +Getting your own Client ID and Key + +rclone uses a default Client ID when talking to OneDrive, unless a +custom client_id is specified in the config. The default Client ID and +Key are shared by all rclone users when performing requests. + +You may choose to create and use your own Client ID, in case the default +one does not work well for you. For example, you might see throttling. + +Creating Client ID for OneDrive Personal + +To create your own Client ID, please follow these steps: + +1. Open + https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade + and then click New registration. +2. Enter a name for your app, choose account type + Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox), + select Web in Redirect URI, then type (do not copy and paste) + http://localhost:53682/ and click Register. Copy and keep the + Application (client) ID under the app name for later use. +3. Under manage select Certificates & secrets, click New client secret. + Enter a description (can be anything) and set Expires to 24 months. + Copy and keep that secret Value for later use (you won't be able to + see this value afterwards). +4. Under manage select API permissions, click Add a permission and + select Microsoft Graph then select delegated permissions. +5. Search and select the following permissions: Files.Read, + Files.ReadWrite, Files.Read.All, Files.ReadWrite.All, + offline_access, User.Read and Sites.Read.All (if custom access + scopes are configured, select the permissions accordingly). Once + selected click Add permissions at the bottom. + +Now the application is complete. Run rclone config to create or edit a +OneDrive remote. Supply the app ID and password as Client ID and Secret, +respectively. rclone will walk you through the remaining steps. + +The access_scopes option allows you to configure the permissions +requested by rclone. See Microsoft Docs for more information about the +different scopes. + +The Sites.Read.All permission is required if you need to search +SharePoint sites when configuring the remote. However, if that +permission is not assigned, you need to exclude Sites.Read.All from your +access scopes or set disable_site_permission option to true in the +advanced options. + +Creating Client ID for OneDrive Business + +The steps for OneDrive Personal may or may not work for OneDrive +Business, depending on the security settings of the organization. A +common error is that the publisher of the App is not verified. + +You may try to verify you account, or try to limit the App to your +organization only, as shown below. + +1. Make sure to create the App with your business account. +2. Follow the steps above to create an App. However, we need a + different account type here: + Accounts in this organizational directory only (*** - Single tenant). + Note that you can also change the account type after creating the + App. +3. Find the tenant ID of your organization. +4. In the rclone config, set auth_url to + https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/authorize. +5. In the rclone config, set token_url to + https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/token. + +Note: If you have a special region, you may need a different host in +step 4 and 5. Here are some hints. + +Modification times and hashes + +OneDrive allows modification times to be set on objects accurate to 1 +second. These will be used to detect whether objects need syncing or +not. + +OneDrive Personal, OneDrive for Business and Sharepoint Server support +QuickXorHash. + +Before rclone 1.62 the default hash for Onedrive Personal was SHA1. For +rclone 1.62 and above the default for all Onedrive backends is +QuickXorHash. + +Starting from July 2023 SHA1 support is being phased out in Onedrive +Personal in favour of QuickXorHash. If necessary the +--onedrive-hash-type flag (or hash_type config option) can be used to +select SHA1 during the transition period if this is important your +workflow. + +For all types of OneDrive you can use the --checksum flag. + +--fast-list + +This remote supports --fast-list which allows you to use fewer +transactions in exchange for more memory. See the rclone docs for more +details. + +This must be enabled with the --onedrive-delta flag (or delta = true in +the config file) as it can cause performance degradation. + +It does this by using the delta listing facilities of OneDrive which +returns all the files in the remote very efficiently. This is much more +efficient than listing directories recursively and is Microsoft's +recommended way of reading all the file information from a drive. + +This can be useful with rclone mount and rclone rc vfs/refresh +recursive=true) to very quickly fill the mount with information about +all the files. + +The API used for the recursive listing (ListR) only supports listing +from the root of the drive. This will become increasingly inefficient +the further away you get from the root as rclone will have to discard +files outside of the directory you are using. + +Some commands (like rclone lsf -R) will use ListR by default - you can +turn this off with --disable ListR if you need to. + +Restricted filename characters + +In addition to the default restricted characters set the following +characters are also replaced: + + Character Value Replacement + ----------- ------- ------------- + " 0x22 " + * 0x2A * + : 0x3A : + < 0x3C < + > 0x3E > + ? 0x3F ? + \ 0x5C \ + | 0x7C | + +File names can also not end with the following characters. These only +get replaced if they are the last character in the name: + + Character Value Replacement + ----------- ------- ------------- + SP 0x20 ␠ + . 0x2E . + +File names can also not begin with the following characters. These only +get replaced if they are the first character in the name: + + Character Value Replacement + ----------- ------- ------------- + SP 0x20 ␠ + ~ 0x7E ~ + +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. + +Deleting files + +Any files you delete with rclone will end up in the trash. Microsoft +doesn't provide an API to permanently delete files, nor to empty the +trash, so you will have to do that with one of Microsoft's apps or via +the OneDrive website. + +Standard options + +Here are the Standard options specific to onedrive (Microsoft OneDrive). + +--onedrive-client-id + +OAuth Client Id. + +Leave blank normally. + +Properties: + +- Config: client_id +- Env Var: RCLONE_ONEDRIVE_CLIENT_ID +- Type: string +- Required: false + +--onedrive-client-secret + +OAuth Client Secret. + +Leave blank normally. + +Properties: + +- Config: client_secret +- Env Var: RCLONE_ONEDRIVE_CLIENT_SECRET +- Type: string +- Required: false + +--onedrive-region + +Choose national cloud region for OneDrive. + +Properties: + +- Config: region +- Env Var: RCLONE_ONEDRIVE_REGION +- Type: string +- Default: "global" +- Examples: + - "global" + - Microsoft Cloud Global + - "us" + - Microsoft Cloud for US Government + - "de" + - Microsoft Cloud Germany + - "cn" + - Azure and Office 365 operated by Vnet Group in China + +Advanced options + +Here are the Advanced options specific to onedrive (Microsoft OneDrive). + +--onedrive-token + +OAuth Access Token as a JSON blob. + +Properties: + +- Config: token +- Env Var: RCLONE_ONEDRIVE_TOKEN +- Type: string +- Required: false + +--onedrive-auth-url + +Auth server URL. + +Leave blank to use the provider defaults. + +Properties: + +- Config: auth_url +- Env Var: RCLONE_ONEDRIVE_AUTH_URL +- Type: string +- Required: false + +--onedrive-token-url + +Token server url. + +Leave blank to use the provider defaults. + +Properties: + +- Config: token_url +- Env Var: RCLONE_ONEDRIVE_TOKEN_URL +- Type: string +- Required: false + +--onedrive-chunk-size + +Chunk size to upload files with - must be multiple of 320k (327,680 +bytes). + +Above this size files will be chunked - must be multiple of 320k +(327,680 bytes) and should not exceed 250M (262,144,000 bytes) else you +may encounter "Microsoft.SharePoint.Client.InvalidClientQueryException: +The request message is too big." Note that the chunks will be buffered +into memory. + +Properties: + +- Config: chunk_size +- Env Var: RCLONE_ONEDRIVE_CHUNK_SIZE +- Type: SizeSuffix +- Default: 10Mi + +--onedrive-drive-id + +The ID of the drive to use. + +Properties: + +- Config: drive_id +- Env Var: RCLONE_ONEDRIVE_DRIVE_ID +- Type: string +- Required: false + +--onedrive-drive-type + +The type of the drive (personal | business | documentLibrary). + +Properties: + +- Config: drive_type +- Env Var: RCLONE_ONEDRIVE_DRIVE_TYPE +- Type: string +- Required: false + +--onedrive-root-folder-id + +ID of the root folder. + +This isn't normally needed, but in special circumstances you might know +the folder ID that you wish to access but not be able to get there +through a path traversal. + +Properties: + +- Config: root_folder_id +- Env Var: RCLONE_ONEDRIVE_ROOT_FOLDER_ID +- Type: string +- Required: false + +--onedrive-access-scopes + +Set scopes to be requested by rclone. + +Choose or manually enter a custom space separated list with all scopes, +that rclone should request. + +Properties: + +- Config: access_scopes +- Env Var: RCLONE_ONEDRIVE_ACCESS_SCOPES +- Type: SpaceSepList +- Default: Files.Read Files.ReadWrite Files.Read.All + Files.ReadWrite.All Sites.Read.All offline_access +- Examples: + - "Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All + Sites.Read.All offline_access" + - Read and write access to all resources + - "Files.Read Files.Read.All Sites.Read.All offline_access" + - Read only access to all resources + - "Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All + offline_access" + - Read and write access to all resources, without the ability + to browse SharePoint sites. + - Same as if disable_site_permission was set to true + +--onedrive-disable-site-permission + +Disable the request for Sites.Read.All permission. + +If set to true, you will no longer be able to search for a SharePoint +site when configuring drive ID, because rclone will not request +Sites.Read.All permission. Set it to true if your organization didn't +assign Sites.Read.All permission to the application, and your +organization disallows users to consent app permission request on their +own. + +Properties: + +- Config: disable_site_permission +- Env Var: RCLONE_ONEDRIVE_DISABLE_SITE_PERMISSION +- Type: bool +- Default: false + +--onedrive-expose-onenote-files + +Set to make OneNote files show up in directory listings. + +By default, rclone will hide OneNote files in directory listings because +operations like "Open" and "Update" won't work on them. But this +behaviour may also prevent you from deleting them. If you want to delete +OneNote files or otherwise want them to show up in directory listing, +set this option. + +Properties: + +- Config: expose_onenote_files +- Env Var: RCLONE_ONEDRIVE_EXPOSE_ONENOTE_FILES +- Type: bool +- Default: false + +--onedrive-server-side-across-configs + +Deprecated: use --server-side-across-configs instead. + +Allow server-side operations (e.g. copy) to work across different +onedrive configs. + +This will work if you are copying between two OneDrive Personal drives +AND the files to copy are already shared between them. Additionally, it +should also function for a user who has access permissions both between +Onedrive for business and SharePoint under the same tenant, and between +SharePoint and another SharePoint under the same tenant. In other cases, +rclone will fall back to normal copy (which will be slightly slower). + +Properties: + +- Config: server_side_across_configs +- Env Var: RCLONE_ONEDRIVE_SERVER_SIDE_ACROSS_CONFIGS +- Type: bool +- Default: false + +--onedrive-list-chunk + +Size of listing chunk. + +Properties: + +- Config: list_chunk +- Env Var: RCLONE_ONEDRIVE_LIST_CHUNK +- Type: int +- Default: 1000 + +--onedrive-no-versions + +Remove all versions on modifying operations. + +Onedrive for business creates versions when rclone uploads new files +overwriting an existing one and when it sets the modification time. + +These versions take up space out of the quota. + +This flag checks for versions after file upload and setting modification +time and removes all but the last version. + +NB Onedrive personal can't currently delete versions so don't use this +flag there. + +Properties: + +- Config: no_versions +- Env Var: RCLONE_ONEDRIVE_NO_VERSIONS +- Type: bool +- Default: false + +--onedrive-hard-delete + +Permanently delete files on removal. + +Normally files will get sent to the recycle bin on deletion. Setting +this flag causes them to be permanently deleted. Use with care. + +OneDrive personal accounts do not support the permanentDelete API, it +only applies to OneDrive for Business and SharePoint document libraries. + +Properties: + +- Config: hard_delete +- Env Var: RCLONE_ONEDRIVE_HARD_DELETE +- Type: bool +- Default: false + +--onedrive-link-scope + +Set the scope of the links created by the link command. + +Properties: + +- Config: link_scope +- Env Var: RCLONE_ONEDRIVE_LINK_SCOPE +- Type: string +- Default: "anonymous" +- Examples: + - "anonymous" + - Anyone with the link has access, without needing to sign in. + - This may include people outside of your organization. + - Anonymous link support may be disabled by an administrator. + - "organization" + - Anyone signed into your organization (tenant) can use the + link to get access. + - Only available in OneDrive for Business and SharePoint. + +--onedrive-link-type + +Set the type of the links created by the link command. + +Properties: + +- Config: link_type +- Env Var: RCLONE_ONEDRIVE_LINK_TYPE +- Type: string +- Default: "view" +- Examples: + - "view" + - Creates a read-only link to the item. + - "edit" + - Creates a read-write link to the item. + - "embed" + - Creates an embeddable link to the item. + +--onedrive-link-password + +Set the password for links created by the link command. + +At the time of writing this only works with OneDrive personal paid +accounts. + +Properties: + +- Config: link_password +- Env Var: RCLONE_ONEDRIVE_LINK_PASSWORD +- Type: string +- Required: false + +--onedrive-hash-type + +Specify the hash in use for the backend. + +This specifies the hash type in use. If set to "auto" it will use the +default hash which is QuickXorHash. + +Before rclone 1.62 an SHA1 hash was used by default for Onedrive +Personal. For 1.62 and later the default is to use a QuickXorHash for +all onedrive types. If an SHA1 hash is desired then set this option +accordingly. + +From July 2023 QuickXorHash will be the only available hash for both +OneDrive for Business and OneDrive Personal. + +This can be set to "none" to not use any hashes. + +If the hash requested does not exist on the object, it will be returned +as an empty string which is treated as a missing hash by rclone. + +Properties: + +- Config: hash_type +- Env Var: RCLONE_ONEDRIVE_HASH_TYPE +- Type: string +- Default: "auto" +- Examples: + - "auto" + - Rclone chooses the best hash + - "quickxor" + - QuickXor + - "sha1" + - SHA1 + - "sha256" + - SHA256 + - "crc32" + - CRC32 + - "none" + - None - don't use any hashes + +--onedrive-av-override + +Allows download of files the server thinks has a virus. + +The onedrive/sharepoint server may check files uploaded with an Anti +Virus checker. If it detects any potential viruses or malware it will +block download of the file. + +In this case you will see a message like this + + server reports this file is infected with a virus - use --onedrive-av-override to download anyway: Infected (name of virus): 403 Forbidden: + +If you are 100% sure you want to download this file anyway then use the +--onedrive-av-override flag, or av_override = true in the config file. + +Properties: + +- Config: av_override +- Env Var: RCLONE_ONEDRIVE_AV_OVERRIDE +- Type: bool +- Default: false + +--onedrive-delta + +If set rclone will use delta listing to implement recursive listings. + +If this flag is set the onedrive backend will advertise ListR support +for recursive listings. + +Setting this flag speeds up these things greatly: + + rclone lsf -R onedrive: + rclone size onedrive: + rclone rc vfs/refresh recursive=true + +However the delta listing API only works at the root of the drive. If +you use it not at the root then it recurses from the root and discards +all the data that is not under the directory you asked for. So it will +be correct but may not be very efficient. + +This is why this flag is not set as the default. + +As a rule of thumb if nearly all of your data is under rclone's root +directory (the root/directory in onedrive:root/directory) then using +this flag will be be a big performance win. If your data is mostly not +under the root then using this flag will be a big performance loss. + +It is recommended if you are mounting your onedrive at the root (or near +the root when using crypt) and using rclone rc vfs/refresh. + +Properties: + +- Config: delta +- Env Var: RCLONE_ONEDRIVE_DELTA +- Type: bool +- Default: false + +--onedrive-metadata-permissions + +Control whether permissions should be read or written in metadata. + +Reading permissions metadata from files can be done quickly, but it +isn't always desirable to set the permissions from the metadata. + +Properties: + +- Config: metadata_permissions +- Env Var: RCLONE_ONEDRIVE_METADATA_PERMISSIONS +- Type: Bits +- Default: off +- Examples: + - "off" + - Do not read or write the value + - "read" + - Read the value only + - "write" + - Write the value only + - "read,write" + - Read and Write the value. + - "failok" + - If writing fails log errors only, don't fail the transfer + +--onedrive-encoding + +The encoding for the backend. + +See the encoding section in the overview for more info. + +Properties: + +- Config: encoding +- Env Var: RCLONE_ONEDRIVE_ENCODING +- Type: Encoding +- Default: + Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot + +--onedrive-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_ONEDRIVE_DESCRIPTION +- Type: string +- Required: false + +Metadata + +OneDrive supports System Metadata (not User Metadata, as of this +writing) for both files and directories. Much of the metadata is +read-only, and there are some differences between OneDrive Personal and +Business (see table below for details). + +Permissions are also supported, if --onedrive-metadata-permissions is +set. The accepted values for --onedrive-metadata-permissions are "read", +"write", "read,write", and "off" (the default). "write" supports adding +new permissions, updating the "role" of existing permissions, and +removing permissions. Updating and removing require the Permission ID to +be known, so it is recommended to use "read,write" instead of "write" if +you wish to update/remove permissions. + +Permissions are read/written in JSON format using the same schema as the +OneDrive API, which differs slightly between OneDrive Personal and +Business. + +Example for OneDrive Personal: - Example for OneDrive Personal: - ```json [ { "id": "1234567890ABC!123", @@ -40964,30 +42879,13 @@ valid recipient must be provided in order to add a permission for a user. Creating a Public Link is also supported, if Link.Scope is set to "anonymous". -Example request to add a "read" permission: +Example request to add a "read" permission with --metadata-mapper: - [ - { - "id": "", - "grantedTo": { - "user": {}, - "application": {}, - "device": {} - }, - "grantedToIdentities": [ - { - "user": { - "id": "ryan@contoso.com" - }, - "application": {}, - "device": {} - } - ], - "roles": [ - "read" - ] + { + "Metadata": { + "permissions": "[{\"grantedToIdentities\":[{\"user\":{\"id\":\"ryan@contoso.com\"}}],\"roles\":[\"read\"]}]" } - ] + } Note that adding a permission can fail if a conflicting permission already exists for the file/folder. @@ -40997,7 +42895,8 @@ new roles to be assigned. roles is the only property that can be changed. To remove permissions, pass in a blob containing only the permissions -you wish to keep (which can be empty, to remove all.) +you wish to keep (which can be empty, to remove all.) Note that the +owner role will be ignored, as it cannot be removed. Note that both reading and writing permissions requires extra API calls, so if you don't need to read or write permissions it is recommended to @@ -41496,7 +43395,7 @@ Properties: --opendrive-description -Description of the remote +Description of the remote. Properties: @@ -42254,7 +44153,7 @@ Properties: --oos-description -Description of the remote +Description of the remote. Properties: @@ -42695,7 +44594,7 @@ Properties: --qingstor-description -Description of the remote +Description of the remote. Properties: @@ -42971,7 +44870,7 @@ Properties: --quatrix-description -Description of the remote +Description of the remote. Properties: @@ -43175,7 +45074,7 @@ Properties: --sia-description -Description of the remote +Description of the remote. Properties: @@ -43698,10 +45597,14 @@ Properties: --swift-chunk-size -Above this size files will be chunked into a _segments container. +Above this size files will be chunked. -Above this size files will be chunked into a _segments container. The -default for this is 5 GiB which is its maximum value. +Above this size files will be chunked into a a _segments container or a +.file-segments directory. (See the use_segments_container option for +more info). Default for this is 5 GiB which is its maximum value, which +means only files above this size will be chunked. + +Rclone uploads chunked files as dynamic large objects (DLO). Properties: @@ -43714,11 +45617,13 @@ Properties: Don't chunk files during streaming upload. -When doing streaming uploads (e.g. using rcat or mount) setting this -flag will cause the swift backend to not upload chunked files. +When doing streaming uploads (e.g. using rcat or mount with +--vfs-cache-mode off) setting this flag will cause the swift backend to +not upload chunked files. -This will limit the maximum upload size to 5 GiB. However non chunked -files are easier to deal with and have an MD5SUM. +This will limit the maximum streamed upload size to 5 GiB. This is +useful because non chunked files are easier to deal with and have an +MD5SUM. Rclone will still chunk files bigger than chunk_size when doing normal copy operations. @@ -43735,11 +45640,12 @@ Properties: Disable support for static and dynamic large objects Swift cannot transparently store files bigger than 5 GiB. There are two -schemes for doing that, static or dynamic large objects, and the API -does not allow rclone to determine whether a file is a static or dynamic -large object without doing a HEAD on the object. Since these need to be -treated differently, this means rclone has to issue HEAD requests for -objects for example when reading checksums. +schemes for chunking large files, static large objects (SLO) or dynamic +large objects (DLO), and the API does not allow rclone to determine +whether a file is a static or dynamic large object without doing a HEAD +on the object. Since these need to be treated differently, this means +rclone has to issue HEAD requests for objects for example when reading +checksums. When no_large_objects is set, rclone will assume that there are no static or dynamic large objects stored. This means it can stop doing the @@ -43760,6 +45666,38 @@ Properties: - Type: bool - Default: false +--swift-use-segments-container + +Choose destination for large object segments + +Swift cannot transparently store files bigger than 5 GiB and rclone will +chunk files larger than chunk_size (default 5 GiB) in order to upload +them. + +If this value is true the chunks will be stored in an additional +container named the same as the destination container but with _segments +appended. This means that there won't be any duplicated data in the +original container but having another container may not be acceptable. + +If this value is false the chunks will be stored in a .file-segments +directory in the root of the container. This directory will be omitted +when listing the container. Some providers (eg Blomp) require this mode +as creating additional containers isn't allowed. If it is desired to see +the .file-segments directory in the root then this flag must be set to +true. + +If this value is unset (the default), then rclone will choose the value +to use. It will be false unless rclone detects any auth_urls that it +knows need it to be true. In this case you'll see a message in the DEBUG +log. + +Properties: + +- Config: use_segments_container +- Env Var: RCLONE_SWIFT_USE_SEGMENTS_CONTAINER +- Type: Tristate +- Default: unset + --swift-encoding The encoding for the backend. @@ -43775,7 +45713,7 @@ Properties: --swift-description -Description of the remote +Description of the remote. Properties: @@ -44114,7 +46052,7 @@ Properties: --pcloud-description -Description of the remote +Description of the remote. Properties: @@ -44344,6 +46282,53 @@ Properties: - Type: SizeSuffix - Default: 10Mi +--pikpak-chunk-size + +Chunk size for multipart uploads. + +Large files will be uploaded in chunks of this size. + +Note that this is stored in memory and there may be up to "--transfers" +* "--pikpak-upload-concurrency" chunks stored at once in memory. + +If you are transferring large files over high-speed links and you have +enough memory, then increasing this will speed up the transfers. + +Rclone will automatically increase the chunk size when uploading a large +file of known size to stay below the 10,000 chunks limit. + +Increasing the chunk size decreases the accuracy of the progress +statistics displayed with "-P" flag. + +Properties: + +- Config: chunk_size +- Env Var: RCLONE_PIKPAK_CHUNK_SIZE +- Type: SizeSuffix +- Default: 5Mi + +--pikpak-upload-concurrency + +Concurrency for multipart uploads. + +This is the number of chunks of the same file that are uploaded +concurrently for multipart uploads. + +Note that chunks are stored in memory and there may be up to +"--transfers" * "--pikpak-upload-concurrency" chunks stored at once in +memory. + +If you are uploading small numbers of large files over high-speed links +and these uploads do not fully utilize your bandwidth, then increasing +this may help to speed up the transfers. + +Properties: + +- Config: upload_concurrency +- Env Var: RCLONE_PIKPAK_UPLOAD_CONCURRENCY +- Type: int +- Default: 5 + --pikpak-encoding The encoding for the backend. @@ -44360,7 +46345,7 @@ Properties: --pikpak-description -Description of the remote +Description of the remote. Properties: @@ -44635,7 +46620,7 @@ Properties: --premiumizeme-description -Description of the remote +Description of the remote. Properties: @@ -44695,7 +46680,7 @@ This will guide you through an interactive setup process: Choose a number from below, or type in your own value [snip] XX / Proton Drive - \ "Proton Drive" + \ "protondrive" [snip] Storage> protondrive User name @@ -44982,7 +46967,7 @@ Properties: --protondrive-description -Description of the remote +Description of the remote. Properties: @@ -45205,7 +47190,7 @@ Properties: --putio-description -Description of the remote +Description of the remote. Properties: @@ -45263,7 +47248,7 @@ This will guide you through an interactive setup process: Choose a number from below, or type in your own value [snip] XX / Proton Drive - \ "Proton Drive" + \ "protondrive" [snip] Storage> protondrive User name @@ -45550,7 +47535,7 @@ Properties: --protondrive-description -Description of the remote +Description of the remote. Properties: @@ -45963,7 +47948,7 @@ Properties: --seafile-description -Description of the remote +Description of the remote. Properties: @@ -46239,7 +48224,8 @@ only have to be performed once. If you manually set a value for this option before first run, the auto-detection will be skipped, and if you set a different value later this will override any existing. Value none can be set to avoid any attempts at executing shell commands, e.g. if -this is not allowed on the server. +this is not allowed on the server. If you have shell_type = none in the +configuration then the ssh must not be set. When the server is rclone serve sftp, the rclone SFTP remote will detect this as a Unix type shell - even if it is running on Windows. This @@ -46856,6 +48842,29 @@ Properties: - Type: int - Default: 64 +--sftp-connections + +Maximum number of SFTP simultaneous connections, 0 for unlimited. + +Note that setting this is very likely to cause deadlocks so it should be +used with care. + +If you are doing a sync or copy then make sure concurrency is one more +than the sum of --transfers and --checkers. + +If you use --check-first then it just needs to be one more than the +maximum of --checkers and --transfers. + +So for concurrency 3 you'd use --checkers 2 --transfers 2 --check-first +or --checkers 1 --transfers 1. + +Properties: + +- Config: connections +- Env Var: RCLONE_SFTP_CONNECTIONS +- Type: int +- Default: 0 + --sftp-set-env Environment variables to pass to sftp and commands @@ -47007,7 +49016,7 @@ Properties: --sftp-description -Description of the remote +Description of the remote. Properties: @@ -47298,7 +49307,7 @@ Properties: --smb-description -Description of the remote +Description of the remote. Properties: @@ -47309,6 +49318,12 @@ Properties: Storj +Storj is redefining the cloud to support the future of data—sustainably +and economically. Storj leverages the vast global supply of +underutilized resources to deliver better security, durability, and +performance services. Experience up to 90% lower costs and carbon +reduction with Storj. + Storj is an encrypted, secure, and cost-effective object storage service that enables you to store, back up, and archive large amounts of data in a decentralized manner. @@ -47599,7 +49614,7 @@ Cloud Storage). --storj-description -Description of the remote +Description of the remote. Properties: @@ -48017,7 +50032,7 @@ Properties: --sugarsync-description -Description of the remote +Description of the remote. Properties: @@ -48039,6 +50054,268 @@ Tardigrade The Tardigrade backend has been renamed to be the Storj backend. Old configuration files will continue to work. +Uloz.to + +Paths are specified as remote:path + +Paths may be as deep as required, e.g. remote:directory/subdirectory. + +The initial setup for Uloz.to involves filling in the user credentials. +rclone config walks you through it. + +Configuration + +Here is an example of how to make a remote called remote. 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 + [snip] + XX / Uloz.to + \ "ulozto" + [snip] + Storage> ulozto + + Option app_token. + The application token identifying the app. An app API key can be either found in the API doc + https://uloz.to/upload-resumable-api-beta or obtained from customer service. + Enter a value. Press Enter to leave empty. + app_token> token_value + + Option username. + The username of the principal to operate as. + Enter a value. Press Enter to leave empty. + username> user + + Option password. + The password for the user. + Choose an alternative below. Press Enter for the default (n). + y) Yes, type in my own password + g) Generate random password + n) No, leave this optional password blank (default) + y/g/n> y + Enter the password: + password: + Confirm the password: + password: + + Edit advanced config? + y) Yes + n) No (default) + y/n> n + + Keep this "remote" remote? + y) Yes this is OK (default) + e) Edit this remote + d) Delete this remote + y/e/d> y + +Once configured you can then use rclone like this, + +List folders in root level folder: + + rclone lsd remote: + +List all the files in your root folder: + + rclone ls remote: + +To copy a local folder to a Uloz.to folder called backup: + + rclone copy /home/source remote:backup + +User credentials + +The only reliable method is to authenticate the user using username and +password. Uloz.to offers an API key as well, but it's reserved for the +use of Uloz.to's in-house application and using it in different +circumstances is unreliable. + +Modification times and hashes + +Uloz.to doesn't allow the user to set a custom modification time, or +retrieve the hashes after upload. As a result, the integration uses a +free form field the API provides to encode client-provided timestamps +and hashes. Timestamps are stored with microsecond precision. + +A server calculated MD5 hash of the file is verified upon upload. +Afterwards, the backend only serves the client-side calculated hashes. +Hashes can also be retrieved upon creating a file download link, but +it's impractical for list-like use cases. + +Restricted filename characters + +In addition to the default restricted characters set the following +characters are also replaced: + + Character Value Replacement + ----------- ------- ------------- + \ 0x5C \ + +Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON +strings. + +Transfers + +All files are currently uploaded using a single HTTP request, so for +uploading large files a stable connection is necessary. Rclone will +upload up to --transfers chunks at the same time (shared among all +uploads). + +Deleting files + +By default, files are moved to the recycle bin whereas folders are +deleted immediately. Trashed files are permanently deleted after 30 days +in the recycle bin. + +Emptying the trash is currently not implemented in rclone. + +Root folder ID + +You can set the root_folder_slug for rclone. This is the folder +(identified by its Folder slug) that rclone considers to be the root of +your Uloz.to drive. + +Normally you will leave this blank and rclone will determine the correct +root to use itself. However you can set this to restrict rclone to a +specific folder hierarchy. + +In order to do this you will have to find the Folder slug of the folder +you wish to use as root. This will be the last segment of the URL when +you open the relevant folder in the Uloz.to web interface. + +For example, for exploring a folder with URL +https://uloz.to/fm/my-files/foobar, foobar should be used as the root +slug. + +root_folder_slug can be used alongside a specific path in the remote +path. For example, if your remote's root_folder_slug corresponds to +/foo/bar, remote:baz/qux will refer to +ABSOLUTE_ULOZTO_ROOT/foo/bar/baz/qux. + +Standard options + +Here are the Standard options specific to ulozto (Uloz.to). + +--ulozto-app-token + +The application token identifying the app. An app API key can be either +found in the API doc https://uloz.to/upload-resumable-api-beta or +obtained from customer service. + +Properties: + +- Config: app_token +- Env Var: RCLONE_ULOZTO_APP_TOKEN +- Type: string +- Required: false + +--ulozto-username + +The username of the principal to operate as. + +Properties: + +- Config: username +- Env Var: RCLONE_ULOZTO_USERNAME +- Type: string +- Required: false + +--ulozto-password + +The password for the user. + +NB Input to this must be obscured - see rclone obscure. + +Properties: + +- Config: password +- Env Var: RCLONE_ULOZTO_PASSWORD +- Type: string +- Required: false + +Advanced options + +Here are the Advanced options specific to ulozto (Uloz.to). + +--ulozto-root-folder-slug + +If set, rclone will use this folder as the root folder for all +operations. For example, if the slug identifies 'foo/bar/', 'ulozto:baz' +is equivalent to 'ulozto:foo/bar/baz' without any root slug set. + +Properties: + +- Config: root_folder_slug +- Env Var: RCLONE_ULOZTO_ROOT_FOLDER_SLUG +- Type: string +- Required: false + +--ulozto-list-page-size + +The size of a single page for list commands. 1-500 + +Properties: + +- Config: list_page_size +- Env Var: RCLONE_ULOZTO_LIST_PAGE_SIZE +- Type: int +- Default: 500 + +--ulozto-encoding + +The encoding for the backend. + +See the encoding section in the overview for more info. + +Properties: + +- Config: encoding +- Env Var: RCLONE_ULOZTO_ENCODING +- Type: Encoding +- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot + +--ulozto-description + +Description of the remote. + +Properties: + +- Config: description +- Env Var: RCLONE_ULOZTO_DESCRIPTION +- Type: string +- Required: false + +Limitations + +Uloz.to file names can't have the \ character in. rclone maps this to +and from an identical looking unicode equivalent \ (U+FF3C Fullwidth +Reverse Solidus). + +Uloz.to only supports filenames up to 255 characters in length. + +Uloz.to rate limits access to the API, but exact details are +undisclosed. Practical testing reveals that hitting the rate limit +during normal use is very rare, although not impossible with higher +number of concurrently uploaded files. + +rclone about is not supported by the Uloz.to backend. Although there's +an endpoint to retrieve the information for the UI, it's not exposed in +the API. Backends without this capability cannot determine free space +for an rclone mount or use policy mfs (most free space) as a member of +an rclone union remote. + +See List of backends that do not support rclone about and rclone about + Uptobox This is a Backend for Uptobox file storage service. Uptobox is closer to @@ -48184,7 +50461,7 @@ Properties: --uptobox-description -Description of the remote +Description of the remote. Properties: @@ -48561,7 +50838,7 @@ Properties: --union-description -Description of the remote +Description of the remote. Properties: @@ -48859,9 +51136,20 @@ Properties: - Type: bool - Default: false +--webdav-owncloud-exclude-mounts + +Exclude ownCloud mounted storages + +Properties: + +- Config: owncloud_exclude_mounts +- Env Var: RCLONE_WEBDAV_OWNCLOUD_EXCLUDE_MOUNTS +- Type: bool +- Default: false + --webdav-description -Description of the remote +Description of the remote. Properties: @@ -49255,7 +51543,7 @@ Properties: --yandex-description -Description of the remote +Description of the remote. Properties: @@ -49513,7 +51801,7 @@ Properties: --zoho-description -Description of the remote +Description of the remote. Properties: @@ -49761,7 +52049,7 @@ For example, supposing you have a directory structure like this Copying the entire directory with '-l' - $ rclone copyto -l /tmp/a/file1 remote:/tmp/a/ + $ rclone copy -l /tmp/a/ remote:/tmp/a/ The remote files are created with a '.rclonelink' suffix @@ -49779,7 +52067,7 @@ The remote files will contain the target of the symbolic links Copying them back with '-l' - $ rclone copyto -l remote:/tmp/a/ /tmp/b/ + $ rclone copy -l remote:/tmp/a/ /tmp/b/ $ tree /tmp/b /tmp/b @@ -49795,6 +52083,15 @@ However, if copied back without '-l' ├── file1.rclonelink └── file2.rclonelink +If you want to copy a single file with -l then you must use the +.rclonelink suffix. + + $ rclone copy -l remote:/tmp/a/file1.rclonelink /tmp/c + + $ tree /tmp/c + /tmp/c + └── file1 -> ./file4 + Note that this flag is incompatible with -copy-links / -L. Restricting filesystems with --one-file-system @@ -50063,6 +52360,44 @@ Properties: - Type: bool - Default: false +--local-time-type + +Set what kind of time is returned. + +Normally rclone does all operations on the mtime or Modification time. + +If you set this flag then rclone will return the Modified time as +whatever you set here. So if you use "rclone lsl --local-time-type +ctime" then you will see ctimes in the listing. + +If the OS doesn't support returning the time_type specified then rclone +will silently replace it with the modification time which all OSes +support. + +- mtime is supported by all OSes +- atime is supported on all OSes except: plan9, js +- btime is only supported on: Windows, macOS, freebsd, netbsd +- ctime is supported on all Oses except: Windows, plan9, js + +Note that setting the time will still set the modified time so this is +only useful for reading. + +Properties: + +- Config: time_type +- Env Var: RCLONE_LOCAL_TIME_TYPE +- Type: mtime|atime|btime|ctime +- Default: mtime +- Examples: + - "mtime" + - The last modification time. + - "atime" + - The last access time. + - "btime" + - The creation time. + - "ctime" + - The last status change time. + --local-encoding The encoding for the backend. @@ -50078,7 +52413,7 @@ Properties: --local-description -Description of the remote +Description of the remote. Properties: @@ -50162,6 +52497,229 @@ Options: Changelog +v1.67.0 - 2024-06-14 + +See commits + +- New backends + - uloz.to (iotmaestro) + - New S3 providers + - Magalu Object Storage (Bruno Fernandes) +- New commands + - gitannex: Enables git-annex to store and retrieve content from + an rclone remote (Dan McArdle) +- New Features + - accounting: Add deleted files total size to status summary line + (Kyle Reynolds) + - build + - Fix CVE-2023-45288 by upgrading golang.org/x/net (Nick + Craig-Wood) + - Fix CVE-2024-35255 by upgrading + github.com/Azure/azure-sdk-for-go/sdk/azidentity to 1.6.0 + (dependabot) + - Convert source files with CRLF to LF (albertony) + - Update all dependencies (Nick Craig-Wood) + - doc updates (albertony, Alex Garel, Dave Nicolson, Dominik Joe + Pantůček, Eric Wolf, Erisa A, Evan Harris, Evan McBeth, Gachoud + Philippe, hidewrong, jakzoe, jumbi77, kapitainsky, Kyle + Reynolds, Lewis Hook, Nick Craig-Wood, overallteach, + pawsey-kbuckley, Pieter van Oostrum, psychopatt, racerole, + static-moonlight, Warrentheo, yudrywet, yumeiyin ) + - ncdu: Do not quit on Esc to aid usability (Katia Esposito) + - rcserver: Set ModTime for dirs and files served by --rc-serve + (Nikita Shoshin) +- Bug Fixes + - bisync: Add integration tests against all backends and fix many + many problems (nielash) + - config: Fix default value for description (Nick Craig-Wood) + - copy: Fix nil pointer dereference when corrupted on transfer + with nil dst (nielash) + - fs + - Improve JSON Unmarshalling for Duration types (Kyle + Reynolds) + - Close the CPU profile on exit (guangwu) + - Replace /bin/bash with /usr/bin/env bash (Florian Klink) + - oauthutil: Clear client secret if client ID is set (Michael + Terry) + - operations + - Rework rcat so that it doesn't call the --metadata-mapper + twice (Nick Craig-Wood) + - Ensure SrcFsType is set correctly when using + --metadata-mapper (Nick Craig-Wood) + - Fix "optional feature not implemented" error with a crypted + sftp bug (Nick Craig-Wood) + - Fix very long file names when using copy with --partial + (Nick Craig-Wood) + - Fix retries downloading too much data with certain backends + (Nick Craig-Wood) + - Fix move when dst is nil and fdst is case-insensitive + (nielash) + - Fix lsjson --encrypted when using --crypt-XXX parameters + (Nick Craig-Wood) + - Fix missing metadata for multipart transfers to local disk + (Nick Craig-Wood) + - Fix incorrect modtime on some multipart transfers (Nick + Craig-Wood) + - Fix hashing problem in integration tests (Nick Craig-Wood) + - rc + - Fix stats groups being ignored in operations/check (Nick + Craig-Wood) + - Fix incorrect Content-Type in HTTP API (Kyle Reynolds) + - serve s3 + - Fix Last-Modified header format (Butanediol) + - Fix in-memory metadata storing wrong modtime (nielash) + - Fix XML of error message (Nick Craig-Wood) + - serve webdav: Fix webdav with --baseurl under Windows (Nick + Craig-Wood) + - serve dlna: Make BrowseMetadata more compliant (albertony) + - serve http: Added Content-Length header when HTML directory is + served (Sunny) + - sync + - Don't sync directories if they haven't been modified (Nick + Craig-Wood) + - Don't test reading metadata if we can't write it (Nick + Craig-Wood) + - Fix case normalisation (problem on on s3) (Nick Craig-Wood) + - Fix management of empty directories to make it more accurate + (Nick Craig-Wood) + - Fix creation of empty directories when + --create-empty-src-dirs=false (Nick Craig-Wood) + - Fix directory modification times not being set (Nick + Craig-Wood) + - Fix "failed to update directory timestamp or metadata: + directory not found" (Nick Craig-Wood) + - Fix expecting SFTP to have MkdirMetadata method: optional + feature not implemented (Nick Craig-Wood) + - test info: Improve cleanup of temp files (Kyle Reynolds) + - touch: Fix using -R on certain backends (Nick Craig-Wood) +- Mount + - Add --direct-io flag to force uncached access (Nick Craig-Wood) +- VFS + - Fix download loop when file size shrunk (Nick Craig-Wood) + - Fix renaming a directory (nielash) +- Local + - Add --local-time-type to use mtime/atime/btime/ctime as the time + (Nick Craig-Wood) + - Allow SeBackupPrivilege and/or SeRestorePrivilege to work on + Windows (Charles Hamilton) +- Azure Blob + - Fix encoding issue with dir path comparison (nielash) +- B2 + - Add new cleanup and cleanup-hidden backend commands. (Pat + Patterson) + - Update B2 URLs to new home (Nick Craig-Wood) +- Chunker + - Fix startup when root points to composite multi-chunk file + without metadata (nielash) + - Fix case-insensitive comparison on local without metadata + (nielash) + - Fix "finalizer already set" error (nielash) +- Drive + - Add backend query command for general purpose querying of files + (John-Paul Smith) + - Stop sending notification emails when setting permissions (Nick + Craig-Wood) + - Fix server side copy with metadata from my drive to shared drive + (Nick Craig-Wood) + - Set all metadata permissions and return error summary instead of + stopping on the first error (Nick Craig-Wood) + - Make errors setting permissions into no retry errors (Nick + Craig-Wood) + - Fix description being overwritten on server side moves (Nick + Craig-Wood) + - Allow setting metadata to fail if failok flag is set (Nick + Craig-Wood) + - Fix panic when using --metadata-mapper on large google doc files + (Nick Craig-Wood) +- Dropbox + - Add --dropbox-root-namespace to override the root namespace + (Bill Fraser) +- Google Cloud Storage + - Fix encoding issue with dir path comparison (nielash) +- Hdfs + - Fix f.String() not including subpath (nielash) +- Http + - Add --http-no-escape to not escape URL metacharacters in path + names (Kyle Reynolds) +- Jottacloud + - Set metadata on server side copy and move (albertony) +- Linkbox + - Fix working with names longer than 8-25 Unicode chars. (Vitaly) + - Fix list paging and optimized synchronization. (gvitali) +- Mailru + - Attempt to fix throttling by increasing min sleep to 100ms (Nick + Craig-Wood) +- Memory + - Fix dst mutating src after server-side copy (nielash) + - Fix deadlock in operations.Purge (nielash) + - Fix incorrect list entries when rooted at subdirectory (nielash) +- Onedrive + - Add --onedrive-hard-delete to permanently delete files (Nick + Craig-Wood) + - Make server-side copy work in more scenarios (YukiUnHappy) + - Fix "unauthenticated: Unauthenticated" errors when downloading + (Nick Craig-Wood) + - Fix --metadata-mapper being called twice if writing permissions + (nielash) + - Set all metadata permissions and return error summary instead of + stopping on the first error (nielash) + - Make errors setting permissions into no retry errors (Nick + Craig-Wood) + - Skip writing permissions with 'owner' role (nielash) + - Fix references to deprecated permissions properties (nielash) + - Add support for group permissions (nielash) + - Allow setting permissions to fail if failok flag is set (Nick + Craig-Wood) +- Pikpak + - Make getFile() usage more efficient to avoid the download limit + (wiserain) + - Improve upload reliability and resolve potential file conflicts + (wiserain) + - Implement configurable chunk size for multipart upload + (wiserain) +- Protondrive + - Don't auth with an empty access token (Michał Dzienisiewicz) +- Qingstor + - Disable integration tests as test account suspended (Nick + Craig-Wood) +- Quatrix + - Fix f.String() not including subpath (nielash) +- S3 + - Add new AWS region il-central-1 Tel Aviv (yoelvini) + - Update Scaleway's configuration options (Alexandre Lavigne) + - Ceph: fix quirks when creating buckets to fix trying to create + an existing bucket (Thomas Schneider) + - Fix encoding issue with dir path comparison (nielash) + - Fix 405 error on HEAD for delete marker with versionId (nielash) + - Validate --s3-copy-cutoff size before copy (hoyho) +- SFTP + - Add --sftp-connections to limit the maximum number of + connections (Tomasz Melcer) +- Storj + - Update storj.io/uplink to latest release (JT Olio) + - Update bio on request (Nick Craig-Wood) +- Swift + - Implement --swift-use-segments-container to allow >5G files on + Blomp (Nick Craig-Wood) +- Union + - Fix deleting dirs when all remotes can't have empty dirs (Nick + Craig-Wood) +- WebDAV + - Fix setting modification times erasing checksums on owncloud and + nextcloud (nielash) + - owncloud: Add --webdav-owncloud-exclude-mounts which allows + excluding mounted folders when listing remote resources (Thomas + Müller) +- Zoho + - Fix throttling problem when uploading files (Nick Craig-Wood) + - Use cursor listing for improved performance (Nick Craig-Wood) + - Retry reading info after upload if size wasn't returned (Nick + Craig-Wood) + - Remove simple file names complication which is no longer needed + (Nick Craig-Wood) + - Sleep for 60 seconds if rate limit error received (Nick + Craig-Wood) + v1.66.0 - 2024-03-10 See commits @@ -57053,7 +59611,7 @@ partially uploading an object. You can't take an existing object, and change some bytes in the middle of it. It would be possible to make a sync system which stored binary diffs -instead of whole objects like rclone does, but that would break the 1:1 +like rsync does, instead of whole objects, but that would break the 1:1 mapping of files on your hard disk to objects in the remote cloud storage system. @@ -57639,7 +60197,7 @@ email addresses removed from here need to be added to bin/.ignore-emails to make - Roman Kredentser shareed2k@gmail.com - Kamil Trzciński ayufan@ayufan.eu - Zac Rubin z-0@users.noreply.github.com -- Vincent Feltz psycho@feltzv.fr +- Vincent Feltz - Heiko Bornholdt bornholdt@informatik.uni-hamburg.de - Matteo Pietro Dazzi matteopietro.dazzi@gmail.com - jtagcat gitlab@c7.ee @@ -58083,6 +60641,45 @@ email addresses removed from here need to be added to bin/.ignore-emails to make - Joe Cai joe.cai@bigcommerce.com - Anders Swanson anders.swanson@oracle.com - huajin tong 137764712+thirdkeyword@users.noreply.github.com +- John-Paul Smith john-paulsmith@users.noreply.github.com +- racerole 148756161+racerole@users.noreply.github.com +- Gachoud Philippe ph.gachoud@gmail.com +- YukiUnHappy saberhana@yandex.com +- Kyle Reynolds kyle.reynolds@bridgerphotonics.com +- Lewis Hook lewis@hook.im +- hoyho luohaihao@gmail.com +- Vitaly 9034218+gvitali@users.noreply.github.com +- iotmaestro iotmaestro@proton.me +- psychopatt 66741203+psychopatt@users.noreply.github.com +- Alex Garel alex@garel.org +- Warrentheo warrentheo@hotmail.com +- Alexandre Lavigne lavigne958@gmail.com +- yoelvini 134453420+yoelvini@users.noreply.github.com +- Erisa A erisa@cloudflare.com +- Pieter van Oostrum pieter@vanoostrum.org +- jakzoe 155812065+jakzoe@users.noreply.github.com +- guangwu guoguangwu@magic-shield.com +- static-moonlight 107991124+static-moonlight@users.noreply.github.com +- yudrywet yudeyao@yeah.net +- Butanediol git@xnh.app +- Dave Nicolson david.nicolson@gmail.com +- Katia Esposito katia@linux.com +- pawsey-kbuckley 36438302+pawsey-kbuckley@users.noreply.github.com +- hidewrong 167099254+hidewrong@users.noreply.github.com +- Michael Terry mike@mterry.name +- Sunny 25066078+LoSunny@users.noreply.github.com +- overallteach cricis@foxmail.com +- JT Olio jt@olio.lol +- Evan McBeth 64177332+AtomicRobotMan0101@users.noreply.github.com +- Dominik Joe Pantůček dominik.pantucek@trustica.cz +- yumeiyin 155420652+yumeiyin@users.noreply.github.com +- Bruno Fernandes 54373093+folkzb@users.noreply.github.com +- Thomas Schneider tspam.github@brainfuck.space +- Charles Hamilton 52973156+chamilton-ccn@users.noreply.github.com +- Tomasz Melcer tomasz@melcer.pl +- Michał Dzienisiewicz michal.piotr.dz@gmail.com +- Florian Klink flokli@flokli.de +- Bill Fraser bill@wfraser.dev Contact the rclone project diff --git a/Makefile b/Makefile index 027d29611..4a9d2240f 100644 --- a/Makefile +++ b/Makefile @@ -239,7 +239,7 @@ fetch_binaries: rclone -P sync --exclude "/testbuilds/**" --delete-excluded $(BETA_UPLOAD) build/ serve: website - cd docs && hugo server -v -w --disableFastRender + cd docs && hugo server --logLevel info -w --disableFastRender tag: retag doc bin/make_changelog.py $(LAST_TAG) $(VERSION) > docs/content/changelog.md.new diff --git a/backend/drive/drive.go b/backend/drive/drive.go index d1868b2c9..30e930f38 100644 --- a/backend/drive/drive.go +++ b/backend/drive/drive.go @@ -3776,7 +3776,7 @@ file named "foo ' \.txt": The result is a JSON array of matches, for example: -[ + [ { "createdTime": "2017-06-29T19:58:28.537Z", "id": "0AxBe_CDEF4zkGHI4d0FjYko2QkD", @@ -3792,7 +3792,7 @@ The result is a JSON array of matches, for example: "size": "311", "webViewLink": "https://drive.google.com/file/d/0AxBe_CDEF4zkGHI4d0FjYko2QkD/view?usp=drivesdk\u0026resourcekey=0-ABCDEFGHIXJQpIGqBJq3MC" } -]`, + ]`, }} // Command the backend to run a named command diff --git a/docs/config.json b/docs/config.json index ea1e6888d..46e1e221f 100644 --- a/docs/config.json +++ b/docs/config.json @@ -9,8 +9,7 @@ "description": "rclone - rsync for cloud storage: google drive, s3, gcs, azure, dropbox, box...", "canonifyurls": false, "disableKinds": [ - "taxonomy", - "taxonomyTerm" + "taxonomy" ], "ignoreFiles": [ "~$", diff --git a/docs/content/alias.md b/docs/content/alias.md index cc419bf30..b0fbcc32a 100644 --- a/docs/content/alias.md +++ b/docs/content/alias.md @@ -118,7 +118,7 @@ Here are the Advanced options specific to alias (Alias for an existing remote). #### --alias-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/azureblob.md b/docs/content/azureblob.md index 883dfeb15..987045cb2 100644 --- a/docs/content/azureblob.md +++ b/docs/content/azureblob.md @@ -851,7 +851,7 @@ Properties: #### --azureblob-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/azurefiles.md b/docs/content/azurefiles.md index 4eca4d68f..532bd9f68 100644 --- a/docs/content/azurefiles.md +++ b/docs/content/azurefiles.md @@ -689,7 +689,7 @@ Properties: #### --azurefiles-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/b2.md b/docs/content/b2.md index 51d816ed4..a53d66b60 100644 --- a/docs/content/b2.md +++ b/docs/content/b2.md @@ -647,7 +647,7 @@ Properties: #### --b2-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/box.md b/docs/content/box.md index b4f9b6ed7..512ff59bd 100644 --- a/docs/content/box.md +++ b/docs/content/box.md @@ -475,7 +475,7 @@ Properties: #### --box-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/cache.md b/docs/content/cache.md index f245634c6..dd9f1d976 100644 --- a/docs/content/cache.md +++ b/docs/content/cache.md @@ -666,7 +666,7 @@ Properties: #### --cache-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/changelog.md b/docs/content/changelog.md index 3a1eeb23d..094baf605 100644 --- a/docs/content/changelog.md +++ b/docs/content/changelog.md @@ -5,6 +5,159 @@ description: "Rclone Changelog" # Changelog +## v1.67.0 - 2024-06-14 + +[See commits](https://github.com/rclone/rclone/compare/v1.66.0...v1.67.0) + +* New backends + * [uloz.to](/ulozto/) (iotmaestro) + * New S3 providers + * [Magalu Object Storage](/s3/#magalu) (Bruno Fernandes) +* New commands + * [gitannex](/commands/rclone_gitannex/): Enables git-annex to store and retrieve content from an rclone remote (Dan McArdle) +* New Features + * accounting: Add deleted files total size to status summary line (Kyle Reynolds) + * build + * Fix `CVE-2023-45288` by upgrading `golang.org/x/net` (Nick Craig-Wood) + * Fix `CVE-2024-35255` by upgrading `github.com/Azure/azure-sdk-for-go/sdk/azidentity` to 1.6.0 (dependabot) + * Convert source files with CRLF to LF (albertony) + * Update all dependencies (Nick Craig-Wood) + * doc updates (albertony, Alex Garel, Dave Nicolson, Dominik Joe Pantůček, Eric Wolf, Erisa A, Evan Harris, Evan McBeth, Gachoud Philippe, hidewrong, jakzoe, jumbi77, kapitainsky, Kyle Reynolds, Lewis Hook, Nick Craig-Wood, overallteach, pawsey-kbuckley, Pieter van Oostrum, psychopatt, racerole, static-moonlight, Warrentheo, yudrywet, yumeiyin ) + * ncdu: Do not quit on Esc to aid usability (Katia Esposito) + * rcserver: Set `ModTime` for dirs and files served by `--rc-serve` (Nikita Shoshin) +* Bug Fixes + * bisync: Add integration tests against all backends and fix many many problems (nielash) + * config: Fix default value for `description` (Nick Craig-Wood) + * copy: Fix `nil` pointer dereference when corrupted on transfer with `nil` dst (nielash) + * fs + * Improve JSON Unmarshalling for `Duration` types (Kyle Reynolds) + * Close the CPU profile on exit (guangwu) + * Replace `/bin/bash` with `/usr/bin/env bash` (Florian Klink) + * oauthutil: Clear client secret if client ID is set (Michael Terry) + * operations + * Rework `rcat` so that it doesn't call the `--metadata-mapper` twice (Nick Craig-Wood) + * Ensure `SrcFsType` is set correctly when using `--metadata-mapper` (Nick Craig-Wood) + * Fix "optional feature not implemented" error with a crypted sftp bug (Nick Craig-Wood) + * Fix very long file names when using copy with `--partial` (Nick Craig-Wood) + * Fix retries downloading too much data with certain backends (Nick Craig-Wood) + * Fix move when dst is nil and fdst is case-insensitive (nielash) + * Fix lsjson `--encrypted` when using `--crypt-XXX` parameters (Nick Craig-Wood) + * Fix missing metadata for multipart transfers to local disk (Nick Craig-Wood) + * Fix incorrect modtime on some multipart transfers (Nick Craig-Wood) + * Fix hashing problem in integration tests (Nick Craig-Wood) + * rc + * Fix stats groups being ignored in `operations/check` (Nick Craig-Wood) + * Fix incorrect `Content-Type` in HTTP API (Kyle Reynolds) + * serve s3 + * Fix `Last-Modified` header format (Butanediol) + * Fix in-memory metadata storing wrong modtime (nielash) + * Fix XML of error message (Nick Craig-Wood) + * serve webdav: Fix webdav with `--baseurl` under Windows (Nick Craig-Wood) + * serve dlna: Make `BrowseMetadata` more compliant (albertony) + * serve http: Added `Content-Length` header when HTML directory is served (Sunny) + * sync + * Don't sync directories if they haven't been modified (Nick Craig-Wood) + * Don't test reading metadata if we can't write it (Nick Craig-Wood) + * Fix case normalisation (problem on on s3) (Nick Craig-Wood) + * Fix management of empty directories to make it more accurate (Nick Craig-Wood) + * Fix creation of empty directories when `--create-empty-src-dirs=false` (Nick Craig-Wood) + * Fix directory modification times not being set (Nick Craig-Wood) + * Fix "failed to update directory timestamp or metadata: directory not found" (Nick Craig-Wood) + * Fix expecting SFTP to have MkdirMetadata method: optional feature not implemented (Nick Craig-Wood) + * test info: Improve cleanup of temp files (Kyle Reynolds) + * touch: Fix using `-R` on certain backends (Nick Craig-Wood) +* Mount + * Add `--direct-io` flag to force uncached access (Nick Craig-Wood) +* VFS + * Fix download loop when file size shrunk (Nick Craig-Wood) + * Fix renaming a directory (nielash) +* Local + * Add `--local-time-type` to use `mtime`/`atime`/`btime`/`ctime` as the time (Nick Craig-Wood) + * Allow `SeBackupPrivilege` and/or `SeRestorePrivilege` to work on Windows (Charles Hamilton) +* Azure Blob + * Fix encoding issue with dir path comparison (nielash) +* B2 + * Add new [cleanup](/b2/#cleanup) and [cleanup-hidden](/b2/#cleanup-hidden) backend commands. (Pat Patterson) + * Update B2 URLs to new home (Nick Craig-Wood) +* Chunker + * Fix startup when root points to composite multi-chunk file without metadata (nielash) + * Fix case-insensitive comparison on local without metadata (nielash) + * Fix "finalizer already set" error (nielash) +* Drive + * Add [backend query](/drive/#query) command for general purpose querying of files (John-Paul Smith) + * Stop sending notification emails when setting permissions (Nick Craig-Wood) + * Fix server side copy with metadata from my drive to shared drive (Nick Craig-Wood) + * Set all metadata permissions and return error summary instead of stopping on the first error (Nick Craig-Wood) + * Make errors setting permissions into no retry errors (Nick Craig-Wood) + * Fix description being overwritten on server side moves (Nick Craig-Wood) + * Allow setting metadata to fail if `failok` flag is set (Nick Craig-Wood) + * Fix panic when using `--metadata-mapper` on large google doc files (Nick Craig-Wood) +* Dropbox + * Add `--dropbox-root-namespace` to override the root namespace (Bill Fraser) +* Google Cloud Storage + * Fix encoding issue with dir path comparison (nielash) +* Hdfs + * Fix f.String() not including subpath (nielash) +* Http + * Add `--http-no-escape` to not escape URL metacharacters in path names (Kyle Reynolds) +* Jottacloud + * Set metadata on server side copy and move (albertony) +* Linkbox + * Fix working with names longer than 8-25 Unicode chars. (Vitaly) + * Fix list paging and optimized synchronization. (gvitali) +* Mailru + * Attempt to fix throttling by increasing min sleep to 100ms (Nick Craig-Wood) +* Memory + * Fix dst mutating src after server-side copy (nielash) + * Fix deadlock in operations.Purge (nielash) + * Fix incorrect list entries when rooted at subdirectory (nielash) +* Onedrive + * Add `--onedrive-hard-delete` to permanently delete files (Nick Craig-Wood) + * Make server-side copy work in more scenarios (YukiUnHappy) + * Fix "unauthenticated: Unauthenticated" errors when downloading (Nick Craig-Wood) + * Fix `--metadata-mapper` being called twice if writing permissions (nielash) + * Set all metadata permissions and return error summary instead of stopping on the first error (nielash) + * Make errors setting permissions into no retry errors (Nick Craig-Wood) + * Skip writing permissions with 'owner' role (nielash) + * Fix references to deprecated permissions properties (nielash) + * Add support for group permissions (nielash) + * Allow setting permissions to fail if `failok` flag is set (Nick Craig-Wood) +* Pikpak + * Make getFile() usage more efficient to avoid the download limit (wiserain) + * Improve upload reliability and resolve potential file conflicts (wiserain) + * Implement configurable chunk size for multipart upload (wiserain) +* Protondrive + * Don't auth with an empty access token (Michał Dzienisiewicz) +* Qingstor + * Disable integration tests as test account suspended (Nick Craig-Wood) +* Quatrix + * Fix f.String() not including subpath (nielash) +* S3 + * Add new AWS region `il-central-1` Tel Aviv (yoelvini) + * Update Scaleway's configuration options (Alexandre Lavigne) + * Ceph: fix quirks when creating buckets to fix trying to create an existing bucket (Thomas Schneider) + * Fix encoding issue with dir path comparison (nielash) + * Fix 405 error on HEAD for delete marker with versionId (nielash) + * Validate `--s3-copy-cutoff` size before copy (hoyho) +* SFTP + * Add `--sftp-connections` to limit the maximum number of connections (Tomasz Melcer) +* Storj + * Update `storj.io/uplink` to latest release (JT Olio) + * Update bio on request (Nick Craig-Wood) +* Swift + * Implement `--swift-use-segments-container` to allow >5G files on Blomp (Nick Craig-Wood) +* Union + * Fix deleting dirs when all remotes can't have empty dirs (Nick Craig-Wood) +* WebDAV + * Fix setting modification times erasing checksums on owncloud and nextcloud (nielash) + * owncloud: Add `--webdav-owncloud-exclude-mounts` which allows excluding mounted folders when listing remote resources (Thomas Müller) +* Zoho + * Fix throttling problem when uploading files (Nick Craig-Wood) + * Use cursor listing for improved performance (Nick Craig-Wood) + * Retry reading info after upload if size wasn't returned (Nick Craig-Wood) + * Remove simple file names complication which is no longer needed (Nick Craig-Wood) + * Sleep for 60 seconds if rate limit error received (Nick Craig-Wood) + ## v1.66.0 - 2024-03-10 [See commits](https://github.com/rclone/rclone/compare/v1.65.0...v1.66.0) diff --git a/docs/content/chunker.md b/docs/content/chunker.md index 722b31078..2de029e3c 100644 --- a/docs/content/chunker.md +++ b/docs/content/chunker.md @@ -479,7 +479,7 @@ Properties: #### --chunker-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/combine.md b/docs/content/combine.md index 9c4aafd5c..15d0154e4 100644 --- a/docs/content/combine.md +++ b/docs/content/combine.md @@ -160,7 +160,7 @@ Here are the Advanced options specific to combine (Combine several remotes into #### --combine-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/commands/rclone.md b/docs/content/commands/rclone.md index cc664c426..8b54793e5 100644 --- a/docs/content/commands/rclone.md +++ b/docs/content/commands/rclone.md @@ -257,6 +257,7 @@ rclone [flags] --dropbox-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot) --dropbox-impersonate string Impersonate this user when using a business account --dropbox-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) + --dropbox-root-namespace string Specify a different Dropbox namespace ID to use as the root for all paths --dropbox-shared-files Instructs rclone to work on individual shared files --dropbox-shared-folders Instructs rclone to work on shared folders --dropbox-token string OAuth Access Token as a JSON blob @@ -384,6 +385,7 @@ rclone [flags] --hidrive-upload-cutoff SizeSuffix Cutoff/Threshold for chunked uploads (default 96Mi) --http-description string Description of the remote --http-headers CommaSepList Set HTTP headers for all transactions + --http-no-escape Do not escape URL metacharacters in path names --http-no-head Don't use HEAD requests --http-no-slash Set this if the site doesn't end directories with / --http-url string URL of HTTP host to connect to @@ -432,7 +434,7 @@ rclone [flags] --koofr-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) --koofr-endpoint string The Koofr API endpoint to use --koofr-mountid string Mount ID of the mount to use - --koofr-password string Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password) (obscured) + --koofr-password string Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password (obscured) --koofr-provider string Choose your storage provider --koofr-setmtime Does the backend support setting modification time (default true) --koofr-user string Your user name @@ -449,6 +451,7 @@ rclone [flags] --local-no-set-modtime Disable setting modtime --local-no-sparse Disable sparse files for multi-thread downloads --local-nounc Disable UNC (long path names) conversion on Windows + --local-time-type mtime|atime|btime|ctime Set what kind of time is returned (default mtime) --local-unicode-normalization Apply unicode NFC normalization to paths and filenames --local-zero-size-links Assume the Stat size of links is zero (and read them instead) (deprecated) --log-file string Log everything to this file @@ -530,6 +533,7 @@ rclone [flags] --onedrive-drive-type string The type of the drive (personal | business | documentLibrary) --onedrive-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot) --onedrive-expose-onenote-files Set to make OneNote files show up in directory listings + --onedrive-hard-delete Permanently delete files on removal --onedrive-hash-type string Specify the hash in use for the backend (default "auto") --onedrive-link-password string Set the password for links created by the link command --onedrive-link-scope string Set the scope of the links created by the link command (default "anonymous") @@ -587,6 +591,7 @@ rclone [flags] --pcloud-token-url string Token server url --pcloud-username string Your pcloud username --pikpak-auth-url string Auth server URL + --pikpak-chunk-size SizeSuffix Chunk size for multipart uploads (default 5Mi) --pikpak-client-id string OAuth Client Id --pikpak-client-secret string OAuth Client Secret --pikpak-description string Description of the remote @@ -597,6 +602,7 @@ rclone [flags] --pikpak-token string OAuth Access Token as a JSON blob --pikpak-token-url string Token server url --pikpak-trashed-only Only show files that are in the trash + --pikpak-upload-concurrency int Concurrency for multipart uploads (default 5) --pikpak-use-trash Send files to the trash instead of deleting permanently (default true) --pikpak-user string Pikpak username --premiumizeme-auth-url string Auth server URL @@ -665,6 +671,7 @@ rclone [flags] --rc-realm string Realm for authentication --rc-salt string Password hashing salt (default "dlPL2MqE") --rc-serve Enable the serving of remote objects + --rc-serve-no-modtime Don't read the modification time (can speed things up) --rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s) --rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s) --rc-template string User-specified template @@ -745,6 +752,7 @@ rclone [flags] --sftp-chunk-size SizeSuffix Upload and download chunk size (default 32Ki) --sftp-ciphers SpaceSepList Space separated list of ciphers to be used for session encryption, ordered by preference --sftp-concurrency int The maximum number of outstanding requests for one file (default 64) + --sftp-connections int Maximum number of SFTP simultaneous connections, 0 for unlimited --sftp-copy-is-hardlink Set to enable server side copies using hardlinks --sftp-description string Description of the remote --sftp-disable-concurrent-reads If set don't use concurrent reads @@ -840,7 +848,7 @@ rclone [flags] --swift-auth string Authentication URL for server (OS_AUTH_URL) --swift-auth-token string Auth Token from alternate authentication - optional (OS_AUTH_TOKEN) --swift-auth-version int AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION) - --swift-chunk-size SizeSuffix Above this size files will be chunked into a _segments container (default 5Gi) + --swift-chunk-size SizeSuffix Above this size files will be chunked (default 5Gi) --swift-description string Description of the remote --swift-domain string User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) --swift-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8) @@ -856,6 +864,7 @@ rclone [flags] --swift-tenant string Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME) --swift-tenant-domain string Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME) --swift-tenant-id string Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID) + --swift-use-segments-container Tristate Choose destination for large object segments (default unset) --swift-user string User name to log in (OS_USERNAME) --swift-user-id string User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID) --syslog Use Syslog for logging @@ -867,6 +876,13 @@ rclone [flags] --track-renames When synchronizing, track file renames and do a server-side move if possible --track-renames-strategy string Strategies to use when synchronizing using track-renames hash|modtime|leaf (default "hash") --transfers int Number of file transfers to run in parallel (default 4) + --ulozto-app-token string The application token identifying the app. An app API key can be either found in the API + --ulozto-description string Description of the remote + --ulozto-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) + --ulozto-list-page-size int The size of a single page for list commands. 1-500 (default 500) + --ulozto-password string The password for the user (obscured) + --ulozto-root-folder-slug string If set, rclone will use this folder as the root folder for all operations. For example, + --ulozto-username string The username of the principal to operate as --union-action-policy string Policy to choose upstream on ACTION category (default "epall") --union-cache-time int Cache time of usage and free space (in seconds) (default 120) --union-create-policy string Policy to choose upstream on CREATE category (default "epmfs") @@ -883,7 +899,7 @@ rclone [flags] --use-json-log Use json log format --use-mmap Use mmap allocator (see docs) --use-server-modtime Use server modified time instead of object metadata - --user-agent string Set the user-agent to a specified string (default "rclone/v1.66.0") + --user-agent string Set the user-agent to a specified string (default "rclone/v1.67.0") -v, --verbose count Print lots more stuff (repeat for more) -V, --version Print the version number --webdav-bearer-token string Bearer token instead of user/pass (e.g. a Macaroon) @@ -892,6 +908,7 @@ rclone [flags] --webdav-encoding string The encoding for the backend --webdav-headers CommaSepList Set HTTP headers for all transactions --webdav-nextcloud-chunk-size SizeSuffix Nextcloud upload chunk size (default 10Mi) + --webdav-owncloud-exclude-mounts Exclude ownCloud mounted storages --webdav-owncloud-exclude-shares Exclude ownCloud shares --webdav-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) --webdav-pass string Password (obscured) @@ -937,6 +954,7 @@ rclone [flags] * [rclone delete](/commands/rclone_delete/) - Remove the files in path. * [rclone deletefile](/commands/rclone_deletefile/) - Remove a single file from remote. * [rclone gendocs](/commands/rclone_gendocs/) - Output markdown docs for rclone to the directory supplied. +* [rclone gitannex](/commands/rclone_gitannex/) - Speaks with git-annex over stdin/stdout. * [rclone hashsum](/commands/rclone_hashsum/) - Produces a hashsum file for all the objects in the path. * [rclone link](/commands/rclone_link/) - Generate public link to file/folder. * [rclone listremotes](/commands/rclone_listremotes/) - List all the remotes in the config file and defined in environment variables. diff --git a/docs/content/commands/rclone_completion_bash.md b/docs/content/commands/rclone_completion_bash.md index 08df4c9ed..4773cc082 100644 --- a/docs/content/commands/rclone_completion_bash.md +++ b/docs/content/commands/rclone_completion_bash.md @@ -14,21 +14,32 @@ Output bash completion script for rclone. Generates a bash shell autocompletion script for rclone. -This writes to /etc/bash_completion.d/rclone by default so will -probably need to be run with sudo or as root, e.g. +By default, when run without any arguments, - sudo rclone genautocomplete bash + rclone genautocomplete bash -Logout and login again to use the autocompletion scripts, or source -them directly +the generated script will be written to - . /etc/bash_completion + /etc/bash_completion.d/rclone -If you supply a command line argument the script will be written -there. +and so rclone will probably need to be run as root, or with sudo. + +If you supply a path to a file as the command line argument, then +the generated script will be written to that file, in which case +you should not need root privileges. If output_file is "-", then the output will be written to stdout. +If you have installed the script into the default location, you +can logout and login again to use the autocompletion script. + +Alternatively, you can source the script directly + + . /path/to/my_bash_completion_scripts/rclone + +and the autocompletion functionality will be added to your +current shell. + ``` rclone completion bash [output_file] [flags] diff --git a/docs/content/commands/rclone_gitannex.md b/docs/content/commands/rclone_gitannex.md new file mode 100644 index 000000000..45e5aeb54 --- /dev/null +++ b/docs/content/commands/rclone_gitannex.md @@ -0,0 +1,102 @@ +--- +title: "rclone gitannex" +description: "Speaks with git-annex over stdin/stdout." +slug: rclone_gitannex +url: /commands/rclone_gitannex/ +versionIntroduced: v1.67.0 +# autogenerated - DO NOT EDIT, instead edit the source code in cmd/gitannex/ and as part of making a release run "make commanddocs" +--- +# rclone gitannex + +Speaks with git-annex over stdin/stdout. + +## Synopsis + +Rclone's `gitannex` subcommand enables [git-annex] to store and retrieve content +from an rclone remote. It is meant to be run by git-annex, not directly by +users. + +[git-annex]: https://git-annex.branchable.com/ + +Installation on Linux +--------------------- + +1. Skip this step if your version of git-annex is [10.20240430] or newer. + Otherwise, you must create a symlink somewhere on your PATH with a particular + name. This symlink helps git-annex tell rclone it wants to run the "gitannex" + subcommand. + + ```sh + # Create the helper symlink in "$HOME/bin". + ln -s "$(realpath rclone)" "$HOME/bin/git-annex-remote-rclone-builtin" + + # Verify the new symlink is on your PATH. + which git-annex-remote-rclone-builtin + ``` + + [10.20240430]: https://git-annex.branchable.com/news/version_10.20240430/ + +2. Add a new remote to your git-annex repo. This new remote will connect + git-annex with the `rclone gitannex` subcommand. + + Start by asking git-annex to describe the remote's available configuration + parameters. + + ```sh + # If you skipped step 1: + git annex initremote MyRemote type=rclone --whatelse + + # If you created a symlink in step 1: + git annex initremote MyRemote type=external externaltype=rclone-builtin --whatelse + ``` + + > **NOTE**: If you're porting an existing [git-annex-remote-rclone] remote to + > use `rclone gitannex`, you can probably reuse the configuration parameters + > verbatim without renaming them. Check parameter synonyms with `--whatelse` + > as shown above. + > + > [git-annex-remote-rclone]: https://github.com/git-annex-remote-rclone/git-annex-remote-rclone + + The following example creates a new git-annex remote named "MyRemote" that + will use the rclone remote named "SomeRcloneRemote". That rclone remote must + be one configured in your rclone.conf file, which can be located with `rclone + config file`. + + ```sh + git annex initremote MyRemote \ + type=external \ + externaltype=rclone-builtin \ + encryption=none \ + rcloneremotename=SomeRcloneRemote \ + rcloneprefix=git-annex-content \ + rclonelayout=nodir + ``` + +3. Before you trust this command with your precious data, be sure to **test the + remote**. This command is very new and has not been tested on many rclone + backends. Caveat emptor! + + ```sh + git annex testremote MyRemote + ``` + +Happy annexing! + + +``` +rclone gitannex [flags] +``` + +## Options + +``` + -h, --help help for gitannex +``` + + +See the [global flags page](/flags/) for global options not listed here. + +# SEE ALSO + +* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends. + diff --git a/docs/content/commands/rclone_lsjson.md b/docs/content/commands/rclone_lsjson.md index 837427e59..dfcdbd779 100644 --- a/docs/content/commands/rclone_lsjson.md +++ b/docs/content/commands/rclone_lsjson.md @@ -37,7 +37,7 @@ The output is an array of Items, where each Item looks like this "Tier" : "hot", } -If `--hash` is not specified the Hashes property won't be emitted. The +If `--hash` is not specified, the Hashes property will be omitted. The types of hash can be specified with the `--hash-type` parameter (which may be repeated). If `--hash-type` is set then it implies `--hash`. @@ -49,7 +49,7 @@ If `--no-mimetype` is specified then MimeType will be blank. This can speed things up on remotes where reading the MimeType takes an extra request (e.g. s3, swift). -If `--encrypted` is not specified the Encrypted won't be emitted. +If `--encrypted` is not specified the Encrypted will be omitted. If `--dirs-only` is not specified files in addition to directories are returned diff --git a/docs/content/commands/rclone_mount.md b/docs/content/commands/rclone_mount.md index c2c9da5c7..d48f71b22 100644 --- a/docs/content/commands/rclone_mount.md +++ b/docs/content/commands/rclone_mount.md @@ -13,9 +13,8 @@ Mount the remote as file system on a mountpoint. ## Synopsis -rclone mount allows Linux, FreeBSD, macOS and Windows to -mount any of Rclone's cloud storage systems as a file system with -FUSE. +Rclone mount allows Linux, FreeBSD, macOS and Windows to +mount any of Rclone's cloud storage systems as a file system with FUSE. First set up your remote using `rclone config`. Check it works with `rclone ls` etc. @@ -830,6 +829,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone mount remote:path /path/to/mountpoint [flags] ``` @@ -850,6 +850,7 @@ rclone mount remote:path /path/to/mountpoint [flags] --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) diff --git a/docs/content/commands/rclone_ncdu.md b/docs/content/commands/rclone_ncdu.md index 4c0a41b3e..c0352b34c 100644 --- a/docs/content/commands/rclone_ncdu.md +++ b/docs/content/commands/rclone_ncdu.md @@ -46,7 +46,8 @@ press '?' to toggle the help on and off. The supported keys are: ^L refresh screen (fix screen corruption) r recalculate file sizes ? to toggle help on and off - q/ESC/^c to quit + ESC to close the menu box + q/^c to quit Listed files/directories may be prefixed by a one-character flag, some of them combined with a description in brackets at end of line. diff --git a/docs/content/commands/rclone_nfsmount.md b/docs/content/commands/rclone_nfsmount.md index 5002782d1..dfe31eca6 100644 --- a/docs/content/commands/rclone_nfsmount.md +++ b/docs/content/commands/rclone_nfsmount.md @@ -14,9 +14,8 @@ Mount the remote as file system on a mountpoint. ## Synopsis -rclone nfsmount allows Linux, FreeBSD, macOS and Windows to -mount any of Rclone's cloud storage systems as a file system with -FUSE. +Rclone nfsmount allows Linux, FreeBSD, macOS and Windows to +mount any of Rclone's cloud storage systems as a file system with FUSE. First set up your remote using `rclone config`. Check it works with `rclone ls` etc. @@ -831,6 +830,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone nfsmount remote:path /path/to/mountpoint [flags] ``` @@ -852,6 +852,7 @@ rclone nfsmount remote:path /path/to/mountpoint [flags] --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) diff --git a/docs/content/commands/rclone_rcd.md b/docs/content/commands/rclone_rcd.md index 73a40c42b..869772c8a 100644 --- a/docs/content/commands/rclone_rcd.md +++ b/docs/content/commands/rclone_rcd.md @@ -13,7 +13,6 @@ Run rclone listening to remote control commands only. ## Synopsis - This runs rclone so that it only listens to remote control commands. This is useful if you are controlling rclone via the rc API. @@ -67,7 +66,7 @@ of that with the CA certificate. `--krc-ey` should be the PEM encoded private key and `--rc-client-ca` should be the PEM encoded client certificate authority certificate. ---rc-min-tls-version is minimum TLS version that is acceptable. Valid +`--rc-min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). @@ -135,6 +134,7 @@ Use `--rc-realm` to set the authentication realm. Use `--rc-salt` to change the password hashing salt from the default. + ``` rclone rcd * [flags] ``` @@ -170,6 +170,7 @@ Flags to control the Remote Control API. --rc-realm string Realm for authentication --rc-salt string Password hashing salt (default "dlPL2MqE") --rc-serve Enable the serving of remote objects + --rc-serve-no-modtime Don't read the modification time (can speed things up) --rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s) --rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s) --rc-template string User-specified template diff --git a/docs/content/commands/rclone_serve_dlna.md b/docs/content/commands/rclone_serve_dlna.md index e9e3c307f..d55176dc0 100644 --- a/docs/content/commands/rclone_serve_dlna.md +++ b/docs/content/commands/rclone_serve_dlna.md @@ -24,7 +24,6 @@ based on media formats or file extensions. Additionally, there is no media transcoding support. This means that some players might show files that they are not able to play back correctly. - ## Server options Use `--addr` to specify which IP address and port the server should @@ -391,6 +390,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone serve dlna remote:path [flags] ``` diff --git a/docs/content/commands/rclone_serve_docker.md b/docs/content/commands/rclone_serve_docker.md index a9d8bfa6d..44fdd5f1c 100644 --- a/docs/content/commands/rclone_serve_docker.md +++ b/docs/content/commands/rclone_serve_docker.md @@ -406,6 +406,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone serve docker [flags] ``` @@ -427,6 +428,7 @@ rclone serve docker [flags] --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --forget-state Skip restoring previous state --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) diff --git a/docs/content/commands/rclone_serve_ftp.md b/docs/content/commands/rclone_serve_ftp.md index 5c2169d60..d2e70c9f6 100644 --- a/docs/content/commands/rclone_serve_ftp.md +++ b/docs/content/commands/rclone_serve_ftp.md @@ -13,7 +13,6 @@ Serve remote:path over FTP. ## Synopsis - Run a basic FTP server to serve a remote over FTP protocol. This can be viewed with a FTP client or you can make a remote of type FTP to read and write it. @@ -469,6 +468,7 @@ This can be used to build general purpose proxies to any kind of backend that rclone supports. + ``` rclone serve ftp remote:path [flags] ``` diff --git a/docs/content/commands/rclone_serve_http.md b/docs/content/commands/rclone_serve_http.md index f5ca6df70..d70c538ea 100644 --- a/docs/content/commands/rclone_serve_http.md +++ b/docs/content/commands/rclone_serve_http.md @@ -68,7 +68,7 @@ of that with the CA certificate. `--key` should be the PEM encoded private key and `--client-ca` should be the PEM encoded client certificate authority certificate. ---min-tls-version is minimum TLS version that is acceptable. Valid +`--min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). @@ -570,6 +570,7 @@ This can be used to build general purpose proxies to any kind of backend that rclone supports. + ``` rclone serve http remote:path [flags] ``` diff --git a/docs/content/commands/rclone_serve_nfs.md b/docs/content/commands/rclone_serve_nfs.md index c39005f5e..565e38db8 100644 --- a/docs/content/commands/rclone_serve_nfs.md +++ b/docs/content/commands/rclone_serve_nfs.md @@ -399,6 +399,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone serve nfs remote:path [flags] ``` diff --git a/docs/content/commands/rclone_serve_restic.md b/docs/content/commands/rclone_serve_restic.md index 60f5f9a99..f6ad9c7ef 100644 --- a/docs/content/commands/rclone_serve_restic.md +++ b/docs/content/commands/rclone_serve_restic.md @@ -137,7 +137,7 @@ of that with the CA certificate. `--key` should be the PEM encoded private key and `--client-ca` should be the PEM encoded client certificate authority certificate. ---min-tls-version is minimum TLS version that is acceptable. Valid +`--min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). @@ -169,6 +169,7 @@ Use `--realm` to set the authentication realm. Use `--salt` to change the password hashing salt from the default. + ``` rclone serve restic remote:path [flags] ``` diff --git a/docs/content/commands/rclone_serve_s3.md b/docs/content/commands/rclone_serve_s3.md index ad3aba45b..84aefd9f8 100644 --- a/docs/content/commands/rclone_serve_s3.md +++ b/docs/content/commands/rclone_serve_s3.md @@ -53,7 +53,27 @@ like this: rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY remote:path ``` -This will be compatible with an rclone remote which is defined like this: +For example, to use a simple folder in the filesystem, run the server +with a command like this: + +``` +rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY local:/path/to/folder +``` + +The `rclone.conf` for the server could look like this: + +``` +[local] +type = local +``` + +The `local` configuration is optional though. If you run the server with a +`remote:path` like `/path/to/folder` (without the `local:` prefix and without an +`rclone.conf` file), rclone will fall back to a default configuration, which +will be visible as a warning in the logs. But it will run nonetheless. + +This will be compatible with an rclone (client) remote configuration which +is defined like this: ``` [serves3] @@ -173,7 +193,7 @@ of that with the CA certificate. `--key` should be the PEM encoded private key and `--client-ca` should be the PEM encoded client certificate authority certificate. ---min-tls-version is minimum TLS version that is acceptable. Valid +`--min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). @@ -531,6 +551,7 @@ result is accurate. However, this is very inefficient and may cost lots of API calls resulting in extra charges. Use it as a last resort and only with caching. + ``` rclone serve s3 remote:path [flags] ``` diff --git a/docs/content/commands/rclone_serve_sftp.md b/docs/content/commands/rclone_serve_sftp.md index ea0fcd5d2..10ccaf190 100644 --- a/docs/content/commands/rclone_serve_sftp.md +++ b/docs/content/commands/rclone_serve_sftp.md @@ -500,6 +500,7 @@ This can be used to build general purpose proxies to any kind of backend that rclone supports. + ``` rclone serve sftp remote:path [flags] ``` diff --git a/docs/content/commands/rclone_serve_webdav.md b/docs/content/commands/rclone_serve_webdav.md index b0e1073df..621cbacf6 100644 --- a/docs/content/commands/rclone_serve_webdav.md +++ b/docs/content/commands/rclone_serve_webdav.md @@ -30,6 +30,7 @@ supported hash on the backend or you can use a named hash such as to see the full list. ## Access WebDAV on Windows + WebDAV shared folder can be mapped as a drive on Windows, however the default settings prevent it. Windows will fail to connect to the server using insecure Basic authentication. It will not even display any login dialog. Windows requires SSL / HTTPS connection to be used with Basic. @@ -45,6 +46,7 @@ If required, increase the FileSizeLimitInBytes to a higher value. Navigate to the Services interface, then restart the WebClient service. ## Access Office applications on WebDAV + Navigate to following registry HKEY_CURRENT_USER\Software\Microsoft\Office\[14.0/15.0/16.0]\Common\Internet Create a new DWORD BasicAuthLevel with value 2. 0 - Basic authentication disabled @@ -53,7 +55,6 @@ Create a new DWORD BasicAuthLevel with value 2. https://learn.microsoft.com/en-us/office/troubleshoot/powerpoint/office-opens-blank-from-sharepoint - ## Server options Use `--addr` to specify which IP address and port the server should @@ -97,7 +98,7 @@ of that with the CA certificate. `--key` should be the PEM encoded private key and `--client-ca` should be the PEM encoded client certificate authority certificate. ---min-tls-version is minimum TLS version that is acceptable. Valid +`--min-tls-version` is minimum TLS version that is acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default "tls1.0"). @@ -599,6 +600,7 @@ This can be used to build general purpose proxies to any kind of backend that rclone supports. + ``` rclone serve webdav remote:path [flags] ``` diff --git a/docs/content/commands/rclone_test_info.md b/docs/content/commands/rclone_test_info.md index 7cef53bd9..fe225e56c 100644 --- a/docs/content/commands/rclone_test_info.md +++ b/docs/content/commands/rclone_test_info.md @@ -34,6 +34,7 @@ rclone test info [remote:path]+ [flags] --check-normalization Check UTF-8 Normalization --check-streaming Check uploads with indeterminate file size -h, --help help for info + --keep-test-files Keep test files after execution --upload-wait Duration Wait after writing a file (default 0s) --write-json string Write results to file ``` diff --git a/docs/content/compress.md b/docs/content/compress.md index 3ede8adc5..425c3653e 100644 --- a/docs/content/compress.md +++ b/docs/content/compress.md @@ -160,7 +160,7 @@ Properties: #### --compress-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/crypt.md b/docs/content/crypt.md index 52e49dba0..2ea2bf7d5 100644 --- a/docs/content/crypt.md +++ b/docs/content/crypt.md @@ -634,7 +634,7 @@ Properties: #### --crypt-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/drive.md b/docs/content/drive.md index c815599ed..d1691421e 100644 --- a/docs/content/drive.md +++ b/docs/content/drive.md @@ -1291,6 +1291,8 @@ Properties: - Read the value only - "write" - Write the value only + - "failok" + - If writing fails log errors only, don't fail the transfer - "read,write" - Read and Write the value. @@ -1319,6 +1321,8 @@ Properties: - Read the value only - "write" - Write the value only + - "failok" + - If writing fails log errors only, don't fail the transfer - "read,write" - Read and Write the value. @@ -1354,6 +1358,8 @@ Properties: - Read the value only - "write" - Write the value only + - "failok" + - If writing fails log errors only, don't fail the transfer - "read,write" - Read and Write the value. @@ -1390,7 +1396,7 @@ Properties: #### --drive-description -Description of the remote +Description of the remote. Properties: @@ -1420,7 +1426,7 @@ Here are the possible system metadata items for the drive backend. | permissions | Permissions in a JSON dump of Google drive format. On shared drives these will only be present if they aren't inherited. Enable with --drive-metadata-permissions. | JSON | {} | N | | starred | Whether the user has starred the file. | boolean | false | N | | viewed-by-me | Whether the file has been viewed by this user. | boolean | true | **Y** | -| writers-can-share | Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. | boolean | false | N | +| writers-can-share | Whether users with only writer permission can modify the file's permissions. Not populated and ignored when setting for items in shared drives. | boolean | false | N | See the [metadata](/docs/#metadata) docs for more info. @@ -1623,6 +1629,51 @@ Dump the import formats for debug purposes rclone backend importformats remote: [options] [+] +### query + +List files using Google Drive query language + + rclone backend query remote: [options] [+] + +This command lists files based on a query + +Usage: + + rclone backend query drive: query + +The query syntax is documented at [Google Drive Search query terms and +operators](https://developers.google.com/drive/api/guides/ref-search-terms). + +For example: + + rclone backend query drive: "'0ABc9DEFGHIJKLMNop0QRatUVW3X' in parents and name contains 'foo'" + +If the query contains literal ' or \ characters, these need to be escaped with +\ characters. "'" becomes "\'" and "\" becomes "\\\", for example to match a +file named "foo ' \.txt": + + rclone backend query drive: "name = 'foo \' \\\.txt'" + +The result is a JSON array of matches, for example: + + [ + { + "createdTime": "2017-06-29T19:58:28.537Z", + "id": "0AxBe_CDEF4zkGHI4d0FjYko2QkD", + "md5Checksum": "68518d16be0c6fbfab918be61d658032", + "mimeType": "text/plain", + "modifiedTime": "2024-02-02T10:40:02.874Z", + "name": "foo ' \\.txt", + "parents": [ + "0BxAe_BCDE4zkFGZpcWJGek0xbzC" + ], + "resourceKey": "0-ABCDEFGHIXJQpIGqBJq3MC", + "sha1Checksum": "8f284fa768bfb4e45d076a579ab3905ab6bfa893", + "size": "311", + "webViewLink": "https://drive.google.com/file/d/0AxBe_CDEF4zkGHI4d0FjYko2QkD/view?usp=drivesdk\u0026resourcekey=0-ABCDEFGHIXJQpIGqBJq3MC" + } + ] + {{< rem autogenerated options stop >}} ## Limitations diff --git a/docs/content/dropbox.md b/docs/content/dropbox.md index 476f5b264..7d81d3f17 100644 --- a/docs/content/dropbox.md +++ b/docs/content/dropbox.md @@ -336,6 +336,9 @@ Note that we don't unmount the shared folder afterwards so the --dropbox-shared-folders can be omitted after the first use of a particular shared folder. +See also --dropbox-root-namespace for an alternative way to work with shared +folders. + Properties: - Config: shared_folders @@ -367,6 +370,17 @@ Properties: - Type: Encoding - Default: Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot +#### --dropbox-root-namespace + +Specify a different Dropbox namespace ID to use as the root for all paths. + +Properties: + +- Config: root_namespace +- Env Var: RCLONE_DROPBOX_ROOT_NAMESPACE +- Type: string +- Required: false + #### --dropbox-batch-mode Upload file batching sync|async|off. @@ -455,7 +469,7 @@ Properties: #### --dropbox-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/fichier.md b/docs/content/fichier.md index 1ed524273..f89844c93 100644 --- a/docs/content/fichier.md +++ b/docs/content/fichier.md @@ -197,7 +197,7 @@ Properties: #### --fichier-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/filefabric.md b/docs/content/filefabric.md index f21f3dd0a..50814052a 100644 --- a/docs/content/filefabric.md +++ b/docs/content/filefabric.md @@ -276,7 +276,7 @@ Properties: #### --filefabric-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/flags.md b/docs/content/flags.md index 358520448..fca12d85c 100644 --- a/docs/content/flags.md +++ b/docs/content/flags.md @@ -114,7 +114,7 @@ General networking and HTTP stuff. --tpslimit float Limit HTTP transactions per second to this --tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --use-cookies Enable session cookiejar - --user-agent string Set the user-agent to a specified string (default "rclone/v1.66.0") + --user-agent string Set the user-agent to a specified string (default "rclone/v1.67.0") ``` @@ -500,6 +500,7 @@ Backend only flags. These can be set in the config file also. --dropbox-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot) --dropbox-impersonate string Impersonate this user when using a business account --dropbox-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) + --dropbox-root-namespace string Specify a different Dropbox namespace ID to use as the root for all paths --dropbox-shared-files Instructs rclone to work on individual shared files --dropbox-shared-folders Instructs rclone to work on shared folders --dropbox-token string OAuth Access Token as a JSON blob @@ -605,6 +606,7 @@ Backend only flags. These can be set in the config file also. --hidrive-upload-cutoff SizeSuffix Cutoff/Threshold for chunked uploads (default 96Mi) --http-description string Description of the remote --http-headers CommaSepList Set HTTP headers for all transactions + --http-no-escape Do not escape URL metacharacters in path names --http-no-head Don't use HEAD requests --http-no-slash Set this if the site doesn't end directories with / --http-url string URL of HTTP host to connect to @@ -640,7 +642,7 @@ Backend only flags. These can be set in the config file also. --koofr-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) --koofr-endpoint string The Koofr API endpoint to use --koofr-mountid string Mount ID of the mount to use - --koofr-password string Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password) (obscured) + --koofr-password string Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password (obscured) --koofr-provider string Choose your storage provider --koofr-setmtime Does the backend support setting modification time (default true) --koofr-user string Your user name @@ -656,6 +658,7 @@ Backend only flags. These can be set in the config file also. --local-no-set-modtime Disable setting modtime --local-no-sparse Disable sparse files for multi-thread downloads --local-nounc Disable UNC (long path names) conversion on Windows + --local-time-type mtime|atime|btime|ctime Set what kind of time is returned (default mtime) --local-unicode-normalization Apply unicode NFC normalization to paths and filenames --local-zero-size-links Assume the Stat size of links is zero (and read them instead) (deprecated) --mailru-auth-url string Auth server URL @@ -698,6 +701,7 @@ Backend only flags. These can be set in the config file also. --onedrive-drive-type string The type of the drive (personal | business | documentLibrary) --onedrive-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot) --onedrive-expose-onenote-files Set to make OneNote files show up in directory listings + --onedrive-hard-delete Permanently delete files on removal --onedrive-hash-type string Specify the hash in use for the backend (default "auto") --onedrive-link-password string Set the password for links created by the link command --onedrive-link-scope string Set the scope of the links created by the link command (default "anonymous") @@ -752,6 +756,7 @@ Backend only flags. These can be set in the config file also. --pcloud-token-url string Token server url --pcloud-username string Your pcloud username --pikpak-auth-url string Auth server URL + --pikpak-chunk-size SizeSuffix Chunk size for multipart uploads (default 5Mi) --pikpak-client-id string OAuth Client Id --pikpak-client-secret string OAuth Client Secret --pikpak-description string Description of the remote @@ -762,6 +767,7 @@ Backend only flags. These can be set in the config file also. --pikpak-token string OAuth Access Token as a JSON blob --pikpak-token-url string Token server url --pikpak-trashed-only Only show files that are in the trash + --pikpak-upload-concurrency int Concurrency for multipart uploads (default 5) --pikpak-use-trash Send files to the trash instead of deleting permanently (default true) --pikpak-user string Pikpak username --premiumizeme-auth-url string Auth server URL @@ -875,6 +881,7 @@ Backend only flags. These can be set in the config file also. --sftp-chunk-size SizeSuffix Upload and download chunk size (default 32Ki) --sftp-ciphers SpaceSepList Space separated list of ciphers to be used for session encryption, ordered by preference --sftp-concurrency int The maximum number of outstanding requests for one file (default 64) + --sftp-connections int Maximum number of SFTP simultaneous connections, 0 for unlimited --sftp-copy-is-hardlink Set to enable server side copies using hardlinks --sftp-description string Description of the remote --sftp-disable-concurrent-reads If set don't use concurrent reads @@ -959,7 +966,7 @@ Backend only flags. These can be set in the config file also. --swift-auth string Authentication URL for server (OS_AUTH_URL) --swift-auth-token string Auth Token from alternate authentication - optional (OS_AUTH_TOKEN) --swift-auth-version int AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION) - --swift-chunk-size SizeSuffix Above this size files will be chunked into a _segments container (default 5Gi) + --swift-chunk-size SizeSuffix Above this size files will be chunked (default 5Gi) --swift-description string Description of the remote --swift-domain string User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) --swift-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8) @@ -975,8 +982,16 @@ Backend only flags. These can be set in the config file also. --swift-tenant string Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME) --swift-tenant-domain string Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME) --swift-tenant-id string Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID) + --swift-use-segments-container Tristate Choose destination for large object segments (default unset) --swift-user string User name to log in (OS_USERNAME) --swift-user-id string User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID) + --ulozto-app-token string The application token identifying the app. An app API key can be either found in the API + --ulozto-description string Description of the remote + --ulozto-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) + --ulozto-list-page-size int The size of a single page for list commands. 1-500 (default 500) + --ulozto-password string The password for the user (obscured) + --ulozto-root-folder-slug string If set, rclone will use this folder as the root folder for all operations. For example, + --ulozto-username string The username of the principal to operate as --union-action-policy string Policy to choose upstream on ACTION category (default "epall") --union-cache-time int Cache time of usage and free space (in seconds) (default 120) --union-create-policy string Policy to choose upstream on CREATE category (default "epmfs") @@ -994,6 +1009,7 @@ Backend only flags. These can be set in the config file also. --webdav-encoding string The encoding for the backend --webdav-headers CommaSepList Set HTTP headers for all transactions --webdav-nextcloud-chunk-size SizeSuffix Nextcloud upload chunk size (default 10Mi) + --webdav-owncloud-exclude-mounts Exclude ownCloud mounted storages --webdav-owncloud-exclude-shares Exclude ownCloud shares --webdav-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) --webdav-pass string Password (obscured) diff --git a/docs/content/ftp.md b/docs/content/ftp.md index 748545af6..9c076011f 100644 --- a/docs/content/ftp.md +++ b/docs/content/ftp.md @@ -455,7 +455,7 @@ Properties: #### --ftp-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/googlecloudstorage.md b/docs/content/googlecloudstorage.md index cd9dc6a34..db1928be3 100644 --- a/docs/content/googlecloudstorage.md +++ b/docs/content/googlecloudstorage.md @@ -701,7 +701,7 @@ Properties: #### --gcs-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/googlephotos.md b/docs/content/googlephotos.md index 1bca0095b..eaefdccae 100644 --- a/docs/content/googlephotos.md +++ b/docs/content/googlephotos.md @@ -463,7 +463,7 @@ Properties: #### --gphotos-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/hasher.md b/docs/content/hasher.md index e7968cb28..30cdff4d2 100644 --- a/docs/content/hasher.md +++ b/docs/content/hasher.md @@ -226,7 +226,7 @@ Properties: #### --hasher-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/hdfs.md b/docs/content/hdfs.md index ec1ada050..c7022586e 100644 --- a/docs/content/hdfs.md +++ b/docs/content/hdfs.md @@ -234,7 +234,7 @@ Properties: #### --hdfs-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/hidrive.md b/docs/content/hidrive.md index 6c4561764..e19649310 100644 --- a/docs/content/hidrive.md +++ b/docs/content/hidrive.md @@ -420,7 +420,7 @@ Properties: #### --hidrive-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/http.md b/docs/content/http.md index fc557e53c..27e048285 100644 --- a/docs/content/http.md +++ b/docs/content/http.md @@ -142,6 +142,17 @@ Properties: - Type: string - Required: true +#### --http-no-escape + +Do not escape URL metacharacters in path names. + +Properties: + +- Config: no_escape +- Env Var: RCLONE_HTTP_NO_ESCAPE +- Type: bool +- Default: false + ### Advanced options Here are the Advanced options specific to http (HTTP). @@ -214,7 +225,7 @@ Properties: #### --http-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/imagekit.md b/docs/content/imagekit.md index 01cf6eaec..e4ecb7e34 100644 --- a/docs/content/imagekit.md +++ b/docs/content/imagekit.md @@ -193,7 +193,7 @@ Properties: #### --imagekit-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/internetarchive.md b/docs/content/internetarchive.md index 2123cfd4d..1117b696b 100644 --- a/docs/content/internetarchive.md +++ b/docs/content/internetarchive.md @@ -265,7 +265,7 @@ Properties: #### --internetarchive-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/jottacloud.md b/docs/content/jottacloud.md index f4adf93f0..3a2ac05dc 100644 --- a/docs/content/jottacloud.md +++ b/docs/content/jottacloud.md @@ -449,7 +449,7 @@ Properties: #### --jottacloud-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/koofr.md b/docs/content/koofr.md index 005ec08e6..ed7497604 100644 --- a/docs/content/koofr.md +++ b/docs/content/koofr.md @@ -159,7 +159,7 @@ Properties: #### --koofr-password -Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password). +Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password. **NB** Input to this must be obscured - see [rclone obscure](/commands/rclone_obscure/). @@ -216,7 +216,7 @@ Properties: #### --koofr-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/linkbox.md b/docs/content/linkbox.md index 3332a2ed2..5389468d5 100644 --- a/docs/content/linkbox.md +++ b/docs/content/linkbox.md @@ -74,7 +74,7 @@ Here are the Advanced options specific to linkbox (Linkbox). #### --linkbox-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/local.md b/docs/content/local.md index bef94be15..849e2cc54 100644 --- a/docs/content/local.md +++ b/docs/content/local.md @@ -566,6 +566,44 @@ Properties: - Type: bool - Default: false +#### --local-time-type + +Set what kind of time is returned. + +Normally rclone does all operations on the mtime or Modification time. + +If you set this flag then rclone will return the Modified time as whatever +you set here. So if you use "rclone lsl --local-time-type ctime" then +you will see ctimes in the listing. + +If the OS doesn't support returning the time_type specified then rclone +will silently replace it with the modification time which all OSes support. + +- mtime is supported by all OSes +- atime is supported on all OSes except: plan9, js +- btime is only supported on: Windows, macOS, freebsd, netbsd +- ctime is supported on all Oses except: Windows, plan9, js + +Note that setting the time will still set the modified time so this is +only useful for reading. + + +Properties: + +- Config: time_type +- Env Var: RCLONE_LOCAL_TIME_TYPE +- Type: mtime|atime|btime|ctime +- Default: mtime +- Examples: + - "mtime" + - The last modification time. + - "atime" + - The last access time. + - "btime" + - The creation time. + - "ctime" + - The last status change time. + #### --local-encoding The encoding for the backend. @@ -581,7 +619,7 @@ Properties: #### --local-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/mailru.md b/docs/content/mailru.md index 5020f07f9..fe6e4bb93 100644 --- a/docs/content/mailru.md +++ b/docs/content/mailru.md @@ -414,7 +414,7 @@ Properties: #### --mailru-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/mega.md b/docs/content/mega.md index 7537d7d47..d62d527fc 100644 --- a/docs/content/mega.md +++ b/docs/content/mega.md @@ -284,7 +284,7 @@ Properties: #### --mega-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/memory.md b/docs/content/memory.md index 73f3120bc..d8637771b 100644 --- a/docs/content/memory.md +++ b/docs/content/memory.md @@ -70,7 +70,7 @@ Here are the Advanced options specific to memory (In memory object storage syste #### --memory-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/netstorage.md b/docs/content/netstorage.md index 7302bd3a4..517ce286e 100644 --- a/docs/content/netstorage.md +++ b/docs/content/netstorage.md @@ -244,7 +244,7 @@ Properties: #### --netstorage-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/onedrive.md b/docs/content/onedrive.md index 0b55629d6..1caefc4a8 100644 --- a/docs/content/onedrive.md +++ b/docs/content/onedrive.md @@ -458,9 +458,11 @@ Deprecated: use --server-side-across-configs instead. Allow server-side operations (e.g. copy) to work across different onedrive configs. -This will only work if you are copying between two OneDrive *Personal* drives AND -the files to copy are already shared between them. In other cases, rclone will -fall back to normal copy (which will be slightly slower). +This will work if you are copying between two OneDrive *Personal* drives AND the files to +copy are already shared between them. Additionally, it should also function for a user who +has access permissions both between Onedrive for *business* and *SharePoint* under the *same +tenant*, and between *SharePoint* and another *SharePoint* under the *same tenant*. In other +cases, rclone will fall back to normal copy (which will be slightly slower). Properties: @@ -503,6 +505,24 @@ Properties: - Type: bool - Default: false +#### --onedrive-hard-delete + +Permanently delete files on removal. + +Normally files will get sent to the recycle bin on deletion. Setting +this flag causes them to be permanently deleted. Use with care. + +OneDrive personal accounts do not support the permanentDelete API, +it only applies to OneDrive for Business and SharePoint document libraries. + + +Properties: + +- Config: hard_delete +- Env Var: RCLONE_ONEDRIVE_HARD_DELETE +- Type: bool +- Default: false + #### --onedrive-link-scope Set the scope of the links created by the link command. @@ -567,7 +587,7 @@ all onedrive types. If an SHA1 hash is desired then set this option accordingly. From July 2023 QuickXorHash will be the only available hash for -both OneDrive for Business and OneDriver Personal. +both OneDrive for Business and OneDrive Personal. This can be set to "none" to not use any hashes. @@ -680,6 +700,8 @@ Properties: - Write the value only - "read,write" - Read and Write the value. + - "failok" + - If writing fails log errors only, don't fail the transfer #### --onedrive-encoding @@ -696,7 +718,7 @@ Properties: #### --onedrive-description -Description of the remote +Description of the remote. Properties: @@ -713,11 +735,11 @@ differences between OneDrive Personal and Business (see table below for details). Permissions are also supported, if `--onedrive-metadata-permissions` is set. The -accepted values for `--onedrive-metadata-permissions` are `read`, `write`, -`read,write`, and `off` (the default). `write` supports adding new permissions, +accepted values for `--onedrive-metadata-permissions` are "`read`", "`write`", +"`read,write`", and "`off`" (the default). "`write`" supports adding new permissions, updating the "role" of existing permissions, and removing permissions. Updating and removing require the Permission ID to be known, so it is recommended to use -`read,write` instead of `write` if you wish to update/remove permissions. +"`read,write`" instead of "`write`" if you wish to update/remove permissions. Permissions are read/written in JSON format using the same schema as the [OneDrive API](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/permission?view=odsp-graph-online), @@ -754,7 +776,7 @@ Example for OneDrive Business: [ { "id": "48d31887-5fad-4d73-a9f5-3c356e68a038", - "grantedToIdentitiesV2": [ + "grantedToIdentities": [ { "user": { "displayName": "ryan@contoso.com" @@ -775,7 +797,7 @@ Example for OneDrive Business: }, { "id": "5D33DD65C6932946", - "grantedToV2": { + "grantedTo": { "user": { "displayName": "John Doe", "id": "efee1b77-fb3b-4f65-99d6-274c11914d12" @@ -796,38 +818,19 @@ format. The [`--metadata-mapper`](https://rclone.org/docs/#metadata-mapper) tool be very helpful for this. When adding permissions, an email address can be provided in the `User.ID` or -`DisplayName` properties of `grantedTo` or `grantedToIdentities` (these are -deprecated on OneDrive Business -- instead, use `grantedToV2` and -`grantedToIdentitiesV2`, respectively). Alternatively, an ObjectID can be -provided in `User.ID`. At least one valid recipient must be provided in order to -add a permission for a user. Creating a Public Link is also supported, if -`Link.Scope` is set to `"anonymous"`. +`DisplayName` properties of `grantedTo` or `grantedToIdentities`. Alternatively, +an ObjectID can be provided in `User.ID`. At least one valid recipient must be +provided in order to add a permission for a user. Creating a Public Link is also +supported, if `Link.Scope` is set to `"anonymous"`. -Example request to add a "read" permission: +Example request to add a "read" permission with `--metadata-mapper`: ```json -[ - { - "id": "", - "grantedTo": { - "user": {}, - "application": {}, - "device": {} - }, - "grantedToIdentities": [ - { - "user": { - "id": "ryan@contoso.com" - }, - "application": {}, - "device": {} - } - ], - "roles": [ - "read" - ] - } -] +{ + "Metadata": { + "permissions": "[{\"grantedToIdentities\":[{\"user\":{\"id\":\"ryan@contoso.com\"}}],\"roles\":[\"read\"]}]" + } +} ``` Note that adding a permission can fail if a conflicting permission already @@ -837,7 +840,8 @@ To update an existing permission, include both the Permission ID and the new `roles` to be assigned. `roles` is the only property that can be changed. To remove permissions, pass in a blob containing only the permissions you wish -to keep (which can be empty, to remove all.) +to keep (which can be empty, to remove all.) Note that the `owner` role will be +ignored, as it cannot be removed. Note that both reading and writing permissions requires extra API calls, so if you don't need to read or write permissions it is recommended to omit diff --git a/docs/content/opendrive.md b/docs/content/opendrive.md index 62a8aea55..4205dc498 100644 --- a/docs/content/opendrive.md +++ b/docs/content/opendrive.md @@ -164,7 +164,7 @@ Properties: #### --opendrive-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/oracleobjectstorage.md b/docs/content/oracleobjectstorage.md index 070dfad2b..06022e480 100644 --- a/docs/content/oracleobjectstorage.md +++ b/docs/content/oracleobjectstorage.md @@ -709,7 +709,7 @@ Properties: #### --oos-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/pcloud.md b/docs/content/pcloud.md index edf67e7ed..be032c491 100644 --- a/docs/content/pcloud.md +++ b/docs/content/pcloud.md @@ -290,7 +290,7 @@ Properties: #### --pcloud-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/pikpak.md b/docs/content/pikpak.md index c1412dfee..6c2fab232 100644 --- a/docs/content/pikpak.md +++ b/docs/content/pikpak.md @@ -227,6 +227,54 @@ Properties: - Type: SizeSuffix - Default: 10Mi +#### --pikpak-chunk-size + +Chunk size for multipart uploads. + +Large files will be uploaded in chunks of this size. + +Note that this is stored in memory and there may be up to +"--transfers" * "--pikpak-upload-concurrency" chunks stored at once +in memory. + +If you are transferring large files over high-speed links and you have +enough memory, then increasing this will speed up the transfers. + +Rclone will automatically increase the chunk size when uploading a +large file of known size to stay below the 10,000 chunks limit. + +Increasing the chunk size decreases the accuracy of the progress +statistics displayed with "-P" flag. + +Properties: + +- Config: chunk_size +- Env Var: RCLONE_PIKPAK_CHUNK_SIZE +- Type: SizeSuffix +- Default: 5Mi + +#### --pikpak-upload-concurrency + +Concurrency for multipart uploads. + +This is the number of chunks of the same file that are uploaded +concurrently for multipart uploads. + +Note that chunks are stored in memory and there may be up to +"--transfers" * "--pikpak-upload-concurrency" chunks stored at once +in memory. + +If you are uploading small numbers of large files over high-speed links +and these uploads do not fully utilize your bandwidth, then increasing +this may help to speed up the transfers. + +Properties: + +- Config: upload_concurrency +- Env Var: RCLONE_PIKPAK_UPLOAD_CONCURRENCY +- Type: int +- Default: 5 + #### --pikpak-encoding The encoding for the backend. @@ -242,7 +290,7 @@ Properties: #### --pikpak-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/premiumizeme.md b/docs/content/premiumizeme.md index 7ed301e4e..ebda9a13a 100644 --- a/docs/content/premiumizeme.md +++ b/docs/content/premiumizeme.md @@ -204,7 +204,7 @@ Properties: #### --premiumizeme-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/protondrive.md b/docs/content/protondrive.md index 8c20450d1..d9f59738d 100644 --- a/docs/content/protondrive.md +++ b/docs/content/protondrive.md @@ -333,7 +333,7 @@ Properties: #### --protondrive-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/putio.md b/docs/content/putio.md index 6c3e377f2..d30d7f8c6 100644 --- a/docs/content/putio.md +++ b/docs/content/putio.md @@ -201,7 +201,7 @@ Properties: #### --putio-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/qingstor.md b/docs/content/qingstor.md index c0fc0911a..47d9aa668 100644 --- a/docs/content/qingstor.md +++ b/docs/content/qingstor.md @@ -312,7 +312,7 @@ Properties: #### --qingstor-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/quatrix.md b/docs/content/quatrix.md index 5a89f06b3..d580e0dfb 100644 --- a/docs/content/quatrix.md +++ b/docs/content/quatrix.md @@ -249,7 +249,7 @@ Properties: #### --quatrix-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/s3.md b/docs/content/s3.md index 69f53a540..a7cd029b3 100644 --- a/docs/content/s3.md +++ b/docs/content/s3.md @@ -672,7 +672,7 @@ A simple solution is to set the `--s3-upload-cutoff 0` and force all the files t {{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/s3/s3.go then run make backenddocs" >}} ### Standard options -Here are the Standard options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others). +Here are the Standard options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others). #### --s3-provider @@ -719,6 +719,8 @@ Properties: - Liara Object Storage - "Linode" - Linode Object Storage + - "Magalu" + - Magalu Object Storage - "Minio" - Minio Object Storage - "Netease" @@ -862,6 +864,9 @@ Properties: - "sa-east-1" - South America (Sao Paulo) Region. - Needs location constraint sa-east-1. + - "il-central-1" + - Israel (Tel Aviv) Region. + - Needs location constraint il-central-1. - "me-south-1" - Middle East (Bahrain) Region. - Needs location constraint me-south-1. @@ -947,6 +952,8 @@ Properties: - Asia Pacific (Hong Kong) Region - "sa-east-1" - South America (Sao Paulo) Region + - "il-central-1" + - Israel (Tel Aviv) Region - "me-south-1" - Middle East (Bahrain) Region - "af-south-1" @@ -1093,7 +1100,7 @@ Properties: ### Advanced options -Here are the Advanced options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others). +Here are the Advanced options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others). #### --s3-bucket-acl @@ -1907,7 +1914,7 @@ Properties: #### --s3-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/seafile.md b/docs/content/seafile.md index 57a00ea30..a7b32f597 100644 --- a/docs/content/seafile.md +++ b/docs/content/seafile.md @@ -391,7 +391,7 @@ Properties: #### --seafile-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/sftp.md b/docs/content/sftp.md index bc3f1f6dc..4e905ee9b 100644 --- a/docs/content/sftp.md +++ b/docs/content/sftp.md @@ -895,6 +895,31 @@ Properties: - Type: int - Default: 64 +#### --sftp-connections + +Maximum number of SFTP simultaneous connections, 0 for unlimited. + +Note that setting this is very likely to cause deadlocks so it should +be used with care. + +If you are doing a sync or copy then make sure concurrency is one more +than the sum of `--transfers` and `--checkers`. + +If you use `--check-first` then it just needs to be one more than the +maximum of `--checkers` and `--transfers`. + +So for `concurrency 3` you'd use `--checkers 2 --transfers 2 +--check-first` or `--checkers 1 --transfers 1`. + + + +Properties: + +- Config: connections +- Env Var: RCLONE_SFTP_CONNECTIONS +- Type: int +- Default: 0 + #### --sftp-set-env Environment variables to pass to sftp and commands @@ -1046,7 +1071,7 @@ Properties: #### --sftp-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/sharefile.md b/docs/content/sharefile.md index 8dde24c86..6a66af439 100644 --- a/docs/content/sharefile.md +++ b/docs/content/sharefile.md @@ -305,7 +305,7 @@ Properties: #### --sharefile-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/sia.md b/docs/content/sia.md index 558c46c8a..71cea343c 100644 --- a/docs/content/sia.md +++ b/docs/content/sia.md @@ -196,7 +196,7 @@ Properties: #### --sia-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/smb.md b/docs/content/smb.md index 2a50a5c5a..e51209598 100644 --- a/docs/content/smb.md +++ b/docs/content/smb.md @@ -250,7 +250,7 @@ Properties: #### --smb-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/storj.md b/docs/content/storj.md index 70c369408..667acba49 100644 --- a/docs/content/storj.md +++ b/docs/content/storj.md @@ -305,7 +305,7 @@ Here are the Advanced options specific to storj (Storj Decentralized Cloud Stora #### --storj-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/sugarsync.md b/docs/content/sugarsync.md index 6e6738aec..c3eaf2047 100644 --- a/docs/content/sugarsync.md +++ b/docs/content/sugarsync.md @@ -274,7 +274,7 @@ Properties: #### --sugarsync-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/swift.md b/docs/content/swift.md index d88802227..f15ba7e81 100644 --- a/docs/content/swift.md +++ b/docs/content/swift.md @@ -510,10 +510,15 @@ Properties: #### --swift-chunk-size -Above this size files will be chunked into a _segments container. +Above this size files will be chunked. + +Above this size files will be chunked into a a `_segments` container +or a `.file-segments` directory. (See the `use_segments_container` option +for more info). Default for this is 5 GiB which is its maximum value, which +means only files above this size will be chunked. + +Rclone uploads chunked files as dynamic large objects (DLO). -Above this size files will be chunked into a _segments container. The -default for this is 5 GiB which is its maximum value. Properties: @@ -526,14 +531,16 @@ Properties: Don't chunk files during streaming upload. -When doing streaming uploads (e.g. using rcat or mount) setting this -flag will cause the swift backend to not upload chunked files. +When doing streaming uploads (e.g. using `rcat` or `mount` with +`--vfs-cache-mode off`) setting this flag will cause the swift backend +to not upload chunked files. -This will limit the maximum upload size to 5 GiB. However non chunked -files are easier to deal with and have an MD5SUM. +This will limit the maximum streamed upload size to 5 GiB. This is +useful because non chunked files are easier to deal with and have an +MD5SUM. -Rclone will still chunk files bigger than chunk_size when doing normal -copy operations. +Rclone will still chunk files bigger than `chunk_size` when doing +normal copy operations. Properties: @@ -547,11 +554,12 @@ Properties: Disable support for static and dynamic large objects Swift cannot transparently store files bigger than 5 GiB. There are -two schemes for doing that, static or dynamic large objects, and the -API does not allow rclone to determine whether a file is a static or -dynamic large object without doing a HEAD on the object. Since these -need to be treated differently, this means rclone has to issue HEAD -requests for objects for example when reading checksums. +two schemes for chunking large files, static large objects (SLO) or +dynamic large objects (DLO), and the API does not allow rclone to +determine whether a file is a static or dynamic large object without +doing a HEAD on the object. Since these need to be treated +differently, this means rclone has to issue HEAD requests for objects +for example when reading checksums. When `no_large_objects` is set, rclone will assume that there are no static or dynamic large objects stored. This means it can stop doing @@ -562,7 +570,7 @@ Setting this option implies `no_chunk` and also that no files will be uploaded in chunks, so files bigger than 5 GiB will just fail on upload. -If you set this option and there *are* static or dynamic large objects, +If you set this option and there **are** static or dynamic large objects, then this will give incorrect hashes for them. Downloads will succeed, but other operations such as Remove and Copy will fail. @@ -574,6 +582,40 @@ Properties: - Type: bool - Default: false +#### --swift-use-segments-container + +Choose destination for large object segments + +Swift cannot transparently store files bigger than 5 GiB and rclone +will chunk files larger than `chunk_size` (default 5 GiB) in order to +upload them. + +If this value is `true` the chunks will be stored in an additional +container named the same as the destination container but with +`_segments` appended. This means that there won't be any duplicated +data in the original container but having another container may not be +acceptable. + +If this value is `false` the chunks will be stored in a +`.file-segments` directory in the root of the container. This +directory will be omitted when listing the container. Some +providers (eg Blomp) require this mode as creating additional +containers isn't allowed. If it is desired to see the `.file-segments` +directory in the root then this flag must be set to `true`. + +If this value is `unset` (the default), then rclone will choose the value +to use. It will be `false` unless rclone detects any `auth_url`s that +it knows need it to be `true`. In this case you'll see a message in +the DEBUG log. + + +Properties: + +- Config: use_segments_container +- Env Var: RCLONE_SWIFT_USE_SEGMENTS_CONTAINER +- Type: Tristate +- Default: unset + #### --swift-encoding The encoding for the backend. @@ -589,7 +631,7 @@ Properties: #### --swift-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/ulozto.md b/docs/content/ulozto.md index e98da5418..5846ae87b 100644 --- a/docs/content/ulozto.md +++ b/docs/content/ulozto.md @@ -4,7 +4,7 @@ description: "Rclone docs for Uloz.to" versionIntroduced: "v1.66" --- -# {{< icon "fa fa-box-archive" >}} Uloz.to +# {{< icon "fas fa-angle-double-down" >}} Uloz.to Paths are specified as `remote:path` @@ -239,7 +239,7 @@ Properties: #### --ulozto-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/union.md b/docs/content/union.md index 0ae6da871..4d56022f3 100644 --- a/docs/content/union.md +++ b/docs/content/union.md @@ -289,7 +289,7 @@ Properties: #### --union-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/uptobox.md b/docs/content/uptobox.md index 98ff5b714..d23b0898a 100644 --- a/docs/content/uptobox.md +++ b/docs/content/uptobox.md @@ -148,7 +148,7 @@ Properties: #### --uptobox-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/webdav.md b/docs/content/webdav.md index 7da008014..458a3488c 100644 --- a/docs/content/webdav.md +++ b/docs/content/webdav.md @@ -283,9 +283,20 @@ Properties: - Type: bool - Default: false +#### --webdav-owncloud-exclude-mounts + +Exclude ownCloud mounted storages + +Properties: + +- Config: owncloud_exclude_mounts +- Env Var: RCLONE_WEBDAV_OWNCLOUD_EXCLUDE_MOUNTS +- Type: bool +- Default: false + #### --webdav-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/yandex.md b/docs/content/yandex.md index c723b839c..8d0ab27bc 100644 --- a/docs/content/yandex.md +++ b/docs/content/yandex.md @@ -211,7 +211,7 @@ Properties: #### --yandex-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/content/zoho.md b/docs/content/zoho.md index 489b8d8e0..9fd5377b5 100644 --- a/docs/content/zoho.md +++ b/docs/content/zoho.md @@ -239,7 +239,7 @@ Properties: #### --zoho-description -Description of the remote +Description of the remote. Properties: diff --git a/docs/layouts/chrome/navbar.html b/docs/layouts/chrome/navbar.html index 629bf0e57..71d5174d1 100644 --- a/docs/layouts/chrome/navbar.html +++ b/docs/layouts/chrome/navbar.html @@ -100,7 +100,7 @@ SMB / CIFS Storj SugarSync - Uloz.to + Uloz.to Uptobox Union (merge backends) WebDAV diff --git a/go.sum b/go.sum index 31e345117..53872e3d0 100644 --- a/go.sum +++ b/go.sum @@ -450,10 +450,6 @@ github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5 github.com/quic-go/quic-go v0.40.1 h1:X3AGzUNFs0jVuO3esAGnTfvdgvL4fq655WaOi1snv1Q= github.com/rasky/go-xdr v0.0.0-20170124162913-1a41d1a06c93 h1:UVArwN/wkKjMVhh2EQGC0tEc1+FqiLlvYXY5mQ2f8Wg= github.com/rasky/go-xdr v0.0.0-20170124162913-1a41d1a06c93/go.mod h1:Nfe4efndBz4TibWycNE+lqyJZiMX4ycx+QKV8Ta0f/o= -github.com/rclone/gofakes3 v0.0.3-0.20240413171058-b7a9fdb78ddb h1:HJJ7XgRBfXew3EosVk45aGPJRY5wSTSpmAJqz8Kiw0w= -github.com/rclone/gofakes3 v0.0.3-0.20240413171058-b7a9fdb78ddb/go.mod h1:L0VIBE0mT6ArN/5dfHsJm3UjqCpi5B/cdN+qWDNh7ko= -github.com/rclone/gofakes3 v0.0.3-0.20240414171457-6975bf40a0a8 h1:hJNS/Xf4iQD/Et/pOVuYtJE9zbEZ01MeQM10Xa3xf+k= -github.com/rclone/gofakes3 v0.0.3-0.20240414171457-6975bf40a0a8/go.mod h1:L0VIBE0mT6ArN/5dfHsJm3UjqCpi5B/cdN+qWDNh7ko= github.com/rclone/gofakes3 v0.0.3-0.20240422160309-90e8e825c0c3 h1:PyMsWM61oBPU3ajQfCImfxPHyESb5wC6NaZ6b2GAXTo= github.com/rclone/gofakes3 v0.0.3-0.20240422160309-90e8e825c0c3/go.mod h1:L0VIBE0mT6ArN/5dfHsJm3UjqCpi5B/cdN+qWDNh7ko= github.com/relvacode/iso8601 v1.3.0 h1:HguUjsGpIMh/zsTczGN3DVJFxTU/GX+MMmzcKoMO7ko= diff --git a/rclone.1 b/rclone.1 index a706cef42..4b8022693 100644 --- a/rclone.1 +++ b/rclone.1 @@ -1,7 +1,7 @@ .\"t .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "rclone" "1" "Mar 10, 2024" "User Manual" "" +.TH "rclone" "1" "Jun 14, 2024" "User Manual" "" .hy .SH Rclone syncs your files to cloud storage .PP @@ -216,6 +216,8 @@ Linkbox .IP \[bu] 2 Linode Object Storage .IP \[bu] 2 +Magalu +.IP \[bu] 2 Mail.ru Cloud .IP \[bu] 2 Memset Memstore @@ -294,6 +296,8 @@ SugarSync .IP \[bu] 2 Tencent Cloud Object Storage (COS) .IP \[bu] 2 +Uloz.to +.IP \[bu] 2 Uptobox .IP \[bu] 2 Wasabi @@ -441,7 +445,7 @@ Its current version is as below. .PP [IMAGE: Homebrew package (https://repology.org/badge/version-for-repo/homebrew/rclone.svg)] (https://repology.org/project/rclone/versions) -.SS Installation with MacPorts (#macos-macports) +.SS Installation with MacPorts .PP On macOS, rclone can also be installed via MacPorts (https://www.macports.org): @@ -1284,6 +1288,8 @@ SugarSync (https://rclone.org/sugarsync/) .IP \[bu] 2 Union (https://rclone.org/union/) .IP \[bu] 2 +Uloz.to (https://rclone.org/ulozto/) +.IP \[bu] 2 Uptobox (https://rclone.org/uptobox/) .IP \[bu] 2 WebDAV (https://rclone.org/webdav/) @@ -1301,10 +1307,35 @@ Its syntax is like this .IP .nf \f[C] -Syntax: [options] subcommand +rclone subcommand [options] \f[R] .fi .PP +A \f[C]subcommand\f[R] is a the rclone operation required, (e.g. +\f[C]sync\f[R], \f[C]copy\f[R], \f[C]ls\f[R]). +.PP +An \f[C]option\f[R] is a single letter flag (e.g. +\f[C]-v\f[R]) or a group of single letter flags (e.g. +\f[C]-Pv\f[R]) or a long flag (e.g. +\f[C]--progress\f[R]). +No options are required. +Options can come after the \f[C]subcommand\f[R] or in between parameters +too or on the end, but only global options can be used before the +\f[C]subcommand\f[R]. +Anything after a \f[C]--\f[R] option will not be interpreted as an +option so if you need to add a parameter which starts with a \f[C]-\f[R] +then put a \f[C]--\f[R] on its own first, eg +.IP +.nf +\f[C] +rclone lsf -- -directory-starting-with-dash +\f[R] +.fi +.PP +A \f[C]parameter\f[R] is usually a file path or rclone remote, eg +\f[C]/path/to/file\f[R] or \f[C]remote:path/to/file\f[R] but it can be +other things - the \f[C]subcommand\f[R] help will tell you what. +.PP Source and destination paths are specified by the name you gave the storage system in the config file then the sub path, e.g. \[dq]drive:myfolder\[dq] to look at \[dq]myfolder\[dq] in Google drive. @@ -3973,28 +4004,44 @@ Output bash completion script for rclone. .PP Generates a bash shell autocompletion script for rclone. .PP -This writes to /etc/bash_completion.d/rclone by default so will probably -need to be run with sudo or as root, e.g. +By default, when run without any arguments, .IP .nf \f[C] -sudo rclone genautocomplete bash +rclone genautocomplete bash \f[R] .fi .PP -Logout and login again to use the autocompletion scripts, or source them -directly +the generated script will be written to .IP .nf \f[C] -\&. /etc/bash_completion +/etc/bash_completion.d/rclone \f[R] .fi .PP -If you supply a command line argument the script will be written there. +and so rclone will probably need to be run as root, or with sudo. +.PP +If you supply a path to a file as the command line argument, then the +generated script will be written to that file, in which case you should +not need root privileges. .PP If output_file is \[dq]-\[dq], then the output will be written to stdout. +.PP +If you have installed the script into the default location, you can +logout and login again to use the autocompletion script. +.PP +Alternatively, you can source the script directly +.IP +.nf +\f[C] +\&. /path/to/my_bash_completion_scripts/rclone +\f[R] +.fi +.PP +and the autocompletion functionality will be added to your current +shell. .IP .nf \f[C] @@ -5516,6 +5563,117 @@ not listed here. .IP \[bu] 2 rclone (https://rclone.org/commands/rclone/) - Show help for rclone commands, flags and backends. +.SH rclone gitannex +.PP +Speaks with git-annex over stdin/stdout. +.SS Synopsis +.PP +Rclone\[aq]s \f[C]gitannex\f[R] subcommand enables +git-annex (https://git-annex.branchable.com/) to store and retrieve +content from an rclone remote. +It is meant to be run by git-annex, not directly by users. +.SS Installation on Linux +.IP "1." 3 +Skip this step if your version of git-annex is +10.20240430 (https://git-annex.branchable.com/news/version_10.20240430/) +or newer. +Otherwise, you must create a symlink somewhere on your PATH with a +particular name. +This symlink helps git-annex tell rclone it wants to run the +\[dq]gitannex\[dq] subcommand. +.RS 4 +.IP +.nf +\f[C] +# Create the helper symlink in \[dq]$HOME/bin\[dq]. +ln -s \[dq]$(realpath rclone)\[dq] \[dq]$HOME/bin/git-annex-remote-rclone-builtin\[dq] + +# Verify the new symlink is on your PATH. +which git-annex-remote-rclone-builtin +\f[R] +.fi +.RE +.IP "2." 3 +Add a new remote to your git-annex repo. +This new remote will connect git-annex with the +\f[C]rclone gitannex\f[R] subcommand. +.RS 4 +.PP +Start by asking git-annex to describe the remote\[aq]s available +configuration parameters. +.IP +.nf +\f[C] +# If you skipped step 1: +git annex initremote MyRemote type=rclone --whatelse + +# If you created a symlink in step 1: +git annex initremote MyRemote type=external externaltype=rclone-builtin --whatelse +\f[R] +.fi +.RS +.PP +\f[B]NOTE\f[R]: If you\[aq]re porting an existing +git-annex-remote-rclone (https://github.com/git-annex-remote-rclone/git-annex-remote-rclone) +remote to use \f[C]rclone gitannex\f[R], you can probably reuse the +configuration parameters verbatim without renaming them. +Check parameter synonyms with \f[C]--whatelse\f[R] as shown above. +.RE +.PP +The following example creates a new git-annex remote named +\[dq]MyRemote\[dq] that will use the rclone remote named +\[dq]SomeRcloneRemote\[dq]. +That rclone remote must be one configured in your rclone.conf file, +which can be located with \f[C]rclone config file\f[R]. +.IP +.nf +\f[C] +git annex initremote MyRemote \[rs] + type=external \[rs] + externaltype=rclone-builtin \[rs] + encryption=none \[rs] + rcloneremotename=SomeRcloneRemote \[rs] + rcloneprefix=git-annex-content \[rs] + rclonelayout=nodir +\f[R] +.fi +.RE +.IP "3." 3 +Before you trust this command with your precious data, be sure to +\f[B]test the remote\f[R]. +This command is very new and has not been tested on many rclone +backends. +Caveat emptor! +.RS 4 +.IP +.nf +\f[C] +git annex testremote MyRemote +\f[R] +.fi +.RE +.PP +Happy annexing! +.IP +.nf +\f[C] +rclone gitannex [flags] +\f[R] +.fi +.SS Options +.IP +.nf +\f[C] + -h, --help help for gitannex +\f[R] +.fi +.PP +See the global flags page (https://rclone.org/flags/) for global options +not listed here. +.SH SEE ALSO +.IP \[bu] 2 +rclone (https://rclone.org/commands/rclone/) - Show help for rclone +commands, flags and backends. .SH rclone hashsum .PP Produces a hashsum file for all the objects in the path. @@ -5998,8 +6156,8 @@ The output is an array of Items, where each Item looks like this \f[R] .fi .PP -If \f[C]--hash\f[R] is not specified the Hashes property won\[aq]t be -emitted. +If \f[C]--hash\f[R] is not specified, the Hashes property will be +omitted. The types of hash can be specified with the \f[C]--hash-type\f[R] parameter (which may be repeated). If \f[C]--hash-type\f[R] is set then it implies \f[C]--hash\f[R]. @@ -6014,8 +6172,7 @@ This can speed things up on remotes where reading the MimeType takes an extra request (e.g. s3, swift). .PP -If \f[C]--encrypted\f[R] is not specified the Encrypted won\[aq]t be -emitted. +If \f[C]--encrypted\f[R] is not specified the Encrypted will be omitted. .PP If \f[C]--dirs-only\f[R] is not specified files in addition to directories are returned @@ -6163,7 +6320,7 @@ commands, flags and backends. Mount the remote as file system on a mountpoint. .SS Synopsis .PP -rclone mount allows Linux, FreeBSD, macOS and Windows to mount any of +Rclone mount allows Linux, FreeBSD, macOS and Windows to mount any of Rclone\[aq]s cloud storage systems as a file system with FUSE. .PP First set up your remote using \f[C]rclone config\f[R]. @@ -6755,7 +6912,7 @@ This allows to hide secrets from such commands as \f[C]ps\f[R] or standard mount options like \f[C]x-systemd.automount\f[R], \f[C]_netdev\f[R], \f[C]nosuid\f[R] and alike are intended only for Automountd and ignored by rclone. -## VFS - Virtual File System +.SS VFS - Virtual File System .PP This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something @@ -7213,6 +7370,7 @@ rclone mount remote:path /path/to/mountpoint [flags] --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) @@ -7483,7 +7641,8 @@ The supported keys are: \[ha]L refresh screen (fix screen corruption) r recalculate file sizes ? to toggle help on and off - q/ESC/\[ha]c to quit + ESC to close the menu box + q/\[ha]c to quit \f[R] .fi .PP @@ -7583,7 +7742,7 @@ commands, flags and backends. Mount the remote as file system on a mountpoint. .SS Synopsis .PP -rclone nfsmount allows Linux, FreeBSD, macOS and Windows to mount any of +Rclone nfsmount allows Linux, FreeBSD, macOS and Windows to mount any of Rclone\[aq]s cloud storage systems as a file system with FUSE. .PP First set up your remote using \f[C]rclone config\f[R]. @@ -8176,7 +8335,7 @@ This allows to hide secrets from such commands as \f[C]ps\f[R] or standard mount options like \f[C]x-systemd.automount\f[R], \f[C]_netdev\f[R], \f[C]nosuid\f[R] and alike are intended only for Automountd and ignored by rclone. -## VFS - Virtual File System +.SS VFS - Virtual File System .PP This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something @@ -8635,6 +8794,7 @@ rclone nfsmount remote:path /path/to/mountpoint [flags] --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) @@ -9017,7 +9177,8 @@ concatenation of that with the CA certificate. \f[C]--rc-client-ca\f[R] should be the PEM encoded client certificate authority certificate. .PP ---rc-min-tls-version is minimum TLS version that is acceptable. +\f[C]--rc-min-tls-version\f[R] is minimum TLS version that is +acceptable. Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq] and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]). .SS Template @@ -9227,6 +9388,7 @@ Flags to control the Remote Control API. --rc-realm string Realm for authentication --rc-salt string Password hashing salt (default \[dq]dlPL2MqE\[dq]) --rc-serve Enable the serving of remote objects + --rc-serve-no-modtime Don\[aq]t read the modification time (can speed things up) --rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s) --rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s) --rc-template string User-specified template @@ -9487,7 +9649,7 @@ default \[dq]rclone (hostname)\[dq]. .PP Use \f[C]--log-trace\f[R] in conjunction with \f[C]-vv\f[R] to enable additional debug logging of all UPNP traffic. -## VFS - Virtual File System +.SS VFS - Virtual File System .PP This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something @@ -10059,7 +10221,7 @@ volumes. All mount and VFS options are submitted by the docker daemon via API, but you can also provide defaults on the command line as well as set path to the config file and cache directory or adjust logging verbosity. -## VFS - Virtual File System +.SS VFS - Virtual File System .PP This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something @@ -10518,6 +10680,7 @@ rclone serve docker [flags] --devname string Set the device name - default is remote:path --dir-cache-time Duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) + --direct-io Use Direct IO, disables caching of data --file-perms FileMode File permissions (default 0666) --forget-state Skip restoring previous state --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) @@ -10621,7 +10784,7 @@ By default this will serve files without needing a login. .PP You can set a single username and password with the --user and --pass flags. -## VFS - Virtual File System +.SS VFS - Virtual File System .PP This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something @@ -11302,7 +11465,7 @@ concatenation of that with the CA certificate. \f[C]--client-ca\f[R] should be the PEM encoded client certificate authority certificate. .PP ---min-tls-version is minimum TLS version that is acceptable. +\f[C]--min-tls-version\f[R] is minimum TLS version that is acceptable. Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq] and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]). .SS Template @@ -11473,7 +11636,7 @@ Use \f[C]--realm\f[R] to set the authentication realm. .PP Use \f[C]--salt\f[R] to change the password hashing salt from the default. -## VFS - Virtual File System +.SS VFS - Virtual File System .PP This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something @@ -12815,7 +12978,7 @@ concatenation of that with the CA certificate. \f[C]--client-ca\f[R] should be the PEM encoded client certificate authority certificate. .PP ---min-tls-version is minimum TLS version that is acceptable. +\f[C]--min-tls-version\f[R] is minimum TLS version that is acceptable. Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq] and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]). .SS Authentication @@ -12941,8 +13104,33 @@ rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY remote:path \f[R] .fi .PP -This will be compatible with an rclone remote which is defined like -this: +For example, to use a simple folder in the filesystem, run the server +with a command like this: +.IP +.nf +\f[C] +rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY local:/path/to/folder +\f[R] +.fi +.PP +The \f[C]rclone.conf\f[R] for the server could look like this: +.IP +.nf +\f[C] +[local] +type = local +\f[R] +.fi +.PP +The \f[C]local\f[R] configuration is optional though. +If you run the server with a \f[C]remote:path\f[R] like +\f[C]/path/to/folder\f[R] (without the \f[C]local:\f[R] prefix and +without an \f[C]rclone.conf\f[R] file), rclone will fall back to a +default configuration, which will be visible as a warning in the logs. +But it will run nonetheless. +.PP +This will be compatible with an rclone (client) remote configuration +which is defined like this: .IP .nf \f[C] @@ -13089,10 +13277,10 @@ concatenation of that with the CA certificate. \f[C]--client-ca\f[R] should be the PEM encoded client certificate authority certificate. .PP ---min-tls-version is minimum TLS version that is acceptable. +\f[C]--min-tls-version\f[R] is minimum TLS version that is acceptable. Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq] and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]). -## VFS - Virtual File System +.SS VFS - Virtual File System .PP This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something @@ -14399,7 +14587,7 @@ concatenation of that with the CA certificate. \f[C]--client-ca\f[R] should be the PEM encoded client certificate authority certificate. .PP ---min-tls-version is minimum TLS version that is acceptable. +\f[C]--min-tls-version\f[R] is minimum TLS version that is acceptable. Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq] and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]). .SS Template @@ -14570,7 +14758,7 @@ Use \f[C]--realm\f[R] to set the authentication realm. .PP Use \f[C]--salt\f[R] to change the password hashing salt from the default. -## VFS - Virtual File System +.SS VFS - Virtual File System .PP This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something @@ -15394,6 +15582,7 @@ rclone test info [remote:path]+ [flags] --check-normalization Check UTF-8 Normalization --check-streaming Check uploads with indeterminate file size -h, --help help for info + --keep-test-files Keep test files after execution --upload-wait Duration Wait after writing a file (default 0s) --write-json string Write results to file \f[R] @@ -17953,6 +18142,10 @@ with the \f[C]--stats\f[R] flag. This can be used with the \f[C]--stats-one-line\f[R] flag for a simpler display. .PP +To change the display length of filenames (for different terminal +widths), see the \f[C]--stats-file-name-length\f[R] option. +The default output is formatted for 80 character wide terminals. +.PP Note: On Windows until this bug (https://github.com/Azure/go-ansiterm/issues/26) is fixed all non-ASCII characters will be replaced with \f[C].\f[R] when @@ -18882,7 +19075,8 @@ account suspended) (Fatal errors) .IP \[bu] 2 \f[C]8\f[R] - Transfer exceeded - limit set by --max-transfer reached .IP \[bu] 2 -\f[C]9\f[R] - Operation successful, but no files transferred +\f[C]9\f[R] - Operation successful, but no files transferred (Requires +\f[C]--error-on-no-transfer\f[R]) .IP \[bu] 2 \f[C]10\f[R] - Duration exceeded - limit set by --max-duration reached .SS Environment Variables @@ -19807,7 +20001,7 @@ E.g. listing. .PP E.g. -\f[C]rclone size remote: \[dq]--exclude /dir/**\[dq]\f[R] returns the +\f[C]rclone size remote: --exclude \[dq]/dir/**\[dq]\f[R] returns the total size of all files on \f[C]remote:\f[R] excluding those in root directory \f[C]dir\f[R] and sub directories. .PP @@ -20578,6 +20772,12 @@ Objects may be requested from remotes using this syntax http://127.0.0.1:5572/[remote:path]/path/to/object .PP Default Off. +.SS --rc-serve-no-modtime +.PP +Set this flag to skip reading the modification time (can speed things +up). +.PP +Default Off. .SS --rc-files /path/to/directory .PP Path to local files to serve on the HTTP server. @@ -23826,6 +24026,21 @@ T}@T{ - T} T{ +Uloz.to +T}@T{ +MD5, SHA256 \[S1]\[S3] +T}@T{ +- +T}@T{ +No +T}@T{ +Yes +T}@T{ +- +T}@T{ +- +T} +T{ Uptobox T}@T{ - @@ -23944,6 +24159,10 @@ set to a non-zero value for full modtime support. hash (https://static.hidrive.com/dev/0001). It combines SHA1 sums for each 4 KiB block hierarchically to a single top-level sum. +.PP +\[S1]\[S3] Uloz.to provides server-calculated MD5 hash upon file upload. +MD5 and SHA256 hashes are client-calculated and stored as metadata +fields. .SS Hash .PP The cloud storage system supports various hash types of the objects. @@ -25908,6 +26127,31 @@ T}@T{ No T} T{ +Uloz.to +T}@T{ +No +T}@T{ +No +T}@T{ +Yes +T}@T{ +Yes +T}@T{ +No +T}@T{ +No +T}@T{ +No +T}@T{ +No +T}@T{ +No +T}@T{ +No +T}@T{ +Yes +T} +T{ Uptobox T}@T{ No @@ -26242,7 +26486,7 @@ General networking and HTTP stuff. --tpslimit float Limit HTTP transactions per second to this --tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --use-cookies Enable session cookiejar - --user-agent string Set the user-agent to a specified string (default \[dq]rclone/v1.66.0\[dq]) + --user-agent string Set the user-agent to a specified string (default \[dq]rclone/v1.67.0\[dq]) \f[R] .fi .SS Performance @@ -26409,6 +26653,7 @@ Flags to control the Remote Control API. --rc-realm string Realm for authentication --rc-salt string Password hashing salt (default \[dq]dlPL2MqE\[dq]) --rc-serve Enable the serving of remote objects + --rc-serve-no-modtime Don\[aq]t read the modification time (can speed things up) --rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s) --rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s) --rc-template string User-specified template @@ -26628,6 +26873,7 @@ These can be set in the config file also. --dropbox-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot) --dropbox-impersonate string Impersonate this user when using a business account --dropbox-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) + --dropbox-root-namespace string Specify a different Dropbox namespace ID to use as the root for all paths --dropbox-shared-files Instructs rclone to work on individual shared files --dropbox-shared-folders Instructs rclone to work on shared folders --dropbox-token string OAuth Access Token as a JSON blob @@ -26733,6 +26979,7 @@ These can be set in the config file also. --hidrive-upload-cutoff SizeSuffix Cutoff/Threshold for chunked uploads (default 96Mi) --http-description string Description of the remote --http-headers CommaSepList Set HTTP headers for all transactions + --http-no-escape Do not escape URL metacharacters in path names --http-no-head Don\[aq]t use HEAD requests --http-no-slash Set this if the site doesn\[aq]t end directories with / --http-url string URL of HTTP host to connect to @@ -26768,7 +27015,7 @@ These can be set in the config file also. --koofr-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) --koofr-endpoint string The Koofr API endpoint to use --koofr-mountid string Mount ID of the mount to use - --koofr-password string Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password) (obscured) + --koofr-password string Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password (obscured) --koofr-provider string Choose your storage provider --koofr-setmtime Does the backend support setting modification time (default true) --koofr-user string Your user name @@ -26784,6 +27031,7 @@ These can be set in the config file also. --local-no-set-modtime Disable setting modtime --local-no-sparse Disable sparse files for multi-thread downloads --local-nounc Disable UNC (long path names) conversion on Windows + --local-time-type mtime|atime|btime|ctime Set what kind of time is returned (default mtime) --local-unicode-normalization Apply unicode NFC normalization to paths and filenames --local-zero-size-links Assume the Stat size of links is zero (and read them instead) (deprecated) --mailru-auth-url string Auth server URL @@ -26826,6 +27074,7 @@ These can be set in the config file also. --onedrive-drive-type string The type of the drive (personal | business | documentLibrary) --onedrive-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot) --onedrive-expose-onenote-files Set to make OneNote files show up in directory listings + --onedrive-hard-delete Permanently delete files on removal --onedrive-hash-type string Specify the hash in use for the backend (default \[dq]auto\[dq]) --onedrive-link-password string Set the password for links created by the link command --onedrive-link-scope string Set the scope of the links created by the link command (default \[dq]anonymous\[dq]) @@ -26880,6 +27129,7 @@ These can be set in the config file also. --pcloud-token-url string Token server url --pcloud-username string Your pcloud username --pikpak-auth-url string Auth server URL + --pikpak-chunk-size SizeSuffix Chunk size for multipart uploads (default 5Mi) --pikpak-client-id string OAuth Client Id --pikpak-client-secret string OAuth Client Secret --pikpak-description string Description of the remote @@ -26890,6 +27140,7 @@ These can be set in the config file also. --pikpak-token string OAuth Access Token as a JSON blob --pikpak-token-url string Token server url --pikpak-trashed-only Only show files that are in the trash + --pikpak-upload-concurrency int Concurrency for multipart uploads (default 5) --pikpak-use-trash Send files to the trash instead of deleting permanently (default true) --pikpak-user string Pikpak username --premiumizeme-auth-url string Auth server URL @@ -27003,6 +27254,7 @@ These can be set in the config file also. --sftp-chunk-size SizeSuffix Upload and download chunk size (default 32Ki) --sftp-ciphers SpaceSepList Space separated list of ciphers to be used for session encryption, ordered by preference --sftp-concurrency int The maximum number of outstanding requests for one file (default 64) + --sftp-connections int Maximum number of SFTP simultaneous connections, 0 for unlimited --sftp-copy-is-hardlink Set to enable server side copies using hardlinks --sftp-description string Description of the remote --sftp-disable-concurrent-reads If set don\[aq]t use concurrent reads @@ -27087,7 +27339,7 @@ These can be set in the config file also. --swift-auth string Authentication URL for server (OS_AUTH_URL) --swift-auth-token string Auth Token from alternate authentication - optional (OS_AUTH_TOKEN) --swift-auth-version int AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION) - --swift-chunk-size SizeSuffix Above this size files will be chunked into a _segments container (default 5Gi) + --swift-chunk-size SizeSuffix Above this size files will be chunked (default 5Gi) --swift-description string Description of the remote --swift-domain string User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) --swift-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8) @@ -27103,8 +27355,16 @@ These can be set in the config file also. --swift-tenant string Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME) --swift-tenant-domain string Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME) --swift-tenant-id string Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID) + --swift-use-segments-container Tristate Choose destination for large object segments (default unset) --swift-user string User name to log in (OS_USERNAME) --swift-user-id string User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID) + --ulozto-app-token string The application token identifying the app. An app API key can be either found in the API + --ulozto-description string Description of the remote + --ulozto-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot) + --ulozto-list-page-size int The size of a single page for list commands. 1-500 (default 500) + --ulozto-password string The password for the user (obscured) + --ulozto-root-folder-slug string If set, rclone will use this folder as the root folder for all operations. For example, + --ulozto-username string The username of the principal to operate as --union-action-policy string Policy to choose upstream on ACTION category (default \[dq]epall\[dq]) --union-cache-time int Cache time of usage and free space (in seconds) (default 120) --union-create-policy string Policy to choose upstream on CREATE category (default \[dq]epmfs\[dq]) @@ -27122,6 +27382,7 @@ These can be set in the config file also. --webdav-encoding string The encoding for the backend --webdav-headers CommaSepList Set HTTP headers for all transactions --webdav-nextcloud-chunk-size SizeSuffix Nextcloud upload chunk size (default 10Mi) + --webdav-owncloud-exclude-mounts Exclude ownCloud mounted storages --webdav-owncloud-exclude-shares Exclude ownCloud shares --webdav-pacer-min-sleep Duration Minimum time to sleep between API calls (default 10ms) --webdav-pass string Password (obscured) @@ -30844,7 +31105,7 @@ Default: Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot .SS --fichier-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -31006,7 +31267,7 @@ Here are the Advanced options specific to alias (Alias for an existing remote). .SS --alias-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -31053,6 +31314,8 @@ Liara Object Storage .IP \[bu] 2 Linode Object Storage .IP \[bu] 2 +Magalu Object Storage +.IP \[bu] 2 Minio .IP \[bu] 2 Petabox @@ -31883,9 +32146,9 @@ all the files to be uploaded as multipart. Here are the Standard options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, -IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, -RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, -TencentCOS, Wasabi, Qiniu and others). +IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, +Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, +Synology, TencentCOS, Wasabi, Qiniu and others). .SS --s3-provider .PP Choose your S3 provider. @@ -32005,6 +32268,12 @@ Liara Object Storage Linode Object Storage .RE .IP \[bu] 2 +\[dq]Magalu\[dq] +.RS 2 +.IP \[bu] 2 +Magalu Object Storage +.RE +.IP \[bu] 2 \[dq]Minio\[dq] .RS 2 .IP \[bu] 2 @@ -32324,6 +32593,14 @@ South America (Sao Paulo) Region. Needs location constraint sa-east-1. .RE .IP \[bu] 2 +\[dq]il-central-1\[dq] +.RS 2 +.IP \[bu] 2 +Israel (Tel Aviv) Region. +.IP \[bu] 2 +Needs location constraint il-central-1. +.RE +.IP \[bu] 2 \[dq]me-south-1\[dq] .RS 2 .IP \[bu] 2 @@ -32524,6 +32801,12 @@ Asia Pacific (Hong Kong) Region South America (Sao Paulo) Region .RE .IP \[bu] 2 +\[dq]il-central-1\[dq] +.RS 2 +.IP \[bu] 2 +Israel (Tel Aviv) Region +.RE +.IP \[bu] 2 \[dq]me-south-1\[dq] .RS 2 .IP \[bu] 2 @@ -32845,9 +33128,9 @@ Glacier Instant Retrieval storage class Here are the Advanced options specific to s3 (Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, -IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, -RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, -TencentCOS, Wasabi, Qiniu and others). +IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, +Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, +Synology, TencentCOS, Wasabi, Qiniu and others). .SS --s3-bucket-acl .PP Canned ACL used when creating buckets. @@ -33840,7 +34123,7 @@ Type: Tristate Default: unset .SS --s3-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -34421,7 +34704,7 @@ Option Storage. Type of storage to configure. Choose a number from below, or type in your own value. \&... -XX / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi +XX / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Lyve Cloud, Minio, Magalu, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi \[rs] (s3) \&... Storage> s3 @@ -34495,6 +34778,10 @@ acl = private .PP Now run \f[C]rclone lsf r2:\f[R] to see your buckets and \f[C]rclone lsf r2:bucket\f[R] to look within a bucket. +.PP +For R2 tokens with the \[dq]Object Read & Write\[dq] permission, you may +also need to add \f[C]no_check_bucket = true\f[R] for object uploads to +work correctly. .SS Dreamhost .PP Dreamhost DreamObjects (https://www.dreamhost.com/cloud/storage/) is an @@ -35681,10 +35968,11 @@ endpoint = s3.nl-ams.scw.cloud access_key_id = SCWXXXXXXXXXXXXXX secret_access_key = 1111111-2222-3333-44444-55555555555555 region = nl-ams -location_constraint = +location_constraint = nl-ams acl = private -server_side_encryption = -storage_class = +upload_cutoff = 5M +chunk_size = 5M +copy_cutoff = 5M \f[R] .fi .PP @@ -36797,6 +37085,131 @@ secret_access_key = SECRET_ACCESS_KEY endpoint = eu-central-1.linodeobjects.com \f[R] .fi +.SS Magalu +.PP +Here is an example of making a Magalu Object +Storage (https://magalu.cloud/object-storage/) configuration. +First run: +.IP +.nf +\f[C] +rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process. +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n + +Enter name for new remote. +name> magalu + +Option Storage. +Type of storage to configure. +Choose a number from below, or type in your own value. +[snip] +XX / Amazon S3 Compliant Storage Providers including AWS, ...Magalu, ...and others + \[rs] (s3) +[snip] +Storage> s3 + +Option provider. +Choose your S3 provider. +Choose a number from below, or type in your own value. +Press Enter to leave empty. +[snip] +XX / Magalu Object Storage + \[rs] (Magalu) +[snip] +provider> Magalu + +Option env_auth. +Get AWS credentials from runtime (environment variables or EC2/ECS meta data if no env vars). +Only applies if access_key_id and secret_access_key is blank. +Choose a number from below, or type in your own boolean value (true or false). +Press Enter for the default (false). + 1 / Enter AWS credentials in the next step. + \[rs] (false) + 2 / Get AWS credentials from the environment (env vars or IAM). + \[rs] (true) +env_auth> 1 + +Option access_key_id. +AWS Access Key ID. +Leave blank for anonymous access or runtime credentials. +Enter a value. Press Enter to leave empty. +access_key_id> ACCESS_KEY + +Option secret_access_key. +AWS Secret Access Key (password). +Leave blank for anonymous access or runtime credentials. +Enter a value. Press Enter to leave empty. +secret_access_key> SECRET_ACCESS_KEY + +Option endpoint. +Endpoint for Magalu Object Storage API. +Choose a number from below, or type in your own value. +Press Enter to leave empty. + 1 / S\[~a]o Paulo, SP (BR), br-se1 + \[rs] (br-se1.magaluobjects.com) + 2 / Fortaleza, CE (BR), br-ne1 + \[rs] (br-ne1.magaluobjects.com) +endpoint> 2 + +Option acl. +Canned ACL used when creating buckets and storing or copying objects. +This ACL is used for creating objects and if bucket_acl isn\[aq]t set, for creating buckets too. +For more info visit https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl +Note that this ACL is applied when server-side copying objects as S3 +doesn\[aq]t copy the ACL from the source but rather writes a fresh one. +If the acl is an empty string then no X-Amz-Acl: header is added and +the default (private) will be used. +Choose a number from below, or type in your own value. +Press Enter to leave empty. + / Owner gets FULL_CONTROL. + 1 | No one else has access rights (default). + \[rs] (private) +[snip] +acl> + +Edit advanced config? +y) Yes +n) No (default) +y/n> n + +Configuration complete. +Options: +- type: s3 +- provider: magalu +- access_key_id: ACCESS_KEY +- secret_access_key: SECRET_ACCESS_KEY +- endpoint: br-ne1.magaluobjects.com +Keep this \[dq]magalu\[dq] remote? +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +This will leave the config file looking like this. +.IP +.nf +\f[C] +[magalu] +type = s3 +provider = Magalu +access_key_id = ACCESS_KEY +secret_access_key = SECRET_ACCESS_KEY +endpoint = br-ne1.magaluobjects.com +\f[R] +.fi .SS ArvanCloud .PP ArvanCloud (https://www.arvancloud.com/en/products/cloud-storage) @@ -37497,4327 +37910,5787 @@ e) Edit this remote d) Delete this remote y/e/d> y - -# Backblaze B2 - -B2 is [Backblaze\[aq]s cloud storage system](https://www.backblaze.com/b2/). - -Paths are specified as \[ga]remote:bucket\[ga] (or \[ga]remote:\[ga] for the \[ga]lsd\[ga] -command.) You may put subdirectories in too, e.g. \[ga]remote:bucket/path/to/dir\[ga]. - -## Configuration - -Here is an example of making a b2 configuration. First run - - rclone config - -This will guide you through an interactive setup process. To authenticate -you will either need your Account ID (a short hex number) and Master -Application Key (a long hex number) OR an Application Key, which is the -recommended method. See below for further details on generating and using -an Application Key. \f[R] .fi +.SH Backblaze B2 .PP -No remotes found, make a new one? -n) New remote q) Quit config n/q> n name> remote Type of storage to -configure. -Choose a number from below, or type in your own value [snip] XX / -Backblaze B2 \ \[dq]b2\[dq] [snip] Storage> b2 Account ID or Application -Key ID account> 123456789abc Application Key key> -0123456789abcdef0123456789abcdef0123456789 Endpoint for the service - -leave blank normally. -endpoint> Remote config -------------------- [remote] account = -123456789abc key = 0123456789abcdef0123456789abcdef0123456789 endpoint = --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y +B2 is Backblaze\[aq]s cloud storage +system (https://www.backblaze.com/cloud-storage). +.PP +Paths are specified as \f[C]remote:bucket\f[R] (or \f[C]remote:\f[R] for +the \f[C]lsd\f[R] command.) You may put subdirectories in too, e.g. +\f[C]remote:bucket/path/to/dir\f[R]. +.SS Configuration +.PP +Here is an example of making a b2 configuration. +First run .IP .nf \f[C] -This remote is called \[ga]remote\[ga] and can now be used like this - +rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process. +To authenticate you will either need your Account ID (a short hex +number) and Master Application Key (a long hex number) OR an Application +Key, which is the recommended method. +See below for further details on generating and using an Application +Key. +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +q) Quit config +n/q> n +name> remote +Type of storage to configure. +Choose a number from below, or type in your own value +[snip] +XX / Backblaze B2 + \[rs] \[dq]b2\[dq] +[snip] +Storage> b2 +Account ID or Application Key ID +account> 123456789abc +Application Key +key> 0123456789abcdef0123456789abcdef0123456789 +Endpoint for the service - leave blank normally. +endpoint> +Remote config +-------------------- +[remote] +account = 123456789abc +key = 0123456789abcdef0123456789abcdef0123456789 +endpoint = +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +This remote is called \f[C]remote\f[R] and can now be used like this +.PP See all buckets - - rclone lsd remote: - +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP Create a new bucket - - rclone mkdir remote:bucket - +.IP +.nf +\f[C] +rclone mkdir remote:bucket +\f[R] +.fi +.PP List the contents of a bucket - - rclone ls remote:bucket - -Sync \[ga]/home/local/directory\[ga] to the remote bucket, deleting any +.IP +.nf +\f[C] +rclone ls remote:bucket +\f[R] +.fi +.PP +Sync \f[C]/home/local/directory\f[R] to the remote bucket, deleting any excess files in the bucket. - - rclone sync --interactive /home/local/directory remote:bucket - -### Application Keys - -B2 supports multiple [Application Keys for different access permission -to B2 Buckets](https://www.backblaze.com/b2/docs/application_keys.html). - -You can use these with rclone too; you will need to use rclone version 1.43 -or later. - -Follow Backblaze\[aq]s docs to create an Application Key with the required -permission and add the \[ga]applicationKeyId\[ga] as the \[ga]account\[ga] and the -\[ga]Application Key\[ga] itself as the \[ga]key\[ga]. - -Note that you must put the _applicationKeyId_ as the \[ga]account\[ga] \[en] you -can\[aq]t use the master Account ID. If you try then B2 will return 401 -errors. - -### --fast-list - -This remote supports \[ga]--fast-list\[ga] which allows you to use fewer -transactions in exchange for more memory. See the [rclone -docs](https://rclone.org/docs/#fast-list) for more details. - -### Modification times - +.IP +.nf +\f[C] +rclone sync --interactive /home/local/directory remote:bucket +\f[R] +.fi +.SS Application Keys +.PP +B2 supports multiple Application Keys for different access permission to +B2 +Buckets (https://www.backblaze.com/docs/cloud-storage-application-keys). +.PP +You can use these with rclone too; you will need to use rclone version +1.43 or later. +.PP +Follow Backblaze\[aq]s docs to create an Application Key with the +required permission and add the \f[C]applicationKeyId\f[R] as the +\f[C]account\f[R] and the \f[C]Application Key\f[R] itself as the +\f[C]key\f[R]. +.PP +Note that you must put the \f[I]applicationKeyId\f[R] as the +\f[C]account\f[R] \[en] you can\[aq]t use the master Account ID. +If you try then B2 will return 401 errors. +.SS --fast-list +.PP +This remote supports \f[C]--fast-list\f[R] which allows you to use fewer +transactions in exchange for more memory. +See the rclone docs (https://rclone.org/docs/#fast-list) for more +details. +.SS Modification times +.PP The modification time is stored as metadata on the object as -\[ga]X-Bz-Info-src_last_modified_millis\[ga] as milliseconds since 1970-01-01 -in the Backblaze standard. Other tools should be able to use this as -a modified time. - -Modified times are used in syncing and are fully supported. Note that -if a modification time needs to be updated on an object then it will -create a new version of the object. - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| \[rs] | 0x5C | \[uFF3C] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -Note that in 2020-05 Backblaze started allowing \[rs] characters in file -names. Rclone hasn\[aq]t changed its encoding as this could cause syncs to -re-transfer files. If you want rclone not to replace \[rs] then see the -\[ga]--b2-encoding\[ga] flag below and remove the \[ga]BackSlash\[ga] from the -string. This can be set in the config. - -### SHA1 checksums - +\f[C]X-Bz-Info-src_last_modified_millis\f[R] as milliseconds since +1970-01-01 in the Backblaze standard. +Other tools should be able to use this as a modified time. +.PP +Modified times are used in syncing and are fully supported. +Note that if a modification time needs to be updated on an object then +it will create a new version of the object. +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.PP +Note that in 2020-05 Backblaze started allowing \ characters in file +names. +Rclone hasn\[aq]t changed its encoding as this could cause syncs to +re-transfer files. +If you want rclone not to replace \ then see the \f[C]--b2-encoding\f[R] +flag below and remove the \f[C]BackSlash\f[R] from the string. +This can be set in the config. +.SS SHA1 checksums +.PP The SHA1 checksums of the files are checked on upload and download and will be used in the syncing process. - -Large files (bigger than the limit in \[ga]--b2-upload-cutoff\[ga]) which are -uploaded in chunks will store their SHA1 on the object as -\[ga]X-Bz-Info-large_file_sha1\[ga] as recommended by Backblaze. - -For a large file to be uploaded with an SHA1 checksum, the source -needs to support SHA1 checksums. The local disk supports SHA1 -checksums so large file transfers from local disk will have an SHA1. -See [the overview](https://rclone.org/overview/#features) for exactly which remotes -support SHA1. - -Sources which don\[aq]t support SHA1, in particular \[ga]crypt\[ga] will upload -large files without SHA1 checksums. This may be fixed in the future -(see [#1767](https://github.com/rclone/rclone/issues/1767)). - -Files sizes below \[ga]--b2-upload-cutoff\[ga] will always have an SHA1 +.PP +Large files (bigger than the limit in \f[C]--b2-upload-cutoff\f[R]) +which are uploaded in chunks will store their SHA1 on the object as +\f[C]X-Bz-Info-large_file_sha1\f[R] as recommended by Backblaze. +.PP +For a large file to be uploaded with an SHA1 checksum, the source needs +to support SHA1 checksums. +The local disk supports SHA1 checksums so large file transfers from +local disk will have an SHA1. +See the overview (https://rclone.org/overview/#features) for exactly +which remotes support SHA1. +.PP +Sources which don\[aq]t support SHA1, in particular \f[C]crypt\f[R] will +upload large files without SHA1 checksums. +This may be fixed in the future (see +#1767 (https://github.com/rclone/rclone/issues/1767)). +.PP +Files sizes below \f[C]--b2-upload-cutoff\f[R] will always have an SHA1 regardless of the source. - -### Transfers - +.SS Transfers +.PP Backblaze recommends that you do lots of transfers simultaneously for -maximum speed. In tests from my SSD equipped laptop the optimum -setting is about \[ga]--transfers 32\[ga] though higher numbers may be used -for a slight speed improvement. The optimum number for you may vary -depending on your hardware, how big the files are, how much you want -to load your computer, etc. The default of \[ga]--transfers 4\[ga] is -definitely too low for Backblaze B2 though. - +maximum speed. +In tests from my SSD equipped laptop the optimum setting is about +\f[C]--transfers 32\f[R] though higher numbers may be used for a slight +speed improvement. +The optimum number for you may vary depending on your hardware, how big +the files are, how much you want to load your computer, etc. +The default of \f[C]--transfers 4\f[R] is definitely too low for +Backblaze B2 though. +.PP Note that uploading big files (bigger than 200 MiB by default) will use -a 96 MiB RAM buffer by default. There can be at most \[ga]--transfers\[ga] of -these in use at any moment, so this sets the upper limit on the memory -used. - -### Versions - -When rclone uploads a new version of a file it creates a [new version -of it](https://www.backblaze.com/b2/docs/file_versions.html). +a 96 MiB RAM buffer by default. +There can be at most \f[C]--transfers\f[R] of these in use at any +moment, so this sets the upper limit on the memory used. +.SS Versions +.PP +When rclone uploads a new version of a file it creates a new version of +it (https://www.backblaze.com/docs/cloud-storage-file-versions). Likewise when you delete a file, the old version will be marked hidden -and still be available. Conversely, you may opt in to a \[dq]hard delete\[dq] -of files with the \[ga]--b2-hard-delete\[ga] flag which would permanently remove -the file instead of hiding it. - -Old versions of files, where available, are visible using the -\[ga]--b2-versions\[ga] flag. - -It is also possible to view a bucket as it was at a certain point in time, -using the \[ga]--b2-version-at\[ga] flag. This will show the file versions as they -were at that time, showing files that have been deleted afterwards, and -hiding files that were created since. - -If you wish to remove all the old versions then you can use the -\[ga]rclone cleanup remote:bucket\[ga] command which will delete all the old -versions of files, leaving the current ones intact. You can also -supply a path and only old versions under that path will be deleted, -e.g. \[ga]rclone cleanup remote:bucket/path/to/stuff\[ga]. - -Note that \[ga]cleanup\[ga] will remove partially uploaded files from the bucket -if they are more than a day old. - -When you \[ga]purge\[ga] a bucket, the current and the old versions will be -deleted then the bucket will be deleted. - -However \[ga]delete\[ga] will cause the current versions of the files to +and still be available. +Conversely, you may opt in to a \[dq]hard delete\[dq] of files with the +\f[C]--b2-hard-delete\f[R] flag which would permanently remove the file +instead of hiding it. +.PP +Old versions of files, where available, are visible using the +\f[C]--b2-versions\f[R] flag. +.PP +It is also possible to view a bucket as it was at a certain point in +time, using the \f[C]--b2-version-at\f[R] flag. +This will show the file versions as they were at that time, showing +files that have been deleted afterwards, and hiding files that were +created since. +.PP +If you wish to remove all the old versions, and unfinished large file +uploads, then you can use the \f[C]rclone cleanup remote:bucket\f[R] +command which will delete all the old versions of files, leaving the +current ones intact. +You can also supply a path and only old versions under that path will be +deleted, e.g. +\f[C]rclone cleanup remote:bucket/path/to/stuff\f[R]. +.PP +Note that \f[C]cleanup\f[R] will remove partially uploaded files from +the bucket if they are more than a day old. +If you want more control over the expiry date then run +\f[C]rclone backend cleanup b2:bucket -o max-age=1h\f[R] to remove all +unfinished large file uploads older than one hour, leaving old versions +intact. +.PP +If you wish to remove all the old versions, leaving current files and +unfinished large files intact, then you can use the +\f[C]rclone backend cleanup-hidden remote:bucket\f[R] command. +You can also supply a path and only old versions under that path will be +deleted, e.g. +\f[C]rclone backend cleanup-hidden remote:bucket/path/to/stuff\f[R]. +.PP +When you \f[C]purge\f[R] a bucket, the current and the old versions will +be deleted then the bucket will be deleted. +.PP +However \f[C]delete\f[R] will cause the current versions of the files to become hidden old versions. - -Here is a session showing the listing and retrieval of an old -version followed by a \[ga]cleanup\[ga] of the old versions. - -Show current version and all the versions with \[ga]--b2-versions\[ga] flag. -\f[R] -.fi .PP -$ rclone -q ls b2:cleanup-test 9 one.txt +Here is a session showing the listing and retrieval of an old version +followed by a \f[C]cleanup\f[R] of the old versions. .PP -$ rclone -q --b2-versions ls b2:cleanup-test 9 one.txt 8 -one-v2016-07-04-141032-000.txt 16 one-v2016-07-04-141003-000.txt 15 -one-v2016-07-02-155621-000.txt +Show current version and all the versions with \f[C]--b2-versions\f[R] +flag. .IP .nf \f[C] +$ rclone -q ls b2:cleanup-test + 9 one.txt + +$ rclone -q --b2-versions ls b2:cleanup-test + 9 one.txt + 8 one-v2016-07-04-141032-000.txt + 16 one-v2016-07-04-141003-000.txt + 15 one-v2016-07-02-155621-000.txt +\f[R] +.fi +.PP Retrieve an old version -\f[R] -.fi -.PP -$ rclone -q --b2-versions copy -b2:cleanup-test/one-v2016-07-04-141003-000.txt /tmp -.PP -$ ls -l /tmp/one-v2016-07-04-141003-000.txt -rw-rw-r-- 1 ncw ncw 16 Jul -2 17:46 /tmp/one-v2016-07-04-141003-000.txt .IP .nf \f[C] +$ rclone -q --b2-versions copy b2:cleanup-test/one-v2016-07-04-141003-000.txt /tmp + +$ ls -l /tmp/one-v2016-07-04-141003-000.txt +-rw-rw-r-- 1 ncw ncw 16 Jul 2 17:46 /tmp/one-v2016-07-04-141003-000.txt +\f[R] +.fi +.PP Clean up all the old versions and show that they\[aq]ve gone. -\f[R] -.fi -.PP +.IP +.nf +\f[C] $ rclone -q cleanup b2:cleanup-test -.PP -$ rclone -q ls b2:cleanup-test 9 one.txt -.PP -$ rclone -q --b2-versions ls b2:cleanup-test 9 one.txt -.IP -.nf -\f[C] -#### Versions naming caveat -When using \[ga]--b2-versions\[ga] flag rclone is relying on the file name -to work out whether the objects are versions or not. Versions\[aq] names -are created by inserting timestamp between file name and its extension. +$ rclone -q ls b2:cleanup-test + 9 one.txt + +$ rclone -q --b2-versions ls b2:cleanup-test + 9 one.txt \f[R] .fi +.SS Versions naming caveat +.PP +When using \f[C]--b2-versions\f[R] flag rclone is relying on the file +name to work out whether the objects are versions or not. +Versions\[aq] names are created by inserting timestamp between file name +and its extension. .IP .nf \f[C] - 9 file.txt - 8 file-v2023-07-17-161032-000.txt - 16 file-v2023-06-15-141003-000.txt + 9 file.txt + 8 file-v2023-07-17-161032-000.txt + 16 file-v2023-06-15-141003-000.txt \f[R] .fi -.IP -.nf -\f[C] +.PP If there are real files present with the same names as versions, then -behaviour of \[ga]--b2-versions\[ga] can be unpredictable. - -### Data usage - -It is useful to know how many requests are sent to the server in different scenarios. - -All copy commands send the following 4 requests: -\f[R] -.fi +behaviour of \f[C]--b2-versions\f[R] can be unpredictable. +.SS Data usage .PP -/b2api/v1/b2_authorize_account /b2api/v1/b2_create_bucket -/b2api/v1/b2_list_buckets /b2api/v1/b2_list_file_names +It is useful to know how many requests are sent to the server in +different scenarios. +.PP +All copy commands send the following 4 requests: .IP .nf \f[C] -The \[ga]b2_list_file_names\[ga] request will be sent once for every 1k files -in the remote path, providing the checksum and modification time of -the listed files. As of version 1.33 issue -[#818](https://github.com/rclone/rclone/issues/818) causes extra requests -to be sent when using B2 with Crypt. When a copy operation does not -require any files to be uploaded, no more requests will be sent. - +/b2api/v1/b2_authorize_account +/b2api/v1/b2_create_bucket +/b2api/v1/b2_list_buckets +/b2api/v1/b2_list_file_names +\f[R] +.fi +.PP +The \f[C]b2_list_file_names\f[R] request will be sent once for every 1k +files in the remote path, providing the checksum and modification time +of the listed files. +As of version 1.33 issue +#818 (https://github.com/rclone/rclone/issues/818) causes extra requests +to be sent when using B2 with Crypt. +When a copy operation does not require any files to be uploaded, no more +requests will be sent. +.PP Uploading files that do not require chunking, will send 2 requests per file upload: -\f[R] -.fi -.PP -/b2api/v1/b2_get_upload_url /b2api/v1/b2_upload_file/ .IP .nf \f[C] +/b2api/v1/b2_get_upload_url +/b2api/v1/b2_upload_file/ +\f[R] +.fi +.PP Uploading files requiring chunking, will send 2 requests (one each to start and finish the upload) and another 2 requests for each chunk: -\f[R] -.fi -.PP -/b2api/v1/b2_start_large_file /b2api/v1/b2_get_upload_part_url -/b2api/v1/b2_upload_part/ /b2api/v1/b2_finish_large_file .IP .nf \f[C] -#### Versions - -Versions can be viewed with the \[ga]--b2-versions\[ga] flag. When it is set -rclone will show and act on older versions of files. For example - -Listing without \[ga]--b2-versions\[ga] +/b2api/v1/b2_start_large_file +/b2api/v1/b2_get_upload_part_url +/b2api/v1/b2_upload_part/ +/b2api/v1/b2_finish_large_file \f[R] .fi +.SS Versions .PP -$ rclone -q ls b2:cleanup-test 9 one.txt +Versions can be viewed with the \f[C]--b2-versions\f[R] flag. +When it is set rclone will show and act on older versions of files. +For example +.PP +Listing without \f[C]--b2-versions\f[R] .IP .nf \f[C] +$ rclone -q ls b2:cleanup-test + 9 one.txt +\f[R] +.fi +.PP And with -\f[R] -.fi -.PP -$ rclone -q --b2-versions ls b2:cleanup-test 9 one.txt 8 -one-v2016-07-04-141032-000.txt 16 one-v2016-07-04-141003-000.txt 15 -one-v2016-07-02-155621-000.txt .IP .nf \f[C] -Showing that the current version is unchanged but older versions can -be seen. These have the UTC date that they were uploaded to the -server to the nearest millisecond appended to them. - -Note that when using \[ga]--b2-versions\[ga] no file write operations are -permitted, so you can\[aq]t upload files or delete them. - -### B2 and rclone link - +$ rclone -q --b2-versions ls b2:cleanup-test + 9 one.txt + 8 one-v2016-07-04-141032-000.txt + 16 one-v2016-07-04-141003-000.txt + 15 one-v2016-07-02-155621-000.txt +\f[R] +.fi +.PP +Showing that the current version is unchanged but older versions can be +seen. +These have the UTC date that they were uploaded to the server to the +nearest millisecond appended to them. +.PP +Note that when using \f[C]--b2-versions\f[R] no file write operations +are permitted, so you can\[aq]t upload files or delete them. +.SS B2 and rclone link +.PP Rclone supports generating file share links for private B2 buckets. They can either be for a file for example: -\f[R] -.fi -.PP +.IP +.nf +\f[C] \&./rclone link B2:bucket/path/to/file.txt https://f002.backblazeb2.com/file/bucket/path/to/file.txt?Authorization=xxxxxxxx -.IP -.nf -\f[C] -or if run on a directory you will get: \f[R] .fi .PP +or if run on a directory you will get: +.IP +.nf +\f[C] \&./rclone link B2:bucket/path https://f002.backblazeb2.com/file/bucket/path?Authorization=xxxxxxxx -.IP -.nf -\f[C] -you can then use the authorization token (the part of the url from the - \[ga]?Authorization=\[ga] on) on any file path under that directory. For example: \f[R] .fi .PP +you can then use the authorization token (the part of the url from the +\f[C]?Authorization=\f[R] on) on any file path under that directory. +For example: +.IP +.nf +\f[C] https://f002.backblazeb2.com/file/bucket/path/to/file1?Authorization=xxxxxxxx https://f002.backblazeb2.com/file/bucket/path/file2?Authorization=xxxxxxxx https://f002.backblazeb2.com/file/bucket/path/folder/file3?Authorization=xxxxxxxx -.IP -.nf -\f[C] - -### Standard options - +\f[R] +.fi +.SS Standard options +.PP Here are the Standard options specific to b2 (Backblaze B2). - -#### --b2-account - +.SS --b2-account +.PP Account ID or Application Key ID. - +.PP Properties: - -- Config: account -- Env Var: RCLONE_B2_ACCOUNT -- Type: string -- Required: true - -#### --b2-key - +.IP \[bu] 2 +Config: account +.IP \[bu] 2 +Env Var: RCLONE_B2_ACCOUNT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --b2-key +.PP Application Key. - +.PP Properties: - -- Config: key -- Env Var: RCLONE_B2_KEY -- Type: string -- Required: true - -#### --b2-hard-delete - +.IP \[bu] 2 +Config: key +.IP \[bu] 2 +Env Var: RCLONE_B2_KEY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --b2-hard-delete +.PP Permanently delete files on remote removal, otherwise hide files. - +.PP Properties: - -- Config: hard_delete -- Env Var: RCLONE_B2_HARD_DELETE -- Type: bool -- Default: false - -### Advanced options - +.IP \[bu] 2 +Config: hard_delete +.IP \[bu] 2 +Env Var: RCLONE_B2_HARD_DELETE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS Advanced options +.PP Here are the Advanced options specific to b2 (Backblaze B2). - -#### --b2-endpoint - +.SS --b2-endpoint +.PP Endpoint for the service. - +.PP Leave blank normally. - +.PP Properties: - -- Config: endpoint -- Env Var: RCLONE_B2_ENDPOINT -- Type: string -- Required: false - -#### --b2-test-mode - +.IP \[bu] 2 +Config: endpoint +.IP \[bu] 2 +Env Var: RCLONE_B2_ENDPOINT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --b2-test-mode +.PP A flag string for X-Bz-Test-Mode header for debugging. - -This is for debugging purposes only. Setting it to one of the strings -below will cause b2 to return specific errors: - - * \[dq]fail_some_uploads\[dq] - * \[dq]expire_some_account_authorization_tokens\[dq] - * \[dq]force_cap_exceeded\[dq] - -These will be set in the \[dq]X-Bz-Test-Mode\[dq] header which is documented -in the [b2 integrations checklist](https://www.backblaze.com/b2/docs/integration_checklist.html). - +.PP +This is for debugging purposes only. +Setting it to one of the strings below will cause b2 to return specific +errors: +.IP \[bu] 2 +\[dq]fail_some_uploads\[dq] +.IP \[bu] 2 +\[dq]expire_some_account_authorization_tokens\[dq] +.IP \[bu] 2 +\[dq]force_cap_exceeded\[dq] +.PP +These will be set in the \[dq]X-Bz-Test-Mode\[dq] header which is +documented in the b2 integrations +checklist (https://www.backblaze.com/docs/cloud-storage-integration-checklist). +.PP Properties: - -- Config: test_mode -- Env Var: RCLONE_B2_TEST_MODE -- Type: string -- Required: false - -#### --b2-versions - +.IP \[bu] 2 +Config: test_mode +.IP \[bu] 2 +Env Var: RCLONE_B2_TEST_MODE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --b2-versions +.PP Include old versions in directory listings. - -Note that when using this no file write operations are permitted, -so you can\[aq]t upload files or delete them. - +.PP +Note that when using this no file write operations are permitted, so you +can\[aq]t upload files or delete them. +.PP Properties: - -- Config: versions -- Env Var: RCLONE_B2_VERSIONS -- Type: bool -- Default: false - -#### --b2-version-at - +.IP \[bu] 2 +Config: versions +.IP \[bu] 2 +Env Var: RCLONE_B2_VERSIONS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --b2-version-at +.PP Show file versions as they were at the specified time. - -Note that when using this no file write operations are permitted, -so you can\[aq]t upload files or delete them. - +.PP +Note that when using this no file write operations are permitted, so you +can\[aq]t upload files or delete them. +.PP Properties: - -- Config: version_at -- Env Var: RCLONE_B2_VERSION_AT -- Type: Time -- Default: off - -#### --b2-upload-cutoff - +.IP \[bu] 2 +Config: version_at +.IP \[bu] 2 +Env Var: RCLONE_B2_VERSION_AT +.IP \[bu] 2 +Type: Time +.IP \[bu] 2 +Default: off +.SS --b2-upload-cutoff +.PP Cutoff for switching to chunked upload. - -Files above this size will be uploaded in chunks of \[dq]--b2-chunk-size\[dq]. - +.PP +Files above this size will be uploaded in chunks of +\[dq]--b2-chunk-size\[dq]. +.PP This value should be set no larger than 4.657 GiB (== 5 GB). - +.PP Properties: - -- Config: upload_cutoff -- Env Var: RCLONE_B2_UPLOAD_CUTOFF -- Type: SizeSuffix -- Default: 200Mi - -#### --b2-copy-cutoff - +.IP \[bu] 2 +Config: upload_cutoff +.IP \[bu] 2 +Env Var: RCLONE_B2_UPLOAD_CUTOFF +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 200Mi +.SS --b2-copy-cutoff +.PP Cutoff for switching to multipart copy. - +.PP Any files larger than this that need to be server-side copied will be copied in chunks of this size. - +.PP The minimum is 0 and the maximum is 4.6 GiB. - +.PP Properties: - -- Config: copy_cutoff -- Env Var: RCLONE_B2_COPY_CUTOFF -- Type: SizeSuffix -- Default: 4Gi - -#### --b2-chunk-size - +.IP \[bu] 2 +Config: copy_cutoff +.IP \[bu] 2 +Env Var: RCLONE_B2_COPY_CUTOFF +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 4Gi +.SS --b2-chunk-size +.PP Upload chunk size. - +.PP When uploading large files, chunk the file into this size. - -Must fit in memory. These chunks are buffered in memory and there -might a maximum of \[dq]--transfers\[dq] chunks in progress at once. - +.PP +Must fit in memory. +These chunks are buffered in memory and there might a maximum of +\[dq]--transfers\[dq] chunks in progress at once. +.PP 5,000,000 Bytes is the minimum size. - +.PP Properties: - -- Config: chunk_size -- Env Var: RCLONE_B2_CHUNK_SIZE -- Type: SizeSuffix -- Default: 96Mi - -#### --b2-upload-concurrency - +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_B2_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 96Mi +.SS --b2-upload-concurrency +.PP Concurrency for multipart uploads. - +.PP This is the number of chunks of the same file that are uploaded concurrently. - +.PP Note that chunks are stored in memory and there may be up to -\[dq]--transfers\[dq] * \[dq]--b2-upload-concurrency\[dq] chunks stored at once -in memory. - +\[dq]--transfers\[dq] * \[dq]--b2-upload-concurrency\[dq] chunks stored +at once in memory. +.PP Properties: - -- Config: upload_concurrency -- Env Var: RCLONE_B2_UPLOAD_CONCURRENCY -- Type: int -- Default: 4 - -#### --b2-disable-checksum - +.IP \[bu] 2 +Config: upload_concurrency +.IP \[bu] 2 +Env Var: RCLONE_B2_UPLOAD_CONCURRENCY +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 4 +.SS --b2-disable-checksum +.PP Disable checksums for large (> upload cutoff) files. - +.PP Normally rclone will calculate the SHA1 checksum of the input before -uploading it so it can add it to metadata on the object. This is great -for data integrity checking but can cause long delays for large files -to start uploading. - +uploading it so it can add it to metadata on the object. +This is great for data integrity checking but can cause long delays for +large files to start uploading. +.PP Properties: - -- Config: disable_checksum -- Env Var: RCLONE_B2_DISABLE_CHECKSUM -- Type: bool -- Default: false - -#### --b2-download-url - +.IP \[bu] 2 +Config: disable_checksum +.IP \[bu] 2 +Env Var: RCLONE_B2_DISABLE_CHECKSUM +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --b2-download-url +.PP Custom endpoint for downloads. - -This is usually set to a Cloudflare CDN URL as Backblaze offers -free egress for data downloaded through the Cloudflare network. -Rclone works with private buckets by sending an \[dq]Authorization\[dq] header. -If the custom endpoint rewrites the requests for authentication, -e.g., in Cloudflare Workers, this header needs to be handled properly. +.PP +This is usually set to a Cloudflare CDN URL as Backblaze offers free +egress for data downloaded through the Cloudflare network. +Rclone works with private buckets by sending an \[dq]Authorization\[dq] +header. +If the custom endpoint rewrites the requests for authentication, e.g., +in Cloudflare Workers, this header needs to be handled properly. Leave blank if you want to use the endpoint provided by Backblaze. - -The URL provided here SHOULD have the protocol and SHOULD NOT have -a trailing slash or specify the /file/bucket subpath as rclone will +.PP +The URL provided here SHOULD have the protocol and SHOULD NOT have a +trailing slash or specify the /file/bucket subpath as rclone will request files with \[dq]{download_url}/file/{bucket_name}/{path}\[dq]. - -Example: -> https://mysubdomain.mydomain.tld -(No trailing \[dq]/\[dq], \[dq]file\[dq] or \[dq]bucket\[dq]) - +.PP +Example: > https://mysubdomain.mydomain.tld (No trailing \[dq]/\[dq], +\[dq]file\[dq] or \[dq]bucket\[dq]) +.PP Properties: - -- Config: download_url -- Env Var: RCLONE_B2_DOWNLOAD_URL -- Type: string -- Required: false - -#### --b2-download-auth-duration - -Time before the public link authorization token will expire in s or suffix ms|s|m|h|d. - +.IP \[bu] 2 +Config: download_url +.IP \[bu] 2 +Env Var: RCLONE_B2_DOWNLOAD_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --b2-download-auth-duration +.PP +Time before the public link authorization token will expire in s or +suffix ms|s|m|h|d. +.PP This is used in combination with \[dq]rclone link\[dq] for making files accessible to the public and sets the duration before the download authorization token will expire. - -The minimum value is 1 second. The maximum value is one week. - +.PP +The minimum value is 1 second. +The maximum value is one week. +.PP Properties: - -- Config: download_auth_duration -- Env Var: RCLONE_B2_DOWNLOAD_AUTH_DURATION -- Type: Duration -- Default: 1w - -#### --b2-memory-pool-flush-time - -How often internal memory buffer pools will be flushed. (no longer used) - +.IP \[bu] 2 +Config: download_auth_duration +.IP \[bu] 2 +Env Var: RCLONE_B2_DOWNLOAD_AUTH_DURATION +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 1w +.SS --b2-memory-pool-flush-time +.PP +How often internal memory buffer pools will be flushed. +(no longer used) +.PP Properties: - -- Config: memory_pool_flush_time -- Env Var: RCLONE_B2_MEMORY_POOL_FLUSH_TIME -- Type: Duration -- Default: 1m0s - -#### --b2-memory-pool-use-mmap - -Whether to use mmap buffers in internal memory pool. (no longer used) - +.IP \[bu] 2 +Config: memory_pool_flush_time +.IP \[bu] 2 +Env Var: RCLONE_B2_MEMORY_POOL_FLUSH_TIME +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 1m0s +.SS --b2-memory-pool-use-mmap +.PP +Whether to use mmap buffers in internal memory pool. +(no longer used) +.PP Properties: - -- Config: memory_pool_use_mmap -- Env Var: RCLONE_B2_MEMORY_POOL_USE_MMAP -- Type: bool -- Default: false - -#### --b2-lifecycle - -Set the number of days deleted files should be kept when creating a bucket. - +.IP \[bu] 2 +Config: memory_pool_use_mmap +.IP \[bu] 2 +Env Var: RCLONE_B2_MEMORY_POOL_USE_MMAP +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --b2-lifecycle +.PP +Set the number of days deleted files should be kept when creating a +bucket. +.PP On bucket creation, this parameter is used to create a lifecycle rule for the entire bucket. - +.PP If lifecycle is 0 (the default) it does not create a lifecycle rule so -the default B2 behaviour applies. This is to create versions of files -on delete and overwrite and to keep them indefinitely. - +the default B2 behaviour applies. +This is to create versions of files on delete and overwrite and to keep +them indefinitely. +.PP If lifecycle is >0 then it creates a single rule setting the number of days before a file that is deleted or overwritten is deleted -permanently. This is known as daysFromHidingToDeleting in the b2 docs. - +permanently. +This is known as daysFromHidingToDeleting in the b2 docs. +.PP The minimum value for this parameter is 1 day. - +.PP You can also enable hard_delete in the config also which will mean deletions won\[aq]t cause versions but overwrites will still cause versions to be made. - -See: [rclone backend lifecycle](#lifecycle) for setting lifecycles after bucket creation. - - +.PP +See: rclone backend lifecycle for setting lifecycles after bucket +creation. +.PP Properties: - -- Config: lifecycle -- Env Var: RCLONE_B2_LIFECYCLE -- Type: int -- Default: 0 - -#### --b2-encoding - +.IP \[bu] 2 +Config: lifecycle +.IP \[bu] 2 +Env Var: RCLONE_B2_LIFECYCLE +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 0 +.SS --b2-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_B2_ENCODING -- Type: Encoding -- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot - -#### --b2-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_B2_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot +.SS --b2-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_B2_DESCRIPTION -- Type: string -- Required: false - -## Backend commands - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_B2_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Backend commands +.PP Here are the commands specific to the b2 backend. - +.PP Run them with - - rclone backend COMMAND remote: - +.IP +.nf +\f[C] +rclone backend COMMAND remote: +\f[R] +.fi +.PP The help below will explain what arguments each command takes. - -See the [backend](https://rclone.org/commands/rclone_backend/) command for more -info on how to pass options and arguments. - +.PP +See the backend (https://rclone.org/commands/rclone_backend/) command +for more info on how to pass options and arguments. +.PP These can be run on a running backend using the rc command -[backend/command](https://rclone.org/rc/#backend-command). - -### lifecycle - +backend/command (https://rclone.org/rc/#backend-command). +.SS lifecycle +.PP Read or set the lifecycle for a bucket - - rclone backend lifecycle remote: [options] [+] - +.IP +.nf +\f[C] +rclone backend lifecycle remote: [options] [+] +\f[R] +.fi +.PP This command can be used to read or set the lifecycle for a bucket. - +.PP Usage Examples: - +.PP To show the current lifecycle rules: - - rclone backend lifecycle b2:bucket - +.IP +.nf +\f[C] +rclone backend lifecycle b2:bucket +\f[R] +.fi +.PP This will dump something like this showing the lifecycle rules. - - [ - { - \[dq]daysFromHidingToDeleting\[dq]: 1, - \[dq]daysFromUploadingToHiding\[dq]: null, - \[dq]fileNamePrefix\[dq]: \[dq]\[dq] - } - ] - -If there are no lifecycle rules (the default) then it will just return []. - +.IP +.nf +\f[C] +[ + { + \[dq]daysFromHidingToDeleting\[dq]: 1, + \[dq]daysFromUploadingToHiding\[dq]: null, + \[dq]fileNamePrefix\[dq]: \[dq]\[dq] + } +] +\f[R] +.fi +.PP +If there are no lifecycle rules (the default) then it will just return +[]. +.PP To reset the current lifecycle rules: - - rclone backend lifecycle b2:bucket -o daysFromHidingToDeleting=30 - rclone backend lifecycle b2:bucket -o daysFromUploadingToHiding=5 -o daysFromHidingToDeleting=1 - +.IP +.nf +\f[C] +rclone backend lifecycle b2:bucket -o daysFromHidingToDeleting=30 +rclone backend lifecycle b2:bucket -o daysFromUploadingToHiding=5 -o daysFromHidingToDeleting=1 +\f[R] +.fi +.PP This will run and then print the new lifecycle rules as above. - +.PP Rclone only lets you set lifecycles for the whole bucket with the fileNamePrefix = \[dq]\[dq]. - -You can\[aq]t disable versioning with B2. The best you can do is to set -the daysFromHidingToDeleting to 1 day. You can enable hard_delete in -the config also which will mean deletions won\[aq]t cause versions but -overwrites will still cause versions to be made. - - rclone backend lifecycle b2:bucket -o daysFromHidingToDeleting=1 - +.PP +You can\[aq]t disable versioning with B2. +The best you can do is to set the daysFromHidingToDeleting to 1 day. +You can enable hard_delete in the config also which will mean deletions +won\[aq]t cause versions but overwrites will still cause versions to be +made. +.IP +.nf +\f[C] +rclone backend lifecycle b2:bucket -o daysFromHidingToDeleting=1 +\f[R] +.fi +.PP See: https://www.backblaze.com/docs/cloud-storage-lifecycle-rules - - +.PP Options: - -- \[dq]daysFromHidingToDeleting\[dq]: After a file has been hidden for this many days it is deleted. 0 is off. -- \[dq]daysFromUploadingToHiding\[dq]: This many days after uploading a file is hidden - - - -## Limitations - -\[ga]rclone about\[ga] is not supported by the B2 backend. Backends without -this capability cannot determine free space for an rclone mount or -use policy \[ga]mfs\[ga] (most free space) as a member of an rclone union -remote. - -See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - -# Box - -Paths are specified as \[ga]remote:path\[ga] - -Paths may be as deep as required, e.g. \[ga]remote:directory/subdirectory\[ga]. - +.IP \[bu] 2 +\[dq]daysFromHidingToDeleting\[dq]: After a file has been hidden for +this many days it is deleted. +0 is off. +.IP \[bu] 2 +\[dq]daysFromUploadingToHiding\[dq]: This many days after uploading a +file is hidden +.SS cleanup +.PP +Remove unfinished large file uploads. +.IP +.nf +\f[C] +rclone backend cleanup remote: [options] [+] +\f[R] +.fi +.PP +This command removes unfinished large file uploads of age greater than +max-age, which defaults to 24 hours. +.PP +Note that you can use --interactive/-i or --dry-run with this command to +see what it would do. +.IP +.nf +\f[C] +rclone backend cleanup b2:bucket/path/to/object +rclone backend cleanup -o max-age=7w b2:bucket/path/to/object +\f[R] +.fi +.PP +Durations are parsed as per the rest of rclone, 2h, 7d, 7w etc. +.PP +Options: +.IP \[bu] 2 +\[dq]max-age\[dq]: Max age of upload to delete +.SS cleanup-hidden +.PP +Remove old versions of files. +.IP +.nf +\f[C] +rclone backend cleanup-hidden remote: [options] [+] +\f[R] +.fi +.PP +This command removes any old hidden versions of files. +.PP +Note that you can use --interactive/-i or --dry-run with this command to +see what it would do. +.IP +.nf +\f[C] +rclone backend cleanup-hidden b2:bucket/path/to/dir +\f[R] +.fi +.SS Limitations +.PP +\f[C]rclone about\f[R] is not supported by the B2 backend. +Backends without this capability cannot determine free space for an +rclone mount or use policy \f[C]mfs\f[R] (most free space) as a member +of an rclone union remote. +.PP +See List of backends that do not support rclone +about (https://rclone.org/overview/#optional-features) and rclone +about (https://rclone.org/commands/rclone_about/) +.SH Box +.PP +Paths are specified as \f[C]remote:path\f[R] +.PP +Paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R]. +.PP The initial setup for Box involves getting a token from Box which you can do either in your browser, or with a config.json downloaded from Box -to use JWT authentication. \[ga]rclone config\[ga] walks you through it. - -## Configuration - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - +to use JWT authentication. +\f[C]rclone config\f[R] walks you through it. +.SS Configuration +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP This will guide you through an interactive setup process: -\f[R] -.fi -.PP +.IP +.nf +\f[C] 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 [snip] XX / Box -\ \[dq]box\[dq] [snip] Storage> box Box App Client Id - leave blank -normally. -client_id> Box App Client Secret - leave blank normally. -client_secret> Box App config.json location Leave blank normally. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -box_config_file> Box App Primary Access Token Leave blank normally. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). +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 +[snip] +XX / Box + \[rs] \[dq]box\[dq] +[snip] +Storage> box +Box App Client Id - leave blank normally. +client_id> +Box App Client Secret - leave blank normally. +client_secret> +Box App config.json location +Leave blank normally. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +box_config_file> +Box App Primary Access Token +Leave blank normally. +Enter a string value. Press Enter for the default (\[dq]\[dq]). access_token> -.PP -Enter a string value. -Press Enter for the default (\[dq]user\[dq]). -Choose a number from below, or type in your own value 1 / Rclone should -act on behalf of a user \ \[dq]user\[dq] 2 / Rclone should act on behalf -of a service account \ \[dq]enterprise\[dq] box_sub_type> Remote config + +Enter a string value. Press Enter for the default (\[dq]user\[dq]). +Choose a number from below, or type in your own value + 1 / Rclone should act on behalf of a user + \[rs] \[dq]user\[dq] + 2 / Rclone should act on behalf of a service account + \[rs] \[dq]enterprise\[dq] +box_sub_type> +Remote config Use web browser to automatically authenticate rclone with remote? -* Say Y if the machine running rclone has a web browser you can use * -Say N if running rclone on a (remote) machine without web browser access -If not sure try Y. -If Y failed, try N. -y) Yes n) No y/n> y If your browser doesn\[aq]t open automatically go to -the following link: http://127.0.0.1:53682/auth Log in and authorize -rclone for access Waiting for code... -Got code -------------------- [remote] client_id = client_secret = token -= -{\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]XXX\[dq]} --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y -.IP -.nf -\f[C] -See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a -machine with no Internet browser available. - -Note that rclone runs a webserver on your local machine to collect the -token as returned from Box. This only runs from the moment it opens -your browser to the moment you get back the verification code. This -is on \[ga]http://127.0.0.1:53682/\[ga] and this it may require you to unblock -it temporarily if you are running a host firewall. - -Once configured you can then use \[ga]rclone\[ga] like this, - -List directories in top level of your Box - - rclone lsd remote: - -List all the files in your Box - - rclone ls remote: - -To copy a local directory to an Box directory called backup - - rclone copy /home/source remote:backup - -### Using rclone with an Enterprise account with SSO - -If you have an \[dq]Enterprise\[dq] account type with Box with single sign on -(SSO), you need to create a password to use Box with rclone. This can -be done at your Enterprise Box account by going to Settings, \[dq]Account\[dq] -Tab, and then set the password in the \[dq]Authentication\[dq] field. - -Once you have done this, you can setup your Enterprise Box account -using the same procedure detailed above in the, using the password you -have just set. - -### Invalid refresh token - -According to the [box docs](https://developer.box.com/v2.0/docs/oauth-20#section-6-using-the-access-and-refresh-tokens): - -> Each refresh_token is valid for one use in 60 days. - -This means that if you - - * Don\[aq]t use the box remote for 60 days - * Copy the config file with a box refresh token in and use it in two places - * Get an error on a token refresh - -then rclone will return an error which includes the text \[ga]Invalid -refresh token\[ga]. - -To fix this you will need to use oauth2 again to update the refresh -token. You can use the methods in [the remote setup -docs](https://rclone.org/remote_setup/), bearing in mind that if you use the copy the -config file method, you should not use that remote on the computer you -did the authentication on. - -Here is how to do it. + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access +If not sure try Y. If Y failed, try N. +y) Yes +n) No +y/n> y +If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth +Log in and authorize rclone for access +Waiting for code... +Got code +-------------------- +[remote] +client_id = +client_secret = +token = {\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]XXX\[dq]} +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y \f[R] .fi .PP -$ rclone config Current remotes: +See the remote setup docs (https://rclone.org/remote_setup/) for how to +set it up on a machine with no Internet browser available. .PP -Name Type ==== ==== remote box -.IP "e)" 3 -Edit existing remote -.IP "f)" 3 -New remote -.IP "g)" 3 -Delete remote -.IP "h)" 3 -Rename remote -.IP "i)" 3 -Copy remote -.IP "j)" 3 -Set configuration password -.IP "k)" 3 -Quit config e/n/d/r/c/s/q> e Choose a number from below, or type in an -existing value 1 > remote remote> remote -------------------- [remote] -type = box token = -{\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]2017-07-08T23:40:08.059167677+01:00\[dq]} --------------------- Edit remote Value \[dq]client_id\[dq] = \[dq]\[dq] -Edit? -(y/n)> -.IP "l)" 3 -Yes -.IP "m)" 3 -No y/n> n Value \[dq]client_secret\[dq] = \[dq]\[dq] Edit? -(y/n)> -.IP "n)" 3 -Yes -.IP "o)" 3 -No y/n> n Remote config Already have a token - refresh? -.IP "p)" 3 -Yes -.IP "q)" 3 -No y/n> y Use web browser to automatically authenticate rclone with -remote? -.IP \[bu] 2 -Say Y if the machine running rclone has a web browser you can use -.IP \[bu] 2 -Say N if running rclone on a (remote) machine without web browser access -If not sure try Y. -If Y failed, try N. -.IP "y)" 3 -Yes -.IP "z)" 3 -No y/n> y If your browser doesn\[aq]t open automatically go to the -following link: http://127.0.0.1:53682/auth Log in and authorize rclone -for access Waiting for code... -Got code -------------------- [remote] type = box token = -{\[dq]access_token\[dq]:\[dq]YYY\[dq],\[dq]token_type\[dq]:\[dq]bearer\[dq],\[dq]refresh_token\[dq]:\[dq]YYY\[dq],\[dq]expiry\[dq]:\[dq]2017-07-23T12:22:29.259137901+01:00\[dq]} --------------------- -.IP "a)" 3 -Yes this is OK -.IP "b)" 3 -Edit this remote -.IP "c)" 3 -Delete this remote y/e/d> y +Note that rclone runs a webserver on your local machine to collect the +token as returned from Box. +This only runs from the moment it opens your browser to the moment you +get back the verification code. +This is on \f[C]http://127.0.0.1:53682/\f[R] and this it may require you +to unblock it temporarily if you are running a host firewall. +.PP +Once configured you can then use \f[C]rclone\f[R] like this, +.PP +List directories in top level of your Box .IP .nf \f[C] -### Modification times and hashes +rclone lsd remote: +\f[R] +.fi +.PP +List all the files in your Box +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP +To copy a local directory to an Box directory called backup +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.SS Using rclone with an Enterprise account with SSO +.PP +If you have an \[dq]Enterprise\[dq] account type with Box with single +sign on (SSO), you need to create a password to use Box with rclone. +This can be done at your Enterprise Box account by going to Settings, +\[dq]Account\[dq] Tab, and then set the password in the +\[dq]Authentication\[dq] field. +.PP +Once you have done this, you can setup your Enterprise Box account using +the same procedure detailed above in the, using the password you have +just set. +.SS Invalid refresh token +.PP +According to the box +docs (https://developer.box.com/v2.0/docs/oauth-20#section-6-using-the-access-and-refresh-tokens): +.RS +.PP +Each refresh_token is valid for one use in 60 days. +.RE +.PP +This means that if you +.IP \[bu] 2 +Don\[aq]t use the box remote for 60 days +.IP \[bu] 2 +Copy the config file with a box refresh token in and use it in two +places +.IP \[bu] 2 +Get an error on a token refresh +.PP +then rclone will return an error which includes the text +\f[C]Invalid refresh token\f[R]. +.PP +To fix this you will need to use oauth2 again to update the refresh +token. +You can use the methods in the remote setup +docs (https://rclone.org/remote_setup/), bearing in mind that if you use +the copy the config file method, you should not use that remote on the +computer you did the authentication on. +.PP +Here is how to do it. +.IP +.nf +\f[C] +$ rclone config +Current remotes: -Box allows modification times to be set on objects accurate to 1 -second. These will be used to detect whether objects need syncing or -not. +Name Type +==== ==== +remote box -Box supports SHA1 type hashes, so you can use the \[ga]--checksum\[ga] +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> e +Choose a number from below, or type in an existing value + 1 > remote +remote> remote +-------------------- +[remote] +type = box +token = {\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]2017-07-08T23:40:08.059167677+01:00\[dq]} +-------------------- +Edit remote +Value \[dq]client_id\[dq] = \[dq]\[dq] +Edit? (y/n)> +y) Yes +n) No +y/n> n +Value \[dq]client_secret\[dq] = \[dq]\[dq] +Edit? (y/n)> +y) Yes +n) No +y/n> n +Remote config +Already have a token - refresh? +y) Yes +n) No +y/n> y +Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access +If not sure try Y. If Y failed, try N. +y) Yes +n) No +y/n> y +If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth +Log in and authorize rclone for access +Waiting for code... +Got code +-------------------- +[remote] +type = box +token = {\[dq]access_token\[dq]:\[dq]YYY\[dq],\[dq]token_type\[dq]:\[dq]bearer\[dq],\[dq]refresh_token\[dq]:\[dq]YYY\[dq],\[dq]expiry\[dq]:\[dq]2017-07-23T12:22:29.259137901+01:00\[dq]} +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.SS Modification times and hashes +.PP +Box allows modification times to be set on objects accurate to 1 second. +These will be used to detect whether objects need syncing or not. +.PP +Box supports SHA1 type hashes, so you can use the \f[C]--checksum\f[R] flag. - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| \[rs] | 0x5C | \[uFF3C] | - +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] +T} +.TE +.PP File names can also not end with the following characters. These only get replaced if they are the last character in the name: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| SP | 0x20 | \[u2420] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -### Transfers - -For files above 50 MiB rclone will use a chunked transfer. Rclone will -upload up to \[ga]--transfers\[ga] chunks at the same time (shared among all -the multipart uploads). Chunks are buffered in memory and are -normally 8 MiB so increasing \[ga]--transfers\[ga] will increase memory use. - -### Deleting files - -Depending on the enterprise settings for your user, the item will -either be actually deleted from Box or moved to the trash. - +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +SP +T}@T{ +0x20 +T}@T{ +\[u2420] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Transfers +.PP +For files above 50 MiB rclone will use a chunked transfer. +Rclone will upload up to \f[C]--transfers\f[R] chunks at the same time +(shared among all the multipart uploads). +Chunks are buffered in memory and are normally 8 MiB so increasing +\f[C]--transfers\f[R] will increase memory use. +.SS Deleting files +.PP +Depending on the enterprise settings for your user, the item will either +be actually deleted from Box or moved to the trash. +.PP Emptying the trash is supported via the rclone however cleanup command however this deletes every trashed file and folder individually so it -may take a very long time. -Emptying the trash via the WebUI does not have this limitation -so it is advised to empty the trash via the WebUI. - -### Root folder ID - -You can set the \[ga]root_folder_id\[ga] for rclone. This is the directory -(identified by its \[ga]Folder ID\[ga]) that rclone considers to be the root -of your Box drive. - -Normally you will leave this blank and rclone will determine the -correct root to use itself. - +may take a very long time. +Emptying the trash via the WebUI does not have this limitation so it is +advised to empty the trash via the WebUI. +.SS Root folder ID +.PP +You can set the \f[C]root_folder_id\f[R] for rclone. +This is the directory (identified by its \f[C]Folder ID\f[R]) that +rclone considers to be the root of your Box drive. +.PP +Normally you will leave this blank and rclone will determine the correct +root to use itself. +.PP However you can set this to restrict rclone to a specific folder hierarchy. - -In order to do this you will have to find the \[ga]Folder ID\[ga] of the -directory you wish rclone to display. This will be the last segment -of the URL when you open the relevant folder in the Box web -interface. - +.PP +In order to do this you will have to find the \f[C]Folder ID\f[R] of the +directory you wish rclone to display. +This will be the last segment of the URL when you open the relevant +folder in the Box web interface. +.PP So if the folder you want rclone to use has a URL which looks like -\[ga]https://app.box.com/folder/11xxxxxxxxx8\[ga] -in the browser, then you use \[ga]11xxxxxxxxx8\[ga] as -the \[ga]root_folder_id\[ga] in the config. - - -### Standard options - +\f[C]https://app.box.com/folder/11xxxxxxxxx8\f[R] in the browser, then +you use \f[C]11xxxxxxxxx8\f[R] as the \f[C]root_folder_id\f[R] in the +config. +.SS Standard options +.PP Here are the Standard options specific to box (Box). - -#### --box-client-id - +.SS --box-client-id +.PP OAuth Client Id. - +.PP Leave blank normally. - +.PP Properties: - -- Config: client_id -- Env Var: RCLONE_BOX_CLIENT_ID -- Type: string -- Required: false - -#### --box-client-secret - +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_BOX_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --box-client-secret +.PP OAuth Client Secret. - +.PP Leave blank normally. - +.PP Properties: - -- Config: client_secret -- Env Var: RCLONE_BOX_CLIENT_SECRET -- Type: string -- Required: false - -#### --box-box-config-file - +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_BOX_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --box-box-config-file +.PP Box App config.json location - +.PP Leave blank normally. - -Leading \[ga]\[ti]\[ga] will be expanded in the file name as will environment variables such as \[ga]${RCLONE_CONFIG_DIR}\[ga]. - +.PP +Leading \f[C]\[ti]\f[R] will be expanded in the file name as will +environment variables such as \f[C]${RCLONE_CONFIG_DIR}\f[R]. +.PP Properties: - -- Config: box_config_file -- Env Var: RCLONE_BOX_BOX_CONFIG_FILE -- Type: string -- Required: false - -#### --box-access-token - +.IP \[bu] 2 +Config: box_config_file +.IP \[bu] 2 +Env Var: RCLONE_BOX_BOX_CONFIG_FILE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --box-access-token +.PP Box App Primary Access Token - +.PP Leave blank normally. - +.PP Properties: - -- Config: access_token -- Env Var: RCLONE_BOX_ACCESS_TOKEN -- Type: string -- Required: false - -#### --box-box-sub-type - - - +.IP \[bu] 2 +Config: access_token +.IP \[bu] 2 +Env Var: RCLONE_BOX_ACCESS_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --box-box-sub-type +.PP Properties: - -- Config: box_sub_type -- Env Var: RCLONE_BOX_BOX_SUB_TYPE -- Type: string -- Default: \[dq]user\[dq] -- Examples: - - \[dq]user\[dq] - - Rclone should act on behalf of a user. - - \[dq]enterprise\[dq] - - Rclone should act on behalf of a service account. - -### Advanced options - +.IP \[bu] 2 +Config: box_sub_type +.IP \[bu] 2 +Env Var: RCLONE_BOX_BOX_SUB_TYPE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]user\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]user\[dq] +.RS 2 +.IP \[bu] 2 +Rclone should act on behalf of a user. +.RE +.IP \[bu] 2 +\[dq]enterprise\[dq] +.RS 2 +.IP \[bu] 2 +Rclone should act on behalf of a service account. +.RE +.RE +.SS Advanced options +.PP Here are the Advanced options specific to box (Box). - -#### --box-token - +.SS --box-token +.PP OAuth Access Token as a JSON blob. - +.PP Properties: - -- Config: token -- Env Var: RCLONE_BOX_TOKEN -- Type: string -- Required: false - -#### --box-auth-url - +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_BOX_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --box-auth-url +.PP Auth server URL. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: auth_url -- Env Var: RCLONE_BOX_AUTH_URL -- Type: string -- Required: false - -#### --box-token-url - +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_BOX_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --box-token-url +.PP Token server url. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: token_url -- Env Var: RCLONE_BOX_TOKEN_URL -- Type: string -- Required: false - -#### --box-root-folder-id - +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_BOX_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --box-root-folder-id +.PP Fill in for rclone to use a non root folder as its starting point. - +.PP Properties: - -- Config: root_folder_id -- Env Var: RCLONE_BOX_ROOT_FOLDER_ID -- Type: string -- Default: \[dq]0\[dq] - -#### --box-upload-cutoff - +.IP \[bu] 2 +Config: root_folder_id +.IP \[bu] 2 +Env Var: RCLONE_BOX_ROOT_FOLDER_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]0\[dq] +.SS --box-upload-cutoff +.PP Cutoff for switching to multipart upload (>= 50 MiB). - +.PP Properties: - -- Config: upload_cutoff -- Env Var: RCLONE_BOX_UPLOAD_CUTOFF -- Type: SizeSuffix -- Default: 50Mi - -#### --box-commit-retries - +.IP \[bu] 2 +Config: upload_cutoff +.IP \[bu] 2 +Env Var: RCLONE_BOX_UPLOAD_CUTOFF +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 50Mi +.SS --box-commit-retries +.PP Max number of times to try committing a multipart file. - +.PP Properties: - -- Config: commit_retries -- Env Var: RCLONE_BOX_COMMIT_RETRIES -- Type: int -- Default: 100 - -#### --box-list-chunk - +.IP \[bu] 2 +Config: commit_retries +.IP \[bu] 2 +Env Var: RCLONE_BOX_COMMIT_RETRIES +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 100 +.SS --box-list-chunk +.PP Size of listing chunk 1-1000. - +.PP Properties: - -- Config: list_chunk -- Env Var: RCLONE_BOX_LIST_CHUNK -- Type: int -- Default: 1000 - -#### --box-owned-by - +.IP \[bu] 2 +Config: list_chunk +.IP \[bu] 2 +Env Var: RCLONE_BOX_LIST_CHUNK +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 1000 +.SS --box-owned-by +.PP Only show items owned by the login (email address) passed in. - +.PP Properties: - -- Config: owned_by -- Env Var: RCLONE_BOX_OWNED_BY -- Type: string -- Required: false - -#### --box-impersonate - +.IP \[bu] 2 +Config: owned_by +.IP \[bu] 2 +Env Var: RCLONE_BOX_OWNED_BY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --box-impersonate +.PP Impersonate this user ID when using a service account. - +.PP Setting this flag allows rclone, when using a JWT service account, to act on behalf of another user by setting the as-user header. - -The user ID is the Box identifier for a user. User IDs can found for -any user via the GET /users endpoint, which is only available to -admins, or by calling the GET /users/me endpoint with an authenticated -user session. - +.PP +The user ID is the Box identifier for a user. +User IDs can found for any user via the GET /users endpoint, which is +only available to admins, or by calling the GET /users/me endpoint with +an authenticated user session. +.PP See: https://developer.box.com/guides/authentication/jwt/as-user/ - - +.PP Properties: - -- Config: impersonate -- Env Var: RCLONE_BOX_IMPERSONATE -- Type: string -- Required: false - -#### --box-encoding - +.IP \[bu] 2 +Config: impersonate +.IP \[bu] 2 +Env Var: RCLONE_BOX_IMPERSONATE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --box-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_BOX_ENCODING -- Type: Encoding -- Default: Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot - -#### --box-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_BOX_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot +.SS --box-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_BOX_DESCRIPTION -- Type: string -- Required: false - - - -## Limitations - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_BOX_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP Note that Box is case insensitive so you can\[aq]t have a file called \[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. - -Box file names can\[aq]t have the \[ga]\[rs]\[ga] character in. rclone maps this to -and from an identical looking unicode equivalent \[ga]\[uFF3C]\[ga] (U+FF3C Fullwidth -Reverse Solidus). - +.PP +Box file names can\[aq]t have the \f[C]\[rs]\f[R] character in. +rclone maps this to and from an identical looking unicode equivalent +\f[C]\[uFF3C]\f[R] (U+FF3C Fullwidth Reverse Solidus). +.PP Box only supports filenames up to 255 characters in length. - -Box has [API rate limits](https://developer.box.com/guides/api-calls/permissions-and-errors/rate-limits/) that sometimes reduce the speed of rclone. - -\[ga]rclone about\[ga] is not supported by the Box backend. Backends without -this capability cannot determine free space for an rclone mount or -use policy \[ga]mfs\[ga] (most free space) as a member of an rclone union -remote. - -See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - -## Get your own Box App ID - +.PP +Box has API rate +limits (https://developer.box.com/guides/api-calls/permissions-and-errors/rate-limits/) +that sometimes reduce the speed of rclone. +.PP +\f[C]rclone about\f[R] is not supported by the Box backend. +Backends without this capability cannot determine free space for an +rclone mount or use policy \f[C]mfs\f[R] (most free space) as a member +of an rclone union remote. +.PP +See List of backends that do not support rclone +about (https://rclone.org/overview/#optional-features) and rclone +about (https://rclone.org/commands/rclone_about/) +.SS Get your own Box App ID +.PP Here is how to create your own Box App ID for rclone: - -1. Go to the [Box Developer Console](https://app.box.com/developers/console) -and login, then click \[ga]My Apps\[ga] on the sidebar. Click \[ga]Create New App\[ga] -and select \[ga]Custom App\[ga]. - -2. In the first screen on the box that pops up, you can pretty much enter -whatever you want. The \[ga]App Name\[ga] can be whatever. For \[ga]Purpose\[ga] choose -automation to avoid having to fill out anything else. Click \[ga]Next\[ga]. - -3. In the second screen of the creation screen, select -\[ga]User Authentication (OAuth 2.0)\[ga]. Then click \[ga]Create App\[ga]. - -4. You should now be on the \[ga]Configuration\[ga] tab of your new app. If not, -click on it at the top of the webpage. Copy down \[ga]Client ID\[ga] -and \[ga]Client Secret\[ga], you\[aq]ll need those for rclone. - -5. Under \[dq]OAuth 2.0 Redirect URI\[dq], add \[ga]http://127.0.0.1:53682/\[ga] - -6. For \[ga]Application Scopes\[ga], select \[ga]Read all files and folders stored in Box\[ga] -and \[ga]Write all files and folders stored in box\[ga] (assuming you want to do both). -Leave others unchecked. Click \[ga]Save Changes\[ga] at the top right. - -# Cache - -The \[ga]cache\[ga] remote wraps another existing remote and stores file structure -and its data for long running tasks like \[ga]rclone mount\[ga]. - -## Status - -The cache backend code is working but it currently doesn\[aq]t -have a maintainer so there are [outstanding bugs](https://github.com/rclone/rclone/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3A%22Remote%3A+Cache%22) which aren\[aq]t getting fixed. - +.IP "1." 3 +Go to the Box Developer Console (https://app.box.com/developers/console) +and login, then click \f[C]My Apps\f[R] on the sidebar. +Click \f[C]Create New App\f[R] and select \f[C]Custom App\f[R]. +.IP "2." 3 +In the first screen on the box that pops up, you can pretty much enter +whatever you want. +The \f[C]App Name\f[R] can be whatever. +For \f[C]Purpose\f[R] choose automation to avoid having to fill out +anything else. +Click \f[C]Next\f[R]. +.IP "3." 3 +In the second screen of the creation screen, select +\f[C]User Authentication (OAuth 2.0)\f[R]. +Then click \f[C]Create App\f[R]. +.IP "4." 3 +You should now be on the \f[C]Configuration\f[R] tab of your new app. +If not, click on it at the top of the webpage. +Copy down \f[C]Client ID\f[R] and \f[C]Client Secret\f[R], you\[aq]ll +need those for rclone. +.IP "5." 3 +Under \[dq]OAuth 2.0 Redirect URI\[dq], add +\f[C]http://127.0.0.1:53682/\f[R] +.IP "6." 3 +For \f[C]Application Scopes\f[R], select +\f[C]Read all files and folders stored in Box\f[R] and +\f[C]Write all files and folders stored in box\f[R] (assuming you want +to do both). +Leave others unchecked. +Click \f[C]Save Changes\f[R] at the top right. +.SH Cache +.PP +The \f[C]cache\f[R] remote wraps another existing remote and stores file +structure and its data for long running tasks like +\f[C]rclone mount\f[R]. +.SS Status +.PP +The cache backend code is working but it currently doesn\[aq]t have a +maintainer so there are outstanding +bugs (https://github.com/rclone/rclone/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3A%22Remote%3A+Cache%22) +which aren\[aq]t getting fixed. +.PP The cache backend is due to be phased out in favour of the VFS caching layer eventually which is more tightly integrated into rclone. - -Until this happens we recommend only using the cache backend if you -find you can\[aq]t work without it. There are many docs online describing -the use of the cache backend to minimize API hits and by-and-large -these are out of date and the cache backend isn\[aq]t needed in those -scenarios any more. - -## Configuration - -To get started you just need to have an existing remote which can be configured -with \[ga]cache\[ga]. - -Here is an example of how to make a remote called \[ga]test-cache\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: +.PP +Until this happens we recommend only using the cache backend if you find +you can\[aq]t work without it. +There are many docs online describing the use of the cache backend to +minimize API hits and by-and-large these are out of date and the cache +backend isn\[aq]t needed in those scenarios any more. +.SS Configuration +.PP +To get started you just need to have an existing remote which can be +configured with \f[C]cache\f[R]. +.PP +Here is an example of how to make a remote called \f[C]test-cache\f[R]. +First run: +.IP +.nf +\f[C] + rclone config \f[R] .fi .PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] No remotes found, make a new one? -n) New remote r) Rename remote c) Copy remote s) Set configuration -password q) Quit config n/r/c/s/q> n name> test-cache Type of storage to -configure. -Choose a number from below, or type in your own value [snip] XX / Cache -a remote \ \[dq]cache\[dq] [snip] Storage> cache Remote to cache. +n) New remote +r) Rename remote +c) Copy remote +s) Set configuration password +q) Quit config +n/r/c/s/q> n +name> test-cache +Type of storage to configure. +Choose a number from below, or type in your own value +[snip] +XX / Cache a remote + \[rs] \[dq]cache\[dq] +[snip] +Storage> cache +Remote to cache. +Normally should contain a \[aq]:\[aq] and a path, e.g. \[dq]myremote:path/to/dir\[dq], +\[dq]myremote:bucket\[dq] or maybe \[dq]myremote:\[dq] (not recommended). +remote> local:/test +Optional: The URL of the Plex server +plex_url> http://127.0.0.1:32400 +Optional: The username of the Plex user +plex_username> dummyusername +Optional: The password of the Plex user +y) Yes type in my own password +g) Generate random password +n) No leave this optional password blank +y/g/n> y +Enter the password: +password: +Confirm the password: +password: +The size of a chunk. Lower value good for slow connections but can affect seamless reading. +Default: 5M +Choose a number from below, or type in your own value + 1 / 1 MiB + \[rs] \[dq]1M\[dq] + 2 / 5 MiB + \[rs] \[dq]5M\[dq] + 3 / 10 MiB + \[rs] \[dq]10M\[dq] +chunk_size> 2 +How much time should object info (file size, file hashes, etc.) be stored in cache. Use a very high value if you don\[aq]t plan on changing the source FS from outside the cache. +Accepted units are: \[dq]s\[dq], \[dq]m\[dq], \[dq]h\[dq]. +Default: 5m +Choose a number from below, or type in your own value + 1 / 1 hour + \[rs] \[dq]1h\[dq] + 2 / 24 hours + \[rs] \[dq]24h\[dq] + 3 / 24 hours + \[rs] \[dq]48h\[dq] +info_age> 2 +The maximum size of stored chunks. When the storage grows beyond this size, the oldest chunks will be deleted. +Default: 10G +Choose a number from below, or type in your own value + 1 / 500 MiB + \[rs] \[dq]500M\[dq] + 2 / 1 GiB + \[rs] \[dq]1G\[dq] + 3 / 10 GiB + \[rs] \[dq]10G\[dq] +chunk_total_size> 3 +Remote config +-------------------- +[test-cache] +remote = local:/test +plex_url = http://127.0.0.1:32400 +plex_username = dummyusername +plex_password = *** ENCRYPTED *** +chunk_size = 5M +info_age = 48h +chunk_total_size = 10G +\f[R] +.fi +.PP +You can then use it like this, +.PP +List directories in top level of your drive +.IP +.nf +\f[C] +rclone lsd test-cache: +\f[R] +.fi +.PP +List all the files in your drive +.IP +.nf +\f[C] +rclone ls test-cache: +\f[R] +.fi +.PP +To start a cached mount +.IP +.nf +\f[C] +rclone mount --allow-other test-cache: /var/tmp/test-cache +\f[R] +.fi +.SS Write Features +.SS Offline uploading +.PP +In an effort to make writing through cache more reliable, the backend +now supports this feature which can be activated by specifying a +\f[C]cache-tmp-upload-path\f[R]. +.PP +A files goes through these states when using this feature: +.IP "1." 3 +An upload is started (usually by copying a file on the cache remote) +.IP "2." 3 +When the copy to the temporary location is complete the file is part of +the cached remote and looks and behaves like any other file (reading +included) +.IP "3." 3 +After \f[C]cache-tmp-wait-time\f[R] passes and the file is next in line, +\f[C]rclone move\f[R] is used to move the file to the cloud provider +.IP "4." 3 +Reading the file still works during the upload but most modifications on +it will be prohibited +.IP "5." 3 +Once the move is complete the file is unlocked for modifications as it +becomes as any other regular file +.IP "6." 3 +If the file is being read through \f[C]cache\f[R] when it\[aq]s actually +deleted from the temporary path then \f[C]cache\f[R] will simply swap +the source to the cloud provider without interrupting the reading (small +blip can happen though) +.PP +Files are uploaded in sequence and only one file is uploaded at a time. +Uploads will be stored in a queue and be processed based on the order +they were added. +The queue and the temporary storage is persistent across restarts but +can be cleared on startup with the \f[C]--cache-db-purge\f[R] flag. +.SS Write Support +.PP +Writes are supported through \f[C]cache\f[R]. +One caveat is that a mounted cache remote does not add any retry or +fallback mechanism to the upload operation. +This will depend on the implementation of the wrapped remote. +Consider using \f[C]Offline uploading\f[R] for reliable writes. +.PP +One special case is covered with \f[C]cache-writes\f[R] which will cache +the file data at the same time as the upload when it is enabled making +it available from the cache store immediately once the upload is +finished. +.SS Read Features +.SS Multiple connections +.PP +To counter the high latency between a local PC where rclone is running +and cloud providers, the cache remote can split multiple requests to the +cloud provider for smaller file chunks and combines them together +locally where they can be available almost immediately before the reader +usually needs them. +.PP +This is similar to buffering when media files are played online. +Rclone will stay around the current marker but always try its best to +stay ahead and prepare the data before. +.SS Plex Integration +.PP +There is a direct integration with Plex which allows cache to detect +during reading if the file is in playback or not. +This helps cache to adapt how it queries the cloud provider depending on +what is needed for. +.PP +Scans will have a minimum amount of workers (1) while in a confirmed +playback cache will deploy the configured number of workers. +.PP +This integration opens the doorway to additional performance +improvements which will be explored in the near future. +.PP +\f[B]Note:\f[R] If Plex options are not configured, \f[C]cache\f[R] will +function with its configured options without adapting any of its +settings. +.PP +How to enable? +Run \f[C]rclone config\f[R] and add all the Plex options (endpoint, +username and password) in your remote and it will be automatically +enabled. +.PP +Affected settings: - \f[C]cache-workers\f[R]: \f[I]Configured value\f[R] +during confirmed playback or \f[I]1\f[R] all the other times +.SS Certificate Validation +.PP +When the Plex server is configured to only accept secure connections, it +is possible to use \f[C].plex.direct\f[R] URLs to ensure certificate +validation succeeds. +These URLs are used by Plex internally to connect to the Plex server +securely. +.PP +The format for these URLs is the following: +.PP +\f[C]https://ip-with-dots-replaced.server-hash.plex.direct:32400/\f[R] +.PP +The \f[C]ip-with-dots-replaced\f[R] part can be any IPv4 address, where +the dots have been replaced with dashes, e.g. +\f[C]127.0.0.1\f[R] becomes \f[C]127-0-0-1\f[R]. +.PP +To get the \f[C]server-hash\f[R] part, the easiest way is to visit +.PP +https://plex.tv/api/resources?includeHttps=1&X-Plex-Token=your-plex-token +.PP +This page will list all the available Plex servers for your account with +at least one \f[C].plex.direct\f[R] link for each. +Copy one URL and replace the IP address with the desired address. +This can be used as the \f[C]plex_url\f[R] value. +.SS Known issues +.SS Mount and --dir-cache-time +.PP +--dir-cache-time controls the first layer of directory caching which +works at the mount layer. +Being an independent caching mechanism from the \f[C]cache\f[R] backend, +it will manage its own entries based on the configured time. +.PP +To avoid getting in a scenario where dir cache has obsolete data and +cache would have the correct one, try to set \f[C]--dir-cache-time\f[R] +to a lower time than \f[C]--cache-info-age\f[R]. +Default values are already configured in this way. +.SS Windows support - Experimental +.PP +There are a couple of issues with Windows \f[C]mount\f[R] functionality +that still require some investigations. +It should be considered as experimental thus far as fixes come in for +this OS. +.PP +Most of the issues seem to be related to the difference between +filesystems on Linux flavors and Windows as cache is heavily dependent +on them. +.PP +Any reports or feedback on how cache behaves on this OS is greatly +appreciated. +.IP \[bu] 2 +https://github.com/rclone/rclone/issues/1935 +.IP \[bu] 2 +https://github.com/rclone/rclone/issues/1907 +.IP \[bu] 2 +https://github.com/rclone/rclone/issues/1834 +.SS Risk of throttling +.PP +Future iterations of the cache backend will make use of the pooling +functionality of the cloud provider to synchronize and at the same time +make writing through it more tolerant to failures. +.PP +There are a couple of enhancements in track to add these but in the +meantime there is a valid concern that the expiring cache listings can +lead to cloud provider throttles or bans due to repeated queries on it +for very large mounts. +.PP +Some recommendations: - don\[aq]t use a very small interval for entry +information (\f[C]--cache-info-age\f[R]) - while writes aren\[aq]t yet +optimised, you can still write through \f[C]cache\f[R] which gives you +the advantage of adding the file in the cache at the same time if +configured to do so. +.PP +Future enhancements: +.IP \[bu] 2 +https://github.com/rclone/rclone/issues/1937 +.IP \[bu] 2 +https://github.com/rclone/rclone/issues/1936 +.SS cache and crypt +.PP +One common scenario is to keep your data encrypted in the cloud provider +using the \f[C]crypt\f[R] remote. +\f[C]crypt\f[R] uses a similar technique to wrap around an existing +remote and handles this translation in a seamless way. +.PP +There is an issue with wrapping the remotes in this order: \f[B]cloud +remote\f[R] -> \f[B]crypt\f[R] -> \f[B]cache\f[R] +.PP +During testing, I experienced a lot of bans with the remotes in this +order. +I suspect it might be related to how crypt opens files on the cloud +provider which makes it think we\[aq]re downloading the full file +instead of small chunks. +Organizing the remotes in this order yields better results: \f[B]cloud +remote\f[R] -> \f[B]cache\f[R] -> \f[B]crypt\f[R] +.SS absolute remote paths +.PP +\f[C]cache\f[R] can not differentiate between relative and absolute +paths for the wrapped remote. +Any path given in the \f[C]remote\f[R] config setting and on the command +line will be passed to the wrapped remote as is, but for storing the +chunks on disk the path will be made relative by removing any leading +\f[C]/\f[R] character. +.PP +This behavior is irrelevant for most backend types, but there are +backends where a leading \f[C]/\f[R] changes the effective directory, +e.g. +in the \f[C]sftp\f[R] backend paths starting with a \f[C]/\f[R] are +relative to the root of the SSH server and paths without are relative to +the user home directory. +As a result \f[C]sftp:bin\f[R] and \f[C]sftp:/bin\f[R] will share the +same cache folder, even if they represent a different directory on the +SSH server. +.SS Cache and Remote Control (--rc) +.PP +Cache supports the new \f[C]--rc\f[R] mode in rclone and can be remote +controlled through the following end points: By default, the listener is +disabled if you do not add the flag. +.SS rc cache/expire +.PP +Purge a remote from the cache backend. +Supports either a directory or a file. +It supports both encrypted and unencrypted file names if cache is +wrapped by crypt. +.PP +Params: - \f[B]remote\f[R] = path to remote \f[B](required)\f[R] - +\f[B]withData\f[R] = true/false to delete cached data (chunks) as well +\f[I](optional, false by default)\f[R] +.SS Standard options +.PP +Here are the Standard options specific to cache (Cache a remote). +.SS --cache-remote +.PP +Remote to cache. +.PP Normally should contain a \[aq]:\[aq] and a path, e.g. \[dq]myremote:path/to/dir\[dq], \[dq]myremote:bucket\[dq] or maybe \[dq]myremote:\[dq] (not recommended). -remote> local:/test Optional: The URL of the Plex server plex_url> -http://127.0.0.1:32400 Optional: The username of the Plex user -plex_username> dummyusername Optional: The password of the Plex user y) -Yes type in my own password g) Generate random password n) No leave this -optional password blank y/g/n> y Enter the password: password: Confirm -the password: password: The size of a chunk. -Lower value good for slow connections but can affect seamless reading. -Default: 5M Choose a number from below, or type in your own value 1 / 1 -MiB \ \[dq]1M\[dq] 2 / 5 MiB \ \[dq]5M\[dq] 3 / 10 MiB \ \[dq]10M\[dq] -chunk_size> 2 How much time should object info (file size, file hashes, -etc.) be stored in cache. -Use a very high value if you don\[aq]t plan on changing the source FS -from outside the cache. -Accepted units are: \[dq]s\[dq], \[dq]m\[dq], \[dq]h\[dq]. -Default: 5m Choose a number from below, or type in your own value 1 / 1 -hour \ \[dq]1h\[dq] 2 / 24 hours \ \[dq]24h\[dq] 3 / 24 hours -\ \[dq]48h\[dq] info_age> 2 The maximum size of stored chunks. -When the storage grows beyond this size, the oldest chunks will be -deleted. -Default: 10G Choose a number from below, or type in your own value 1 / -500 MiB \ \[dq]500M\[dq] 2 / 1 GiB \ \[dq]1G\[dq] 3 / 10 GiB -\ \[dq]10G\[dq] chunk_total_size> 3 Remote config -------------------- -[test-cache] remote = local:/test plex_url = http://127.0.0.1:32400 -plex_username = dummyusername plex_password = *** ENCRYPTED *** -chunk_size = 5M info_age = 48h chunk_total_size = 10G -.IP -.nf -\f[C] -You can then use it like this, - -List directories in top level of your drive - - rclone lsd test-cache: - -List all the files in your drive - - rclone ls test-cache: - -To start a cached mount - - rclone mount --allow-other test-cache: /var/tmp/test-cache - -### Write Features ### - -### Offline uploading ### - -In an effort to make writing through cache more reliable, the backend -now supports this feature which can be activated by specifying a -\[ga]cache-tmp-upload-path\[ga]. - -A files goes through these states when using this feature: - -1. An upload is started (usually by copying a file on the cache remote) -2. When the copy to the temporary location is complete the file is part -of the cached remote and looks and behaves like any other file (reading included) -3. After \[ga]cache-tmp-wait-time\[ga] passes and the file is next in line, \[ga]rclone move\[ga] -is used to move the file to the cloud provider -4. Reading the file still works during the upload but most modifications on it will be prohibited -5. Once the move is complete the file is unlocked for modifications as it -becomes as any other regular file -6. If the file is being read through \[ga]cache\[ga] when it\[aq]s actually -deleted from the temporary path then \[ga]cache\[ga] will simply swap the source -to the cloud provider without interrupting the reading (small blip can happen though) - -Files are uploaded in sequence and only one file is uploaded at a time. -Uploads will be stored in a queue and be processed based on the order they were added. -The queue and the temporary storage is persistent across restarts but -can be cleared on startup with the \[ga]--cache-db-purge\[ga] flag. - -### Write Support ### - -Writes are supported through \[ga]cache\[ga]. -One caveat is that a mounted cache remote does not add any retry or fallback -mechanism to the upload operation. This will depend on the implementation -of the wrapped remote. Consider using \[ga]Offline uploading\[ga] for reliable writes. - -One special case is covered with \[ga]cache-writes\[ga] which will cache the file -data at the same time as the upload when it is enabled making it available -from the cache store immediately once the upload is finished. - -### Read Features ### - -#### Multiple connections #### - -To counter the high latency between a local PC where rclone is running -and cloud providers, the cache remote can split multiple requests to the -cloud provider for smaller file chunks and combines them together locally -where they can be available almost immediately before the reader usually -needs them. - -This is similar to buffering when media files are played online. Rclone -will stay around the current marker but always try its best to stay ahead -and prepare the data before. - -#### Plex Integration #### - -There is a direct integration with Plex which allows cache to detect during reading -if the file is in playback or not. This helps cache to adapt how it queries -the cloud provider depending on what is needed for. - -Scans will have a minimum amount of workers (1) while in a confirmed playback cache -will deploy the configured number of workers. - -This integration opens the doorway to additional performance improvements -which will be explored in the near future. - -**Note:** If Plex options are not configured, \[ga]cache\[ga] will function with its -configured options without adapting any of its settings. - -How to enable? Run \[ga]rclone config\[ga] and add all the Plex options (endpoint, username -and password) in your remote and it will be automatically enabled. - -Affected settings: -- \[ga]cache-workers\[ga]: _Configured value_ during confirmed playback or _1_ all the other times - -##### Certificate Validation ##### - -When the Plex server is configured to only accept secure connections, it is -possible to use \[ga].plex.direct\[ga] URLs to ensure certificate validation succeeds. -These URLs are used by Plex internally to connect to the Plex server securely. - -The format for these URLs is the following: - -\[ga]https://ip-with-dots-replaced.server-hash.plex.direct:32400/\[ga] - -The \[ga]ip-with-dots-replaced\[ga] part can be any IPv4 address, where the dots -have been replaced with dashes, e.g. \[ga]127.0.0.1\[ga] becomes \[ga]127-0-0-1\[ga]. - -To get the \[ga]server-hash\[ga] part, the easiest way is to visit - -https://plex.tv/api/resources?includeHttps=1&X-Plex-Token=your-plex-token - -This page will list all the available Plex servers for your account -with at least one \[ga].plex.direct\[ga] link for each. Copy one URL and replace -the IP address with the desired address. This can be used as the -\[ga]plex_url\[ga] value. - -### Known issues ### - -#### Mount and --dir-cache-time #### - ---dir-cache-time controls the first layer of directory caching which works at the mount layer. -Being an independent caching mechanism from the \[ga]cache\[ga] backend, it will manage its own entries -based on the configured time. - -To avoid getting in a scenario where dir cache has obsolete data and cache would have the correct -one, try to set \[ga]--dir-cache-time\[ga] to a lower time than \[ga]--cache-info-age\[ga]. Default values are -already configured in this way. - -#### Windows support - Experimental #### - -There are a couple of issues with Windows \[ga]mount\[ga] functionality that still require some investigations. -It should be considered as experimental thus far as fixes come in for this OS. - -Most of the issues seem to be related to the difference between filesystems -on Linux flavors and Windows as cache is heavily dependent on them. - -Any reports or feedback on how cache behaves on this OS is greatly appreciated. - -- https://github.com/rclone/rclone/issues/1935 -- https://github.com/rclone/rclone/issues/1907 -- https://github.com/rclone/rclone/issues/1834 - -#### Risk of throttling #### - -Future iterations of the cache backend will make use of the pooling functionality -of the cloud provider to synchronize and at the same time make writing through it -more tolerant to failures. - -There are a couple of enhancements in track to add these but in the meantime -there is a valid concern that the expiring cache listings can lead to cloud provider -throttles or bans due to repeated queries on it for very large mounts. - -Some recommendations: -- don\[aq]t use a very small interval for entry information (\[ga]--cache-info-age\[ga]) -- while writes aren\[aq]t yet optimised, you can still write through \[ga]cache\[ga] which gives you the advantage -of adding the file in the cache at the same time if configured to do so. - -Future enhancements: - -- https://github.com/rclone/rclone/issues/1937 -- https://github.com/rclone/rclone/issues/1936 - -#### cache and crypt #### - -One common scenario is to keep your data encrypted in the cloud provider -using the \[ga]crypt\[ga] remote. \[ga]crypt\[ga] uses a similar technique to wrap around -an existing remote and handles this translation in a seamless way. - -There is an issue with wrapping the remotes in this order: -**cloud remote** -> **crypt** -> **cache** - -During testing, I experienced a lot of bans with the remotes in this order. -I suspect it might be related to how crypt opens files on the cloud provider -which makes it think we\[aq]re downloading the full file instead of small chunks. -Organizing the remotes in this order yields better results: -**cloud remote** -> **cache** -> **crypt** - -#### absolute remote paths #### - -\[ga]cache\[ga] can not differentiate between relative and absolute paths for the wrapped remote. -Any path given in the \[ga]remote\[ga] config setting and on the command line will be passed to -the wrapped remote as is, but for storing the chunks on disk the path will be made -relative by removing any leading \[ga]/\[ga] character. - -This behavior is irrelevant for most backend types, but there are backends where a leading \[ga]/\[ga] -changes the effective directory, e.g. in the \[ga]sftp\[ga] backend paths starting with a \[ga]/\[ga] are -relative to the root of the SSH server and paths without are relative to the user home directory. -As a result \[ga]sftp:bin\[ga] and \[ga]sftp:/bin\[ga] will share the same cache folder, even if they represent -a different directory on the SSH server. - -### Cache and Remote Control (--rc) ### -Cache supports the new \[ga]--rc\[ga] mode in rclone and can be remote controlled through the following end points: -By default, the listener is disabled if you do not add the flag. - -### rc cache/expire -Purge a remote from the cache backend. Supports either a directory or a file. -It supports both encrypted and unencrypted file names if cache is wrapped by crypt. - -Params: - - **remote** = path to remote **(required)** - - **withData** = true/false to delete cached data (chunks) as well _(optional, false by default)_ - - -### Standard options - -Here are the Standard options specific to cache (Cache a remote). - -#### --cache-remote - -Remote to cache. - -Normally should contain a \[aq]:\[aq] and a path, e.g. \[dq]myremote:path/to/dir\[dq], -\[dq]myremote:bucket\[dq] or maybe \[dq]myremote:\[dq] (not recommended). - +.PP Properties: - -- Config: remote -- Env Var: RCLONE_CACHE_REMOTE -- Type: string -- Required: true - -#### --cache-plex-url - +.IP \[bu] 2 +Config: remote +.IP \[bu] 2 +Env Var: RCLONE_CACHE_REMOTE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --cache-plex-url +.PP The URL of the Plex server. - +.PP Properties: - -- Config: plex_url -- Env Var: RCLONE_CACHE_PLEX_URL -- Type: string -- Required: false - -#### --cache-plex-username - +.IP \[bu] 2 +Config: plex_url +.IP \[bu] 2 +Env Var: RCLONE_CACHE_PLEX_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --cache-plex-username +.PP The username of the Plex user. - +.PP Properties: - -- Config: plex_username -- Env Var: RCLONE_CACHE_PLEX_USERNAME -- Type: string -- Required: false - -#### --cache-plex-password - +.IP \[bu] 2 +Config: plex_username +.IP \[bu] 2 +Env Var: RCLONE_CACHE_PLEX_USERNAME +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --cache-plex-password +.PP The password of the Plex user. - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP Properties: - -- Config: plex_password -- Env Var: RCLONE_CACHE_PLEX_PASSWORD -- Type: string -- Required: false - -#### --cache-chunk-size - +.IP \[bu] 2 +Config: plex_password +.IP \[bu] 2 +Env Var: RCLONE_CACHE_PLEX_PASSWORD +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --cache-chunk-size +.PP The size of a chunk (partial file data). - -Use lower numbers for slower connections. If the chunk size is -changed, any downloaded chunks will be invalid and cache-chunk-path -will need to be cleared or unexpected EOF errors will occur. - +.PP +Use lower numbers for slower connections. +If the chunk size is changed, any downloaded chunks will be invalid and +cache-chunk-path will need to be cleared or unexpected EOF errors will +occur. +.PP Properties: - -- Config: chunk_size -- Env Var: RCLONE_CACHE_CHUNK_SIZE -- Type: SizeSuffix -- Default: 5Mi -- Examples: - - \[dq]1M\[dq] - - 1 MiB - - \[dq]5M\[dq] - - 5 MiB - - \[dq]10M\[dq] - - 10 MiB - -#### --cache-info-age - -How long to cache file structure information (directory listings, file size, times, etc.). -If all write operations are done through the cache then you can safely make -this value very large as the cache store will also be updated in real time. - +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_CACHE_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 5Mi +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]1M\[dq] +.RS 2 +.IP \[bu] 2 +1 MiB +.RE +.IP \[bu] 2 +\[dq]5M\[dq] +.RS 2 +.IP \[bu] 2 +5 MiB +.RE +.IP \[bu] 2 +\[dq]10M\[dq] +.RS 2 +.IP \[bu] 2 +10 MiB +.RE +.RE +.SS --cache-info-age +.PP +How long to cache file structure information (directory listings, file +size, times, etc.). +If all write operations are done through the cache then you can safely +make this value very large as the cache store will also be updated in +real time. +.PP Properties: - -- Config: info_age -- Env Var: RCLONE_CACHE_INFO_AGE -- Type: Duration -- Default: 6h0m0s -- Examples: - - \[dq]1h\[dq] - - 1 hour - - \[dq]24h\[dq] - - 24 hours - - \[dq]48h\[dq] - - 48 hours - -#### --cache-chunk-total-size - +.IP \[bu] 2 +Config: info_age +.IP \[bu] 2 +Env Var: RCLONE_CACHE_INFO_AGE +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 6h0m0s +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]1h\[dq] +.RS 2 +.IP \[bu] 2 +1 hour +.RE +.IP \[bu] 2 +\[dq]24h\[dq] +.RS 2 +.IP \[bu] 2 +24 hours +.RE +.IP \[bu] 2 +\[dq]48h\[dq] +.RS 2 +.IP \[bu] 2 +48 hours +.RE +.RE +.SS --cache-chunk-total-size +.PP The total size that the chunks can take up on the local disk. - -If the cache exceeds this value then it will start to delete the -oldest chunks until it goes under this value. - +.PP +If the cache exceeds this value then it will start to delete the oldest +chunks until it goes under this value. +.PP Properties: - -- Config: chunk_total_size -- Env Var: RCLONE_CACHE_CHUNK_TOTAL_SIZE -- Type: SizeSuffix -- Default: 10Gi -- Examples: - - \[dq]500M\[dq] - - 500 MiB - - \[dq]1G\[dq] - - 1 GiB - - \[dq]10G\[dq] - - 10 GiB - -### Advanced options - +.IP \[bu] 2 +Config: chunk_total_size +.IP \[bu] 2 +Env Var: RCLONE_CACHE_CHUNK_TOTAL_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 10Gi +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]500M\[dq] +.RS 2 +.IP \[bu] 2 +500 MiB +.RE +.IP \[bu] 2 +\[dq]1G\[dq] +.RS 2 +.IP \[bu] 2 +1 GiB +.RE +.IP \[bu] 2 +\[dq]10G\[dq] +.RS 2 +.IP \[bu] 2 +10 GiB +.RE +.RE +.SS Advanced options +.PP Here are the Advanced options specific to cache (Cache a remote). - -#### --cache-plex-token - +.SS --cache-plex-token +.PP The plex token for authentication - auto set normally. - +.PP Properties: - -- Config: plex_token -- Env Var: RCLONE_CACHE_PLEX_TOKEN -- Type: string -- Required: false - -#### --cache-plex-insecure - +.IP \[bu] 2 +Config: plex_token +.IP \[bu] 2 +Env Var: RCLONE_CACHE_PLEX_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --cache-plex-insecure +.PP Skip all certificate verification when connecting to the Plex server. - +.PP Properties: - -- Config: plex_insecure -- Env Var: RCLONE_CACHE_PLEX_INSECURE -- Type: string -- Required: false - -#### --cache-db-path - +.IP \[bu] 2 +Config: plex_insecure +.IP \[bu] 2 +Env Var: RCLONE_CACHE_PLEX_INSECURE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --cache-db-path +.PP Directory to store file structure metadata DB. - +.PP The remote name is used as the DB file name. - +.PP Properties: - -- Config: db_path -- Env Var: RCLONE_CACHE_DB_PATH -- Type: string -- Default: \[dq]$HOME/.cache/rclone/cache-backend\[dq] - -#### --cache-chunk-path - +.IP \[bu] 2 +Config: db_path +.IP \[bu] 2 +Env Var: RCLONE_CACHE_DB_PATH +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]$HOME/.cache/rclone/cache-backend\[dq] +.SS --cache-chunk-path +.PP Directory to cache chunk files. - -Path to where partial file data (chunks) are stored locally. The remote -name is appended to the final path. - -This config follows the \[dq]--cache-db-path\[dq]. If you specify a custom -location for \[dq]--cache-db-path\[dq] and don\[aq]t specify one for \[dq]--cache-chunk-path\[dq] -then \[dq]--cache-chunk-path\[dq] will use the same path as \[dq]--cache-db-path\[dq]. - +.PP +Path to where partial file data (chunks) are stored locally. +The remote name is appended to the final path. +.PP +This config follows the \[dq]--cache-db-path\[dq]. +If you specify a custom location for \[dq]--cache-db-path\[dq] and +don\[aq]t specify one for \[dq]--cache-chunk-path\[dq] then +\[dq]--cache-chunk-path\[dq] will use the same path as +\[dq]--cache-db-path\[dq]. +.PP Properties: - -- Config: chunk_path -- Env Var: RCLONE_CACHE_CHUNK_PATH -- Type: string -- Default: \[dq]$HOME/.cache/rclone/cache-backend\[dq] - -#### --cache-db-purge - +.IP \[bu] 2 +Config: chunk_path +.IP \[bu] 2 +Env Var: RCLONE_CACHE_CHUNK_PATH +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]$HOME/.cache/rclone/cache-backend\[dq] +.SS --cache-db-purge +.PP Clear all the cached data for this remote on start. - +.PP Properties: - -- Config: db_purge -- Env Var: RCLONE_CACHE_DB_PURGE -- Type: bool -- Default: false - -#### --cache-chunk-clean-interval - +.IP \[bu] 2 +Config: db_purge +.IP \[bu] 2 +Env Var: RCLONE_CACHE_DB_PURGE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --cache-chunk-clean-interval +.PP How often should the cache perform cleanups of the chunk storage. - -The default value should be ok for most people. If you find that the -cache goes over \[dq]cache-chunk-total-size\[dq] too often then try to lower -this value to force it to perform cleanups more often. - +.PP +The default value should be ok for most people. +If you find that the cache goes over \[dq]cache-chunk-total-size\[dq] +too often then try to lower this value to force it to perform cleanups +more often. +.PP Properties: - -- Config: chunk_clean_interval -- Env Var: RCLONE_CACHE_CHUNK_CLEAN_INTERVAL -- Type: Duration -- Default: 1m0s - -#### --cache-read-retries - +.IP \[bu] 2 +Config: chunk_clean_interval +.IP \[bu] 2 +Env Var: RCLONE_CACHE_CHUNK_CLEAN_INTERVAL +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 1m0s +.SS --cache-read-retries +.PP How many times to retry a read from a cache storage. - +.PP Since reading from a cache stream is independent from downloading file data, readers can get to a point where there\[aq]s no more data in the -cache. Most of the times this can indicate a connectivity issue if -cache isn\[aq]t able to provide file data anymore. - -For really slow connections, increase this to a point where the stream is -able to provide data but your experience will be very stuttering. - +cache. +Most of the times this can indicate a connectivity issue if cache +isn\[aq]t able to provide file data anymore. +.PP +For really slow connections, increase this to a point where the stream +is able to provide data but your experience will be very stuttering. +.PP Properties: - -- Config: read_retries -- Env Var: RCLONE_CACHE_READ_RETRIES -- Type: int -- Default: 10 - -#### --cache-workers - +.IP \[bu] 2 +Config: read_retries +.IP \[bu] 2 +Env Var: RCLONE_CACHE_READ_RETRIES +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 10 +.SS --cache-workers +.PP How many workers should run in parallel to download chunks. - -Higher values will mean more parallel processing (better CPU needed) -and more concurrent requests on the cloud provider. This impacts -several aspects like the cloud provider API limits, more stress on the -hardware that rclone runs on but it also means that streams will be -more fluid and data will be available much more faster to readers. - -**Note**: If the optional Plex integration is enabled then this +.PP +Higher values will mean more parallel processing (better CPU needed) and +more concurrent requests on the cloud provider. +This impacts several aspects like the cloud provider API limits, more +stress on the hardware that rclone runs on but it also means that +streams will be more fluid and data will be available much more faster +to readers. +.PP +\f[B]Note\f[R]: If the optional Plex integration is enabled then this setting will adapt to the type of reading performed and the value specified here will be used as a maximum number of workers to use. - +.PP Properties: - -- Config: workers -- Env Var: RCLONE_CACHE_WORKERS -- Type: int -- Default: 4 - -#### --cache-chunk-no-memory - +.IP \[bu] 2 +Config: workers +.IP \[bu] 2 +Env Var: RCLONE_CACHE_WORKERS +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 4 +.SS --cache-chunk-no-memory +.PP Disable the in-memory cache for storing chunks during streaming. - -By default, cache will keep file data during streaming in RAM as well -to provide it to readers as fast as possible. - +.PP +By default, cache will keep file data during streaming in RAM as well to +provide it to readers as fast as possible. +.PP This transient data is evicted as soon as it is read and the number of -chunks stored doesn\[aq]t exceed the number of workers. However, depending -on other settings like \[dq]cache-chunk-size\[dq] and \[dq]cache-workers\[dq] this footprint -can increase if there are parallel streams too (multiple files being read -at the same time). - -If the hardware permits it, use this feature to provide an overall better -performance during streaming but it can also be disabled if RAM is not -available on the local machine. - +chunks stored doesn\[aq]t exceed the number of workers. +However, depending on other settings like \[dq]cache-chunk-size\[dq] and +\[dq]cache-workers\[dq] this footprint can increase if there are +parallel streams too (multiple files being read at the same time). +.PP +If the hardware permits it, use this feature to provide an overall +better performance during streaming but it can also be disabled if RAM +is not available on the local machine. +.PP Properties: - -- Config: chunk_no_memory -- Env Var: RCLONE_CACHE_CHUNK_NO_MEMORY -- Type: bool -- Default: false - -#### --cache-rps - -Limits the number of requests per second to the source FS (-1 to disable). - +.IP \[bu] 2 +Config: chunk_no_memory +.IP \[bu] 2 +Env Var: RCLONE_CACHE_CHUNK_NO_MEMORY +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --cache-rps +.PP +Limits the number of requests per second to the source FS (-1 to +disable). +.PP This setting places a hard limit on the number of requests per second -that cache will be doing to the cloud provider remote and try to -respect that value by setting waits between reads. - +that cache will be doing to the cloud provider remote and try to respect +that value by setting waits between reads. +.PP If you find that you\[aq]re getting banned or limited on the cloud provider through cache and know that a smaller number of requests per -second will allow you to work with it then you can use this setting -for that. - +second will allow you to work with it then you can use this setting for +that. +.PP A good balance of all the other settings should make this setting useless but it is available to set for more special cases. - -**NOTE**: This will limit the number of requests during streams but -other API calls to the cloud provider like directory listings will +.PP +\f[B]NOTE\f[R]: This will limit the number of requests during streams +but other API calls to the cloud provider like directory listings will still pass. - +.PP Properties: - -- Config: rps -- Env Var: RCLONE_CACHE_RPS -- Type: int -- Default: -1 - -#### --cache-writes - +.IP \[bu] 2 +Config: rps +.IP \[bu] 2 +Env Var: RCLONE_CACHE_RPS +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: -1 +.SS --cache-writes +.PP Cache file data on writes through the FS. - +.PP If you need to read files immediately after you upload them through -cache you can enable this flag to have their data stored in the -cache store at the same time during upload. - +cache you can enable this flag to have their data stored in the cache +store at the same time during upload. +.PP Properties: - -- Config: writes -- Env Var: RCLONE_CACHE_WRITES -- Type: bool -- Default: false - -#### --cache-tmp-upload-path - +.IP \[bu] 2 +Config: writes +.IP \[bu] 2 +Env Var: RCLONE_CACHE_WRITES +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --cache-tmp-upload-path +.PP Directory to keep temporary files until they are uploaded. - +.PP This is the path where cache will use as a temporary storage for new files that need to be uploaded to the cloud provider. - -Specifying a value will enable this feature. Without it, it is -completely disabled and files will be uploaded directly to the cloud -provider - +.PP +Specifying a value will enable this feature. +Without it, it is completely disabled and files will be uploaded +directly to the cloud provider +.PP Properties: - -- Config: tmp_upload_path -- Env Var: RCLONE_CACHE_TMP_UPLOAD_PATH -- Type: string -- Required: false - -#### --cache-tmp-wait-time - +.IP \[bu] 2 +Config: tmp_upload_path +.IP \[bu] 2 +Env Var: RCLONE_CACHE_TMP_UPLOAD_PATH +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --cache-tmp-wait-time +.PP How long should files be stored in local cache before being uploaded. - +.PP This is the duration that a file must wait in the temporary location -_cache-tmp-upload-path_ before it is selected for upload. - -Note that only one file is uploaded at a time and it can take longer -to start the upload if a queue formed for this purpose. - +\f[I]cache-tmp-upload-path\f[R] before it is selected for upload. +.PP +Note that only one file is uploaded at a time and it can take longer to +start the upload if a queue formed for this purpose. +.PP Properties: - -- Config: tmp_wait_time -- Env Var: RCLONE_CACHE_TMP_WAIT_TIME -- Type: Duration -- Default: 15s - -#### --cache-db-wait-time - +.IP \[bu] 2 +Config: tmp_wait_time +.IP \[bu] 2 +Env Var: RCLONE_CACHE_TMP_WAIT_TIME +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 15s +.SS --cache-db-wait-time +.PP How long to wait for the DB to be available - 0 is unlimited. - +.PP Only one process can have the DB open at any one time, so rclone waits for this duration for the DB to become available before it gives an error. - -If you set it to 0 then it will wait forever. - -Properties: - -- Config: db_wait_time -- Env Var: RCLONE_CACHE_DB_WAIT_TIME -- Type: Duration -- Default: 1s - -#### --cache-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_CACHE_DESCRIPTION -- Type: string -- Required: false - -## Backend commands - -Here are the commands specific to the cache backend. - -Run them with - - rclone backend COMMAND remote: - -The help below will explain what arguments each command takes. - -See the [backend](https://rclone.org/commands/rclone_backend/) command for more -info on how to pass options and arguments. - -These can be run on a running backend using the rc command -[backend/command](https://rclone.org/rc/#backend-command). - -### stats - -Print stats on the cache backend in JSON format. - - rclone backend stats remote: [options] [+] - - - -# Chunker - -The \[ga]chunker\[ga] overlay transparently splits large files into smaller chunks -during upload to wrapped remote and transparently assembles them back -when the file is downloaded. This allows to effectively overcome size limits -imposed by storage providers. - -## Configuration - -To use it, first set up the underlying remote following the configuration -instructions for that remote. You can also use a local pathname instead of -a remote. - -First check your chosen remote is working - we\[aq]ll call it \[ga]remote:path\[ga] here. -Note that anything inside \[ga]remote:path\[ga] will be chunked and anything outside -won\[aq]t. This means that if you are using a bucket-based remote (e.g. S3, B2, swift) -then you should probably put the bucket in the remote \[ga]s3:bucket\[ga]. - -Now configure \[ga]chunker\[ga] using \[ga]rclone config\[ga]. We will call this one \[ga]overlay\[ga] -to separate it from the \[ga]remote\[ga] itself. -\f[R] -.fi .PP -No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -name> overlay Type of storage to configure. -Choose a number from below, or type in your own value [snip] XX / -Transparently chunk/split large files \ \[dq]chunker\[dq] [snip] -Storage> chunker Remote to chunk/unchunk. -Normally should contain a \[aq]:\[aq] and a path, e.g. -\[dq]myremote:path/to/dir\[dq], \[dq]myremote:bucket\[dq] or maybe -\[dq]myremote:\[dq] (not recommended). -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -remote> remote:path Files larger than chunk size will be split in -chunks. -Enter a size with suffix K,M,G,T. -Press Enter for the default (\[dq]2G\[dq]). -chunk_size> 100M Choose how chunker handles hash sums. -All modes but \[dq]none\[dq] require metadata. -Enter a string value. -Press Enter for the default (\[dq]md5\[dq]). -Choose a number from below, or type in your own value 1 / Pass any hash -supported by wrapped remote for non-chunked files, return nothing -otherwise \ \[dq]none\[dq] 2 / MD5 for composite files \ \[dq]md5\[dq] 3 -/ SHA1 for composite files \ \[dq]sha1\[dq] 4 / MD5 for all files -\ \[dq]md5all\[dq] 5 / SHA1 for all files \ \[dq]sha1all\[dq] 6 / -Copying a file to chunker will request MD5 from the source falling back -to SHA1 if unsupported \ \[dq]md5quick\[dq] 7 / Similar to -\[dq]md5quick\[dq] but prefers SHA1 over MD5 \ \[dq]sha1quick\[dq] -hash_type> md5 Edit advanced config? -(y/n) y) Yes n) No y/n> n Remote config -------------------- [overlay] -type = chunker remote = remote:bucket chunk_size = 100M hash_type = md5 --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y +If you set it to 0 then it will wait forever. +.PP +Properties: +.IP \[bu] 2 +Config: db_wait_time +.IP \[bu] 2 +Env Var: RCLONE_CACHE_DB_WAIT_TIME +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 1s +.SS --cache-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_CACHE_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Backend commands +.PP +Here are the commands specific to the cache backend. +.PP +Run them with .IP .nf \f[C] -### Specifying the remote - -In normal use, make sure the remote has a \[ga]:\[ga] in. If you specify the remote -without a \[ga]:\[ga] then rclone will use a local directory of that name. -So if you use a remote of \[ga]/path/to/secret/files\[ga] then rclone will -chunk stuff in that directory. If you use a remote of \[ga]name\[ga] then rclone -will put files in a directory called \[ga]name\[ga] in the current directory. - - -### Chunking - -When rclone starts a file upload, chunker checks the file size. If it -doesn\[aq]t exceed the configured chunk size, chunker will just pass the file -to the wrapped remote (however, see caveat below). If a file is large, chunker will transparently cut -data in pieces with temporary names and stream them one by one, on the fly. -Each data chunk will contain the specified number of bytes, except for the -last one which may have less data. If file size is unknown in advance -(this is called a streaming upload), chunker will internally create -a temporary copy, record its size and repeat the above process. - +rclone backend COMMAND remote: +\f[R] +.fi +.PP +The help below will explain what arguments each command takes. +.PP +See the backend (https://rclone.org/commands/rclone_backend/) command +for more info on how to pass options and arguments. +.PP +These can be run on a running backend using the rc command +backend/command (https://rclone.org/rc/#backend-command). +.SS stats +.PP +Print stats on the cache backend in JSON format. +.IP +.nf +\f[C] +rclone backend stats remote: [options] [+] +\f[R] +.fi +.SH Chunker +.PP +The \f[C]chunker\f[R] overlay transparently splits large files into +smaller chunks during upload to wrapped remote and transparently +assembles them back when the file is downloaded. +This allows to effectively overcome size limits imposed by storage +providers. +.SS Configuration +.PP +To use it, first set up the underlying remote following the +configuration instructions for that remote. +You can also use a local pathname instead of a remote. +.PP +First check your chosen remote is working - we\[aq]ll call it +\f[C]remote:path\f[R] here. +Note that anything inside \f[C]remote:path\f[R] will be chunked and +anything outside won\[aq]t. +This means that if you are using a bucket-based remote (e.g. +S3, B2, swift) then you should probably put the bucket in the remote +\f[C]s3:bucket\f[R]. +.PP +Now configure \f[C]chunker\f[R] using \f[C]rclone config\f[R]. +We will call this one \f[C]overlay\f[R] to separate it from the +\f[C]remote\f[R] itself. +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n +name> overlay +Type of storage to configure. +Choose a number from below, or type in your own value +[snip] +XX / Transparently chunk/split large files + \[rs] \[dq]chunker\[dq] +[snip] +Storage> chunker +Remote to chunk/unchunk. +Normally should contain a \[aq]:\[aq] and a path, e.g. \[dq]myremote:path/to/dir\[dq], +\[dq]myremote:bucket\[dq] or maybe \[dq]myremote:\[dq] (not recommended). +Enter a string value. Press Enter for the default (\[dq]\[dq]). +remote> remote:path +Files larger than chunk size will be split in chunks. +Enter a size with suffix K,M,G,T. Press Enter for the default (\[dq]2G\[dq]). +chunk_size> 100M +Choose how chunker handles hash sums. All modes but \[dq]none\[dq] require metadata. +Enter a string value. Press Enter for the default (\[dq]md5\[dq]). +Choose a number from below, or type in your own value + 1 / Pass any hash supported by wrapped remote for non-chunked files, return nothing otherwise + \[rs] \[dq]none\[dq] + 2 / MD5 for composite files + \[rs] \[dq]md5\[dq] + 3 / SHA1 for composite files + \[rs] \[dq]sha1\[dq] + 4 / MD5 for all files + \[rs] \[dq]md5all\[dq] + 5 / SHA1 for all files + \[rs] \[dq]sha1all\[dq] + 6 / Copying a file to chunker will request MD5 from the source falling back to SHA1 if unsupported + \[rs] \[dq]md5quick\[dq] + 7 / Similar to \[dq]md5quick\[dq] but prefers SHA1 over MD5 + \[rs] \[dq]sha1quick\[dq] +hash_type> md5 +Edit advanced config? (y/n) +y) Yes +n) No +y/n> n +Remote config +-------------------- +[overlay] +type = chunker +remote = remote:bucket +chunk_size = 100M +hash_type = md5 +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.SS Specifying the remote +.PP +In normal use, make sure the remote has a \f[C]:\f[R] in. +If you specify the remote without a \f[C]:\f[R] then rclone will use a +local directory of that name. +So if you use a remote of \f[C]/path/to/secret/files\f[R] then rclone +will chunk stuff in that directory. +If you use a remote of \f[C]name\f[R] then rclone will put files in a +directory called \f[C]name\f[R] in the current directory. +.SS Chunking +.PP +When rclone starts a file upload, chunker checks the file size. +If it doesn\[aq]t exceed the configured chunk size, chunker will just +pass the file to the wrapped remote (however, see caveat below). +If a file is large, chunker will transparently cut data in pieces with +temporary names and stream them one by one, on the fly. +Each data chunk will contain the specified number of bytes, except for +the last one which may have less data. +If file size is unknown in advance (this is called a streaming upload), +chunker will internally create a temporary copy, record its size and +repeat the above process. +.PP When upload completes, temporary chunk files are finally renamed. This scheme guarantees that operations can be run in parallel and look from outside as atomic. -A similar method with hidden temporary chunks is used for other operations -(copy/move/rename, etc.). If an operation fails, hidden chunks are normally -destroyed, and the target composite file stays intact. - +A similar method with hidden temporary chunks is used for other +operations (copy/move/rename, etc.). +If an operation fails, hidden chunks are normally destroyed, and the +target composite file stays intact. +.PP When a composite file download is requested, chunker transparently -assembles it by concatenating data chunks in order. As the split is trivial -one could even manually concatenate data chunks together to obtain the -original content. - -When the \[ga]list\[ga] rclone command scans a directory on wrapped remote, -the potential chunk files are accounted for, grouped and assembled into -composite directory entries. Any temporary chunks are hidden. - +assembles it by concatenating data chunks in order. +As the split is trivial one could even manually concatenate data chunks +together to obtain the original content. +.PP +When the \f[C]list\f[R] rclone command scans a directory on wrapped +remote, the potential chunk files are accounted for, grouped and +assembled into composite directory entries. +Any temporary chunks are hidden. +.PP List and other commands can sometimes come across composite files with -missing or invalid chunks, e.g. shadowed by like-named directory or -another file. This usually means that wrapped file system has been directly -tampered with or damaged. If chunker detects a missing chunk it will -by default print warning, skip the whole incomplete group of chunks but -proceed with current command. -You can set the \[ga]--chunker-fail-hard\[ga] flag to have commands abort with -error message in such cases. - -**Caveat**: As it is now, chunker will always create a temporary file in the -backend and then rename it, even if the file is below the chunk threshold. -This will result in unnecessary API calls and can severely restrict throughput -when handling transfers primarily composed of small files on some backends (e.g. Box). -A workaround to this issue is to use chunker only for files above the chunk threshold -via \[ga]--min-size\[ga] and then perform a separate call without chunker on the remaining -files. - - -#### Chunk names - -The default chunk name format is \[ga]*.rclone_chunk.###\[ga], hence by default -chunk names are \[ga]BIG_FILE_NAME.rclone_chunk.001\[ga], -\[ga]BIG_FILE_NAME.rclone_chunk.002\[ga] etc. You can configure another name format -using the \[ga]name_format\[ga] configuration file option. The format uses asterisk -\[ga]*\[ga] as a placeholder for the base file name and one or more consecutive -hash characters \[ga]#\[ga] as a placeholder for sequential chunk number. -There must be one and only one asterisk. The number of consecutive hash -characters defines the minimum length of a string representing a chunk number. +missing or invalid chunks, e.g. +shadowed by like-named directory or another file. +This usually means that wrapped file system has been directly tampered +with or damaged. +If chunker detects a missing chunk it will by default print warning, +skip the whole incomplete group of chunks but proceed with current +command. +You can set the \f[C]--chunker-fail-hard\f[R] flag to have commands +abort with error message in such cases. +.PP +\f[B]Caveat\f[R]: As it is now, chunker will always create a temporary +file in the backend and then rename it, even if the file is below the +chunk threshold. +This will result in unnecessary API calls and can severely restrict +throughput when handling transfers primarily composed of small files on +some backends (e.g. +Box). +A workaround to this issue is to use chunker only for files above the +chunk threshold via \f[C]--min-size\f[R] and then perform a separate +call without chunker on the remaining files. +.SS Chunk names +.PP +The default chunk name format is \f[C]*.rclone_chunk.###\f[R], hence by +default chunk names are \f[C]BIG_FILE_NAME.rclone_chunk.001\f[R], +\f[C]BIG_FILE_NAME.rclone_chunk.002\f[R] etc. +You can configure another name format using the \f[C]name_format\f[R] +configuration file option. +The format uses asterisk \f[C]*\f[R] as a placeholder for the base file +name and one or more consecutive hash characters \f[C]#\f[R] as a +placeholder for sequential chunk number. +There must be one and only one asterisk. +The number of consecutive hash characters defines the minimum length of +a string representing a chunk number. If decimal chunk number has less digits than the number of hashes, it is -left-padded by zeros. If the decimal string is longer, it is left intact. -By default numbering starts from 1 but there is another option that allows -user to start from 0, e.g. for compatibility with legacy software. - -For example, if name format is \[ga]big_*-##.part\[ga] and original file name is -\[ga]data.txt\[ga] and numbering starts from 0, then the first chunk will be named -\[ga]big_data.txt-00.part\[ga], the 99th chunk will be \[ga]big_data.txt-98.part\[ga] -and the 302nd chunk will become \[ga]big_data.txt-301.part\[ga]. - -Note that \[ga]list\[ga] assembles composite directory entries only when chunk names -match the configured format and treats non-conforming file names as normal -non-chunked files. - -When using \[ga]norename\[ga] transactions, chunk names will additionally have a unique -file version suffix. For example, \[ga]BIG_FILE_NAME.rclone_chunk.001_bp562k\[ga]. - - -### Metadata - -Besides data chunks chunker will by default create metadata object for -a composite file. The object is named after the original file. -Chunker allows user to disable metadata completely (the \[ga]none\[ga] format). +left-padded by zeros. +If the decimal string is longer, it is left intact. +By default numbering starts from 1 but there is another option that +allows user to start from 0, e.g. +for compatibility with legacy software. +.PP +For example, if name format is \f[C]big_*-##.part\f[R] and original file +name is \f[C]data.txt\f[R] and numbering starts from 0, then the first +chunk will be named \f[C]big_data.txt-00.part\f[R], the 99th chunk will +be \f[C]big_data.txt-98.part\f[R] and the 302nd chunk will become +\f[C]big_data.txt-301.part\f[R]. +.PP +Note that \f[C]list\f[R] assembles composite directory entries only when +chunk names match the configured format and treats non-conforming file +names as normal non-chunked files. +.PP +When using \f[C]norename\f[R] transactions, chunk names will +additionally have a unique file version suffix. +For example, \f[C]BIG_FILE_NAME.rclone_chunk.001_bp562k\f[R]. +.SS Metadata +.PP +Besides data chunks chunker will by default create metadata object for a +composite file. +The object is named after the original file. +Chunker allows user to disable metadata completely (the \f[C]none\f[R] +format). Note that metadata is normally not created for files smaller than the -configured chunk size. This may change in future rclone releases. - -#### Simple JSON metadata format - -This is the default format. It supports hash sums and chunk validation -for composite files. Meta objects carry the following fields: - -- \[ga]ver\[ga] - version of format, currently \[ga]1\[ga] -- \[ga]size\[ga] - total size of composite file -- \[ga]nchunks\[ga] - number of data chunks in file -- \[ga]md5\[ga] - MD5 hashsum of composite file (if present) -- \[ga]sha1\[ga] - SHA1 hashsum (if present) -- \[ga]txn\[ga] - identifies current version of the file - -There is no field for composite file name as it\[aq]s simply equal to the name -of meta object on the wrapped remote. Please refer to respective sections -for details on hashsums and modified time handling. - -#### No metadata - -You can disable meta objects by setting the meta format option to \[ga]none\[ga]. +configured chunk size. +This may change in future rclone releases. +.SS Simple JSON metadata format +.PP +This is the default format. +It supports hash sums and chunk validation for composite files. +Meta objects carry the following fields: +.IP \[bu] 2 +\f[C]ver\f[R] - version of format, currently \f[C]1\f[R] +.IP \[bu] 2 +\f[C]size\f[R] - total size of composite file +.IP \[bu] 2 +\f[C]nchunks\f[R] - number of data chunks in file +.IP \[bu] 2 +\f[C]md5\f[R] - MD5 hashsum of composite file (if present) +.IP \[bu] 2 +\f[C]sha1\f[R] - SHA1 hashsum (if present) +.IP \[bu] 2 +\f[C]txn\f[R] - identifies current version of the file +.PP +There is no field for composite file name as it\[aq]s simply equal to +the name of meta object on the wrapped remote. +Please refer to respective sections for details on hashsums and modified +time handling. +.SS No metadata +.PP +You can disable meta objects by setting the meta format option to +\f[C]none\f[R]. In this mode chunker will scan directory for all files that follow -configured chunk name format, group them by detecting chunks with the same -base name and show group names as virtual composite files. +configured chunk name format, group them by detecting chunks with the +same base name and show group names as virtual composite files. This method is more prone to missing chunk errors (especially missing last chunk) than format with metadata enabled. - - -### Hashsums - +.SS Hashsums +.PP Chunker supports hashsums only when a compatible metadata is present. -Hence, if you choose metadata format of \[ga]none\[ga], chunker will report hashsum -as \[ga]UNSUPPORTED\[ga]. - +Hence, if you choose metadata format of \f[C]none\f[R], chunker will +report hashsum as \f[C]UNSUPPORTED\f[R]. +.PP Please note that by default metadata is stored only for composite files. -If a file is smaller than configured chunk size, chunker will transparently -redirect hash requests to wrapped remote, so support depends on that. +If a file is smaller than configured chunk size, chunker will +transparently redirect hash requests to wrapped remote, so support +depends on that. You will see the empty string as a hashsum of requested type for small files if the wrapped remote doesn\[aq]t support it. - +.PP Many storage backends support MD5 and SHA1 hash types, so does chunker. With chunker you can choose one or another but not both. MD5 is set by default as the most supported type. Since chunker keeps hashes for composite files and falls back to the -wrapped remote hash for non-chunked ones, we advise you to choose the same -hash type as supported by wrapped remote so that your file listings +wrapped remote hash for non-chunked ones, we advise you to choose the +same hash type as supported by wrapped remote so that your file listings look coherent. - -If your storage backend does not support MD5 or SHA1 but you need consistent -file hashing, configure chunker with \[ga]md5all\[ga] or \[ga]sha1all\[ga]. These two modes -guarantee given hash for all files. If wrapped remote doesn\[aq]t support it, -chunker will then add metadata to all files, even small. However, this can -double the amount of small files in storage and incur additional service charges. +.PP +If your storage backend does not support MD5 or SHA1 but you need +consistent file hashing, configure chunker with \f[C]md5all\f[R] or +\f[C]sha1all\f[R]. +These two modes guarantee given hash for all files. +If wrapped remote doesn\[aq]t support it, chunker will then add metadata +to all files, even small. +However, this can double the amount of small files in storage and incur +additional service charges. You can even use chunker to force md5/sha1 support in any other remote -at expense of sidecar meta objects by setting e.g. \[ga]hash_type=sha1all\[ga] -to force hashsums and \[ga]chunk_size=1P\[ga] to effectively disable chunking. - +at expense of sidecar meta objects by setting e.g. +\f[C]hash_type=sha1all\f[R] to force hashsums and +\f[C]chunk_size=1P\f[R] to effectively disable chunking. +.PP Normally, when a file is copied to chunker controlled remote, chunker -will ask the file source for compatible file hash and revert to on-the-fly -calculation if none is found. This involves some CPU overhead but provides -a guarantee that given hashsum is available. Also, chunker will reject -a server-side copy or move operation if source and destination hashsum -types are different resulting in the extra network bandwidth, too. -In some rare cases this may be undesired, so chunker provides two optional -choices: \[ga]sha1quick\[ga] and \[ga]md5quick\[ga]. If the source does not support primary -hash type and the quick mode is enabled, chunker will try to fall back to -the secondary type. This will save CPU and bandwidth but can result in empty -hashsums at destination. Beware of consequences: the \[ga]sync\[ga] command will -revert (sometimes silently) to time/size comparison if compatible hashsums +will ask the file source for compatible file hash and revert to +on-the-fly calculation if none is found. +This involves some CPU overhead but provides a guarantee that given +hashsum is available. +Also, chunker will reject a server-side copy or move operation if source +and destination hashsum types are different resulting in the extra +network bandwidth, too. +In some rare cases this may be undesired, so chunker provides two +optional choices: \f[C]sha1quick\f[R] and \f[C]md5quick\f[R]. +If the source does not support primary hash type and the quick mode is +enabled, chunker will try to fall back to the secondary type. +This will save CPU and bandwidth but can result in empty hashsums at +destination. +Beware of consequences: the \f[C]sync\f[R] command will revert +(sometimes silently) to time/size comparison if compatible hashsums between source and target are not found. - - -### Modification times - +.SS Modification times +.PP Chunker stores modification times using the wrapped remote so support -depends on that. For a small non-chunked file the chunker overlay simply -manipulates modification time of the wrapped remote file. -For a composite file with metadata chunker will get and set -modification time of the metadata object on the wrapped remote. -If file is chunked but metadata format is \[ga]none\[ga] then chunker will -use modification time of the first data chunk. - - -### Migrations - -The idiomatic way to migrate to a different chunk size, hash type, transaction -style or chunk naming scheme is to: - -- Collect all your chunked files under a directory and have your - chunker remote point to it. -- Create another directory (most probably on the same cloud storage) - and configure a new remote with desired metadata format, - hash type, chunk naming etc. -- Now run \[ga]rclone sync --interactive oldchunks: newchunks:\[ga] and all your data - will be transparently converted in transfer. - This may take some time, yet chunker will try server-side - copy if possible. -- After checking data integrity you may remove configuration section - of the old remote. - +depends on that. +For a small non-chunked file the chunker overlay simply manipulates +modification time of the wrapped remote file. +For a composite file with metadata chunker will get and set modification +time of the metadata object on the wrapped remote. +If file is chunked but metadata format is \f[C]none\f[R] then chunker +will use modification time of the first data chunk. +.SS Migrations +.PP +The idiomatic way to migrate to a different chunk size, hash type, +transaction style or chunk naming scheme is to: +.IP \[bu] 2 +Collect all your chunked files under a directory and have your chunker +remote point to it. +.IP \[bu] 2 +Create another directory (most probably on the same cloud storage) and +configure a new remote with desired metadata format, hash type, chunk +naming etc. +.IP \[bu] 2 +Now run \f[C]rclone sync --interactive oldchunks: newchunks:\f[R] and +all your data will be transparently converted in transfer. +This may take some time, yet chunker will try server-side copy if +possible. +.IP \[bu] 2 +After checking data integrity you may remove configuration section of +the old remote. +.PP If rclone gets killed during a long operation on a big composite file, -hidden temporary chunks may stay in the directory. They will not be -shown by the \[ga]list\[ga] command but will eat up your account quota. -Please note that the \[ga]deletefile\[ga] command deletes only active -chunks of a file. As a workaround, you can use remote of the wrapped -file system to see them. +hidden temporary chunks may stay in the directory. +They will not be shown by the \f[C]list\f[R] command but will eat up +your account quota. +Please note that the \f[C]deletefile\f[R] command deletes only active +chunks of a file. +As a workaround, you can use remote of the wrapped file system to see +them. An easy way to get rid of hidden garbage is to copy littered directory somewhere using the chunker remote and purge the original directory. -The \[ga]copy\[ga] command will copy only active chunks while the \[ga]purge\[ga] will -remove everything including garbage. - - -### Caveats and Limitations - -Chunker requires wrapped remote to support server-side \[ga]move\[ga] (or \[ga]copy\[ga] + -\[ga]delete\[ga]) operations, otherwise it will explicitly refuse to start. -This is because it internally renames temporary chunk files to their final -names when an operation completes successfully. - -Chunker encodes chunk number in file name, so with default \[ga]name_format\[ga] -setting it adds 17 characters. Also chunker adds 7 characters of temporary -suffix during operations. Many file systems limit base file name without path -by 255 characters. Using rclone\[aq]s crypt remote as a base file system limits -file name by 143 characters. Thus, maximum name length is 231 for most files -and 119 for chunker-over-crypt. A user in need can change name format to -e.g. \[ga]*.rcc##\[ga] and save 10 characters (provided at most 99 chunks per file). - +The \f[C]copy\f[R] command will copy only active chunks while the +\f[C]purge\f[R] will remove everything including garbage. +.SS Caveats and Limitations +.PP +Chunker requires wrapped remote to support server-side \f[C]move\f[R] +(or \f[C]copy\f[R] + \f[C]delete\f[R]) operations, otherwise it will +explicitly refuse to start. +This is because it internally renames temporary chunk files to their +final names when an operation completes successfully. +.PP +Chunker encodes chunk number in file name, so with default +\f[C]name_format\f[R] setting it adds 17 characters. +Also chunker adds 7 characters of temporary suffix during operations. +Many file systems limit base file name without path by 255 characters. +Using rclone\[aq]s crypt remote as a base file system limits file name +by 143 characters. +Thus, maximum name length is 231 for most files and 119 for +chunker-over-crypt. +A user in need can change name format to e.g. +\f[C]*.rcc##\f[R] and save 10 characters (provided at most 99 chunks per +file). +.PP Note that a move implemented using the copy-and-delete method may incur double charging with some cloud storage providers. - +.PP Chunker will not automatically rename existing chunks when you run -\[ga]rclone config\[ga] on a live remote and change the chunk name format. -Beware that in result of this some files which have been treated as chunks -before the change can pop up in directory listings as normal files -and vice versa. The same warning holds for the chunk size. +\f[C]rclone config\f[R] on a live remote and change the chunk name +format. +Beware that in result of this some files which have been treated as +chunks before the change can pop up in directory listings as normal +files and vice versa. +The same warning holds for the chunk size. If you desperately need to change critical chunking settings, you should run data migration as described above. - +.PP If wrapped remote is case insensitive, the chunker overlay will inherit -that property (so you can\[aq]t have a file called \[dq]Hello.doc\[dq] and \[dq]hello.doc\[dq] -in the same directory). - -Chunker included in rclone releases up to \[ga]v1.54\[ga] can sometimes fail to -detect metadata produced by recent versions of rclone. We recommend users -to keep rclone up-to-date to avoid data corruption. - -Changing \[ga]transactions\[ga] is dangerous and requires explicit migration. - - -### Standard options - -Here are the Standard options specific to chunker (Transparently chunk/split large files). - -#### --chunker-remote - +that property (so you can\[aq]t have a file called \[dq]Hello.doc\[dq] +and \[dq]hello.doc\[dq] in the same directory). +.PP +Chunker included in rclone releases up to \f[C]v1.54\f[R] can sometimes +fail to detect metadata produced by recent versions of rclone. +We recommend users to keep rclone up-to-date to avoid data corruption. +.PP +Changing \f[C]transactions\f[R] is dangerous and requires explicit +migration. +.SS Standard options +.PP +Here are the Standard options specific to chunker (Transparently +chunk/split large files). +.SS --chunker-remote +.PP Remote to chunk/unchunk. - -Normally should contain a \[aq]:\[aq] and a path, e.g. \[dq]myremote:path/to/dir\[dq], -\[dq]myremote:bucket\[dq] or maybe \[dq]myremote:\[dq] (not recommended). - +.PP +Normally should contain a \[aq]:\[aq] and a path, e.g. +\[dq]myremote:path/to/dir\[dq], \[dq]myremote:bucket\[dq] or maybe +\[dq]myremote:\[dq] (not recommended). +.PP Properties: - -- Config: remote -- Env Var: RCLONE_CHUNKER_REMOTE -- Type: string -- Required: true - -#### --chunker-chunk-size - +.IP \[bu] 2 +Config: remote +.IP \[bu] 2 +Env Var: RCLONE_CHUNKER_REMOTE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --chunker-chunk-size +.PP Files larger than chunk size will be split in chunks. - +.PP Properties: - -- Config: chunk_size -- Env Var: RCLONE_CHUNKER_CHUNK_SIZE -- Type: SizeSuffix -- Default: 2Gi - -#### --chunker-hash-type - +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_CHUNKER_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 2Gi +.SS --chunker-hash-type +.PP Choose how chunker handles hash sums. - +.PP All modes but \[dq]none\[dq] require metadata. - +.PP Properties: - -- Config: hash_type -- Env Var: RCLONE_CHUNKER_HASH_TYPE -- Type: string -- Default: \[dq]md5\[dq] -- Examples: - - \[dq]none\[dq] - - Pass any hash supported by wrapped remote for non-chunked files. - - Return nothing otherwise. - - \[dq]md5\[dq] - - MD5 for composite files. - - \[dq]sha1\[dq] - - SHA1 for composite files. - - \[dq]md5all\[dq] - - MD5 for all files. - - \[dq]sha1all\[dq] - - SHA1 for all files. - - \[dq]md5quick\[dq] - - Copying a file to chunker will request MD5 from the source. - - Falling back to SHA1 if unsupported. - - \[dq]sha1quick\[dq] - - Similar to \[dq]md5quick\[dq] but prefers SHA1 over MD5. - -### Advanced options - -Here are the Advanced options specific to chunker (Transparently chunk/split large files). - -#### --chunker-name-format - +.IP \[bu] 2 +Config: hash_type +.IP \[bu] 2 +Env Var: RCLONE_CHUNKER_HASH_TYPE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]md5\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]none\[dq] +.RS 2 +.IP \[bu] 2 +Pass any hash supported by wrapped remote for non-chunked files. +.IP \[bu] 2 +Return nothing otherwise. +.RE +.IP \[bu] 2 +\[dq]md5\[dq] +.RS 2 +.IP \[bu] 2 +MD5 for composite files. +.RE +.IP \[bu] 2 +\[dq]sha1\[dq] +.RS 2 +.IP \[bu] 2 +SHA1 for composite files. +.RE +.IP \[bu] 2 +\[dq]md5all\[dq] +.RS 2 +.IP \[bu] 2 +MD5 for all files. +.RE +.IP \[bu] 2 +\[dq]sha1all\[dq] +.RS 2 +.IP \[bu] 2 +SHA1 for all files. +.RE +.IP \[bu] 2 +\[dq]md5quick\[dq] +.RS 2 +.IP \[bu] 2 +Copying a file to chunker will request MD5 from the source. +.IP \[bu] 2 +Falling back to SHA1 if unsupported. +.RE +.IP \[bu] 2 +\[dq]sha1quick\[dq] +.RS 2 +.IP \[bu] 2 +Similar to \[dq]md5quick\[dq] but prefers SHA1 over MD5. +.RE +.RE +.SS Advanced options +.PP +Here are the Advanced options specific to chunker (Transparently +chunk/split large files). +.SS --chunker-name-format +.PP String format of chunk file names. - +.PP The two placeholders are: base file name (*) and chunk number (#...). -There must be one and only one asterisk and one or more consecutive hash characters. -If chunk number has less digits than the number of hashes, it is left-padded by zeros. +There must be one and only one asterisk and one or more consecutive hash +characters. +If chunk number has less digits than the number of hashes, it is +left-padded by zeros. If there are more digits in the number, they are left as is. -Possible chunk files are ignored if their name does not match given format. - +Possible chunk files are ignored if their name does not match given +format. +.PP Properties: - -- Config: name_format -- Env Var: RCLONE_CHUNKER_NAME_FORMAT -- Type: string -- Default: \[dq]*.rclone_chunk.###\[dq] - -#### --chunker-start-from - -Minimum valid chunk number. Usually 0 or 1. - +.IP \[bu] 2 +Config: name_format +.IP \[bu] 2 +Env Var: RCLONE_CHUNKER_NAME_FORMAT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]*.rclone_chunk.###\[dq] +.SS --chunker-start-from +.PP +Minimum valid chunk number. +Usually 0 or 1. +.PP By default chunk numbers start from 1. - +.PP Properties: - -- Config: start_from -- Env Var: RCLONE_CHUNKER_START_FROM -- Type: int -- Default: 1 - -#### --chunker-meta-format - +.IP \[bu] 2 +Config: start_from +.IP \[bu] 2 +Env Var: RCLONE_CHUNKER_START_FROM +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 1 +.SS --chunker-meta-format +.PP Format of the metadata object or \[dq]none\[dq]. - +.PP By default \[dq]simplejson\[dq]. Metadata is a small JSON file named after the composite file. - +.PP Properties: - -- Config: meta_format -- Env Var: RCLONE_CHUNKER_META_FORMAT -- Type: string -- Default: \[dq]simplejson\[dq] -- Examples: - - \[dq]none\[dq] - - Do not use metadata files at all. - - Requires hash type \[dq]none\[dq]. - - \[dq]simplejson\[dq] - - Simple JSON supports hash sums and chunk validation. - - - - It has the following fields: ver, size, nchunks, md5, sha1. - -#### --chunker-fail-hard - +.IP \[bu] 2 +Config: meta_format +.IP \[bu] 2 +Env Var: RCLONE_CHUNKER_META_FORMAT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]simplejson\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]none\[dq] +.RS 2 +.IP \[bu] 2 +Do not use metadata files at all. +.IP \[bu] 2 +Requires hash type \[dq]none\[dq]. +.RE +.IP \[bu] 2 +\[dq]simplejson\[dq] +.RS 2 +.IP \[bu] 2 +Simple JSON supports hash sums and chunk validation. +.IP \[bu] 2 +It has the following fields: ver, size, nchunks, md5, sha1. +.RE +.RE +.SS --chunker-fail-hard +.PP Choose how chunker should handle files with missing or invalid chunks. - +.PP Properties: - -- Config: fail_hard -- Env Var: RCLONE_CHUNKER_FAIL_HARD -- Type: bool -- Default: false -- Examples: - - \[dq]true\[dq] - - Report errors and abort current command. - - \[dq]false\[dq] - - Warn user, skip incomplete file and proceed. - -#### --chunker-transactions - +.IP \[bu] 2 +Config: fail_hard +.IP \[bu] 2 +Env Var: RCLONE_CHUNKER_FAIL_HARD +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]true\[dq] +.RS 2 +.IP \[bu] 2 +Report errors and abort current command. +.RE +.IP \[bu] 2 +\[dq]false\[dq] +.RS 2 +.IP \[bu] 2 +Warn user, skip incomplete file and proceed. +.RE +.RE +.SS --chunker-transactions +.PP Choose how chunker should handle temporary files during transactions. - +.PP Properties: - -- Config: transactions -- Env Var: RCLONE_CHUNKER_TRANSACTIONS -- Type: string -- Default: \[dq]rename\[dq] -- Examples: - - \[dq]rename\[dq] - - Rename temporary files after a successful transaction. - - \[dq]norename\[dq] - - Leave temporary file names and write transaction ID to metadata file. - - Metadata is required for no rename transactions (meta format cannot be \[dq]none\[dq]). - - If you are using norename transactions you should be careful not to downgrade Rclone - - as older versions of Rclone don\[aq]t support this transaction style and will misinterpret - - files manipulated by norename transactions. - - This method is EXPERIMENTAL, don\[aq]t use on production systems. - - \[dq]auto\[dq] - - Rename or norename will be used depending on capabilities of the backend. - - If meta format is set to \[dq]none\[dq], rename transactions will always be used. - - This method is EXPERIMENTAL, don\[aq]t use on production systems. - -#### --chunker-description - -Description of the remote - +.IP \[bu] 2 +Config: transactions +.IP \[bu] 2 +Env Var: RCLONE_CHUNKER_TRANSACTIONS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]rename\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]rename\[dq] +.RS 2 +.IP \[bu] 2 +Rename temporary files after a successful transaction. +.RE +.IP \[bu] 2 +\[dq]norename\[dq] +.RS 2 +.IP \[bu] 2 +Leave temporary file names and write transaction ID to metadata file. +.IP \[bu] 2 +Metadata is required for no rename transactions (meta format cannot be +\[dq]none\[dq]). +.IP \[bu] 2 +If you are using norename transactions you should be careful not to +downgrade Rclone +.IP \[bu] 2 +as older versions of Rclone don\[aq]t support this transaction style and +will misinterpret +.IP \[bu] 2 +files manipulated by norename transactions. +.IP \[bu] 2 +This method is EXPERIMENTAL, don\[aq]t use on production systems. +.RE +.IP \[bu] 2 +\[dq]auto\[dq] +.RS 2 +.IP \[bu] 2 +Rename or norename will be used depending on capabilities of the +backend. +.IP \[bu] 2 +If meta format is set to \[dq]none\[dq], rename transactions will always +be used. +.IP \[bu] 2 +This method is EXPERIMENTAL, don\[aq]t use on production systems. +.RE +.RE +.SS --chunker-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_CHUNKER_DESCRIPTION -- Type: string -- Required: false - - - -# Citrix ShareFile - -[Citrix ShareFile](https://sharefile.com) is a secure file sharing and transfer service aimed as business. - -## Configuration - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_CHUNKER_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SH Citrix ShareFile +.PP +Citrix ShareFile (https://sharefile.com) is a secure file sharing and +transfer service aimed as business. +.SS Configuration +.PP The initial setup for Citrix ShareFile involves getting a token from -Citrix ShareFile which you can in your browser. \[ga]rclone config\[ga] walks you -through it. - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: +Citrix ShareFile which you can in your browser. +\f[C]rclone config\f[R] walks you through it. +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config \f[R] .fi .PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] 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. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value XX / Citrix -Sharefile \ \[dq]sharefile\[dq] Storage> sharefile ** See help for -sharefile backend at: https://rclone.org/sharefile/ ** -.PP +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n +name> remote +Type of storage to configure. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +XX / Citrix Sharefile + \[rs] \[dq]sharefile\[dq] +Storage> sharefile +** See help for sharefile backend at: https://rclone.org/sharefile/ ** + ID of the root folder + +Leave blank to access \[dq]Personal Folders\[dq]. You can use one of the +standard values here or any folder ID (long hex number ID). +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value + 1 / Access the Personal Folders. (Default) + \[rs] \[dq]\[dq] + 2 / Access the Favorites folder. + \[rs] \[dq]favorites\[dq] + 3 / Access all the shared folders. + \[rs] \[dq]allshared\[dq] + 4 / Access all the individual connectors. + \[rs] \[dq]connectors\[dq] + 5 / Access the home, favorites, and shared folders as well as the connectors. + \[rs] \[dq]top\[dq] +root_folder_id> +Edit advanced config? (y/n) +y) Yes +n) No +y/n> n +Remote config +Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access +If not sure try Y. If Y failed, try N. +y) Yes +n) No +y/n> y +If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth?state=XXX +Log in and authorize rclone for access +Waiting for code... +Got code +-------------------- +[remote] +type = sharefile +endpoint = https://XXX.sharefile.com +token = {\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]2019-09-30T19:41:45.878561877+01:00\[dq]} +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +See the remote setup docs (https://rclone.org/remote_setup/) for how to +set it up on a machine with no Internet browser available. +.PP +Note that rclone runs a webserver on your local machine to collect the +token as returned from Citrix ShareFile. +This only runs from the moment it opens your browser to the moment you +get back the verification code. +This is on \f[C]http://127.0.0.1:53682/\f[R] and this it may require you +to unblock it temporarily if you are running a host firewall. +.PP +Once configured you can then use \f[C]rclone\f[R] like this, +.PP +List directories in top level of your ShareFile +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +List all the files in your ShareFile +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP +To copy a local directory to an ShareFile directory called backup +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.PP +Paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R]. +.SS Modification times and hashes +.PP +ShareFile allows modification times to be set on objects accurate to 1 +second. +These will be used to detect whether objects need syncing or not. +.PP +ShareFile supports MD5 type hashes, so you can use the +\f[C]--checksum\f[R] flag. +.SS Transfers +.PP +For files above 128 MiB rclone will use a chunked transfer. +Rclone will upload up to \f[C]--transfers\f[R] chunks at the same time +(shared among all the multipart uploads). +Chunks are buffered in memory and are normally 64 MiB so increasing +\f[C]--transfers\f[R] will increase memory use. +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] +T} +T{ +* +T}@T{ +0x2A +T}@T{ +\[uFF0A] +T} +T{ +< +T}@T{ +0x3C +T}@T{ +\[uFF1C] +T} +T{ +> +T}@T{ +0x3E +T}@T{ +\[uFF1E] +T} +T{ +? +T}@T{ +0x3F +T}@T{ +\[uFF1F] +T} +T{ +: +T}@T{ +0x3A +T}@T{ +\[uFF1A] +T} +T{ +| +T}@T{ +0x7C +T}@T{ +\[uFF5C] +T} +T{ +\[dq] +T}@T{ +0x22 +T}@T{ +\[uFF02] +T} +.TE +.PP +File names can also not start or end with the following characters. +These only get replaced if they are the first or last character in the +name: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +SP +T}@T{ +0x20 +T}@T{ +\[u2420] +T} +T{ +\&. +T}@T{ +0x2E +T}@T{ +\[uFF0E] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Standard options +.PP +Here are the Standard options specific to sharefile (Citrix Sharefile). +.SS --sharefile-client-id +.PP +OAuth Client Id. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --sharefile-client-secret +.PP +OAuth Client Secret. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --sharefile-root-folder-id +.PP +ID of the root folder. .PP Leave blank to access \[dq]Personal Folders\[dq]. You can use one of the standard values here or any folder ID (long hex number ID). -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value 1 / Access the -Personal Folders. -(Default) \ \[dq]\[dq] 2 / Access the Favorites folder. -\ \[dq]favorites\[dq] 3 / Access all the shared folders. -\ \[dq]allshared\[dq] 4 / Access all the individual connectors. -\ \[dq]connectors\[dq] 5 / Access the home, favorites, and shared -folders as well as the connectors. -\ \[dq]top\[dq] root_folder_id> Edit advanced config? -(y/n) y) Yes n) No y/n> n Remote config Use web browser to automatically -authenticate rclone with remote? -* Say Y if the machine running rclone has a web browser you can use * -Say N if running rclone on a (remote) machine without web browser access -If not sure try Y. -If Y failed, try N. -y) Yes n) No y/n> y If your browser doesn\[aq]t open automatically go to -the following link: http://127.0.0.1:53682/auth?state=XXX Log in and -authorize rclone for access Waiting for code... -Got code -------------------- [remote] type = sharefile endpoint = -https://XXX.sharefile.com token = -{\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]2019-09-30T19:41:45.878561877+01:00\[dq]} --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y -.IP -.nf -\f[C] -See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a -machine with no Internet browser available. - -Note that rclone runs a webserver on your local machine to collect the -token as returned from Citrix ShareFile. This only runs from the moment it opens -your browser to the moment you get back the verification code. This -is on \[ga]http://127.0.0.1:53682/\[ga] and this it may require you to unblock -it temporarily if you are running a host firewall. - -Once configured you can then use \[ga]rclone\[ga] like this, - -List directories in top level of your ShareFile - - rclone lsd remote: - -List all the files in your ShareFile - - rclone ls remote: - -To copy a local directory to an ShareFile directory called backup - - rclone copy /home/source remote:backup - -Paths may be as deep as required, e.g. \[ga]remote:directory/subdirectory\[ga]. - -### Modification times and hashes - -ShareFile allows modification times to be set on objects accurate to 1 -second. These will be used to detect whether objects need syncing or -not. - -ShareFile supports MD5 type hashes, so you can use the \[ga]--checksum\[ga] -flag. - -### Transfers - -For files above 128 MiB rclone will use a chunked transfer. Rclone will -upload up to \[ga]--transfers\[ga] chunks at the same time (shared among all -the multipart uploads). Chunks are buffered in memory and are -normally 64 MiB so increasing \[ga]--transfers\[ga] will increase memory use. - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| \[rs]\[rs] | 0x5C | \[uFF3C] | -| * | 0x2A | \[uFF0A] | -| < | 0x3C | \[uFF1C] | -| > | 0x3E | \[uFF1E] | -| ? | 0x3F | \[uFF1F] | -| : | 0x3A | \[uFF1A] | -| \[rs]| | 0x7C | \[uFF5C] | -| \[dq] | 0x22 | \[uFF02] | - -File names can also not start or end with the following characters. -These only get replaced if they are the first or last character in the -name: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| SP | 0x20 | \[u2420] | -| . | 0x2E | \[uFF0E] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - - -### Standard options - -Here are the Standard options specific to sharefile (Citrix Sharefile). - -#### --sharefile-client-id - -OAuth Client Id. - -Leave blank normally. - +.PP Properties: - -- Config: client_id -- Env Var: RCLONE_SHAREFILE_CLIENT_ID -- Type: string -- Required: false - -#### --sharefile-client-secret - -OAuth Client Secret. - -Leave blank normally. - -Properties: - -- Config: client_secret -- Env Var: RCLONE_SHAREFILE_CLIENT_SECRET -- Type: string -- Required: false - -#### --sharefile-root-folder-id - -ID of the root folder. - -Leave blank to access \[dq]Personal Folders\[dq]. You can use one of the -standard values here or any folder ID (long hex number ID). - -Properties: - -- Config: root_folder_id -- Env Var: RCLONE_SHAREFILE_ROOT_FOLDER_ID -- Type: string -- Required: false -- Examples: - - \[dq]\[dq] - - Access the Personal Folders (default). - - \[dq]favorites\[dq] - - Access the Favorites folder. - - \[dq]allshared\[dq] - - Access all the shared folders. - - \[dq]connectors\[dq] - - Access all the individual connectors. - - \[dq]top\[dq] - - Access the home, favorites, and shared folders as well as the connectors. - -### Advanced options - +.IP \[bu] 2 +Config: root_folder_id +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_ROOT_FOLDER_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]\[dq] +.RS 2 +.IP \[bu] 2 +Access the Personal Folders (default). +.RE +.IP \[bu] 2 +\[dq]favorites\[dq] +.RS 2 +.IP \[bu] 2 +Access the Favorites folder. +.RE +.IP \[bu] 2 +\[dq]allshared\[dq] +.RS 2 +.IP \[bu] 2 +Access all the shared folders. +.RE +.IP \[bu] 2 +\[dq]connectors\[dq] +.RS 2 +.IP \[bu] 2 +Access all the individual connectors. +.RE +.IP \[bu] 2 +\[dq]top\[dq] +.RS 2 +.IP \[bu] 2 +Access the home, favorites, and shared folders as well as the +connectors. +.RE +.RE +.SS Advanced options +.PP Here are the Advanced options specific to sharefile (Citrix Sharefile). - -#### --sharefile-token - +.SS --sharefile-token +.PP OAuth Access Token as a JSON blob. - +.PP Properties: - -- Config: token -- Env Var: RCLONE_SHAREFILE_TOKEN -- Type: string -- Required: false - -#### --sharefile-auth-url - +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --sharefile-auth-url +.PP Auth server URL. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: auth_url -- Env Var: RCLONE_SHAREFILE_AUTH_URL -- Type: string -- Required: false - -#### --sharefile-token-url - +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --sharefile-token-url +.PP Token server url. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: token_url -- Env Var: RCLONE_SHAREFILE_TOKEN_URL -- Type: string -- Required: false - -#### --sharefile-upload-cutoff - +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --sharefile-upload-cutoff +.PP Cutoff for switching to multipart upload. - +.PP Properties: - -- Config: upload_cutoff -- Env Var: RCLONE_SHAREFILE_UPLOAD_CUTOFF -- Type: SizeSuffix -- Default: 128Mi - -#### --sharefile-chunk-size - +.IP \[bu] 2 +Config: upload_cutoff +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_UPLOAD_CUTOFF +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 128Mi +.SS --sharefile-chunk-size +.PP Upload chunk size. - +.PP Must a power of 2 >= 256k. - -Making this larger will improve performance, but note that each chunk -is buffered in memory one per transfer. - +.PP +Making this larger will improve performance, but note that each chunk is +buffered in memory one per transfer. +.PP Reducing this will reduce memory usage but decrease performance. - +.PP Properties: - -- Config: chunk_size -- Env Var: RCLONE_SHAREFILE_CHUNK_SIZE -- Type: SizeSuffix -- Default: 64Mi - -#### --sharefile-endpoint - +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 64Mi +.SS --sharefile-endpoint +.PP Endpoint for API calls. - -This is usually auto discovered as part of the oauth process, but can -be set manually to something like: https://XXX.sharefile.com - - +.PP +This is usually auto discovered as part of the oauth process, but can be +set manually to something like: https://XXX.sharefile.com +.PP Properties: - -- Config: endpoint -- Env Var: RCLONE_SHAREFILE_ENDPOINT -- Type: string -- Required: false - -#### --sharefile-encoding - +.IP \[bu] 2 +Config: endpoint +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_ENDPOINT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --sharefile-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_SHAREFILE_ENCODING -- Type: Encoding -- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot - -#### --sharefile-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: +Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot +.SS --sharefile-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_SHAREFILE_DESCRIPTION -- Type: string -- Required: false - - -## Limitations - -Note that ShareFile is case insensitive so you can\[aq]t have a file called -\[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_SHAREFILE_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP +Note that ShareFile is case insensitive so you can\[aq]t have a file +called \[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. +.PP ShareFile only supports filenames up to 256 characters in length. - -\[ga]rclone about\[ga] is not supported by the Citrix ShareFile backend. Backends without -this capability cannot determine free space for an rclone mount or -use policy \[ga]mfs\[ga] (most free space) as a member of an rclone union -remote. - -See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - -# Crypt - -Rclone \[ga]crypt\[ga] remotes encrypt and decrypt other remotes. - -A remote of type \[ga]crypt\[ga] does not access a [storage system](https://rclone.org/overview/) -directly, but instead wraps another remote, which in turn accesses -the storage system. This is similar to how [alias](https://rclone.org/alias/), -[union](https://rclone.org/union/), [chunker](https://rclone.org/chunker/) -and a few others work. It makes the usage very flexible, as you can -add a layer, in this case an encryption layer, on top of any other -backend, even in multiple layers. Rclone\[aq]s functionality -can be used as with any other remote, for example you can -[mount](https://rclone.org/commands/rclone_mount/) a crypt remote. - +.PP +\f[C]rclone about\f[R] is not supported by the Citrix ShareFile backend. +Backends without this capability cannot determine free space for an +rclone mount or use policy \f[C]mfs\f[R] (most free space) as a member +of an rclone union remote. +.PP +See List of backends that do not support rclone +about (https://rclone.org/overview/#optional-features) and rclone +about (https://rclone.org/commands/rclone_about/) +.SH Crypt +.PP +Rclone \f[C]crypt\f[R] remotes encrypt and decrypt other remotes. +.PP +A remote of type \f[C]crypt\f[R] does not access a storage +system (https://rclone.org/overview/) directly, but instead wraps +another remote, which in turn accesses the storage system. +This is similar to how alias (https://rclone.org/alias/), +union (https://rclone.org/union/), chunker (https://rclone.org/chunker/) +and a few others work. +It makes the usage very flexible, as you can add a layer, in this case +an encryption layer, on top of any other backend, even in multiple +layers. +Rclone\[aq]s functionality can be used as with any other remote, for +example you can mount (https://rclone.org/commands/rclone_mount/) a +crypt remote. +.PP Accessing a storage system through a crypt remote realizes client-side encryption, which makes it safe to keep your data in a location you do not trust will not get compromised. -When working against the \[ga]crypt\[ga] remote, rclone will automatically -encrypt (before uploading) and decrypt (after downloading) on your local -system as needed on the fly, leaving the data encrypted at rest in the -wrapped remote. If you access the storage system using an application -other than rclone, or access the wrapped remote directly using rclone, -there will not be any encryption/decryption: Downloading existing content -will just give you the encrypted (scrambled) format, and anything you -upload will *not* become encrypted. - -The encryption is a secret-key encryption (also called symmetric key encryption) -algorithm, where a password (or pass phrase) is used to generate real encryption key. +When working against the \f[C]crypt\f[R] remote, rclone will +automatically encrypt (before uploading) and decrypt (after downloading) +on your local system as needed on the fly, leaving the data encrypted at +rest in the wrapped remote. +If you access the storage system using an application other than rclone, +or access the wrapped remote directly using rclone, there will not be +any encryption/decryption: Downloading existing content will just give +you the encrypted (scrambled) format, and anything you upload will +\f[I]not\f[R] become encrypted. +.PP +The encryption is a secret-key encryption (also called symmetric key +encryption) algorithm, where a password (or pass phrase) is used to +generate real encryption key. The password can be supplied by user, or you may chose to let rclone -generate one. It will be stored in the configuration file, in a lightly obscured form. -If you are in an environment where you are not able to keep your configuration -secured, you should add -[configuration encryption](https://rclone.org/docs/#configuration-encryption) -as protection. As long as you have this configuration file, you will be able to -decrypt your data. Without the configuration file, as long as you remember -the password (or keep it in a safe place), you can re-create the configuration -and gain access to the existing data. You may also configure a corresponding -remote in a different installation to access the same data. -See below for guidance to [changing password](#changing-password). - -Encryption uses [cryptographic salt](https://en.wikipedia.org/wiki/Salt_(cryptography)), -to permute the encryption key so that the same string may be encrypted in -different ways. When configuring the crypt remote it is optional to enter a salt, -or to let rclone generate a unique salt. If omitted, rclone uses a built-in unique string. -Normally in cryptography, the salt is stored together with the encrypted content, -and do not have to be memorized by the user. This is not the case in rclone, -because rclone does not store any additional information on the remotes. Use of -custom salt is effectively a second password that must be memorized. - -[File content](#file-encryption) encryption is performed using -[NaCl SecretBox](https://godoc.org/golang.org/x/crypto/nacl/secretbox), -based on XSalsa20 cipher and Poly1305 for integrity. -[Names](#name-encryption) (file- and directory names) are also encrypted -by default, but this has some implications and is therefore -possible to be turned off. - -## Configuration - -Here is an example of how to make a remote called \[ga]secret\[ga]. - -To use \[ga]crypt\[ga], first set up the underlying remote. Follow the -\[ga]rclone config\[ga] instructions for the specific backend. - +generate one. +It will be stored in the configuration file, in a lightly obscured form. +If you are in an environment where you are not able to keep your +configuration secured, you should add configuration +encryption (https://rclone.org/docs/#configuration-encryption) as +protection. +As long as you have this configuration file, you will be able to decrypt +your data. +Without the configuration file, as long as you remember the password (or +keep it in a safe place), you can re-create the configuration and gain +access to the existing data. +You may also configure a corresponding remote in a different +installation to access the same data. +See below for guidance to changing password. +.PP +Encryption uses cryptographic +salt (https://en.wikipedia.org/wiki/Salt_(cryptography)), to permute the +encryption key so that the same string may be encrypted in different +ways. +When configuring the crypt remote it is optional to enter a salt, or to +let rclone generate a unique salt. +If omitted, rclone uses a built-in unique string. +Normally in cryptography, the salt is stored together with the encrypted +content, and do not have to be memorized by the user. +This is not the case in rclone, because rclone does not store any +additional information on the remotes. +Use of custom salt is effectively a second password that must be +memorized. +.PP +File content encryption is performed using NaCl +SecretBox (https://godoc.org/golang.org/x/crypto/nacl/secretbox), based +on XSalsa20 cipher and Poly1305 for integrity. +Names (file- and directory names) are also encrypted by default, but +this has some implications and is therefore possible to be turned off. +.SS Configuration +.PP +Here is an example of how to make a remote called \f[C]secret\f[R]. +.PP +To use \f[C]crypt\f[R], first set up the underlying remote. +Follow the \f[C]rclone config\f[R] instructions for the specific +backend. +.PP Before configuring the crypt remote, check the underlying remote is -working. In this example the underlying remote is called \[ga]remote\[ga]. -We will configure a path \[ga]path\[ga] within this remote to contain the -encrypted content. Anything inside \[ga]remote:path\[ga] will be encrypted -and anything outside will not. - -Configure \[ga]crypt\[ga] using \[ga]rclone config\[ga]. In this example the \[ga]crypt\[ga] -remote is called \[ga]secret\[ga], to differentiate it from the underlying -\[ga]remote\[ga]. - -When you are done you can use the crypt remote named \[ga]secret\[ga] just -as you would with any other remote, e.g. \[ga]rclone copy D:\[rs]docs secret:\[rs]docs\[ga], -and rclone will encrypt and decrypt as needed on the fly. -If you access the wrapped remote \[ga]remote:path\[ga] directly you will bypass -the encryption, and anything you read will be in encrypted form, and -anything you write will be unencrypted. To avoid issues it is best to -configure a dedicated path for encrypted content, and access it -exclusively through a crypt remote. -\f[R] -.fi +working. +In this example the underlying remote is called \f[C]remote\f[R]. +We will configure a path \f[C]path\f[R] within this remote to contain +the encrypted content. +Anything inside \f[C]remote:path\f[R] will be encrypted and anything +outside will not. .PP +Configure \f[C]crypt\f[R] using \f[C]rclone config\f[R]. +In this example the \f[C]crypt\f[R] remote is called \f[C]secret\f[R], +to differentiate it from the underlying \f[C]remote\f[R]. +.PP +When you are done you can use the crypt remote named \f[C]secret\f[R] +just as you would with any other remote, e.g. +\f[C]rclone copy D:\[rs]docs secret:\[rs]docs\f[R], and rclone will +encrypt and decrypt as needed on the fly. +If you access the wrapped remote \f[C]remote:path\f[R] directly you will +bypass the encryption, and anything you read will be in encrypted form, +and anything you write will be unencrypted. +To avoid issues it is best to configure a dedicated path for encrypted +content, and access it exclusively through a crypt remote. +.IP +.nf +\f[C] No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -name> secret Type of storage to configure. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value [snip] XX / -Encrypt/Decrypt a remote \ \[dq]crypt\[dq] [snip] Storage> crypt ** See -help for crypt backend at: https://rclone.org/crypt/ ** -.PP -Remote to encrypt/decrypt. -Normally should contain a \[aq]:\[aq] and a path, eg -\[dq]myremote:path/to/dir\[dq], \[dq]myremote:bucket\[dq] or maybe -\[dq]myremote:\[dq] (not recommended). -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -remote> remote:path How to encrypt the filenames. -Enter a string value. -Press Enter for the default (\[dq]standard\[dq]). -Choose a number from below, or type in your own value. -/ Encrypt the filenames. -1 | See the docs for the details. -\ \[dq]standard\[dq] 2 / Very simple filename obfuscation. -\ \[dq]obfuscate\[dq] / Don\[aq]t encrypt the file names. -3 | Adds a \[dq].bin\[dq] extension only. -\ \[dq]off\[dq] filename_encryption> Option to either encrypt directory -names or leave them intact. -.PP -NB If filename_encryption is \[dq]off\[dq] then this option will do -nothing. -Enter a boolean value (true or false). -Press Enter for the default (\[dq]true\[dq]). -Choose a number from below, or type in your own value 1 / Encrypt -directory names. -\ \[dq]true\[dq] 2 / Don\[aq]t encrypt directory names, leave them -intact. -\ \[dq]false\[dq] directory_name_encryption> Password or pass phrase for -encryption. -y) Yes type in my own password g) Generate random password y/g> y Enter -the password: password: Confirm the password: password: Password or pass -phrase for salt. -Optional but recommended. -Should be different to the previous password. -y) Yes type in my own password g) Generate random password n) No leave -this optional password blank (default) y/g/n> g Password strength in -bits. -64 is just about memorable 128 is secure 1024 is the maximum Bits> 128 -Your password is: JAsJvRcgR-_veXNfy_sGmQ Use this password? -Please note that an obscured version of this password (and not the -password itself) will be stored under your configuration file, so keep -this generated password in a safe place. -y) Yes (default) n) No y/n> Edit advanced config? -(y/n) y) Yes n) No (default) y/n> Remote config -------------------- -[secret] type = crypt remote = remote:path password = *** ENCRYPTED -\f[B]\f[BI] password2 = \f[B]\f[R] ENCRYPTED *** -------------------- y) -Yes this is OK (default) e) Edit this remote d) Delete this remote -y/e/d> -.IP -.nf -\f[C] -**Important** The crypt password stored in \[ga]rclone.conf\[ga] is lightly -obscured. That only protects it from cursory inspection. It is not -secure unless [configuration encryption](https://rclone.org/docs/#configuration-encryption) of \[ga]rclone.conf\[ga] is specified. - -A long passphrase is recommended, or \[ga]rclone config\[ga] can generate a -random one. - -The obscured password is created using AES-CTR with a static key. The -salt is stored verbatim at the beginning of the obscured password. This -static key is shared between all versions of rclone. - -If you reconfigure rclone with the same passwords/passphrases -elsewhere it will be compatible, but the obscured version will be different -due to the different salt. - -Rclone does not encrypt - - * file length - this can be calculated within 16 bytes - * modification time - used for syncing - -### Specifying the remote - -When configuring the remote to encrypt/decrypt, you may specify any -string that rclone accepts as a source/destination of other commands. - -The primary use case is to specify the path into an already configured -remote (e.g. \[ga]remote:path/to/dir\[ga] or \[ga]remote:bucket\[ga]), such that -data in a remote untrusted location can be stored encrypted. - -You may also specify a local filesystem path, such as -\[ga]/path/to/dir\[ga] on Linux, \[ga]C:\[rs]path\[rs]to\[rs]dir\[ga] on Windows. By creating -a crypt remote pointing to such a local filesystem path, you can -use rclone as a utility for pure local file encryption, for example -to keep encrypted files on a removable USB drive. - -**Note**: A string which do not contain a \[ga]:\[ga] will by rclone be treated -as a relative path in the local filesystem. For example, if you enter -the name \[ga]remote\[ga] without the trailing \[ga]:\[ga], it will be treated as -a subdirectory of the current directory with name \[dq]remote\[dq]. - -If a path \[ga]remote:path/to/dir\[ga] is specified, rclone stores encrypted -files in \[ga]path/to/dir\[ga] on the remote. With file name encryption, files -saved to \[ga]secret:subdir/subfile\[ga] are stored in the unencrypted path -\[ga]path/to/dir\[ga] but the \[ga]subdir/subpath\[ga] element is encrypted. - -The path you specify does not have to exist, rclone will create -it when needed. - -If you intend to use the wrapped remote both directly for keeping -unencrypted content, as well as through a crypt remote for encrypted -content, it is recommended to point the crypt remote to a separate -directory within the wrapped remote. If you use a bucket-based storage -system (e.g. Swift, S3, Google Compute Storage, B2) it is generally -advisable to wrap the crypt remote around a specific bucket (\[ga]s3:bucket\[ga]). -If wrapping around the entire root of the storage (\[ga]s3:\[ga]), and use the -optional file name encryption, rclone will encrypt the bucket name. - -### Changing password - -Should the password, or the configuration file containing a lightly obscured -form of the password, be compromised, you need to re-encrypt your data with -a new password. Since rclone uses secret-key encryption, where the encryption -key is generated directly from the password kept on the client, it is not -possible to change the password/key of already encrypted content. Just changing -the password configured for an existing crypt remote means you will no longer -able to decrypt any of the previously encrypted content. The only possibility -is to re-upload everything via a crypt remote configured with your new password. - -Depending on the size of your data, your bandwidth, storage quota etc, there are -different approaches you can take: -- If you have everything in a different location, for example on your local system, -you could remove all of the prior encrypted files, change the password for your -configured crypt remote (or delete and re-create the crypt configuration), -and then re-upload everything from the alternative location. -- If you have enough space on the storage system you can create a new crypt -remote pointing to a separate directory on the same backend, and then use -rclone to copy everything from the original crypt remote to the new, -effectively decrypting everything on the fly using the old password and -re-encrypting using the new password. When done, delete the original crypt -remote directory and finally the rclone crypt configuration with the old password. -All data will be streamed from the storage system and back, so you will -get half the bandwidth and be charged twice if you have upload and download quota -on the storage system. - -**Note**: A security problem related to the random password generator -was fixed in rclone version 1.53.3 (released 2020-11-19). Passwords generated -by rclone config in version 1.49.0 (released 2019-08-26) to 1.53.2 -(released 2020-10-26) are not considered secure and should be changed. -If you made up your own password, or used rclone version older than 1.49.0 or -newer than 1.53.2 to generate it, you are *not* affected by this issue. -See [issue #4783](https://github.com/rclone/rclone/issues/4783) for more -details, and a tool you can use to check if you are affected. - -### Example - -Create the following file structure using \[dq]standard\[dq] file name -encryption. -\f[R] -.fi -.PP -plaintext/ \[u251C]\[u2500]\[u2500] file0.txt \[u251C]\[u2500]\[u2500] -file1.txt \[u2514]\[u2500]\[u2500] subdir \[u251C]\[u2500]\[u2500] -file2.txt \[u251C]\[u2500]\[u2500] file3.txt \[u2514]\[u2500]\[u2500] -subsubdir \[u2514]\[u2500]\[u2500] file4.txt -.IP -.nf -\f[C] -Copy these to the remote, and list them -\f[R] -.fi -.PP -$ rclone -q copy plaintext secret: $ rclone -q ls secret: 7 file1.txt 6 -file0.txt 8 subdir/file2.txt 10 subdir/subsubdir/file4.txt 9 -subdir/file3.txt -.IP -.nf -\f[C] -The crypt remote looks like -\f[R] -.fi -.PP -$ rclone -q ls remote:path 55 hagjclgavj2mbiqm6u6cnjjqcg 54 -v05749mltvv1tf4onltun46gls 57 -86vhrsv86mpbtd3a0akjuqslj8/dlj7fkq4kdq72emafg7a7s41uo 58 -86vhrsv86mpbtd3a0akjuqslj8/7uu829995du6o42n32otfhjqp4/b9pausrfansjth5ob3jkdqd4lc -56 86vhrsv86mpbtd3a0akjuqslj8/8njh1sk437gttmep3p70g81aps -.IP -.nf -\f[C] -The directory structure is preserved -\f[R] -.fi -.PP -$ rclone -q ls secret:subdir 8 file2.txt 9 file3.txt 10 -subsubdir/file4.txt -.IP -.nf -\f[C] -Without file name encryption \[ga].bin\[ga] extensions are added to underlying -names. This prevents the cloud provider attempting to interpret file -content. -\f[R] -.fi -.PP -$ rclone -q ls remote:path 54 file0.txt.bin 57 subdir/file3.txt.bin 56 -subdir/file2.txt.bin 58 subdir/subsubdir/file4.txt.bin 55 file1.txt.bin -.IP -.nf -\f[C] -### File name encryption modes - -Off - - * doesn\[aq]t hide file names or directory structure - * allows for longer file names (\[ti]246 characters) - * can use sub paths and copy single files - -Standard - - * file names encrypted - * file names can\[aq]t be as long (\[ti]143 characters) - * can use sub paths and copy single files - * directory structure visible - * identical files names will have identical uploaded names - * can use shortcuts to shorten the directory recursion - -Obfuscation - -This is a simple \[dq]rotate\[dq] of the filename, with each file having a rot -distance based on the filename. Rclone stores the distance at the -beginning of the filename. A file called \[dq]hello\[dq] may become \[dq]53.jgnnq\[dq]. - -Obfuscation is not a strong encryption of filenames, but hinders -automated scanning tools picking up on filename patterns. It is an -intermediate between \[dq]off\[dq] and \[dq]standard\[dq] which allows for longer path -segment names. - -There is a possibility with some unicode based filenames that the -obfuscation is weak and may map lower case characters to upper case -equivalents. - -Obfuscation cannot be relied upon for strong protection. - - * file names very lightly obfuscated - * file names can be longer than standard encryption - * can use sub paths and copy single files - * directory structure visible - * identical files names will have identical uploaded names - -Cloud storage systems have limits on file name length and -total path length which rclone is more likely to breach using -\[dq]Standard\[dq] file name encryption. Where file names are less than 156 -characters in length issues should not be encountered, irrespective of -cloud storage provider. - -An experimental advanced option \[ga]filename_encoding\[ga] is now provided to -address this problem to a certain degree. -For cloud storage systems with case sensitive file names (e.g. Google Drive), -\[ga]base64\[ga] can be used to reduce file name length. -For cloud storage systems using UTF-16 to store file names internally -(e.g. OneDrive, Dropbox, Box), \[ga]base32768\[ga] can be used to drastically reduce -file name length. - -An alternative, future rclone file name encryption mode may tolerate -backend provider path length limits. - -### Directory name encryption - -Crypt offers the option of encrypting dir names or leaving them intact. -There are two options: - -True - -Encrypts the whole file path including directory names -Example: -\[ga]1/12/123.txt\[ga] is encrypted to -\[ga]p0e52nreeaj0a5ea7s64m4j72s/l42g6771hnv3an9cgc8cr2n1ng/qgm4avr35m5loi1th53ato71v0\[ga] - -False - -Only encrypts file names, skips directory names -Example: -\[ga]1/12/123.txt\[ga] is encrypted to -\[ga]1/12/qgm4avr35m5loi1th53ato71v0\[ga] - - -### Modification times and hashes - -Crypt stores modification times using the underlying remote so support -depends on that. - -Hashes are not stored for crypt. However the data integrity is -protected by an extremely strong crypto authenticator. - -Use the \[ga]rclone cryptcheck\[ga] command to check the -integrity of an encrypted remote instead of \[ga]rclone check\[ga] which can\[aq]t -check the checksums properly. - - -### Standard options - -Here are the Standard options specific to crypt (Encrypt/Decrypt a remote). - -#### --crypt-remote +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n +name> secret +Type of storage to configure. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +[snip] +XX / Encrypt/Decrypt a remote + \[rs] \[dq]crypt\[dq] +[snip] +Storage> crypt +** See help for crypt backend at: https://rclone.org/crypt/ ** Remote to encrypt/decrypt. - -Normally should contain a \[aq]:\[aq] and a path, e.g. \[dq]myremote:path/to/dir\[dq], +Normally should contain a \[aq]:\[aq] and a path, eg \[dq]myremote:path/to/dir\[dq], \[dq]myremote:bucket\[dq] or maybe \[dq]myremote:\[dq] (not recommended). - -Properties: - -- Config: remote -- Env Var: RCLONE_CRYPT_REMOTE -- Type: string -- Required: true - -#### --crypt-filename-encryption - +Enter a string value. Press Enter for the default (\[dq]\[dq]). +remote> remote:path How to encrypt the filenames. - -Properties: - -- Config: filename_encryption -- Env Var: RCLONE_CRYPT_FILENAME_ENCRYPTION -- Type: string -- Default: \[dq]standard\[dq] -- Examples: - - \[dq]standard\[dq] - - Encrypt the filenames. - - See the docs for the details. - - \[dq]obfuscate\[dq] - - Very simple filename obfuscation. - - \[dq]off\[dq] - - Don\[aq]t encrypt the file names. - - Adds a \[dq].bin\[dq], or \[dq]suffix\[dq] extension only. - -#### --crypt-directory-name-encryption - +Enter a string value. Press Enter for the default (\[dq]standard\[dq]). +Choose a number from below, or type in your own value. + / Encrypt the filenames. + 1 | See the docs for the details. + \[rs] \[dq]standard\[dq] + 2 / Very simple filename obfuscation. + \[rs] \[dq]obfuscate\[dq] + / Don\[aq]t encrypt the file names. + 3 | Adds a \[dq].bin\[dq] extension only. + \[rs] \[dq]off\[dq] +filename_encryption> Option to either encrypt directory names or leave them intact. NB If filename_encryption is \[dq]off\[dq] then this option will do nothing. - -Properties: - -- Config: directory_name_encryption -- Env Var: RCLONE_CRYPT_DIRECTORY_NAME_ENCRYPTION -- Type: bool -- Default: true -- Examples: - - \[dq]true\[dq] - - Encrypt directory names. - - \[dq]false\[dq] - - Don\[aq]t encrypt directory names, leave them intact. - -#### --crypt-password - +Enter a boolean value (true or false). Press Enter for the default (\[dq]true\[dq]). +Choose a number from below, or type in your own value + 1 / Encrypt directory names. + \[rs] \[dq]true\[dq] + 2 / Don\[aq]t encrypt directory names, leave them intact. + \[rs] \[dq]false\[dq] +directory_name_encryption> Password or pass phrase for encryption. - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - +y) Yes type in my own password +g) Generate random password +y/g> y +Enter the password: +password: +Confirm the password: +password: +Password or pass phrase for salt. Optional but recommended. +Should be different to the previous password. +y) Yes type in my own password +g) Generate random password +n) No leave this optional password blank (default) +y/g/n> g +Password strength in bits. +64 is just about memorable +128 is secure +1024 is the maximum +Bits> 128 +Your password is: JAsJvRcgR-_veXNfy_sGmQ +Use this password? Please note that an obscured version of this +password (and not the password itself) will be stored under your +configuration file, so keep this generated password in a safe place. +y) Yes (default) +n) No +y/n> +Edit advanced config? (y/n) +y) Yes +n) No (default) +y/n> +Remote config +-------------------- +[secret] +type = crypt +remote = remote:path +password = *** ENCRYPTED *** +password2 = *** ENCRYPTED *** +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> +\f[R] +.fi +.PP +\f[B]Important\f[R] The crypt password stored in \f[C]rclone.conf\f[R] +is lightly obscured. +That only protects it from cursory inspection. +It is not secure unless configuration +encryption (https://rclone.org/docs/#configuration-encryption) of +\f[C]rclone.conf\f[R] is specified. +.PP +A long passphrase is recommended, or \f[C]rclone config\f[R] can +generate a random one. +.PP +The obscured password is created using AES-CTR with a static key. +The IV (nonce) is stored verbatim at the beginning of the obscured +password. +This static key is shared between all versions of rclone. +.PP +If you reconfigure rclone with the same passwords/passphrases elsewhere +it will be compatible, but the obscured version will be different due to +the different salt. +.PP +Rclone does not encrypt +.IP \[bu] 2 +file length - this can be calculated within 16 bytes +.IP \[bu] 2 +modification time - used for syncing +.SS Specifying the remote +.PP +When configuring the remote to encrypt/decrypt, you may specify any +string that rclone accepts as a source/destination of other commands. +.PP +The primary use case is to specify the path into an already configured +remote (e.g. +\f[C]remote:path/to/dir\f[R] or \f[C]remote:bucket\f[R]), such that data +in a remote untrusted location can be stored encrypted. +.PP +You may also specify a local filesystem path, such as +\f[C]/path/to/dir\f[R] on Linux, \f[C]C:\[rs]path\[rs]to\[rs]dir\f[R] on +Windows. +By creating a crypt remote pointing to such a local filesystem path, you +can use rclone as a utility for pure local file encryption, for example +to keep encrypted files on a removable USB drive. +.PP +\f[B]Note\f[R]: A string which do not contain a \f[C]:\f[R] will by +rclone be treated as a relative path in the local filesystem. +For example, if you enter the name \f[C]remote\f[R] without the trailing +\f[C]:\f[R], it will be treated as a subdirectory of the current +directory with name \[dq]remote\[dq]. +.PP +If a path \f[C]remote:path/to/dir\f[R] is specified, rclone stores +encrypted files in \f[C]path/to/dir\f[R] on the remote. +With file name encryption, files saved to +\f[C]secret:subdir/subfile\f[R] are stored in the unencrypted path +\f[C]path/to/dir\f[R] but the \f[C]subdir/subpath\f[R] element is +encrypted. +.PP +The path you specify does not have to exist, rclone will create it when +needed. +.PP +If you intend to use the wrapped remote both directly for keeping +unencrypted content, as well as through a crypt remote for encrypted +content, it is recommended to point the crypt remote to a separate +directory within the wrapped remote. +If you use a bucket-based storage system (e.g. +Swift, S3, Google Compute Storage, B2) it is generally advisable to wrap +the crypt remote around a specific bucket (\f[C]s3:bucket\f[R]). +If wrapping around the entire root of the storage (\f[C]s3:\f[R]), and +use the optional file name encryption, rclone will encrypt the bucket +name. +.SS Changing password +.PP +Should the password, or the configuration file containing a lightly +obscured form of the password, be compromised, you need to re-encrypt +your data with a new password. +Since rclone uses secret-key encryption, where the encryption key is +generated directly from the password kept on the client, it is not +possible to change the password/key of already encrypted content. +Just changing the password configured for an existing crypt remote means +you will no longer able to decrypt any of the previously encrypted +content. +The only possibility is to re-upload everything via a crypt remote +configured with your new password. +.PP +Depending on the size of your data, your bandwidth, storage quota etc, +there are different approaches you can take: - If you have everything in +a different location, for example on your local system, you could remove +all of the prior encrypted files, change the password for your +configured crypt remote (or delete and re-create the crypt +configuration), and then re-upload everything from the alternative +location. +- If you have enough space on the storage system you can create a new +crypt remote pointing to a separate directory on the same backend, and +then use rclone to copy everything from the original crypt remote to the +new, effectively decrypting everything on the fly using the old password +and re-encrypting using the new password. +When done, delete the original crypt remote directory and finally the +rclone crypt configuration with the old password. +All data will be streamed from the storage system and back, so you will +get half the bandwidth and be charged twice if you have upload and +download quota on the storage system. +.PP +\f[B]Note\f[R]: A security problem related to the random password +generator was fixed in rclone version 1.53.3 (released 2020-11-19). +Passwords generated by rclone config in version 1.49.0 (released +2019-08-26) to 1.53.2 (released 2020-10-26) are not considered secure +and should be changed. +If you made up your own password, or used rclone version older than +1.49.0 or newer than 1.53.2 to generate it, you are \f[I]not\f[R] +affected by this issue. +See issue #4783 (https://github.com/rclone/rclone/issues/4783) for more +details, and a tool you can use to check if you are affected. +.SS Example +.PP +Create the following file structure using \[dq]standard\[dq] file name +encryption. +.IP +.nf +\f[C] +plaintext/ +\[u251C]\[u2500]\[u2500] file0.txt +\[u251C]\[u2500]\[u2500] file1.txt +\[u2514]\[u2500]\[u2500] subdir + \[u251C]\[u2500]\[u2500] file2.txt + \[u251C]\[u2500]\[u2500] file3.txt + \[u2514]\[u2500]\[u2500] subsubdir + \[u2514]\[u2500]\[u2500] file4.txt +\f[R] +.fi +.PP +Copy these to the remote, and list them +.IP +.nf +\f[C] +$ rclone -q copy plaintext secret: +$ rclone -q ls secret: + 7 file1.txt + 6 file0.txt + 8 subdir/file2.txt + 10 subdir/subsubdir/file4.txt + 9 subdir/file3.txt +\f[R] +.fi +.PP +The crypt remote looks like +.IP +.nf +\f[C] +$ rclone -q ls remote:path + 55 hagjclgavj2mbiqm6u6cnjjqcg + 54 v05749mltvv1tf4onltun46gls + 57 86vhrsv86mpbtd3a0akjuqslj8/dlj7fkq4kdq72emafg7a7s41uo + 58 86vhrsv86mpbtd3a0akjuqslj8/7uu829995du6o42n32otfhjqp4/b9pausrfansjth5ob3jkdqd4lc + 56 86vhrsv86mpbtd3a0akjuqslj8/8njh1sk437gttmep3p70g81aps +\f[R] +.fi +.PP +The directory structure is preserved +.IP +.nf +\f[C] +$ rclone -q ls secret:subdir + 8 file2.txt + 9 file3.txt + 10 subsubdir/file4.txt +\f[R] +.fi +.PP +Without file name encryption \f[C].bin\f[R] extensions are added to +underlying names. +This prevents the cloud provider attempting to interpret file content. +.IP +.nf +\f[C] +$ rclone -q ls remote:path + 54 file0.txt.bin + 57 subdir/file3.txt.bin + 56 subdir/file2.txt.bin + 58 subdir/subsubdir/file4.txt.bin + 55 file1.txt.bin +\f[R] +.fi +.SS File name encryption modes +.PP +Off +.IP \[bu] 2 +doesn\[aq]t hide file names or directory structure +.IP \[bu] 2 +allows for longer file names (\[ti]246 characters) +.IP \[bu] 2 +can use sub paths and copy single files +.PP +Standard +.IP \[bu] 2 +file names encrypted +.IP \[bu] 2 +file names can\[aq]t be as long (\[ti]143 characters) +.IP \[bu] 2 +can use sub paths and copy single files +.IP \[bu] 2 +directory structure visible +.IP \[bu] 2 +identical files names will have identical uploaded names +.IP \[bu] 2 +can use shortcuts to shorten the directory recursion +.PP +Obfuscation +.PP +This is a simple \[dq]rotate\[dq] of the filename, with each file having +a rot distance based on the filename. +Rclone stores the distance at the beginning of the filename. +A file called \[dq]hello\[dq] may become \[dq]53.jgnnq\[dq]. +.PP +Obfuscation is not a strong encryption of filenames, but hinders +automated scanning tools picking up on filename patterns. +It is an intermediate between \[dq]off\[dq] and \[dq]standard\[dq] which +allows for longer path segment names. +.PP +There is a possibility with some unicode based filenames that the +obfuscation is weak and may map lower case characters to upper case +equivalents. +.PP +Obfuscation cannot be relied upon for strong protection. +.IP \[bu] 2 +file names very lightly obfuscated +.IP \[bu] 2 +file names can be longer than standard encryption +.IP \[bu] 2 +can use sub paths and copy single files +.IP \[bu] 2 +directory structure visible +.IP \[bu] 2 +identical files names will have identical uploaded names +.PP +Cloud storage systems have limits on file name length and total path +length which rclone is more likely to breach using \[dq]Standard\[dq] +file name encryption. +Where file names are 143 or fewer characters in length issues should not +be encountered, irrespective of cloud storage provider. +.PP +An experimental advanced option \f[C]filename_encoding\f[R] is now +provided to address this problem to a certain degree. +For cloud storage systems with case sensitive file names (e.g. +Google Drive), \f[C]base64\f[R] can be used to reduce file name length. +For cloud storage systems using UTF-16 to store file names internally +(e.g. +OneDrive, Dropbox, Box), \f[C]base32768\f[R] can be used to drastically +reduce file name length. +.PP +An alternative, future rclone file name encryption mode may tolerate +backend provider path length limits. +.SS Directory name encryption +.PP +Crypt offers the option of encrypting dir names or leaving them intact. +There are two options: +.PP +True +.PP +Encrypts the whole file path including directory names Example: +\f[C]1/12/123.txt\f[R] is encrypted to +\f[C]p0e52nreeaj0a5ea7s64m4j72s/l42g6771hnv3an9cgc8cr2n1ng/qgm4avr35m5loi1th53ato71v0\f[R] +.PP +False +.PP +Only encrypts file names, skips directory names Example: +\f[C]1/12/123.txt\f[R] is encrypted to +\f[C]1/12/qgm4avr35m5loi1th53ato71v0\f[R] +.SS Modification times and hashes +.PP +Crypt stores modification times using the underlying remote so support +depends on that. +.PP +Hashes are not stored for crypt. +However the data integrity is protected by an extremely strong crypto +authenticator. +.PP +Use the \f[C]rclone cryptcheck\f[R] command to check the integrity of an +encrypted remote instead of \f[C]rclone check\f[R] which can\[aq]t check +the checksums properly. +.SS Standard options +.PP +Here are the Standard options specific to crypt (Encrypt/Decrypt a +remote). +.SS --crypt-remote +.PP +Remote to encrypt/decrypt. +.PP +Normally should contain a \[aq]:\[aq] and a path, e.g. +\[dq]myremote:path/to/dir\[dq], \[dq]myremote:bucket\[dq] or maybe +\[dq]myremote:\[dq] (not recommended). +.PP Properties: - -- Config: password -- Env Var: RCLONE_CRYPT_PASSWORD -- Type: string -- Required: true - -#### --crypt-password2 - +.IP \[bu] 2 +Config: remote +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_REMOTE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --crypt-filename-encryption +.PP +How to encrypt the filenames. +.PP +Properties: +.IP \[bu] 2 +Config: filename_encryption +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_FILENAME_ENCRYPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]standard\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]standard\[dq] +.RS 2 +.IP \[bu] 2 +Encrypt the filenames. +.IP \[bu] 2 +See the docs for the details. +.RE +.IP \[bu] 2 +\[dq]obfuscate\[dq] +.RS 2 +.IP \[bu] 2 +Very simple filename obfuscation. +.RE +.IP \[bu] 2 +\[dq]off\[dq] +.RS 2 +.IP \[bu] 2 +Don\[aq]t encrypt the file names. +.IP \[bu] 2 +Adds a \[dq].bin\[dq], or \[dq]suffix\[dq] extension only. +.RE +.RE +.SS --crypt-directory-name-encryption +.PP +Option to either encrypt directory names or leave them intact. +.PP +NB If filename_encryption is \[dq]off\[dq] then this option will do +nothing. +.PP +Properties: +.IP \[bu] 2 +Config: directory_name_encryption +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_DIRECTORY_NAME_ENCRYPTION +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: true +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]true\[dq] +.RS 2 +.IP \[bu] 2 +Encrypt directory names. +.RE +.IP \[bu] 2 +\[dq]false\[dq] +.RS 2 +.IP \[bu] 2 +Don\[aq]t encrypt directory names, leave them intact. +.RE +.RE +.SS --crypt-password +.PP +Password or pass phrase for encryption. +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP +Properties: +.IP \[bu] 2 +Config: password +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_PASSWORD +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --crypt-password2 +.PP Password or pass phrase for salt. - +.PP Optional but recommended. Should be different to the previous password. - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP Properties: - -- Config: password2 -- Env Var: RCLONE_CRYPT_PASSWORD2 -- Type: string -- Required: false - -### Advanced options - -Here are the Advanced options specific to crypt (Encrypt/Decrypt a remote). - -#### --crypt-server-side-across-configs - +.IP \[bu] 2 +Config: password2 +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_PASSWORD2 +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Advanced options +.PP +Here are the Advanced options specific to crypt (Encrypt/Decrypt a +remote). +.SS --crypt-server-side-across-configs +.PP Deprecated: use --server-side-across-configs instead. - -Allow server-side operations (e.g. copy) to work across different crypt configs. - +.PP +Allow server-side operations (e.g. +copy) to work across different crypt configs. +.PP Normally this option is not what you want, but if you have two crypts pointing to the same backend you can use it. - +.PP This can be used, for example, to change file name encryption type -without re-uploading all the data. Just make two crypt backends -pointing to two different directories with the single changed -parameter and use rclone move to move the files between the crypt -remotes. - +without re-uploading all the data. +Just make two crypt backends pointing to two different directories with +the single changed parameter and use rclone move to move the files +between the crypt remotes. +.PP Properties: - -- Config: server_side_across_configs -- Env Var: RCLONE_CRYPT_SERVER_SIDE_ACROSS_CONFIGS -- Type: bool -- Default: false - -#### --crypt-show-mapping - +.IP \[bu] 2 +Config: server_side_across_configs +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_SERVER_SIDE_ACROSS_CONFIGS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --crypt-show-mapping +.PP For all files listed show how the names encrypt. - -If this flag is set then for each file that the remote is asked to -list, it will log (at level INFO) a line stating the decrypted file -name and the encrypted file name. - +.PP +If this flag is set then for each file that the remote is asked to list, +it will log (at level INFO) a line stating the decrypted file name and +the encrypted file name. +.PP This is so you can work out which encrypted names are which decrypted names just in case you need to do something with the encrypted file names, or for debugging purposes. - +.PP Properties: - -- Config: show_mapping -- Env Var: RCLONE_CRYPT_SHOW_MAPPING -- Type: bool -- Default: false - -#### --crypt-no-data-encryption - +.IP \[bu] 2 +Config: show_mapping +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_SHOW_MAPPING +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --crypt-no-data-encryption +.PP Option to either encrypt file data or leave it unencrypted. - +.PP Properties: - -- Config: no_data_encryption -- Env Var: RCLONE_CRYPT_NO_DATA_ENCRYPTION -- Type: bool -- Default: false -- Examples: - - \[dq]true\[dq] - - Don\[aq]t encrypt file data, leave it unencrypted. - - \[dq]false\[dq] - - Encrypt file data. - -#### --crypt-pass-bad-blocks - +.IP \[bu] 2 +Config: no_data_encryption +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_NO_DATA_ENCRYPTION +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]true\[dq] +.RS 2 +.IP \[bu] 2 +Don\[aq]t encrypt file data, leave it unencrypted. +.RE +.IP \[bu] 2 +\[dq]false\[dq] +.RS 2 +.IP \[bu] 2 +Encrypt file data. +.RE +.RE +.SS --crypt-pass-bad-blocks +.PP If set this will pass bad blocks through as all 0. - +.PP This should not be set in normal operation, it should only be set if trying to recover an encrypted file with errors and it is desired to recover as much of the file as possible. - +.PP Properties: - -- Config: pass_bad_blocks -- Env Var: RCLONE_CRYPT_PASS_BAD_BLOCKS -- Type: bool -- Default: false - -#### --crypt-strict-names - -If set, this will raise an error when crypt comes across a filename that can\[aq]t be decrypted. - -(By default, rclone will just log a NOTICE and continue as normal.) -This can happen if encrypted and unencrypted files are stored in the same -directory (which is not recommended.) It may also indicate a more serious -problem that should be investigated. - +.IP \[bu] 2 +Config: pass_bad_blocks +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_PASS_BAD_BLOCKS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --crypt-strict-names +.PP +If set, this will raise an error when crypt comes across a filename that +can\[aq]t be decrypted. +.PP +(By default, rclone will just log a NOTICE and continue as normal.) This +can happen if encrypted and unencrypted files are stored in the same +directory (which is not recommended.) It may also indicate a more +serious problem that should be investigated. +.PP Properties: - -- Config: strict_names -- Env Var: RCLONE_CRYPT_STRICT_NAMES -- Type: bool -- Default: false - -#### --crypt-filename-encoding - +.IP \[bu] 2 +Config: strict_names +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_STRICT_NAMES +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --crypt-filename-encoding +.PP How to encode the encrypted filename to text string. - -This option could help with shortening the encrypted filename. The -suitable option would depend on the way your remote count the filename -length and if it\[aq]s case sensitive. - +.PP +This option could help with shortening the encrypted filename. +The suitable option would depend on the way your remote count the +filename length and if it\[aq]s case sensitive. +.PP Properties: - -- Config: filename_encoding -- Env Var: RCLONE_CRYPT_FILENAME_ENCODING -- Type: string -- Default: \[dq]base32\[dq] -- Examples: - - \[dq]base32\[dq] - - Encode using base32. Suitable for all remote. - - \[dq]base64\[dq] - - Encode using base64. Suitable for case sensitive remote. - - \[dq]base32768\[dq] - - Encode using base32768. Suitable if your remote counts UTF-16 or - - Unicode codepoint instead of UTF-8 byte length. (Eg. Onedrive, Dropbox) - -#### --crypt-suffix - +.IP \[bu] 2 +Config: filename_encoding +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_FILENAME_ENCODING +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]base32\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]base32\[dq] +.RS 2 +.IP \[bu] 2 +Encode using base32. +Suitable for all remote. +.RE +.IP \[bu] 2 +\[dq]base64\[dq] +.RS 2 +.IP \[bu] 2 +Encode using base64. +Suitable for case sensitive remote. +.RE +.IP \[bu] 2 +\[dq]base32768\[dq] +.RS 2 +.IP \[bu] 2 +Encode using base32768. +Suitable if your remote counts UTF-16 or +.IP \[bu] 2 +Unicode codepoint instead of UTF-8 byte length. +(Eg. +Onedrive, Dropbox) +.RE +.RE +.SS --crypt-suffix +.PP If this is set it will override the default suffix of \[dq].bin\[dq]. - -Setting suffix to \[dq]none\[dq] will result in an empty suffix. This may be useful -when the path length is critical. - +.PP +Setting suffix to \[dq]none\[dq] will result in an empty suffix. +This may be useful when the path length is critical. +.PP Properties: - -- Config: suffix -- Env Var: RCLONE_CRYPT_SUFFIX -- Type: string -- Default: \[dq].bin\[dq] - -#### --crypt-description - -Description of the remote - +.IP \[bu] 2 +Config: suffix +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_SUFFIX +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq].bin\[dq] +.SS --crypt-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_CRYPT_DESCRIPTION -- Type: string -- Required: false - -### Metadata - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_CRYPT_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Metadata +.PP Any metadata supported by the underlying remote is read and written. - -See the [metadata](https://rclone.org/docs/#metadata) docs for more info. - -## Backend commands - +.PP +See the metadata (https://rclone.org/docs/#metadata) docs for more info. +.SS Backend commands +.PP Here are the commands specific to the crypt backend. - +.PP Run them with - - rclone backend COMMAND remote: - -The help below will explain what arguments each command takes. - -See the [backend](https://rclone.org/commands/rclone_backend/) command for more -info on how to pass options and arguments. - -These can be run on a running backend using the rc command -[backend/command](https://rclone.org/rc/#backend-command). - -### encode - -Encode the given filename(s) - - rclone backend encode remote: [options] [+] - -This encodes the filenames given as arguments returning a list of -strings of the encoded results. - -Usage Example: - - rclone backend encode crypt: file1 [file2...] - rclone rc backend/command command=encode fs=crypt: file1 [file2...] - - -### decode - -Decode the given filename(s) - - rclone backend decode remote: [options] [+] - -This decodes the filenames given as arguments returning a list of -strings of the decoded results. It will return an error if any of the -inputs are invalid. - -Usage Example: - - rclone backend decode crypt: encryptedfile1 [encryptedfile2...] - rclone rc backend/command command=decode fs=crypt: encryptedfile1 [encryptedfile2...] - - - - -## Backing up an encrypted remote - -If you wish to backup an encrypted remote, it is recommended that you use -\[ga]rclone sync\[ga] on the encrypted files, and make sure the passwords are -the same in the new encrypted remote. - -This will have the following advantages - - * \[ga]rclone sync\[ga] will check the checksums while copying - * you can use \[ga]rclone check\[ga] between the encrypted remotes - * you don\[aq]t decrypt and encrypt unnecessarily - -For example, let\[aq]s say you have your original remote at \[ga]remote:\[ga] with -the encrypted version at \[ga]eremote:\[ga] with path \[ga]remote:crypt\[ga]. You -would then set up the new remote \[ga]remote2:\[ga] and then the encrypted -version \[ga]eremote2:\[ga] with path \[ga]remote2:crypt\[ga] using the same passwords -as \[ga]eremote:\[ga]. - -To sync the two remotes you would do - - rclone sync --interactive remote:crypt remote2:crypt - -And to check the integrity you would do - - rclone check remote:crypt remote2:crypt - -## File formats - -### File encryption - -Files are encrypted 1:1 source file to destination object. The file -has a header and is divided into chunks. - -#### Header - - * 8 bytes magic string \[ga]RCLONE\[rs]x00\[rs]x00\[ga] - * 24 bytes Nonce (IV) - -The initial nonce is generated from the operating systems crypto -strong random number generator. The nonce is incremented for each -chunk read making sure each nonce is unique for each block written. -The chance of a nonce being reused is minuscule. If you wrote an -exabyte of data (10\[S1]\[u2078] bytes) you would have a probability of -approximately 2\[tmu]10\[u207B]\[S3]\[S2] of re-using a nonce. - -#### Chunk - -Each chunk will contain 64 KiB of data, except for the last one which -may have less data. The data chunk is in standard NaCl SecretBox -format. SecretBox uses XSalsa20 and Poly1305 to encrypt and -authenticate messages. - -Each chunk contains: - - * 16 Bytes of Poly1305 authenticator - * 1 - 65536 bytes XSalsa20 encrypted data - -64k chunk size was chosen as the best performing chunk size (the -authenticator takes too much time below this and the performance drops -off due to cache effects above this). Note that these chunks are -buffered in memory so they can\[aq]t be too big. - -This uses a 32 byte (256 bit key) key derived from the user password. - -#### Examples - -1 byte file will encrypt to - - * 32 bytes header - * 17 bytes data chunk - -49 bytes total - -1 MiB (1048576 bytes) file will encrypt to - - * 32 bytes header - * 16 chunks of 65568 bytes - -1049120 bytes total (a 0.05% overhead). This is the overhead for big -files. - -### Name encryption - -File names are encrypted segment by segment - the path is broken up -into \[ga]/\[ga] separated strings and these are encrypted individually. - -File segments are padded using PKCS#7 to a multiple of 16 bytes -before encryption. - -They are then encrypted with EME using AES with 256 bit key. EME -(ECB-Mix-ECB) is a wide-block encryption mode presented in the 2003 -paper \[dq]A Parallelizable Enciphering Mode\[dq] by Halevi and Rogaway. - -This makes for deterministic encryption which is what we want - the -same filename must encrypt to the same thing otherwise we can\[aq]t find -it on the cloud storage system. - -This means that - - * filenames with the same name will encrypt the same - * filenames which start the same won\[aq]t have a common prefix - -This uses a 32 byte key (256 bits) and a 16 byte (128 bits) IV both of -which are derived from the user password. - -After encryption they are written out using a modified version of -standard \[ga]base32\[ga] encoding as described in RFC4648. The standard -encoding is modified in two ways: - - * it becomes lower case (no-one likes upper case filenames!) - * we strip the padding character \[ga]=\[ga] - -\[ga]base32\[ga] is used rather than the more efficient \[ga]base64\[ga] so rclone can be -used on case insensitive remotes (e.g. Windows, Box, Dropbox, Onedrive etc). - -### Key derivation - -Rclone uses \[ga]scrypt\[ga] with parameters \[ga]N=16384, r=8, p=1\[ga] with an -optional user supplied salt (password2) to derive the 32+32+16 = 80 -bytes of key material required. If the user doesn\[aq]t supply a salt -then rclone uses an internal one. - -\[ga]scrypt\[ga] makes it impractical to mount a dictionary attack on rclone -encrypted data. For full protection against this you should always use -a salt. - -## SEE ALSO - -* [rclone cryptdecode](https://rclone.org/commands/rclone_cryptdecode/) - Show forward/reverse mapping of encrypted filenames - -# Compress - -## Warning - -This remote is currently **experimental**. Things may break and data may be lost. Anything you do with this remote is -at your own risk. Please understand the risks associated with using experimental code and don\[aq]t use this remote in -critical applications. - -The \[ga]Compress\[ga] remote adds compression to another remote. It is best used with remotes containing -many large compressible files. - -## Configuration - -To use this remote, all you need to do is specify another remote and a compression mode to use: -\f[R] -.fi -.PP -Current remotes: -.PP -Name Type ==== ==== remote_to_press sometype -.IP "e)" 3 -Edit existing remote $ rclone config -.IP "f)" 3 -New remote -.IP "g)" 3 -Delete remote -.IP "h)" 3 -Rename remote -.IP "i)" 3 -Copy remote -.IP "j)" 3 -Set configuration password -.IP "k)" 3 -Quit config e/n/d/r/c/s/q> n name> compress ... -8 / Compress a remote \ \[dq]compress\[dq] ... -Storage> compress ** See help for compress backend at: -https://rclone.org/compress/ ** -.PP -Remote to compress. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -remote> remote_to_press:subdir Compression mode. -Enter a string value. -Press Enter for the default (\[dq]gzip\[dq]). -Choose a number from below, or type in your own value 1 / Gzip -compression balanced for speed and compression strength. -\ \[dq]gzip\[dq] compression_mode> gzip Edit advanced config? -(y/n) y) Yes n) No (default) y/n> n Remote config -------------------- -[compress] type = compress remote = remote_to_press:subdir -compression_mode = gzip -------------------- y) Yes this is OK (default) -e) Edit this remote d) Delete this remote y/e/d> y .IP .nf \f[C] -### Compression Modes +rclone backend COMMAND remote: +\f[R] +.fi +.PP +The help below will explain what arguments each command takes. +.PP +See the backend (https://rclone.org/commands/rclone_backend/) command +for more info on how to pass options and arguments. +.PP +These can be run on a running backend using the rc command +backend/command (https://rclone.org/rc/#backend-command). +.SS encode +.PP +Encode the given filename(s) +.IP +.nf +\f[C] +rclone backend encode remote: [options] [+] +\f[R] +.fi +.PP +This encodes the filenames given as arguments returning a list of +strings of the encoded results. +.PP +Usage Example: +.IP +.nf +\f[C] +rclone backend encode crypt: file1 [file2...] +rclone rc backend/command command=encode fs=crypt: file1 [file2...] +\f[R] +.fi +.SS decode +.PP +Decode the given filename(s) +.IP +.nf +\f[C] +rclone backend decode remote: [options] [+] +\f[R] +.fi +.PP +This decodes the filenames given as arguments returning a list of +strings of the decoded results. +It will return an error if any of the inputs are invalid. +.PP +Usage Example: +.IP +.nf +\f[C] +rclone backend decode crypt: encryptedfile1 [encryptedfile2...] +rclone rc backend/command command=decode fs=crypt: encryptedfile1 [encryptedfile2...] +\f[R] +.fi +.SS Backing up an encrypted remote +.PP +If you wish to backup an encrypted remote, it is recommended that you +use \f[C]rclone sync\f[R] on the encrypted files, and make sure the +passwords are the same in the new encrypted remote. +.PP +This will have the following advantages +.IP \[bu] 2 +\f[C]rclone sync\f[R] will check the checksums while copying +.IP \[bu] 2 +you can use \f[C]rclone check\f[R] between the encrypted remotes +.IP \[bu] 2 +you don\[aq]t decrypt and encrypt unnecessarily +.PP +For example, let\[aq]s say you have your original remote at +\f[C]remote:\f[R] with the encrypted version at \f[C]eremote:\f[R] with +path \f[C]remote:crypt\f[R]. +You would then set up the new remote \f[C]remote2:\f[R] and then the +encrypted version \f[C]eremote2:\f[R] with path \f[C]remote2:crypt\f[R] +using the same passwords as \f[C]eremote:\f[R]. +.PP +To sync the two remotes you would do +.IP +.nf +\f[C] +rclone sync --interactive remote:crypt remote2:crypt +\f[R] +.fi +.PP +And to check the integrity you would do +.IP +.nf +\f[C] +rclone check remote:crypt remote2:crypt +\f[R] +.fi +.SS File formats +.SS File encryption +.PP +Files are encrypted 1:1 source file to destination object. +The file has a header and is divided into chunks. +.SS Header +.IP \[bu] 2 +8 bytes magic string \f[C]RCLONE\[rs]x00\[rs]x00\f[R] +.IP \[bu] 2 +24 bytes Nonce (IV) +.PP +The initial nonce is generated from the operating systems crypto strong +random number generator. +The nonce is incremented for each chunk read making sure each nonce is +unique for each block written. +The chance of a nonce being reused is minuscule. +If you wrote an exabyte of data (10\[S1]\[u2078] bytes) you would have a +probability of approximately 2\[tmu]10\[u207B]\[S3]\[S2] of re-using a +nonce. +.SS Chunk +.PP +Each chunk will contain 64 KiB of data, except for the last one which +may have less data. +The data chunk is in standard NaCl SecretBox format. +SecretBox uses XSalsa20 and Poly1305 to encrypt and authenticate +messages. +.PP +Each chunk contains: +.IP \[bu] 2 +16 Bytes of Poly1305 authenticator +.IP \[bu] 2 +1 - 65536 bytes XSalsa20 encrypted data +.PP +64k chunk size was chosen as the best performing chunk size (the +authenticator takes too much time below this and the performance drops +off due to cache effects above this). +Note that these chunks are buffered in memory so they can\[aq]t be too +big. +.PP +This uses a 32 byte (256 bit key) key derived from the user password. +.SS Examples +.PP +1 byte file will encrypt to +.IP \[bu] 2 +32 bytes header +.IP \[bu] 2 +17 bytes data chunk +.PP +49 bytes total +.PP +1 MiB (1048576 bytes) file will encrypt to +.IP \[bu] 2 +32 bytes header +.IP \[bu] 2 +16 chunks of 65568 bytes +.PP +1049120 bytes total (a 0.05% overhead). +This is the overhead for big files. +.SS Name encryption +.PP +File names are encrypted segment by segment - the path is broken up into +\f[C]/\f[R] separated strings and these are encrypted individually. +.PP +File segments are padded using PKCS#7 to a multiple of 16 bytes before +encryption. +.PP +They are then encrypted with EME using AES with 256 bit key. +EME (ECB-Mix-ECB) is a wide-block encryption mode presented in the 2003 +paper \[dq]A Parallelizable Enciphering Mode\[dq] by Halevi and Rogaway. +.PP +This makes for deterministic encryption which is what we want - the same +filename must encrypt to the same thing otherwise we can\[aq]t find it +on the cloud storage system. +.PP +This means that +.IP \[bu] 2 +filenames with the same name will encrypt the same +.IP \[bu] 2 +filenames which start the same won\[aq]t have a common prefix +.PP +This uses a 32 byte key (256 bits) and a 16 byte (128 bits) IV both of +which are derived from the user password. +.PP +After encryption they are written out using a modified version of +standard \f[C]base32\f[R] encoding as described in RFC4648. +The standard encoding is modified in two ways: +.IP \[bu] 2 +it becomes lower case (no-one likes upper case filenames!) +.IP \[bu] 2 +we strip the padding character \f[C]=\f[R] +.PP +\f[C]base32\f[R] is used rather than the more efficient \f[C]base64\f[R] +so rclone can be used on case insensitive remotes (e.g. +Windows, Box, Dropbox, Onedrive etc). +.SS Key derivation +.PP +Rclone uses \f[C]scrypt\f[R] with parameters \f[C]N=16384, r=8, p=1\f[R] +with an optional user supplied salt (password2) to derive the 32+32+16 = +80 bytes of key material required. +If the user doesn\[aq]t supply a salt then rclone uses an internal one. +.PP +\f[C]scrypt\f[R] makes it impractical to mount a dictionary attack on +rclone encrypted data. +For full protection against this you should always use a salt. +.SS SEE ALSO +.IP \[bu] 2 +rclone cryptdecode (https://rclone.org/commands/rclone_cryptdecode/) - +Show forward/reverse mapping of encrypted filenames +.SH Compress +.SS Warning +.PP +This remote is currently \f[B]experimental\f[R]. +Things may break and data may be lost. +Anything you do with this remote is at your own risk. +Please understand the risks associated with using experimental code and +don\[aq]t use this remote in critical applications. +.PP +The \f[C]Compress\f[R] remote adds compression to another remote. +It is best used with remotes containing many large compressible files. +.SS Configuration +.PP +To use this remote, all you need to do is specify another remote and a +compression mode to use: +.IP +.nf +\f[C] +Current remotes: -Currently only gzip compression is supported. It provides a decent balance between speed and size and is well -supported by other applications. Compression strength can further be configured via an advanced setting where 0 is no -compression and 9 is strongest compression. +Name Type +==== ==== +remote_to_press sometype -### File types - -If you open a remote wrapped by compress, you will see that there are many files with an extension corresponding to -the compression algorithm you chose. These files are standard files that can be opened by various archive programs, -but they have some hidden metadata that allows them to be used by rclone. -While you may download and decompress these files at will, do **not** manually delete or rename files. Files without -correct metadata files will not be recognized by rclone. - -### File names - -The compressed files will be named \[ga]*.###########.gz\[ga] where \[ga]*\[ga] is the base file and the \[ga]#\[ga] part is base64 encoded -size of the uncompressed file. The file names should not be changed by anything other than the rclone compression backend. - - -### Standard options - -Here are the Standard options specific to compress (Compress a remote). - -#### --compress-remote +e) Edit existing remote +$ rclone config +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> n +name> compress +\&... + 8 / Compress a remote + \[rs] \[dq]compress\[dq] +\&... +Storage> compress +** See help for compress backend at: https://rclone.org/compress/ ** Remote to compress. - -Properties: - -- Config: remote -- Env Var: RCLONE_COMPRESS_REMOTE -- Type: string -- Required: true - -#### --compress-mode - +Enter a string value. Press Enter for the default (\[dq]\[dq]). +remote> remote_to_press:subdir Compression mode. - +Enter a string value. Press Enter for the default (\[dq]gzip\[dq]). +Choose a number from below, or type in your own value + 1 / Gzip compression balanced for speed and compression strength. + \[rs] \[dq]gzip\[dq] +compression_mode> gzip +Edit advanced config? (y/n) +y) Yes +n) No (default) +y/n> n +Remote config +-------------------- +[compress] +type = compress +remote = remote_to_press:subdir +compression_mode = gzip +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.SS Compression Modes +.PP +Currently only gzip compression is supported. +It provides a decent balance between speed and size and is well +supported by other applications. +Compression strength can further be configured via an advanced setting +where 0 is no compression and 9 is strongest compression. +.SS File types +.PP +If you open a remote wrapped by compress, you will see that there are +many files with an extension corresponding to the compression algorithm +you chose. +These files are standard files that can be opened by various archive +programs, but they have some hidden metadata that allows them to be used +by rclone. +While you may download and decompress these files at will, do +\f[B]not\f[R] manually delete or rename files. +Files without correct metadata files will not be recognized by rclone. +.SS File names +.PP +The compressed files will be named \f[C]*.###########.gz\f[R] where +\f[C]*\f[R] is the base file and the \f[C]#\f[R] part is base64 encoded +size of the uncompressed file. +The file names should not be changed by anything other than the rclone +compression backend. +.SS Standard options +.PP +Here are the Standard options specific to compress (Compress a remote). +.SS --compress-remote +.PP +Remote to compress. +.PP Properties: - -- Config: mode -- Env Var: RCLONE_COMPRESS_MODE -- Type: string -- Default: \[dq]gzip\[dq] -- Examples: - - \[dq]gzip\[dq] - - Standard gzip compression with fastest parameters. - -### Advanced options - +.IP \[bu] 2 +Config: remote +.IP \[bu] 2 +Env Var: RCLONE_COMPRESS_REMOTE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --compress-mode +.PP +Compression mode. +.PP +Properties: +.IP \[bu] 2 +Config: mode +.IP \[bu] 2 +Env Var: RCLONE_COMPRESS_MODE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]gzip\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]gzip\[dq] +.RS 2 +.IP \[bu] 2 +Standard gzip compression with fastest parameters. +.RE +.RE +.SS Advanced options +.PP Here are the Advanced options specific to compress (Compress a remote). - -#### --compress-level - +.SS --compress-level +.PP GZIP compression level (-2 to 9). - +.PP Generally -1 (default, equivalent to 5) is recommended. -Levels 1 to 9 increase compression at the cost of speed. Going past 6 -generally offers very little return. - -Level -2 uses Huffman encoding only. Only use if you know what you -are doing. +Levels 1 to 9 increase compression at the cost of speed. +Going past 6 generally offers very little return. +.PP +Level -2 uses Huffman encoding only. +Only use if you know what you are doing. Level 0 turns off compression. - +.PP Properties: - -- Config: level -- Env Var: RCLONE_COMPRESS_LEVEL -- Type: int -- Default: -1 - -#### --compress-ram-cache-limit - +.IP \[bu] 2 +Config: level +.IP \[bu] 2 +Env Var: RCLONE_COMPRESS_LEVEL +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: -1 +.SS --compress-ram-cache-limit +.PP Some remotes don\[aq]t allow the upload of files with unknown size. In this case the compressed file will need to be cached to determine it\[aq]s size. - -Files smaller than this limit will be cached in RAM, files larger than +.PP +Files smaller than this limit will be cached in RAM, files larger than this limit will be cached on disk. - +.PP Properties: - -- Config: ram_cache_limit -- Env Var: RCLONE_COMPRESS_RAM_CACHE_LIMIT -- Type: SizeSuffix -- Default: 20Mi - -#### --compress-description - -Description of the remote - +.IP \[bu] 2 +Config: ram_cache_limit +.IP \[bu] 2 +Env Var: RCLONE_COMPRESS_RAM_CACHE_LIMIT +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 20Mi +.SS --compress-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_COMPRESS_DESCRIPTION -- Type: string -- Required: false - -### Metadata - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_COMPRESS_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Metadata +.PP Any metadata supported by the underlying remote is read and written. - -See the [metadata](https://rclone.org/docs/#metadata) docs for more info. - - - -# Combine - -The \[ga]combine\[ga] backend joins remotes together into a single directory -tree. - +.PP +See the metadata (https://rclone.org/docs/#metadata) docs for more info. +.SH Combine +.PP +The \f[C]combine\f[R] backend joins remotes together into a single +directory tree. +.PP For example you might have a remote for images on one provider: -\f[R] -.fi -.PP -$ rclone tree s3:imagesbucket / \[u251C]\[u2500]\[u2500] image1.jpg +.IP +.nf +\f[C] +$ rclone tree s3:imagesbucket +/ +\[u251C]\[u2500]\[u2500] image1.jpg \[u2514]\[u2500]\[u2500] image2.jpg -.IP -.nf -\f[C] +\f[R] +.fi +.PP And a remote for files on another: -\f[R] -.fi -.PP -$ rclone tree drive:important/files / \[u251C]\[u2500]\[u2500] file1.txt +.IP +.nf +\f[C] +$ rclone tree drive:important/files +/ +\[u251C]\[u2500]\[u2500] file1.txt \[u2514]\[u2500]\[u2500] file2.txt -.IP -.nf -\f[C] -The \[ga]combine\[ga] backend can join these together into a synthetic +\f[R] +.fi +.PP +The \f[C]combine\f[R] backend can join these together into a synthetic directory structure like this: -\f[R] -.fi -.PP -$ rclone tree combined: / \[u251C]\[u2500]\[u2500] files \[br] -\[u251C]\[u2500]\[u2500] file1.txt \[br] \[u2514]\[u2500]\[u2500] -file2.txt \[u2514]\[u2500]\[u2500] images \[u251C]\[u2500]\[u2500] -image1.jpg \[u2514]\[u2500]\[u2500] image2.jpg .IP .nf \f[C] -You\[aq]d do this by specifying an \[ga]upstreams\[ga] parameter in the config -like this - - upstreams = images=s3:imagesbucket files=drive:important/files - -During the initial setup with \[ga]rclone config\[ga] you will specify the -upstreams remotes as a space separated list. The upstream remotes can -either be a local paths or other remotes. - -## Configuration - -Here is an example of how to make a combine called \[ga]remote\[ga] for the -example above. First run: - - rclone config - -This will guide you through an interactive setup process: +$ rclone tree combined: +/ +\[u251C]\[u2500]\[u2500] files +\[br] \[u251C]\[u2500]\[u2500] file1.txt +\[br] \[u2514]\[u2500]\[u2500] file2.txt +\[u2514]\[u2500]\[u2500] images + \[u251C]\[u2500]\[u2500] image1.jpg + \[u2514]\[u2500]\[u2500] image2.jpg \f[R] .fi .PP +You\[aq]d do this by specifying an \f[C]upstreams\f[R] parameter in the +config like this +.IP +.nf +\f[C] +upstreams = images=s3:imagesbucket files=drive:important/files +\f[R] +.fi +.PP +During the initial setup with \f[C]rclone config\f[R] you will specify +the upstreams remotes as a space separated list. +The upstream remotes can either be a local paths or other remotes. +.SS Configuration +.PP +Here is an example of how to make a combine called \f[C]remote\f[R] for +the example above. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -name> remote Option Storage. +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n +name> remote +Option Storage. Type of storage to configure. Choose a number from below, or type in your own value. \&... -XX / Combine several remotes into one \ (combine) ... -Storage> combine Option upstreams. -Upstreams for combining These should be in the form dir=remote:path -dir2=remote2:path Where before the = is specified the root directory and -after is the remote to put there. -Embedded spaces can be added using quotes \[dq]dir=remote:path with -space\[dq] \[dq]dir2=remote2:path with space\[dq] Enter a -fs.SpaceSepList value. -upstreams> images=s3:imagesbucket files=drive:important/files --------------------- [remote] type = combine upstreams = -images=s3:imagesbucket files=drive:important/files -------------------- -y) Yes this is OK (default) e) Edit this remote d) Delete this remote -y/e/d> y -.IP -.nf -\f[C] -### Configuring for Google Drive Shared Drives - -Rclone has a convenience feature for making a combine backend for all -the shared drives you have access to. - -Assuming your main (non shared drive) Google drive remote is called -\[ga]drive:\[ga] you would run - - rclone backend -o config drives drive: - -This would produce something like this: - - [My Drive] - type = alias - remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=: - - [Test Drive] - type = alias - remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=: - - [AllDrives] - type = combine - upstreams = \[dq]My Drive=My Drive:\[dq] \[dq]Test Drive=Test Drive:\[dq] - -If you then add that config to your config file (find it with \[ga]rclone -config file\[ga]) then you can access all the shared drives in one place -with the \[ga]AllDrives:\[ga] remote. - -See [the Google Drive docs](https://rclone.org/drive/#drives) for full info. - - -### Standard options - -Here are the Standard options specific to combine (Combine several remotes into one). - -#### --combine-upstreams - +XX / Combine several remotes into one + \[rs] (combine) +\&... +Storage> combine +Option upstreams. Upstreams for combining - These should be in the form - dir=remote:path dir2=remote2:path - Where before the = is specified the root directory and after is the remote to put there. - Embedded spaces can be added using quotes - \[dq]dir=remote:path with space\[dq] \[dq]dir2=remote2:path with space\[dq] - - - -Properties: - -- Config: upstreams -- Env Var: RCLONE_COMBINE_UPSTREAMS -- Type: SpaceSepList -- Default: - -### Advanced options - -Here are the Advanced options specific to combine (Combine several remotes into one). - -#### --combine-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_COMBINE_DESCRIPTION -- Type: string -- Required: false - -### Metadata - -Any metadata supported by the underlying remote is read and written. - -See the [metadata](https://rclone.org/docs/#metadata) docs for more info. - - - -# Dropbox - -Paths are specified as \[ga]remote:path\[ga] - -Dropbox paths may be as deep as required, e.g. -\[ga]remote:directory/subdirectory\[ga]. - -## Configuration - -The initial setup for dropbox involves getting a token from Dropbox -which you need to do in your browser. \[ga]rclone config\[ga] walks you -through it. - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: +Enter a fs.SpaceSepList value. +upstreams> images=s3:imagesbucket files=drive:important/files +-------------------- +[remote] +type = combine +upstreams = images=s3:imagesbucket files=drive:important/files +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y \f[R] .fi -.IP "n)" 3 -New remote -.IP "o)" 3 -Delete remote -.IP "p)" 3 -Quit config e/n/d/q> n name> remote Type of storage to configure. -Choose a number from below, or type in your own value [snip] XX / -Dropbox \ \[dq]dropbox\[dq] [snip] Storage> dropbox Dropbox App Key - -leave blank normally. -app_key> Dropbox App Secret - leave blank normally. -app_secret> Remote config Please visit: -https://www.dropbox.com/1/oauth2/authorize?client_id=XXXXXXXXXXXXXXX&response_type=code -Enter the code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXXXXXXXX --------------------- [remote] app_key = app_secret = token = -XXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------------------- -.IP "q)" 3 -Yes this is OK -.IP "r)" 3 -Edit this remote -.IP "s)" 3 -Delete this remote y/e/d> y +.SS Configuring for Google Drive Shared Drives +.PP +Rclone has a convenience feature for making a combine backend for all +the shared drives you have access to. +.PP +Assuming your main (non shared drive) Google drive remote is called +\f[C]drive:\f[R] you would run .IP .nf \f[C] -See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a -machine with no Internet browser available. - -Note that rclone runs a webserver on your local machine to collect the -token as returned from Dropbox. This only -runs from the moment it opens your browser to the moment you get back -the verification code. This is on \[ga]http://127.0.0.1:53682/\[ga] and it -may require you to unblock it temporarily if you are running a host -firewall, or use manual mode. - -You can then use it like this, - -List directories in top level of your dropbox - - rclone lsd remote: - -List all the files in your dropbox - - rclone ls remote: - -To copy a local directory to a dropbox directory called backup - - rclone copy /home/source remote:backup - -### Dropbox for business - -Rclone supports Dropbox for business and Team Folders. - -When using Dropbox for business \[ga]remote:\[ga] and \[ga]remote:path/to/file\[ga] -will refer to your personal folder. - -If you wish to see Team Folders you must use a leading \[ga]/\[ga] in the -path, so \[ga]rclone lsd remote:/\[ga] will refer to the root and show you all -Team Folders and your User Folder. - -You can then use team folders like this \[ga]remote:/TeamFolder\[ga] and -\[ga]remote:/TeamFolder/path/to/file\[ga]. - -A leading \[ga]/\[ga] for a Dropbox personal account will do nothing, but it -will take an extra HTTP transaction so it should be avoided. - -### Modification times and hashes - -Dropbox supports modified times, but the only way to set a -modification time is to re-upload the file. - -This means that if you uploaded your data with an older version of -rclone which didn\[aq]t support the v2 API and modified times, rclone will -decide to upload all your old data to fix the modification times. If -you don\[aq]t want this to happen use \[ga]--size-only\[ga] or \[ga]--checksum\[ga] flag -to stop it. - -Dropbox supports [its own hash -type](https://www.dropbox.com/developers/reference/content-hash) which -is checked for all transfers. - -### Restricted filename characters - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| NUL | 0x00 | \[u2400] | -| / | 0x2F | \[uFF0F] | -| DEL | 0x7F | \[u2421] | -| \[rs] | 0x5C | \[uFF3C] | - -File names can also not end with the following characters. -These only get replaced if they are the last character in the name: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| SP | 0x20 | \[u2420] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -### Batch mode uploads {#batch-mode} - -Using batch mode uploads is very important for performance when using -the Dropbox API. See [the dropbox performance guide](https://developers.dropbox.com/dbx-performance-guide) -for more info. - -There are 3 modes rclone can use for uploads. - -#### --dropbox-batch-mode off - -In this mode rclone will not use upload batching. This was the default -before rclone v1.55. It has the disadvantage that it is very likely to -encounter \[ga]too_many_requests\[ga] errors like this - - NOTICE: too_many_requests/.: Too many requests or write operations. Trying again in 15 seconds. - -When rclone receives these it has to wait for 15s or sometimes 300s -before continuing which really slows down transfers. - -This will happen especially if \[ga]--transfers\[ga] is large, so this mode -isn\[aq]t recommended except for compatibility or investigating problems. - -#### --dropbox-batch-mode sync - -In this mode rclone will batch up uploads to the size specified by -\[ga]--dropbox-batch-size\[ga] and commit them together. - -Using this mode means you can use a much higher \[ga]--transfers\[ga] -parameter (32 or 64 works fine) without receiving \[ga]too_many_requests\[ga] -errors. - -This mode ensures full data integrity. - -Note that there may be a pause when quitting rclone while rclone -finishes up the last batch using this mode. - -#### --dropbox-batch-mode async - -In this mode rclone will batch up uploads to the size specified by -\[ga]--dropbox-batch-size\[ga] and commit them together. - -However it will not wait for the status of the batch to be returned to -the caller. This means rclone can use a much bigger batch size (much -bigger than \[ga]--transfers\[ga]), at the cost of not being able to check the -status of the upload. - -This provides the maximum possible upload speed especially with lots -of small files, however rclone can\[aq]t check the file got uploaded -properly using this mode. - -If you are using this mode then using \[dq]rclone check\[dq] after the -transfer completes is recommended. Or you could do an initial transfer -with \[ga]--dropbox-batch-mode async\[ga] then do a final transfer with -\[ga]--dropbox-batch-mode sync\[ga] (the default). - -Note that there may be a pause when quitting rclone while rclone -finishes up the last batch using this mode. - - - -### Standard options - -Here are the Standard options specific to dropbox (Dropbox). - -#### --dropbox-client-id - -OAuth Client Id. - -Leave blank normally. - -Properties: - -- Config: client_id -- Env Var: RCLONE_DROPBOX_CLIENT_ID -- Type: string -- Required: false - -#### --dropbox-client-secret - -OAuth Client Secret. - -Leave blank normally. - -Properties: - -- Config: client_secret -- Env Var: RCLONE_DROPBOX_CLIENT_SECRET -- Type: string -- Required: false - -### Advanced options - -Here are the Advanced options specific to dropbox (Dropbox). - -#### --dropbox-token - -OAuth Access Token as a JSON blob. - -Properties: - -- Config: token -- Env Var: RCLONE_DROPBOX_TOKEN -- Type: string -- Required: false - -#### --dropbox-auth-url - -Auth server URL. - -Leave blank to use the provider defaults. - -Properties: - -- Config: auth_url -- Env Var: RCLONE_DROPBOX_AUTH_URL -- Type: string -- Required: false - -#### --dropbox-token-url - -Token server url. - -Leave blank to use the provider defaults. - -Properties: - -- Config: token_url -- Env Var: RCLONE_DROPBOX_TOKEN_URL -- Type: string -- Required: false - -#### --dropbox-chunk-size - -Upload chunk size (< 150Mi). - -Any files larger than this will be uploaded in chunks of this size. - -Note that chunks are buffered in memory (one at a time) so rclone can -deal with retries. Setting this larger will increase the speed -slightly (at most 10% for 128 MiB in tests) at the cost of using more -memory. It can be set smaller if you are tight on memory. - -Properties: - -- Config: chunk_size -- Env Var: RCLONE_DROPBOX_CHUNK_SIZE -- Type: SizeSuffix -- Default: 48Mi - -#### --dropbox-impersonate - -Impersonate this user when using a business account. - -Note that if you want to use impersonate, you should make sure this -flag is set when running \[dq]rclone config\[dq] as this will cause rclone to -request the \[dq]members.read\[dq] scope which it won\[aq]t normally. This is -needed to lookup a members email address into the internal ID that -dropbox uses in the API. - -Using the \[dq]members.read\[dq] scope will require a Dropbox Team Admin -to approve during the OAuth flow. - -You will have to use your own App (setting your own client_id and -client_secret) to use this option as currently rclone\[aq]s default set of -permissions doesn\[aq]t include \[dq]members.read\[dq]. This can be added once -v1.55 or later is in use everywhere. - - -Properties: - -- Config: impersonate -- Env Var: RCLONE_DROPBOX_IMPERSONATE -- Type: string -- Required: false - -#### --dropbox-shared-files - -Instructs rclone to work on individual shared files. - -In this mode rclone\[aq]s features are extremely limited - only list (ls, lsl, etc.) -operations and read operations (e.g. downloading) are supported in this mode. -All other operations will be disabled. - -Properties: - -- Config: shared_files -- Env Var: RCLONE_DROPBOX_SHARED_FILES -- Type: bool -- Default: false - -#### --dropbox-shared-folders - -Instructs rclone to work on shared folders. - -When this flag is used with no path only the List operation is supported and -all available shared folders will be listed. If you specify a path the first part -will be interpreted as the name of shared folder. Rclone will then try to mount this -shared to the root namespace. On success shared folder rclone proceeds normally. -The shared folder is now pretty much a normal folder and all normal operations -are supported. - -Note that we don\[aq]t unmount the shared folder afterwards so the ---dropbox-shared-folders can be omitted after the first use of a particular -shared folder. - -Properties: - -- Config: shared_folders -- Env Var: RCLONE_DROPBOX_SHARED_FOLDERS -- Type: bool -- Default: false - -#### --dropbox-pacer-min-sleep - -Minimum time to sleep between API calls. - -Properties: - -- Config: pacer_min_sleep -- Env Var: RCLONE_DROPBOX_PACER_MIN_SLEEP -- Type: Duration -- Default: 10ms - -#### --dropbox-encoding - -The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - -Properties: - -- Config: encoding -- Env Var: RCLONE_DROPBOX_ENCODING -- Type: Encoding -- Default: Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot - -#### --dropbox-batch-mode - -Upload file batching sync|async|off. - -This sets the batch mode used by rclone. - -For full info see [the main docs](https://rclone.org/dropbox/#batch-mode) - -This has 3 possible values - -- off - no batching -- sync - batch uploads and check completion (default) -- async - batch upload and don\[aq]t check completion - -Rclone will close any outstanding batches when it exits which may make -a delay on quit. - - -Properties: - -- Config: batch_mode -- Env Var: RCLONE_DROPBOX_BATCH_MODE -- Type: string -- Default: \[dq]sync\[dq] - -#### --dropbox-batch-size - -Max number of files in upload batch. - -This sets the batch size of files to upload. It has to be less than 1000. - -By default this is 0 which means rclone which calculate the batch size -depending on the setting of batch_mode. - -- batch_mode: async - default batch_size is 100 -- batch_mode: sync - default batch_size is the same as --transfers -- batch_mode: off - not in use - -Rclone will close any outstanding batches when it exits which may make -a delay on quit. - -Setting this is a great idea if you are uploading lots of small files -as it will make them a lot quicker. You can use --transfers 32 to -maximise throughput. - - -Properties: - -- Config: batch_size -- Env Var: RCLONE_DROPBOX_BATCH_SIZE -- Type: int -- Default: 0 - -#### --dropbox-batch-timeout - -Max time to allow an idle upload batch before uploading. - -If an upload batch is idle for more than this long then it will be -uploaded. - -The default for this is 0 which means rclone will choose a sensible -default based on the batch_mode in use. - -- batch_mode: async - default batch_timeout is 10s -- batch_mode: sync - default batch_timeout is 500ms -- batch_mode: off - not in use - - -Properties: - -- Config: batch_timeout -- Env Var: RCLONE_DROPBOX_BATCH_TIMEOUT -- Type: Duration -- Default: 0s - -#### --dropbox-batch-commit-timeout - -Max time to wait for a batch to finish committing - -Properties: - -- Config: batch_commit_timeout -- Env Var: RCLONE_DROPBOX_BATCH_COMMIT_TIMEOUT -- Type: Duration -- Default: 10m0s - -#### --dropbox-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_DROPBOX_DESCRIPTION -- Type: string -- Required: false - - - -## Limitations - -Note that Dropbox is case insensitive so you can\[aq]t have a file called -\[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. - -There are some file names such as \[ga]thumbs.db\[ga] which Dropbox can\[aq]t -store. There is a full list of them in the [\[dq]Ignored Files\[dq] section -of this document](https://www.dropbox.com/en/help/145). Rclone will -issue an error message \[ga]File name disallowed - not uploading\[ga] if it -attempts to upload one of those file names, but the sync won\[aq]t fail. - -Some errors may occur if you try to sync copyright-protected files -because Dropbox has its own [copyright detector](https://techcrunch.com/2014/03/30/how-dropbox-knows-when-youre-sharing-copyrighted-stuff-without-actually-looking-at-your-stuff/) that -prevents this sort of file being downloaded. This will return the error \[ga]ERROR : -/path/to/your/file: Failed to copy: failed to open source object: -path/restricted_content/.\[ga] - -If you have more than 10,000 files in a directory then \[ga]rclone purge -dropbox:dir\[ga] will return the error \[ga]Failed to purge: There are too -many files involved in this operation\[ga]. As a work-around do an -\[ga]rclone delete dropbox:dir\[ga] followed by an \[ga]rclone rmdir dropbox:dir\[ga]. - -When using \[ga]rclone link\[ga] you\[aq]ll need to set \[ga]--expire\[ga] if using a -non-personal account otherwise the visibility may not be correct. -(Note that \[ga]--expire\[ga] isn\[aq]t supported on personal accounts). See the -[forum discussion](https://forum.rclone.org/t/rclone-link-dropbox-permissions/23211) and the -[dropbox SDK issue](https://github.com/dropbox/dropbox-sdk-go-unofficial/issues/75). - -## Get your own Dropbox App ID - -When you use rclone with Dropbox in its default configuration you are using rclone\[aq]s App ID. This is shared between all the rclone users. - -Here is how to create your own Dropbox App ID for rclone: - -1. Log into the [Dropbox App console](https://www.dropbox.com/developers/apps/create) with your Dropbox Account (It need not -to be the same account as the Dropbox you want to access) - -2. Choose an API => Usually this should be \[ga]Dropbox API\[ga] - -3. Choose the type of access you want to use => \[ga]Full Dropbox\[ga] or \[ga]App Folder\[ga]. If you want to use Team Folders, \[ga]Full Dropbox\[ga] is required ([see here](https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-create-team-folder-inside-my-app-s-folder/m-p/601005/highlight/true#M27911)). - -4. Name your App. The app name is global, so you can\[aq]t use \[ga]rclone\[ga] for example - -5. Click the button \[ga]Create App\[ga] - -6. Switch to the \[ga]Permissions\[ga] tab. Enable at least the following permissions: \[ga]account_info.read\[ga], \[ga]files.metadata.write\[ga], \[ga]files.content.write\[ga], \[ga]files.content.read\[ga], \[ga]sharing.write\[ga]. The \[ga]files.metadata.read\[ga] and \[ga]sharing.read\[ga] checkboxes will be marked too. Click \[ga]Submit\[ga] - -7. Switch to the \[ga]Settings\[ga] tab. Fill \[ga]OAuth2 - Redirect URIs\[ga] as \[ga]http://localhost:53682/\[ga] and click on \[ga]Add\[ga] - -8. Find the \[ga]App key\[ga] and \[ga]App secret\[ga] values on the \[ga]Settings\[ga] tab. Use these values in rclone config to add a new remote or edit an existing remote. The \[ga]App key\[ga] setting corresponds to \[ga]client_id\[ga] in rclone config, the \[ga]App secret\[ga] corresponds to \[ga]client_secret\[ga] - -# Enterprise File Fabric - -This backend supports [Storage Made Easy\[aq]s Enterprise File -Fabric\[tm]](https://storagemadeeasy.com/about/) which provides a software -solution to integrate and unify File and Object Storage accessible -through a global file system. - -## Configuration - -The initial setup for the Enterprise File Fabric backend involves -getting a token from the Enterprise File Fabric which you need to -do in your browser. \[ga]rclone config\[ga] walks you through it. - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: +rclone backend -o config drives drive: \f[R] .fi .PP -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. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value [snip] XX / -Enterprise File Fabric \ \[dq]filefabric\[dq] [snip] Storage> filefabric -** See help for filefabric backend at: https://rclone.org/filefabric/ ** +This would produce something like this: +.IP +.nf +\f[C] +[My Drive] +type = alias +remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=: + +[Test Drive] +type = alias +remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=: + +[AllDrives] +type = combine +upstreams = \[dq]My Drive=My Drive:\[dq] \[dq]Test Drive=Test Drive:\[dq] +\f[R] +.fi .PP -URL of the Enterprise File Fabric to connect to Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value 1 / Storage Made -Easy US \ \[dq]https://storagemadeeasy.com\[dq] 2 / Storage Made Easy EU -\ \[dq]https://eu.storagemadeeasy.com\[dq] 3 / Connect to your -Enterprise File Fabric \ \[dq]https://yourfabric.smestorage.com\[dq] -url> https://yourfabric.smestorage.com/ ID of the root folder Leave -blank normally. +If you then add that config to your config file (find it with +\f[C]rclone config file\f[R]) then you can access all the shared drives +in one place with the \f[C]AllDrives:\f[R] remote. +.PP +See the Google Drive docs (https://rclone.org/drive/#drives) for full +info. +.SS Standard options +.PP +Here are the Standard options specific to combine (Combine several +remotes into one). +.SS --combine-upstreams +.PP +Upstreams for combining +.PP +These should be in the form +.IP +.nf +\f[C] +dir=remote:path dir2=remote2:path +\f[R] +.fi +.PP +Where before the = is specified the root directory and after is the +remote to put there. +.PP +Embedded spaces can be added using quotes +.IP +.nf +\f[C] +\[dq]dir=remote:path with space\[dq] \[dq]dir2=remote2:path with space\[dq] +\f[R] +.fi +.PP +Properties: +.IP \[bu] 2 +Config: upstreams +.IP \[bu] 2 +Env Var: RCLONE_COMBINE_UPSTREAMS +.IP \[bu] 2 +Type: SpaceSepList +.IP \[bu] 2 +Default: +.SS Advanced options +.PP +Here are the Advanced options specific to combine (Combine several +remotes into one). +.SS --combine-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_COMBINE_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Metadata +.PP +Any metadata supported by the underlying remote is read and written. +.PP +See the metadata (https://rclone.org/docs/#metadata) docs for more info. +.SH Dropbox +.PP +Paths are specified as \f[C]remote:path\f[R] +.PP +Dropbox paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R]. +.SS Configuration +.PP +The initial setup for dropbox involves getting a token from Dropbox +which you need to do in your browser. +\f[C]rclone config\f[R] walks you through it. +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +n) New remote +d) Delete remote +q) Quit config +e/n/d/q> n +name> remote +Type of storage to configure. +Choose a number from below, or type in your own value +[snip] +XX / Dropbox + \[rs] \[dq]dropbox\[dq] +[snip] +Storage> dropbox +Dropbox App Key - leave blank normally. +app_key> +Dropbox App Secret - leave blank normally. +app_secret> +Remote config +Please visit: +https://www.dropbox.com/1/oauth2/authorize?client_id=XXXXXXXXXXXXXXX&response_type=code +Enter the code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXXXXXXXX +-------------------- +[remote] +app_key = +app_secret = +token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +See the remote setup docs (https://rclone.org/remote_setup/) for how to +set it up on a machine with no Internet browser available. +.PP +Note that rclone runs a webserver on your local machine to collect the +token as returned from Dropbox. +This only runs from the moment it opens your browser to the moment you +get back the verification code. +This is on \f[C]http://127.0.0.1:53682/\f[R] and it may require you to +unblock it temporarily if you are running a host firewall, or use manual +mode. +.PP +You can then use it like this, +.PP +List directories in top level of your dropbox +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +List all the files in your dropbox +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP +To copy a local directory to a dropbox directory called backup +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.SS Dropbox for business +.PP +Rclone supports Dropbox for business and Team Folders. +.PP +When using Dropbox for business \f[C]remote:\f[R] and +\f[C]remote:path/to/file\f[R] will refer to your personal folder. +.PP +If you wish to see Team Folders you must use a leading \f[C]/\f[R] in +the path, so \f[C]rclone lsd remote:/\f[R] will refer to the root and +show you all Team Folders and your User Folder. +.PP +You can then use team folders like this \f[C]remote:/TeamFolder\f[R] and +\f[C]remote:/TeamFolder/path/to/file\f[R]. +.PP +A leading \f[C]/\f[R] for a Dropbox personal account will do nothing, +but it will take an extra HTTP transaction so it should be avoided. +.SS Modification times and hashes +.PP +Dropbox supports modified times, but the only way to set a modification +time is to re-upload the file. +.PP +This means that if you uploaded your data with an older version of +rclone which didn\[aq]t support the v2 API and modified times, rclone +will decide to upload all your old data to fix the modification times. +If you don\[aq]t want this to happen use \f[C]--size-only\f[R] or +\f[C]--checksum\f[R] flag to stop it. +.PP +Dropbox supports its own hash +type (https://www.dropbox.com/developers/reference/content-hash) which +is checked for all transfers. +.SS Restricted filename characters +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +NUL +T}@T{ +0x00 +T}@T{ +\[u2400] +T} +T{ +/ +T}@T{ +0x2F +T}@T{ +\[uFF0F] +T} +T{ +DEL +T}@T{ +0x7F +T}@T{ +\[u2421] +T} +T{ +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] +T} +.TE +.PP +File names can also not end with the following characters. +These only get replaced if they are the last character in the name: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +SP +T}@T{ +0x20 +T}@T{ +\[u2420] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Batch mode uploads +.PP +Using batch mode uploads is very important for performance when using +the Dropbox API. +See the dropbox performance +guide (https://developers.dropbox.com/dbx-performance-guide) for more +info. +.PP +There are 3 modes rclone can use for uploads. +.SS --dropbox-batch-mode off +.PP +In this mode rclone will not use upload batching. +This was the default before rclone v1.55. +It has the disadvantage that it is very likely to encounter +\f[C]too_many_requests\f[R] errors like this +.IP +.nf +\f[C] +NOTICE: too_many_requests/.: Too many requests or write operations. Trying again in 15 seconds. +\f[R] +.fi +.PP +When rclone receives these it has to wait for 15s or sometimes 300s +before continuing which really slows down transfers. +.PP +This will happen especially if \f[C]--transfers\f[R] is large, so this +mode isn\[aq]t recommended except for compatibility or investigating +problems. +.SS --dropbox-batch-mode sync +.PP +In this mode rclone will batch up uploads to the size specified by +\f[C]--dropbox-batch-size\f[R] and commit them together. +.PP +Using this mode means you can use a much higher \f[C]--transfers\f[R] +parameter (32 or 64 works fine) without receiving +\f[C]too_many_requests\f[R] errors. +.PP +This mode ensures full data integrity. +.PP +Note that there may be a pause when quitting rclone while rclone +finishes up the last batch using this mode. +.SS --dropbox-batch-mode async +.PP +In this mode rclone will batch up uploads to the size specified by +\f[C]--dropbox-batch-size\f[R] and commit them together. +.PP +However it will not wait for the status of the batch to be returned to +the caller. +This means rclone can use a much bigger batch size (much bigger than +\f[C]--transfers\f[R]), at the cost of not being able to check the +status of the upload. +.PP +This provides the maximum possible upload speed especially with lots of +small files, however rclone can\[aq]t check the file got uploaded +properly using this mode. +.PP +If you are using this mode then using \[dq]rclone check\[dq] after the +transfer completes is recommended. +Or you could do an initial transfer with +\f[C]--dropbox-batch-mode async\f[R] then do a final transfer with +\f[C]--dropbox-batch-mode sync\f[R] (the default). +.PP +Note that there may be a pause when quitting rclone while rclone +finishes up the last batch using this mode. +.SS Standard options +.PP +Here are the Standard options specific to dropbox (Dropbox). +.SS --dropbox-client-id +.PP +OAuth Client Id. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --dropbox-client-secret +.PP +OAuth Client Secret. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Advanced options +.PP +Here are the Advanced options specific to dropbox (Dropbox). +.SS --dropbox-token +.PP +OAuth Access Token as a JSON blob. +.PP +Properties: +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --dropbox-auth-url +.PP +Auth server URL. +.PP +Leave blank to use the provider defaults. +.PP +Properties: +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --dropbox-token-url +.PP +Token server url. +.PP +Leave blank to use the provider defaults. +.PP +Properties: +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --dropbox-chunk-size +.PP +Upload chunk size (< 150Mi). +.PP +Any files larger than this will be uploaded in chunks of this size. +.PP +Note that chunks are buffered in memory (one at a time) so rclone can +deal with retries. +Setting this larger will increase the speed slightly (at most 10% for +128 MiB in tests) at the cost of using more memory. +It can be set smaller if you are tight on memory. +.PP +Properties: +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 48Mi +.SS --dropbox-impersonate +.PP +Impersonate this user when using a business account. +.PP +Note that if you want to use impersonate, you should make sure this flag +is set when running \[dq]rclone config\[dq] as this will cause rclone to +request the \[dq]members.read\[dq] scope which it won\[aq]t normally. +This is needed to lookup a members email address into the internal ID +that dropbox uses in the API. +.PP +Using the \[dq]members.read\[dq] scope will require a Dropbox Team Admin +to approve during the OAuth flow. +.PP +You will have to use your own App (setting your own client_id and +client_secret) to use this option as currently rclone\[aq]s default set +of permissions doesn\[aq]t include \[dq]members.read\[dq]. +This can be added once v1.55 or later is in use everywhere. +.PP +Properties: +.IP \[bu] 2 +Config: impersonate +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_IMPERSONATE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --dropbox-shared-files +.PP +Instructs rclone to work on individual shared files. +.PP +In this mode rclone\[aq]s features are extremely limited - only list +(ls, lsl, etc.) operations and read operations (e.g. +downloading) are supported in this mode. +All other operations will be disabled. +.PP +Properties: +.IP \[bu] 2 +Config: shared_files +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_SHARED_FILES +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --dropbox-shared-folders +.PP +Instructs rclone to work on shared folders. +.PP +When this flag is used with no path only the List operation is supported +and all available shared folders will be listed. +If you specify a path the first part will be interpreted as the name of +shared folder. +Rclone will then try to mount this shared to the root namespace. +On success shared folder rclone proceeds normally. +The shared folder is now pretty much a normal folder and all normal +operations are supported. +.PP +Note that we don\[aq]t unmount the shared folder afterwards so the +--dropbox-shared-folders can be omitted after the first use of a +particular shared folder. +.PP +See also --dropbox-root-namespace for an alternative way to work with +shared folders. +.PP +Properties: +.IP \[bu] 2 +Config: shared_folders +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_SHARED_FOLDERS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --dropbox-pacer-min-sleep +.PP +Minimum time to sleep between API calls. +.PP +Properties: +.IP \[bu] 2 +Config: pacer_min_sleep +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_PACER_MIN_SLEEP +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 10ms +.SS --dropbox-encoding +.PP +The encoding for the backend. +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP +Properties: +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot +.SS --dropbox-root-namespace +.PP +Specify a different Dropbox namespace ID to use as the root for all +paths. +.PP +Properties: +.IP \[bu] 2 +Config: root_namespace +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_ROOT_NAMESPACE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --dropbox-batch-mode +.PP +Upload file batching sync|async|off. +.PP +This sets the batch mode used by rclone. +.PP +For full info see the main docs (https://rclone.org/dropbox/#batch-mode) +.PP +This has 3 possible values +.IP \[bu] 2 +off - no batching +.IP \[bu] 2 +sync - batch uploads and check completion (default) +.IP \[bu] 2 +async - batch upload and don\[aq]t check completion +.PP +Rclone will close any outstanding batches when it exits which may make a +delay on quit. +.PP +Properties: +.IP \[bu] 2 +Config: batch_mode +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_BATCH_MODE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]sync\[dq] +.SS --dropbox-batch-size +.PP +Max number of files in upload batch. +.PP +This sets the batch size of files to upload. +It has to be less than 1000. +.PP +By default this is 0 which means rclone which calculate the batch size +depending on the setting of batch_mode. +.IP \[bu] 2 +batch_mode: async - default batch_size is 100 +.IP \[bu] 2 +batch_mode: sync - default batch_size is the same as --transfers +.IP \[bu] 2 +batch_mode: off - not in use +.PP +Rclone will close any outstanding batches when it exits which may make a +delay on quit. +.PP +Setting this is a great idea if you are uploading lots of small files as +it will make them a lot quicker. +You can use --transfers 32 to maximise throughput. +.PP +Properties: +.IP \[bu] 2 +Config: batch_size +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_BATCH_SIZE +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 0 +.SS --dropbox-batch-timeout +.PP +Max time to allow an idle upload batch before uploading. +.PP +If an upload batch is idle for more than this long then it will be +uploaded. +.PP +The default for this is 0 which means rclone will choose a sensible +default based on the batch_mode in use. +.IP \[bu] 2 +batch_mode: async - default batch_timeout is 10s +.IP \[bu] 2 +batch_mode: sync - default batch_timeout is 500ms +.IP \[bu] 2 +batch_mode: off - not in use +.PP +Properties: +.IP \[bu] 2 +Config: batch_timeout +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_BATCH_TIMEOUT +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 0s +.SS --dropbox-batch-commit-timeout +.PP +Max time to wait for a batch to finish committing +.PP +Properties: +.IP \[bu] 2 +Config: batch_commit_timeout +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_BATCH_COMMIT_TIMEOUT +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 10m0s +.SS --dropbox-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_DROPBOX_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP +Note that Dropbox is case insensitive so you can\[aq]t have a file +called \[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. +.PP +There are some file names such as \f[C]thumbs.db\f[R] which Dropbox +can\[aq]t store. +There is a full list of them in the \[dq]Ignored Files\[dq] section of +this document (https://www.dropbox.com/en/help/145). +Rclone will issue an error message +\f[C]File name disallowed - not uploading\f[R] if it attempts to upload +one of those file names, but the sync won\[aq]t fail. +.PP +Some errors may occur if you try to sync copyright-protected files +because Dropbox has its own copyright +detector (https://techcrunch.com/2014/03/30/how-dropbox-knows-when-youre-sharing-copyrighted-stuff-without-actually-looking-at-your-stuff/) +that prevents this sort of file being downloaded. +This will return the error +\f[C]ERROR : /path/to/your/file: Failed to copy: failed to open source object: path/restricted_content/.\f[R] +.PP +If you have more than 10,000 files in a directory then +\f[C]rclone purge dropbox:dir\f[R] will return the error +\f[C]Failed to purge: There are too many files involved in this operation\f[R]. +As a work-around do an \f[C]rclone delete dropbox:dir\f[R] followed by +an \f[C]rclone rmdir dropbox:dir\f[R]. +.PP +When using \f[C]rclone link\f[R] you\[aq]ll need to set +\f[C]--expire\f[R] if using a non-personal account otherwise the +visibility may not be correct. +(Note that \f[C]--expire\f[R] isn\[aq]t supported on personal accounts). +See the forum +discussion (https://forum.rclone.org/t/rclone-link-dropbox-permissions/23211) +and the dropbox SDK +issue (https://github.com/dropbox/dropbox-sdk-go-unofficial/issues/75). +.SS Get your own Dropbox App ID +.PP +When you use rclone with Dropbox in its default configuration you are +using rclone\[aq]s App ID. +This is shared between all the rclone users. +.PP +Here is how to create your own Dropbox App ID for rclone: +.IP "1." 3 +Log into the Dropbox App +console (https://www.dropbox.com/developers/apps/create) with your +Dropbox Account (It need not to be the same account as the Dropbox you +want to access) +.IP "2." 3 +Choose an API => Usually this should be \f[C]Dropbox API\f[R] +.IP "3." 3 +Choose the type of access you want to use => \f[C]Full Dropbox\f[R] or +\f[C]App Folder\f[R]. +If you want to use Team Folders, \f[C]Full Dropbox\f[R] is required (see +here (https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-create-team-folder-inside-my-app-s-folder/m-p/601005/highlight/true#M27911)). +.IP "4." 3 +Name your App. +The app name is global, so you can\[aq]t use \f[C]rclone\f[R] for +example +.IP "5." 3 +Click the button \f[C]Create App\f[R] +.IP "6." 3 +Switch to the \f[C]Permissions\f[R] tab. +Enable at least the following permissions: \f[C]account_info.read\f[R], +\f[C]files.metadata.write\f[R], \f[C]files.content.write\f[R], +\f[C]files.content.read\f[R], \f[C]sharing.write\f[R]. +The \f[C]files.metadata.read\f[R] and \f[C]sharing.read\f[R] checkboxes +will be marked too. +Click \f[C]Submit\f[R] +.IP "7." 3 +Switch to the \f[C]Settings\f[R] tab. +Fill \f[C]OAuth2 - Redirect URIs\f[R] as +\f[C]http://localhost:53682/\f[R] and click on \f[C]Add\f[R] +.IP "8." 3 +Find the \f[C]App key\f[R] and \f[C]App secret\f[R] values on the +\f[C]Settings\f[R] tab. +Use these values in rclone config to add a new remote or edit an +existing remote. +The \f[C]App key\f[R] setting corresponds to \f[C]client_id\f[R] in +rclone config, the \f[C]App secret\f[R] corresponds to +\f[C]client_secret\f[R] +.SH Enterprise File Fabric +.PP +This backend supports Storage Made Easy\[aq]s Enterprise File +Fabric\[tm] (https://storagemadeeasy.com/about/) which provides a +software solution to integrate and unify File and Object Storage +accessible through a global file system. +.SS Configuration +.PP +The initial setup for the Enterprise File Fabric backend involves +getting a token from the Enterprise File Fabric which you need to do in +your browser. +\f[C]rclone config\f[R] walks you through it. +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +[snip] +XX / Enterprise File Fabric + \[rs] \[dq]filefabric\[dq] +[snip] +Storage> filefabric +** See help for filefabric backend at: https://rclone.org/filefabric/ ** + +URL of the Enterprise File Fabric to connect to +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value + 1 / Storage Made Easy US + \[rs] \[dq]https://storagemadeeasy.com\[dq] + 2 / Storage Made Easy EU + \[rs] \[dq]https://eu.storagemadeeasy.com\[dq] + 3 / Connect to your Enterprise File Fabric + \[rs] \[dq]https://yourfabric.smestorage.com\[dq] +url> https://yourfabric.smestorage.com/ +ID of the root folder +Leave blank normally. + +Fill in to make rclone start with directory of a given ID. + +Enter a string value. Press Enter for the default (\[dq]\[dq]). +root_folder_id> +Permanent Authentication Token + +A Permanent Authentication Token can be created in the Enterprise File +Fabric, on the users Dashboard under Security, there is an entry +you\[aq]ll see called \[dq]My Authentication Tokens\[dq]. Click the Manage button +to create one. + +These tokens are normally valid for several years. + +For more info see: https://docs.storagemadeeasy.com/organisationcloud/api-tokens + +Enter a string value. Press Enter for the default (\[dq]\[dq]). +permanent_token> xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx +Edit advanced config? (y/n) +y) Yes +n) No (default) +y/n> n +Remote config +-------------------- +[remote] +type = filefabric +url = https://yourfabric.smestorage.com/ +permanent_token = xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +Once configured you can then use \f[C]rclone\f[R] like this, +.PP +List directories in top level of your Enterprise File Fabric +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +List all the files in your Enterprise File Fabric +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP +To copy a local directory to an Enterprise File Fabric directory called +backup +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.SS Modification times and hashes +.PP +The Enterprise File Fabric allows modification times to be set on files +accurate to 1 second. +These will be used to detect whether objects need syncing or not. +.PP +The Enterprise File Fabric does not support any data hashes at this +time. +.SS Restricted filename characters +.PP +The default restricted characters +set (https://rclone.org/overview/#restricted-characters) will be +replaced. +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Empty files +.PP +Empty files aren\[aq]t supported by the Enterprise File Fabric. +Rclone will therefore upload an empty file as a single space with a mime +type of \f[C]application/vnd.rclone.empty.file\f[R] and files with that +mime type are treated as empty. +.SS Root folder ID +.PP +You can set the \f[C]root_folder_id\f[R] for rclone. +This is the directory (identified by its \f[C]Folder ID\f[R]) that +rclone considers to be the root of your Enterprise File Fabric. +.PP +Normally you will leave this blank and rclone will determine the correct +root to use itself. +.PP +However you can set this to restrict rclone to a specific folder +hierarchy. +.PP +In order to do this you will have to find the \f[C]Folder ID\f[R] of the +directory you wish rclone to display. +These aren\[aq]t displayed in the web interface, but you can use +\f[C]rclone lsf\f[R] to find them, for example +.IP +.nf +\f[C] +$ rclone lsf --dirs-only -Fip --csv filefabric: +120673758,Burnt PDFs/ +120673759,My Quick Uploads/ +120673755,My Syncs/ +120673756,My backups/ +120673757,My contacts/ +120673761,S3 Storage/ +\f[R] +.fi +.PP +The ID for \[dq]S3 Storage\[dq] would be \f[C]120673761\f[R]. +.SS Standard options +.PP +Here are the Standard options specific to filefabric (Enterprise File +Fabric). +.SS --filefabric-url +.PP +URL of the Enterprise File Fabric to connect to. +.PP +Properties: +.IP \[bu] 2 +Config: url +.IP \[bu] 2 +Env Var: RCLONE_FILEFABRIC_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]https://storagemadeeasy.com\[dq] +.RS 2 +.IP \[bu] 2 +Storage Made Easy US +.RE +.IP \[bu] 2 +\[dq]https://eu.storagemadeeasy.com\[dq] +.RS 2 +.IP \[bu] 2 +Storage Made Easy EU +.RE +.IP \[bu] 2 +\[dq]https://yourfabric.smestorage.com\[dq] +.RS 2 +.IP \[bu] 2 +Connect to your Enterprise File Fabric +.RE +.RE +.SS --filefabric-root-folder-id +.PP +ID of the root folder. +.PP +Leave blank normally. .PP Fill in to make rclone start with directory of a given ID. .PP -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -root_folder_id> Permanent Authentication Token +Properties: +.IP \[bu] 2 +Config: root_folder_id +.IP \[bu] 2 +Env Var: RCLONE_FILEFABRIC_ROOT_FOLDER_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --filefabric-permanent-token +.PP +Permanent Authentication Token. .PP A Permanent Authentication Token can be created in the Enterprise File Fabric, on the users Dashboard under Security, there is an entry @@ -41829,3208 +43702,4603 @@ These tokens are normally valid for several years. For more info see: https://docs.storagemadeeasy.com/organisationcloud/api-tokens .PP -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -permanent_token> xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx Edit advanced config? -(y/n) y) Yes n) No (default) y/n> n Remote config -------------------- -[remote] type = filefabric url = https://yourfabric.smestorage.com/ -permanent_token = xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx -------------------- -y) Yes this is OK (default) e) Edit this remote d) Delete this remote -y/e/d> y -.IP -.nf -\f[C] -Once configured you can then use \[ga]rclone\[ga] like this, - -List directories in top level of your Enterprise File Fabric - - rclone lsd remote: - -List all the files in your Enterprise File Fabric - - rclone ls remote: - -To copy a local directory to an Enterprise File Fabric directory called backup - - rclone copy /home/source remote:backup - -### Modification times and hashes - -The Enterprise File Fabric allows modification times to be set on -files accurate to 1 second. These will be used to detect whether -objects need syncing or not. - -The Enterprise File Fabric does not support any data hashes at this time. - -### Restricted filename characters - -The [default restricted characters set](https://rclone.org/overview/#restricted-characters) -will be replaced. - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -### Empty files - -Empty files aren\[aq]t supported by the Enterprise File Fabric. Rclone will therefore -upload an empty file as a single space with a mime type of -\[ga]application/vnd.rclone.empty.file\[ga] and files with that mime type are -treated as empty. - -### Root folder ID ### - -You can set the \[ga]root_folder_id\[ga] for rclone. This is the directory -(identified by its \[ga]Folder ID\[ga]) that rclone considers to be the root -of your Enterprise File Fabric. - -Normally you will leave this blank and rclone will determine the -correct root to use itself. - -However you can set this to restrict rclone to a specific folder -hierarchy. - -In order to do this you will have to find the \[ga]Folder ID\[ga] of the -directory you wish rclone to display. These aren\[aq]t displayed in the -web interface, but you can use \[ga]rclone lsf\[ga] to find them, for example -\f[R] -.fi +Properties: +.IP \[bu] 2 +Config: permanent_token +.IP \[bu] 2 +Env Var: RCLONE_FILEFABRIC_PERMANENT_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Advanced options +.PP +Here are the Advanced options specific to filefabric (Enterprise File +Fabric). +.SS --filefabric-token .PP -$ rclone lsf --dirs-only -Fip --csv filefabric: 120673758,Burnt PDFs/ -120673759,My Quick Uploads/ 120673755,My Syncs/ 120673756,My backups/ -120673757,My contacts/ 120673761,S3 Storage/ -.IP -.nf -\f[C] -The ID for \[dq]S3 Storage\[dq] would be \[ga]120673761\[ga]. - - -### Standard options - -Here are the Standard options specific to filefabric (Enterprise File Fabric). - -#### --filefabric-url - -URL of the Enterprise File Fabric to connect to. - -Properties: - -- Config: url -- Env Var: RCLONE_FILEFABRIC_URL -- Type: string -- Required: true -- Examples: - - \[dq]https://storagemadeeasy.com\[dq] - - Storage Made Easy US - - \[dq]https://eu.storagemadeeasy.com\[dq] - - Storage Made Easy EU - - \[dq]https://yourfabric.smestorage.com\[dq] - - Connect to your Enterprise File Fabric - -#### --filefabric-root-folder-id - -ID of the root folder. - -Leave blank normally. - -Fill in to make rclone start with directory of a given ID. - - -Properties: - -- Config: root_folder_id -- Env Var: RCLONE_FILEFABRIC_ROOT_FOLDER_ID -- Type: string -- Required: false - -#### --filefabric-permanent-token - -Permanent Authentication Token. - -A Permanent Authentication Token can be created in the Enterprise File -Fabric, on the users Dashboard under Security, there is an entry -you\[aq]ll see called \[dq]My Authentication Tokens\[dq]. Click the Manage button -to create one. - -These tokens are normally valid for several years. - -For more info see: https://docs.storagemadeeasy.com/organisationcloud/api-tokens - - -Properties: - -- Config: permanent_token -- Env Var: RCLONE_FILEFABRIC_PERMANENT_TOKEN -- Type: string -- Required: false - -### Advanced options - -Here are the Advanced options specific to filefabric (Enterprise File Fabric). - -#### --filefabric-token - Session Token. - -This is a session token which rclone caches in the config file. It is -usually valid for 1 hour. - +.PP +This is a session token which rclone caches in the config file. +It is usually valid for 1 hour. +.PP Don\[aq]t set this value - rclone will set it automatically. - - +.PP Properties: - -- Config: token -- Env Var: RCLONE_FILEFABRIC_TOKEN -- Type: string -- Required: false - -#### --filefabric-token-expiry - +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_FILEFABRIC_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --filefabric-token-expiry +.PP Token expiry time. - +.PP Don\[aq]t set this value - rclone will set it automatically. - - +.PP Properties: - -- Config: token_expiry -- Env Var: RCLONE_FILEFABRIC_TOKEN_EXPIRY -- Type: string -- Required: false - -#### --filefabric-version - +.IP \[bu] 2 +Config: token_expiry +.IP \[bu] 2 +Env Var: RCLONE_FILEFABRIC_TOKEN_EXPIRY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --filefabric-version +.PP Version read from the file fabric. - +.PP Don\[aq]t set this value - rclone will set it automatically. - - +.PP Properties: - -- Config: version -- Env Var: RCLONE_FILEFABRIC_VERSION -- Type: string -- Required: false - -#### --filefabric-encoding - +.IP \[bu] 2 +Config: version +.IP \[bu] 2 +Env Var: RCLONE_FILEFABRIC_VERSION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --filefabric-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_FILEFABRIC_ENCODING -- Type: Encoding -- Default: Slash,Del,Ctl,InvalidUtf8,Dot - -#### --filefabric-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_FILEFABRIC_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,Del,Ctl,InvalidUtf8,Dot +.SS --filefabric-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_FILEFABRIC_DESCRIPTION -- Type: string -- Required: false - - - -# FTP - -FTP is the File Transfer Protocol. Rclone FTP support is provided using the -[github.com/jlaffaye/ftp](https://godoc.org/github.com/jlaffaye/ftp) +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_FILEFABRIC_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SH FTP +.PP +FTP is the File Transfer Protocol. +Rclone FTP support is provided using the +github.com/jlaffaye/ftp (https://godoc.org/github.com/jlaffaye/ftp) package. - -[Limitations of Rclone\[aq]s FTP backend](#limitations) - -Paths are specified as \[ga]remote:path\[ga]. If the path does not begin with -a \[ga]/\[ga] it is relative to the home directory of the user. An empty path -\[ga]remote:\[ga] refers to the user\[aq]s home directory. - -## Configuration - -To create an FTP configuration named \[ga]remote\[ga], run - - rclone config - -Rclone config guides you through an interactive setup process. A minimal -rclone FTP remote definition only requires host, username and password. -For an anonymous FTP server, see [below](#anonymous-ftp). -\f[R] -.fi .PP -No remotes found, make a new one? -n) New remote r) Rename remote c) Copy remote s) Set configuration -password q) Quit config n/r/c/s/q> n name> remote Type of storage to -configure. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value [snip] XX / FTP -\ \[dq]ftp\[dq] [snip] Storage> ftp ** See help for ftp backend at: -https://rclone.org/ftp/ ** +Limitations of Rclone\[aq]s FTP backend .PP -FTP host to connect to Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value 1 / Connect to -ftp.example.com \ \[dq]ftp.example.com\[dq] host> ftp.example.com FTP -username Enter a string value. -Press Enter for the default (\[dq]$USER\[dq]). -user> FTP port number Enter a signed integer. -Press Enter for the default (21). -port> FTP password y) Yes type in my own password g) Generate random -password y/g> y Enter the password: password: Confirm the password: -password: Use FTP over TLS (Implicit) Enter a boolean value (true or -false). -Press Enter for the default (\[dq]false\[dq]). -tls> Use FTP over TLS (Explicit) Enter a boolean value (true or false). -Press Enter for the default (\[dq]false\[dq]). -explicit_tls> Remote config -------------------- [remote] type = ftp -host = ftp.example.com pass = *** ENCRYPTED *** -------------------- y) -Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y +Paths are specified as \f[C]remote:path\f[R]. +If the path does not begin with a \f[C]/\f[R] it is relative to the home +directory of the user. +An empty path \f[C]remote:\f[R] refers to the user\[aq]s home directory. +.SS Configuration +.PP +To create an FTP configuration named \f[C]remote\f[R], run .IP .nf \f[C] -To see all directories in the home directory of \[ga]remote\[ga] - - rclone lsd remote: +rclone config +\f[R] +.fi +.PP +Rclone config guides you through an interactive setup process. +A minimal rclone FTP remote definition only requires host, username and +password. +For an anonymous FTP server, see below. +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +r) Rename remote +c) Copy remote +s) Set configuration password +q) Quit config +n/r/c/s/q> n +name> remote +Type of storage to configure. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +[snip] +XX / FTP + \[rs] \[dq]ftp\[dq] +[snip] +Storage> ftp +** See help for ftp backend at: https://rclone.org/ftp/ ** +FTP host to connect to +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value + 1 / Connect to ftp.example.com + \[rs] \[dq]ftp.example.com\[dq] +host> ftp.example.com +FTP username +Enter a string value. Press Enter for the default (\[dq]$USER\[dq]). +user> +FTP port number +Enter a signed integer. Press Enter for the default (21). +port> +FTP password +y) Yes type in my own password +g) Generate random password +y/g> y +Enter the password: +password: +Confirm the password: +password: +Use FTP over TLS (Implicit) +Enter a boolean value (true or false). Press Enter for the default (\[dq]false\[dq]). +tls> +Use FTP over TLS (Explicit) +Enter a boolean value (true or false). Press Enter for the default (\[dq]false\[dq]). +explicit_tls> +Remote config +-------------------- +[remote] +type = ftp +host = ftp.example.com +pass = *** ENCRYPTED *** +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +To see all directories in the home directory of \f[C]remote\f[R] +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP Make a new directory - - rclone mkdir remote:path/to/directory - +.IP +.nf +\f[C] +rclone mkdir remote:path/to/directory +\f[R] +.fi +.PP List the contents of a directory - - rclone ls remote:path/to/directory - -Sync \[ga]/home/local/directory\[ga] to the remote directory, deleting any -excess files in the directory. - - rclone sync --interactive /home/local/directory remote:directory - -### Anonymous FTP - -When connecting to a FTP server that allows anonymous login, you can use the -special \[dq]anonymous\[dq] username. Traditionally, this user account accepts any -string as a password, although it is common to use either the password -\[dq]anonymous\[dq] or \[dq]guest\[dq]. Some servers require the use of a valid e-mail -address as password. - -Using [on-the-fly](#backend-path-to-dir) or -[connection string](https://rclone.org/docs/#connection-strings) remotes makes it easy to access -such servers, without requiring any configuration in advance. The following -are examples of that: - - rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=$(rclone obscure dummy) - rclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=$(rclone obscure dummy): - -The above examples work in Linux shells and in PowerShell, but not Windows -Command Prompt. They execute the [rclone obscure](https://rclone.org/commands/rclone_obscure/) -command to create a password string in the format required by the -[pass](#ftp-pass) option. The following examples are exactly the same, except use -an already obscured string representation of the same password \[dq]dummy\[dq], and +.IP +.nf +\f[C] +rclone ls remote:path/to/directory +\f[R] +.fi +.PP +Sync \f[C]/home/local/directory\f[R] to the remote directory, deleting +any excess files in the directory. +.IP +.nf +\f[C] +rclone sync --interactive /home/local/directory remote:directory +\f[R] +.fi +.SS Anonymous FTP +.PP +When connecting to a FTP server that allows anonymous login, you can use +the special \[dq]anonymous\[dq] username. +Traditionally, this user account accepts any string as a password, +although it is common to use either the password \[dq]anonymous\[dq] or +\[dq]guest\[dq]. +Some servers require the use of a valid e-mail address as password. +.PP +Using on-the-fly or connection +string (https://rclone.org/docs/#connection-strings) remotes makes it +easy to access such servers, without requiring any configuration in +advance. +The following are examples of that: +.IP +.nf +\f[C] +rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=$(rclone obscure dummy) +rclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=$(rclone obscure dummy): +\f[R] +.fi +.PP +The above examples work in Linux shells and in PowerShell, but not +Windows Command Prompt. +They execute the rclone +obscure (https://rclone.org/commands/rclone_obscure/) command to create +a password string in the format required by the pass option. +The following examples are exactly the same, except use an already +obscured string representation of the same password \[dq]dummy\[dq], and therefore works even in Windows Command Prompt: - - rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxM - rclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxM: - -### Implicit TLS - -Rlone FTP supports implicit FTP over TLS servers (FTPS). This has to -be enabled in the FTP backend config for the remote, or with -[\[ga]--ftp-tls\[ga]](#ftp-tls). The default FTPS port is \[ga]990\[ga], not \[ga]21\[ga] and -can be set with [\[ga]--ftp-port\[ga]](#ftp-port). - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -File names cannot end with the following characters. Replacement is -limited to the last character in a file name: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| SP | 0x20 | \[u2420] | - +.IP +.nf +\f[C] +rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxM +rclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxM: +\f[R] +.fi +.SS Implicit TLS +.PP +Rlone FTP supports implicit FTP over TLS servers (FTPS). +This has to be enabled in the FTP backend config for the remote, or with +\f[C]--ftp-tls\f[R]. +The default FTPS port is \f[C]990\f[R], not \f[C]21\f[R] and can be set +with \f[C]--ftp-port\f[R]. +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +File names cannot end with the following characters. +Replacement is limited to the last character in a file name: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +SP +T}@T{ +0x20 +T}@T{ +\[u2420] +T} +.TE +.PP Not all FTP servers can have all characters in file names, for example: - -| FTP Server| Forbidden characters | -| --------- |:--------------------:| -| proftpd | \[ga]*\[ga] | -| pureftpd | \[ga]\[rs] [ ]\[ga] | - -This backend\[aq]s interactive configuration wizard provides a selection of -sensible encoding settings for major FTP servers: ProFTPd, PureFTPd, VsFTPd. +.PP +.TS +tab(@); +l c. +T{ +FTP Server +T}@T{ +Forbidden characters +T} +_ +T{ +proftpd +T}@T{ +\f[C]*\f[R] +T} +T{ +pureftpd +T}@T{ +\f[C]\[rs] [ ]\f[R] +T} +.TE +.PP +This backend\[aq]s interactive configuration wizard provides a selection +of sensible encoding settings for major FTP servers: ProFTPd, PureFTPd, +VsFTPd. Just hit a selection number when prompted. - - -### Standard options - +.SS Standard options +.PP Here are the Standard options specific to ftp (FTP). - -#### --ftp-host - +.SS --ftp-host +.PP FTP host to connect to. - -E.g. \[dq]ftp.example.com\[dq]. - +.PP +E.g. +\[dq]ftp.example.com\[dq]. +.PP Properties: - -- Config: host -- Env Var: RCLONE_FTP_HOST -- Type: string -- Required: true - -#### --ftp-user - +.IP \[bu] 2 +Config: host +.IP \[bu] 2 +Env Var: RCLONE_FTP_HOST +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --ftp-user +.PP FTP username. - +.PP Properties: - -- Config: user -- Env Var: RCLONE_FTP_USER -- Type: string -- Default: \[dq]$USER\[dq] - -#### --ftp-port - +.IP \[bu] 2 +Config: user +.IP \[bu] 2 +Env Var: RCLONE_FTP_USER +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]$USER\[dq] +.SS --ftp-port +.PP FTP port number. - +.PP Properties: - -- Config: port -- Env Var: RCLONE_FTP_PORT -- Type: int -- Default: 21 - -#### --ftp-pass - +.IP \[bu] 2 +Config: port +.IP \[bu] 2 +Env Var: RCLONE_FTP_PORT +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 21 +.SS --ftp-pass +.PP FTP password. - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP Properties: - -- Config: pass -- Env Var: RCLONE_FTP_PASS -- Type: string -- Required: false - -#### --ftp-tls - +.IP \[bu] 2 +Config: pass +.IP \[bu] 2 +Env Var: RCLONE_FTP_PASS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --ftp-tls +.PP Use Implicit FTPS (FTP over TLS). - -When using implicit FTP over TLS the client connects using TLS -right from the start which breaks compatibility with -non-TLS-aware servers. This is usually served over port 990 rather -than port 21. Cannot be used in combination with explicit FTPS. - +.PP +When using implicit FTP over TLS the client connects using TLS right +from the start which breaks compatibility with non-TLS-aware servers. +This is usually served over port 990 rather than port 21. +Cannot be used in combination with explicit FTPS. +.PP Properties: - -- Config: tls -- Env Var: RCLONE_FTP_TLS -- Type: bool -- Default: false - -#### --ftp-explicit-tls - +.IP \[bu] 2 +Config: tls +.IP \[bu] 2 +Env Var: RCLONE_FTP_TLS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --ftp-explicit-tls +.PP Use Explicit FTPS (FTP over TLS). - -When using explicit FTP over TLS the client explicitly requests -security from the server in order to upgrade a plain text connection -to an encrypted one. Cannot be used in combination with implicit FTPS. - +.PP +When using explicit FTP over TLS the client explicitly requests security +from the server in order to upgrade a plain text connection to an +encrypted one. +Cannot be used in combination with implicit FTPS. +.PP Properties: - -- Config: explicit_tls -- Env Var: RCLONE_FTP_EXPLICIT_TLS -- Type: bool -- Default: false - -### Advanced options - +.IP \[bu] 2 +Config: explicit_tls +.IP \[bu] 2 +Env Var: RCLONE_FTP_EXPLICIT_TLS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS Advanced options +.PP Here are the Advanced options specific to ftp (FTP). - -#### --ftp-concurrency - +.SS --ftp-concurrency +.PP Maximum number of FTP simultaneous connections, 0 for unlimited. - -Note that setting this is very likely to cause deadlocks so it should -be used with care. - +.PP +Note that setting this is very likely to cause deadlocks so it should be +used with care. +.PP If you are doing a sync or copy then make sure concurrency is one more -than the sum of \[ga]--transfers\[ga] and \[ga]--checkers\[ga]. - -If you use \[ga]--check-first\[ga] then it just needs to be one more than the -maximum of \[ga]--checkers\[ga] and \[ga]--transfers\[ga]. - -So for \[ga]concurrency 3\[ga] you\[aq]d use \[ga]--checkers 2 --transfers 2 ---check-first\[ga] or \[ga]--checkers 1 --transfers 1\[ga]. - - - +than the sum of \f[C]--transfers\f[R] and \f[C]--checkers\f[R]. +.PP +If you use \f[C]--check-first\f[R] then it just needs to be one more +than the maximum of \f[C]--checkers\f[R] and \f[C]--transfers\f[R]. +.PP +So for \f[C]concurrency 3\f[R] you\[aq]d use +\f[C]--checkers 2 --transfers 2 --check-first\f[R] or +\f[C]--checkers 1 --transfers 1\f[R]. +.PP Properties: - -- Config: concurrency -- Env Var: RCLONE_FTP_CONCURRENCY -- Type: int -- Default: 0 - -#### --ftp-no-check-certificate - +.IP \[bu] 2 +Config: concurrency +.IP \[bu] 2 +Env Var: RCLONE_FTP_CONCURRENCY +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 0 +.SS --ftp-no-check-certificate +.PP Do not verify the TLS certificate of the server. - +.PP Properties: - -- Config: no_check_certificate -- Env Var: RCLONE_FTP_NO_CHECK_CERTIFICATE -- Type: bool -- Default: false - -#### --ftp-disable-epsv - +.IP \[bu] 2 +Config: no_check_certificate +.IP \[bu] 2 +Env Var: RCLONE_FTP_NO_CHECK_CERTIFICATE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --ftp-disable-epsv +.PP Disable using EPSV even if server advertises support. - +.PP Properties: - -- Config: disable_epsv -- Env Var: RCLONE_FTP_DISABLE_EPSV -- Type: bool -- Default: false - -#### --ftp-disable-mlsd - +.IP \[bu] 2 +Config: disable_epsv +.IP \[bu] 2 +Env Var: RCLONE_FTP_DISABLE_EPSV +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --ftp-disable-mlsd +.PP Disable using MLSD even if server advertises support. - +.PP Properties: - -- Config: disable_mlsd -- Env Var: RCLONE_FTP_DISABLE_MLSD -- Type: bool -- Default: false - -#### --ftp-disable-utf8 - +.IP \[bu] 2 +Config: disable_mlsd +.IP \[bu] 2 +Env Var: RCLONE_FTP_DISABLE_MLSD +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --ftp-disable-utf8 +.PP Disable using UTF-8 even if server advertises support. - +.PP Properties: - -- Config: disable_utf8 -- Env Var: RCLONE_FTP_DISABLE_UTF8 -- Type: bool -- Default: false - -#### --ftp-writing-mdtm - +.IP \[bu] 2 +Config: disable_utf8 +.IP \[bu] 2 +Env Var: RCLONE_FTP_DISABLE_UTF8 +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --ftp-writing-mdtm +.PP Use MDTM to set modification time (VsFtpd quirk) - +.PP Properties: - -- Config: writing_mdtm -- Env Var: RCLONE_FTP_WRITING_MDTM -- Type: bool -- Default: false - -#### --ftp-force-list-hidden - -Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD. - +.IP \[bu] 2 +Config: writing_mdtm +.IP \[bu] 2 +Env Var: RCLONE_FTP_WRITING_MDTM +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --ftp-force-list-hidden +.PP +Use LIST -a to force listing of hidden files and folders. +This will disable the use of MLSD. +.PP Properties: - -- Config: force_list_hidden -- Env Var: RCLONE_FTP_FORCE_LIST_HIDDEN -- Type: bool -- Default: false - -#### --ftp-idle-timeout - +.IP \[bu] 2 +Config: force_list_hidden +.IP \[bu] 2 +Env Var: RCLONE_FTP_FORCE_LIST_HIDDEN +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --ftp-idle-timeout +.PP Max time before closing idle connections. - +.PP If no connections have been returned to the connection pool in the time given, rclone will empty the connection pool. - +.PP Set to 0 to keep connections indefinitely. - - +.PP Properties: - -- Config: idle_timeout -- Env Var: RCLONE_FTP_IDLE_TIMEOUT -- Type: Duration -- Default: 1m0s - -#### --ftp-close-timeout - +.IP \[bu] 2 +Config: idle_timeout +.IP \[bu] 2 +Env Var: RCLONE_FTP_IDLE_TIMEOUT +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 1m0s +.SS --ftp-close-timeout +.PP Maximum time to wait for a response to close. - +.PP Properties: - -- Config: close_timeout -- Env Var: RCLONE_FTP_CLOSE_TIMEOUT -- Type: Duration -- Default: 1m0s - -#### --ftp-tls-cache-size - +.IP \[bu] 2 +Config: close_timeout +.IP \[bu] 2 +Env Var: RCLONE_FTP_CLOSE_TIMEOUT +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 1m0s +.SS --ftp-tls-cache-size +.PP Size of TLS session cache for all control and data connections. - -TLS cache allows to resume TLS sessions and reuse PSK between connections. -Increase if default size is not enough resulting in TLS resumption errors. -Enabled by default. Use 0 to disable. - +.PP +TLS cache allows to resume TLS sessions and reuse PSK between +connections. +Increase if default size is not enough resulting in TLS resumption +errors. +Enabled by default. +Use 0 to disable. +.PP Properties: - -- Config: tls_cache_size -- Env Var: RCLONE_FTP_TLS_CACHE_SIZE -- Type: int -- Default: 32 - -#### --ftp-disable-tls13 - +.IP \[bu] 2 +Config: tls_cache_size +.IP \[bu] 2 +Env Var: RCLONE_FTP_TLS_CACHE_SIZE +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 32 +.SS --ftp-disable-tls13 +.PP Disable TLS 1.3 (workaround for FTP servers with buggy TLS) - +.PP Properties: - -- Config: disable_tls13 -- Env Var: RCLONE_FTP_DISABLE_TLS13 -- Type: bool -- Default: false - -#### --ftp-shut-timeout - +.IP \[bu] 2 +Config: disable_tls13 +.IP \[bu] 2 +Env Var: RCLONE_FTP_DISABLE_TLS13 +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --ftp-shut-timeout +.PP Maximum time to wait for data connection closing status. - +.PP Properties: - -- Config: shut_timeout -- Env Var: RCLONE_FTP_SHUT_TIMEOUT -- Type: Duration -- Default: 1m0s - -#### --ftp-ask-password - +.IP \[bu] 2 +Config: shut_timeout +.IP \[bu] 2 +Env Var: RCLONE_FTP_SHUT_TIMEOUT +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 1m0s +.SS --ftp-ask-password +.PP Allow asking for FTP password when needed. - -If this is set and no password is supplied then rclone will ask for a password - - +.PP +If this is set and no password is supplied then rclone will ask for a +password +.PP Properties: - -- Config: ask_password -- Env Var: RCLONE_FTP_ASK_PASSWORD -- Type: bool -- Default: false - -#### --ftp-socks-proxy - +.IP \[bu] 2 +Config: ask_password +.IP \[bu] 2 +Env Var: RCLONE_FTP_ASK_PASSWORD +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --ftp-socks-proxy +.PP Socks 5 proxy host. - - Supports the format user:pass\[at]host:port, user\[at]host:port, host:port. - - Example: - - myUser:myPass\[at]localhost:9005 - - +.IP +.nf +\f[C] + Supports the format user:pass\[at]host:port, user\[at]host:port, host:port. + + Example: + + myUser:myPass\[at]localhost:9005 + +\f[R] +.fi +.PP Properties: - -- Config: socks_proxy -- Env Var: RCLONE_FTP_SOCKS_PROXY -- Type: string -- Required: false - -#### --ftp-encoding - +.IP \[bu] 2 +Config: socks_proxy +.IP \[bu] 2 +Env Var: RCLONE_FTP_SOCKS_PROXY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --ftp-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_FTP_ENCODING -- Type: Encoding -- Default: Slash,Del,Ctl,RightSpace,Dot -- Examples: - - \[dq]Asterisk,Ctl,Dot,Slash\[dq] - - ProFTPd can\[aq]t handle \[aq]*\[aq] in file names - - \[dq]BackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket\[dq] - - PureFTPd can\[aq]t handle \[aq][]\[aq] or \[aq]*\[aq] in file names - - \[dq]Ctl,LeftPeriod,Slash\[dq] - - VsFTPd can\[aq]t handle file names starting with dot - -#### --ftp-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_FTP_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,Del,Ctl,RightSpace,Dot +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]Asterisk,Ctl,Dot,Slash\[dq] +.RS 2 +.IP \[bu] 2 +ProFTPd can\[aq]t handle \[aq]*\[aq] in file names +.RE +.IP \[bu] 2 +\[dq]BackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket\[dq] +.RS 2 +.IP \[bu] 2 +PureFTPd can\[aq]t handle \[aq][]\[aq] or \[aq]*\[aq] in file names +.RE +.IP \[bu] 2 +\[dq]Ctl,LeftPeriod,Slash\[dq] +.RS 2 +.IP \[bu] 2 +VsFTPd can\[aq]t handle file names starting with dot +.RE +.RE +.SS --ftp-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_FTP_DESCRIPTION -- Type: string -- Required: false - - - -## Limitations - -FTP servers acting as rclone remotes must support \[ga]passive\[ga] mode. -The mode cannot be configured as \[ga]passive\[ga] is the only supported one. -Rclone\[aq]s FTP implementation is not compatible with \[ga]active\[ga] mode -as [the library it uses doesn\[aq]t support it](https://github.com/jlaffaye/ftp/issues/29). +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_FTP_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP +FTP servers acting as rclone remotes must support \f[C]passive\f[R] +mode. +The mode cannot be configured as \f[C]passive\f[R] is the only supported +one. +Rclone\[aq]s FTP implementation is not compatible with \f[C]active\f[R] +mode as the library it uses doesn\[aq]t support +it (https://github.com/jlaffaye/ftp/issues/29). This will likely never be supported due to security concerns. - +.PP Rclone\[aq]s FTP backend does not support any checksums but can compare file sizes. - -\[ga]rclone about\[ga] is not supported by the FTP backend. Backends without -this capability cannot determine free space for an rclone mount or -use policy \[ga]mfs\[ga] (most free space) as a member of an rclone union -remote. - -See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - -The implementation of : \[ga]--dump headers\[ga], -\[ga]--dump bodies\[ga], \[ga]--dump auth\[ga] for debugging isn\[aq]t the same as -for rclone HTTP based backends - it has less fine grained control. - -\[ga]--timeout\[ga] isn\[aq]t supported (but \[ga]--contimeout\[ga] is). - -\[ga]--bind\[ga] isn\[aq]t supported. - -Rclone\[aq]s FTP backend could support server-side move but does not -at present. - -The \[ga]ftp_proxy\[ga] environment variable is not currently supported. - -### Modification times - +.PP +\f[C]rclone about\f[R] is not supported by the FTP backend. +Backends without this capability cannot determine free space for an +rclone mount or use policy \f[C]mfs\f[R] (most free space) as a member +of an rclone union remote. +.PP +See List of backends that do not support rclone +about (https://rclone.org/overview/#optional-features) and rclone +about (https://rclone.org/commands/rclone_about/) +.PP +The implementation of : \f[C]--dump headers\f[R], +\f[C]--dump bodies\f[R], \f[C]--dump auth\f[R] for debugging isn\[aq]t +the same as for rclone HTTP based backends - it has less fine grained +control. +.PP +\f[C]--timeout\f[R] isn\[aq]t supported (but \f[C]--contimeout\f[R] is). +.PP +\f[C]--bind\f[R] isn\[aq]t supported. +.PP +Rclone\[aq]s FTP backend could support server-side move but does not at +present. +.PP +The \f[C]ftp_proxy\f[R] environment variable is not currently supported. +.SS Modification times +.PP File modification time (timestamps) is supported to 1 second resolution -for major FTP servers: ProFTPd, PureFTPd, VsFTPd, and FileZilla FTP server. -The \[ga]VsFTPd\[ga] server has non-standard implementation of time related protocol -commands and needs a special configuration setting: \[ga]writing_mdtm = true\[ga]. - -Support for precise file time with other FTP servers varies depending on what -protocol extensions they advertise. If all the \[ga]MLSD\[ga], \[ga]MDTM\[ga] and \[ga]MFTM\[ga] -extensions are present, rclone will use them together to provide precise time. -Otherwise the times you see on the FTP server through rclone are those of the -last file upload. - -You can use the following command to check whether rclone can use precise time -with your FTP server: \[ga]rclone backend features your_ftp_remote:\[ga] (the trailing -colon is important). Look for the number in the line tagged by \[ga]Precision\[ga] -designating the remote time precision expressed as nanoseconds. A value of -\[ga]1000000000\[ga] means that file time precision of 1 second is available. -A value of \[ga]3153600000000000000\[ga] (or another large number) means \[dq]unsupported\[dq]. - -# Google Cloud Storage - -Paths are specified as \[ga]remote:bucket\[ga] (or \[ga]remote:\[ga] for the \[ga]lsd\[ga] -command.) You may put subdirectories in too, e.g. \[ga]remote:bucket/path/to/dir\[ga]. - -## Configuration - -The initial setup for google cloud storage involves getting a token from Google Cloud Storage -which you need to do in your browser. \[ga]rclone config\[ga] walks you -through it. - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi -.IP "n)" 3 -New remote -.IP "o)" 3 -Delete remote -.IP "p)" 3 -Quit config e/n/d/q> n name> remote Type of storage to configure. -Choose a number from below, or type in your own value [snip] XX / Google -Cloud Storage (this is not Google Drive) \ \[dq]google cloud -storage\[dq] [snip] Storage> google cloud storage Google Application -Client Id - leave blank normally. -client_id> Google Application Client Secret - leave blank normally. -client_secret> Project number optional - needed only for -list/create/delete buckets - see your developer console. -project_number> 12345678 Service Account Credentials JSON file path - -needed only if you want use SA instead of interactive login. -service_account_file> Access Control List for new objects. -Choose a number from below, or type in your own value 1 / Object owner -gets OWNER access, and all Authenticated Users get READER access. -\ \[dq]authenticatedRead\[dq] 2 / Object owner gets OWNER access, and -project team owners get OWNER access. -\ \[dq]bucketOwnerFullControl\[dq] 3 / Object owner gets OWNER access, -and project team owners get READER access. -\ \[dq]bucketOwnerRead\[dq] 4 / Object owner gets OWNER access [default -if left blank]. -\ \[dq]private\[dq] 5 / Object owner gets OWNER access, and project team -members get access according to their roles. -\ \[dq]projectPrivate\[dq] 6 / Object owner gets OWNER access, and all -Users get READER access. -\ \[dq]publicRead\[dq] object_acl> 4 Access Control List for new -buckets. -Choose a number from below, or type in your own value 1 / Project team -owners get OWNER access, and all Authenticated Users get READER access. -\ \[dq]authenticatedRead\[dq] 2 / Project team owners get OWNER access -[default if left blank]. -\ \[dq]private\[dq] 3 / Project team members get access according to -their roles. -\ \[dq]projectPrivate\[dq] 4 / Project team owners get OWNER access, and -all Users get READER access. -\ \[dq]publicRead\[dq] 5 / Project team owners get OWNER access, and all -Users get WRITER access. -\ \[dq]publicReadWrite\[dq] bucket_acl> 2 Location for the newly created -buckets. -Choose a number from below, or type in your own value 1 / Empty for -default location (US). -\ \[dq]\[dq] 2 / Multi-regional location for Asia. -\ \[dq]asia\[dq] 3 / Multi-regional location for Europe. -\ \[dq]eu\[dq] 4 / Multi-regional location for United States. -\ \[dq]us\[dq] 5 / Taiwan. -\ \[dq]asia-east1\[dq] 6 / Tokyo. -\ \[dq]asia-northeast1\[dq] 7 / Singapore. -\ \[dq]asia-southeast1\[dq] 8 / Sydney. -\ \[dq]australia-southeast1\[dq] 9 / Belgium. -\ \[dq]europe-west1\[dq] 10 / London. -\ \[dq]europe-west2\[dq] 11 / Iowa. -\ \[dq]us-central1\[dq] 12 / South Carolina. -\ \[dq]us-east1\[dq] 13 / Northern Virginia. -\ \[dq]us-east4\[dq] 14 / Oregon. -\ \[dq]us-west1\[dq] location> 12 The storage class to use when storing -objects in Google Cloud Storage. -Choose a number from below, or type in your own value 1 / Default -\ \[dq]\[dq] 2 / Multi-regional storage class \ \[dq]MULTI_REGIONAL\[dq] -3 / Regional storage class \ \[dq]REGIONAL\[dq] 4 / Nearline storage -class \ \[dq]NEARLINE\[dq] 5 / Coldline storage class -\ \[dq]COLDLINE\[dq] 6 / Durable reduced availability storage class -\ \[dq]DURABLE_REDUCED_AVAILABILITY\[dq] storage_class> 5 Remote config -Use web browser to automatically authenticate rclone with remote? -.IP \[bu] 2 -Say Y if the machine running rclone has a web browser you can use -.IP \[bu] 2 -Say N if running rclone on a (remote) machine without web browser access -If not sure try Y. -If Y failed, try N. -.IP "y)" 3 -Yes -.IP "z)" 3 -No y/n> y If your browser doesn\[aq]t open automatically go to the -following link: http://127.0.0.1:53682/auth Log in and authorize rclone -for access Waiting for code... -Got code -------------------- [remote] type = google cloud storage -client_id = client_secret = token = -{\[dq]AccessToken\[dq]:\[dq]xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\[dq],\[dq]RefreshToken\[dq]:\[dq]x/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxx\[dq],\[dq]Expiry\[dq]:\[dq]2014-07-17T20:49:14.929208288+01:00\[dq],\[dq]Extra\[dq]:null} -project_number = 12345678 object_acl = private bucket_acl = private --------------------- -.IP "a)" 3 -Yes this is OK -.IP "b)" 3 -Edit this remote -.IP "c)" 3 -Delete this remote y/e/d> y +for major FTP servers: ProFTPd, PureFTPd, VsFTPd, and FileZilla FTP +server. +The \f[C]VsFTPd\f[R] server has non-standard implementation of time +related protocol commands and needs a special configuration setting: +\f[C]writing_mdtm = true\f[R]. +.PP +Support for precise file time with other FTP servers varies depending on +what protocol extensions they advertise. +If all the \f[C]MLSD\f[R], \f[C]MDTM\f[R] and \f[C]MFTM\f[R] extensions +are present, rclone will use them together to provide precise time. +Otherwise the times you see on the FTP server through rclone are those +of the last file upload. +.PP +You can use the following command to check whether rclone can use +precise time with your FTP server: +\f[C]rclone backend features your_ftp_remote:\f[R] (the trailing colon +is important). +Look for the number in the line tagged by \f[C]Precision\f[R] +designating the remote time precision expressed as nanoseconds. +A value of \f[C]1000000000\f[R] means that file time precision of 1 +second is available. +A value of \f[C]3153600000000000000\f[R] (or another large number) means +\[dq]unsupported\[dq]. +.SH Google Cloud Storage +.PP +Paths are specified as \f[C]remote:bucket\f[R] (or \f[C]remote:\f[R] for +the \f[C]lsd\f[R] command.) You may put subdirectories in too, e.g. +\f[C]remote:bucket/path/to/dir\f[R]. +.SS Configuration +.PP +The initial setup for google cloud storage involves getting a token from +Google Cloud Storage which you need to do in your browser. +\f[C]rclone config\f[R] walks you through it. +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: .IP .nf \f[C] -See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a -machine with no Internet browser available. - -Note that rclone runs a webserver on your local machine to collect the -token as returned from Google if using web browser to automatically -authenticate. This only -runs from the moment it opens your browser to the moment you get back -the verification code. This is on \[ga]http://127.0.0.1:53682/\[ga] and this -it may require you to unblock it temporarily if you are running a host -firewall, or use manual mode. - -This remote is called \[ga]remote\[ga] and can now be used like this - -See all the buckets in your project - - rclone lsd remote: - -Make a new bucket - - rclone mkdir remote:bucket - -List the contents of a bucket - - rclone ls remote:bucket - -Sync \[ga]/home/local/directory\[ga] to the remote bucket, deleting any excess -files in the bucket. - - rclone sync --interactive /home/local/directory remote:bucket - -### Service Account support - -You can set up rclone with Google Cloud Storage in an unattended mode, -i.e. not tied to a specific end-user Google account. This is useful -when you want to synchronise files onto machines that don\[aq]t have -actively logged-in users, for example build machines. - -To get credentials for Google Cloud Platform -[IAM Service Accounts](https://cloud.google.com/iam/docs/service-accounts), -please head to the -[Service Account](https://console.cloud.google.com/permissions/serviceaccounts) -section of the Google Developer Console. Service Accounts behave just -like normal \[ga]User\[ga] permissions in -[Google Cloud Storage ACLs](https://cloud.google.com/storage/docs/access-control), -so you can limit their access (e.g. make them read only). After -creating an account, a JSON file containing the Service Account\[aq]s -credentials will be downloaded onto your machines. These credentials -are what rclone will use for authentication. - -To use a Service Account instead of OAuth2 token flow, enter the path -to your Service Account credentials at the \[ga]service_account_file\[ga] -prompt and rclone won\[aq]t use the browser based authentication -flow. If you\[aq]d rather stuff the contents of the credentials file into -the rclone config file, you can set \[ga]service_account_credentials\[ga] with -the actual contents of the file instead, or set the equivalent -environment variable. - -### Anonymous Access - -For downloads of objects that permit public access you can configure rclone -to use anonymous access by setting \[ga]anonymous\[ga] to \[ga]true\[ga]. -With unauthorized access you can\[aq]t write or create files but only read or list -those buckets and objects that have public read access. - -### Application Default Credentials - -If no other source of credentials is provided, rclone will fall back -to -[Application Default Credentials](https://cloud.google.com/video-intelligence/docs/common/auth#authenticating_with_application_default_credentials) -this is useful both when you already have configured authentication -for your developer account, or in production when running on a google -compute host. Note that if running in docker, you may need to run -additional commands on your google compute machine - -[see this page](https://cloud.google.com/container-registry/docs/advanced-authentication#gcloud_as_a_docker_credential_helper). - -Note that in the case application default credentials are used, there -is no need to explicitly configure a project number. - -### --fast-list - -This remote supports \[ga]--fast-list\[ga] which allows you to use fewer -transactions in exchange for more memory. See the [rclone -docs](https://rclone.org/docs/#fast-list) for more details. - -### Custom upload headers - -You can set custom upload headers with the \[ga]--header-upload\[ga] -flag. Google Cloud Storage supports the headers as described in the -[working with metadata documentation](https://cloud.google.com/storage/docs/gsutil/addlhelp/WorkingWithObjectMetadata) - -- Cache-Control -- Content-Disposition -- Content-Encoding -- Content-Language -- Content-Type -- X-Goog-Storage-Class -- X-Goog-Meta- - -Eg \[ga]--header-upload \[dq]Content-Type text/potato\[dq]\[ga] - -Note that the last of these is for setting custom metadata in the form -\[ga]--header-upload \[dq]x-goog-meta-key: value\[dq]\[ga] - -### Modification times - -Google Cloud Storage stores md5sum natively. -Google\[aq]s [gsutil](https://cloud.google.com/storage/docs/gsutil) tool stores modification time -with one-second precision as \[ga]goog-reserved-file-mtime\[ga] in file metadata. - -To ensure compatibility with gsutil, rclone stores modification time in 2 separate metadata entries. -\[ga]mtime\[ga] uses RFC3339 format with one-nanosecond precision. -\[ga]goog-reserved-file-mtime\[ga] uses Unix timestamp format with one-second precision. -To get modification time from object metadata, rclone reads the metadata in the following order: \[ga]mtime\[ga], \[ga]goog-reserved-file-mtime\[ga], object updated time. - -Note that rclone\[aq]s default modify window is 1ns. -Files uploaded by gsutil only contain timestamps with one-second precision. -If you use rclone to sync files previously uploaded by gsutil, -rclone will attempt to update modification time for all these files. -To avoid these possibly unnecessary updates, use \[ga]--modify-window 1s\[ga]. - -### Restricted filename characters - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| NUL | 0x00 | \[u2400] | -| LF | 0x0A | \[u240A] | -| CR | 0x0D | \[u240D] | -| / | 0x2F | \[uFF0F] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - - -### Standard options - -Here are the Standard options specific to google cloud storage (Google Cloud Storage (this is not Google Drive)). - -#### --gcs-client-id - -OAuth Client Id. - -Leave blank normally. - -Properties: - -- Config: client_id -- Env Var: RCLONE_GCS_CLIENT_ID -- Type: string -- Required: false - -#### --gcs-client-secret - -OAuth Client Secret. - -Leave blank normally. - -Properties: - -- Config: client_secret -- Env Var: RCLONE_GCS_CLIENT_SECRET -- Type: string -- Required: false - -#### --gcs-project-number - -Project number. - -Optional - needed only for list/create/delete buckets - see your developer console. - -Properties: - -- Config: project_number -- Env Var: RCLONE_GCS_PROJECT_NUMBER -- Type: string -- Required: false - -#### --gcs-user-project - -User project. - -Optional - needed only for requester pays. - -Properties: - -- Config: user_project -- Env Var: RCLONE_GCS_USER_PROJECT -- Type: string -- Required: false - -#### --gcs-service-account-file - -Service Account Credentials JSON file path. - -Leave blank normally. -Needed only if you want use SA instead of interactive login. - -Leading \[ga]\[ti]\[ga] will be expanded in the file name as will environment variables such as \[ga]${RCLONE_CONFIG_DIR}\[ga]. - -Properties: - -- Config: service_account_file -- Env Var: RCLONE_GCS_SERVICE_ACCOUNT_FILE -- Type: string -- Required: false - -#### --gcs-service-account-credentials - -Service Account Credentials JSON blob. - -Leave blank normally. -Needed only if you want use SA instead of interactive login. - -Properties: - -- Config: service_account_credentials -- Env Var: RCLONE_GCS_SERVICE_ACCOUNT_CREDENTIALS -- Type: string -- Required: false - -#### --gcs-anonymous - -Access public buckets and objects without credentials. - -Set to \[aq]true\[aq] if you just want to download files and don\[aq]t configure credentials. - -Properties: - -- Config: anonymous -- Env Var: RCLONE_GCS_ANONYMOUS -- Type: bool -- Default: false - -#### --gcs-object-acl - + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +n) New remote +d) Delete remote +q) Quit config +e/n/d/q> n +name> remote +Type of storage to configure. +Choose a number from below, or type in your own value +[snip] +XX / Google Cloud Storage (this is not Google Drive) + \[rs] \[dq]google cloud storage\[dq] +[snip] +Storage> google cloud storage +Google Application Client Id - leave blank normally. +client_id> +Google Application Client Secret - leave blank normally. +client_secret> +Project number optional - needed only for list/create/delete buckets - see your developer console. +project_number> 12345678 +Service Account Credentials JSON file path - needed only if you want use SA instead of interactive login. +service_account_file> Access Control List for new objects. - -Properties: - -- Config: object_acl -- Env Var: RCLONE_GCS_OBJECT_ACL -- Type: string -- Required: false -- Examples: - - \[dq]authenticatedRead\[dq] - - Object owner gets OWNER access. - - All Authenticated Users get READER access. - - \[dq]bucketOwnerFullControl\[dq] - - Object owner gets OWNER access. - - Project team owners get OWNER access. - - \[dq]bucketOwnerRead\[dq] - - Object owner gets OWNER access. - - Project team owners get READER access. - - \[dq]private\[dq] - - Object owner gets OWNER access. - - Default if left blank. - - \[dq]projectPrivate\[dq] - - Object owner gets OWNER access. - - Project team members get access according to their roles. - - \[dq]publicRead\[dq] - - Object owner gets OWNER access. - - All Users get READER access. - -#### --gcs-bucket-acl - +Choose a number from below, or type in your own value + 1 / Object owner gets OWNER access, and all Authenticated Users get READER access. + \[rs] \[dq]authenticatedRead\[dq] + 2 / Object owner gets OWNER access, and project team owners get OWNER access. + \[rs] \[dq]bucketOwnerFullControl\[dq] + 3 / Object owner gets OWNER access, and project team owners get READER access. + \[rs] \[dq]bucketOwnerRead\[dq] + 4 / Object owner gets OWNER access [default if left blank]. + \[rs] \[dq]private\[dq] + 5 / Object owner gets OWNER access, and project team members get access according to their roles. + \[rs] \[dq]projectPrivate\[dq] + 6 / Object owner gets OWNER access, and all Users get READER access. + \[rs] \[dq]publicRead\[dq] +object_acl> 4 Access Control List for new buckets. - +Choose a number from below, or type in your own value + 1 / Project team owners get OWNER access, and all Authenticated Users get READER access. + \[rs] \[dq]authenticatedRead\[dq] + 2 / Project team owners get OWNER access [default if left blank]. + \[rs] \[dq]private\[dq] + 3 / Project team members get access according to their roles. + \[rs] \[dq]projectPrivate\[dq] + 4 / Project team owners get OWNER access, and all Users get READER access. + \[rs] \[dq]publicRead\[dq] + 5 / Project team owners get OWNER access, and all Users get WRITER access. + \[rs] \[dq]publicReadWrite\[dq] +bucket_acl> 2 +Location for the newly created buckets. +Choose a number from below, or type in your own value + 1 / Empty for default location (US). + \[rs] \[dq]\[dq] + 2 / Multi-regional location for Asia. + \[rs] \[dq]asia\[dq] + 3 / Multi-regional location for Europe. + \[rs] \[dq]eu\[dq] + 4 / Multi-regional location for United States. + \[rs] \[dq]us\[dq] + 5 / Taiwan. + \[rs] \[dq]asia-east1\[dq] + 6 / Tokyo. + \[rs] \[dq]asia-northeast1\[dq] + 7 / Singapore. + \[rs] \[dq]asia-southeast1\[dq] + 8 / Sydney. + \[rs] \[dq]australia-southeast1\[dq] + 9 / Belgium. + \[rs] \[dq]europe-west1\[dq] +10 / London. + \[rs] \[dq]europe-west2\[dq] +11 / Iowa. + \[rs] \[dq]us-central1\[dq] +12 / South Carolina. + \[rs] \[dq]us-east1\[dq] +13 / Northern Virginia. + \[rs] \[dq]us-east4\[dq] +14 / Oregon. + \[rs] \[dq]us-west1\[dq] +location> 12 +The storage class to use when storing objects in Google Cloud Storage. +Choose a number from below, or type in your own value + 1 / Default + \[rs] \[dq]\[dq] + 2 / Multi-regional storage class + \[rs] \[dq]MULTI_REGIONAL\[dq] + 3 / Regional storage class + \[rs] \[dq]REGIONAL\[dq] + 4 / Nearline storage class + \[rs] \[dq]NEARLINE\[dq] + 5 / Coldline storage class + \[rs] \[dq]COLDLINE\[dq] + 6 / Durable reduced availability storage class + \[rs] \[dq]DURABLE_REDUCED_AVAILABILITY\[dq] +storage_class> 5 +Remote config +Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access +If not sure try Y. If Y failed, try N. +y) Yes +n) No +y/n> y +If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth +Log in and authorize rclone for access +Waiting for code... +Got code +-------------------- +[remote] +type = google cloud storage +client_id = +client_secret = +token = {\[dq]AccessToken\[dq]:\[dq]xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\[dq],\[dq]RefreshToken\[dq]:\[dq]x/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxx\[dq],\[dq]Expiry\[dq]:\[dq]2014-07-17T20:49:14.929208288+01:00\[dq],\[dq]Extra\[dq]:null} +project_number = 12345678 +object_acl = private +bucket_acl = private +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +See the remote setup docs (https://rclone.org/remote_setup/) for how to +set it up on a machine with no Internet browser available. +.PP +Note that rclone runs a webserver on your local machine to collect the +token as returned from Google if using web browser to automatically +authenticate. +This only runs from the moment it opens your browser to the moment you +get back the verification code. +This is on \f[C]http://127.0.0.1:53682/\f[R] and this it may require you +to unblock it temporarily if you are running a host firewall, or use +manual mode. +.PP +This remote is called \f[C]remote\f[R] and can now be used like this +.PP +See all the buckets in your project +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +Make a new bucket +.IP +.nf +\f[C] +rclone mkdir remote:bucket +\f[R] +.fi +.PP +List the contents of a bucket +.IP +.nf +\f[C] +rclone ls remote:bucket +\f[R] +.fi +.PP +Sync \f[C]/home/local/directory\f[R] to the remote bucket, deleting any +excess files in the bucket. +.IP +.nf +\f[C] +rclone sync --interactive /home/local/directory remote:bucket +\f[R] +.fi +.SS Service Account support +.PP +You can set up rclone with Google Cloud Storage in an unattended mode, +i.e. +not tied to a specific end-user Google account. +This is useful when you want to synchronise files onto machines that +don\[aq]t have actively logged-in users, for example build machines. +.PP +To get credentials for Google Cloud Platform IAM Service +Accounts (https://cloud.google.com/iam/docs/service-accounts), please +head to the Service +Account (https://console.cloud.google.com/permissions/serviceaccounts) +section of the Google Developer Console. +Service Accounts behave just like normal \f[C]User\f[R] permissions in +Google Cloud Storage +ACLs (https://cloud.google.com/storage/docs/access-control), so you can +limit their access (e.g. +make them read only). +After creating an account, a JSON file containing the Service +Account\[aq]s credentials will be downloaded onto your machines. +These credentials are what rclone will use for authentication. +.PP +To use a Service Account instead of OAuth2 token flow, enter the path to +your Service Account credentials at the \f[C]service_account_file\f[R] +prompt and rclone won\[aq]t use the browser based authentication flow. +If you\[aq]d rather stuff the contents of the credentials file into the +rclone config file, you can set \f[C]service_account_credentials\f[R] +with the actual contents of the file instead, or set the equivalent +environment variable. +.SS Anonymous Access +.PP +For downloads of objects that permit public access you can configure +rclone to use anonymous access by setting \f[C]anonymous\f[R] to +\f[C]true\f[R]. +With unauthorized access you can\[aq]t write or create files but only +read or list those buckets and objects that have public read access. +.SS Application Default Credentials +.PP +If no other source of credentials is provided, rclone will fall back to +Application Default +Credentials (https://cloud.google.com/video-intelligence/docs/common/auth#authenticating_with_application_default_credentials) +this is useful both when you already have configured authentication for +your developer account, or in production when running on a google +compute host. +Note that if running in docker, you may need to run additional commands +on your google compute machine - see this +page (https://cloud.google.com/container-registry/docs/advanced-authentication#gcloud_as_a_docker_credential_helper). +.PP +Note that in the case application default credentials are used, there is +no need to explicitly configure a project number. +.SS --fast-list +.PP +This remote supports \f[C]--fast-list\f[R] which allows you to use fewer +transactions in exchange for more memory. +See the rclone docs (https://rclone.org/docs/#fast-list) for more +details. +.SS Custom upload headers +.PP +You can set custom upload headers with the \f[C]--header-upload\f[R] +flag. +Google Cloud Storage supports the headers as described in the working +with metadata +documentation (https://cloud.google.com/storage/docs/gsutil/addlhelp/WorkingWithObjectMetadata) +.IP \[bu] 2 +Cache-Control +.IP \[bu] 2 +Content-Disposition +.IP \[bu] 2 +Content-Encoding +.IP \[bu] 2 +Content-Language +.IP \[bu] 2 +Content-Type +.IP \[bu] 2 +X-Goog-Storage-Class +.IP \[bu] 2 +X-Goog-Meta- +.PP +Eg \f[C]--header-upload \[dq]Content-Type text/potato\[dq]\f[R] +.PP +Note that the last of these is for setting custom metadata in the form +\f[C]--header-upload \[dq]x-goog-meta-key: value\[dq]\f[R] +.SS Modification times +.PP +Google Cloud Storage stores md5sum natively. +Google\[aq]s gsutil (https://cloud.google.com/storage/docs/gsutil) tool +stores modification time with one-second precision as +\f[C]goog-reserved-file-mtime\f[R] in file metadata. +.PP +To ensure compatibility with gsutil, rclone stores modification time in +2 separate metadata entries. +\f[C]mtime\f[R] uses RFC3339 format with one-nanosecond precision. +\f[C]goog-reserved-file-mtime\f[R] uses Unix timestamp format with +one-second precision. +To get modification time from object metadata, rclone reads the metadata +in the following order: \f[C]mtime\f[R], +\f[C]goog-reserved-file-mtime\f[R], object updated time. +.PP +Note that rclone\[aq]s default modify window is 1ns. +Files uploaded by gsutil only contain timestamps with one-second +precision. +If you use rclone to sync files previously uploaded by gsutil, rclone +will attempt to update modification time for all these files. +To avoid these possibly unnecessary updates, use +\f[C]--modify-window 1s\f[R]. +.SS Restricted filename characters +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +NUL +T}@T{ +0x00 +T}@T{ +\[u2400] +T} +T{ +LF +T}@T{ +0x0A +T}@T{ +\[u240A] +T} +T{ +CR +T}@T{ +0x0D +T}@T{ +\[u240D] +T} +T{ +/ +T}@T{ +0x2F +T}@T{ +\[uFF0F] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Standard options +.PP +Here are the Standard options specific to google cloud storage (Google +Cloud Storage (this is not Google Drive)). +.SS --gcs-client-id +.PP +OAuth Client Id. +.PP +Leave blank normally. +.PP Properties: - -- Config: bucket_acl -- Env Var: RCLONE_GCS_BUCKET_ACL -- Type: string -- Required: false -- Examples: - - \[dq]authenticatedRead\[dq] - - Project team owners get OWNER access. - - All Authenticated Users get READER access. - - \[dq]private\[dq] - - Project team owners get OWNER access. - - Default if left blank. - - \[dq]projectPrivate\[dq] - - Project team members get access according to their roles. - - \[dq]publicRead\[dq] - - Project team owners get OWNER access. - - All Users get READER access. - - \[dq]publicReadWrite\[dq] - - Project team owners get OWNER access. - - All Users get WRITER access. - -#### --gcs-bucket-policy-only - +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_GCS_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-client-secret +.PP +OAuth Client Secret. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_GCS_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-project-number +.PP +Project number. +.PP +Optional - needed only for list/create/delete buckets - see your +developer console. +.PP +Properties: +.IP \[bu] 2 +Config: project_number +.IP \[bu] 2 +Env Var: RCLONE_GCS_PROJECT_NUMBER +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-user-project +.PP +User project. +.PP +Optional - needed only for requester pays. +.PP +Properties: +.IP \[bu] 2 +Config: user_project +.IP \[bu] 2 +Env Var: RCLONE_GCS_USER_PROJECT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-service-account-file +.PP +Service Account Credentials JSON file path. +.PP +Leave blank normally. +Needed only if you want use SA instead of interactive login. +.PP +Leading \f[C]\[ti]\f[R] will be expanded in the file name as will +environment variables such as \f[C]${RCLONE_CONFIG_DIR}\f[R]. +.PP +Properties: +.IP \[bu] 2 +Config: service_account_file +.IP \[bu] 2 +Env Var: RCLONE_GCS_SERVICE_ACCOUNT_FILE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-service-account-credentials +.PP +Service Account Credentials JSON blob. +.PP +Leave blank normally. +Needed only if you want use SA instead of interactive login. +.PP +Properties: +.IP \[bu] 2 +Config: service_account_credentials +.IP \[bu] 2 +Env Var: RCLONE_GCS_SERVICE_ACCOUNT_CREDENTIALS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-anonymous +.PP +Access public buckets and objects without credentials. +.PP +Set to \[aq]true\[aq] if you just want to download files and don\[aq]t +configure credentials. +.PP +Properties: +.IP \[bu] 2 +Config: anonymous +.IP \[bu] 2 +Env Var: RCLONE_GCS_ANONYMOUS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --gcs-object-acl +.PP +Access Control List for new objects. +.PP +Properties: +.IP \[bu] 2 +Config: object_acl +.IP \[bu] 2 +Env Var: RCLONE_GCS_OBJECT_ACL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]authenticatedRead\[dq] +.RS 2 +.IP \[bu] 2 +Object owner gets OWNER access. +.IP \[bu] 2 +All Authenticated Users get READER access. +.RE +.IP \[bu] 2 +\[dq]bucketOwnerFullControl\[dq] +.RS 2 +.IP \[bu] 2 +Object owner gets OWNER access. +.IP \[bu] 2 +Project team owners get OWNER access. +.RE +.IP \[bu] 2 +\[dq]bucketOwnerRead\[dq] +.RS 2 +.IP \[bu] 2 +Object owner gets OWNER access. +.IP \[bu] 2 +Project team owners get READER access. +.RE +.IP \[bu] 2 +\[dq]private\[dq] +.RS 2 +.IP \[bu] 2 +Object owner gets OWNER access. +.IP \[bu] 2 +Default if left blank. +.RE +.IP \[bu] 2 +\[dq]projectPrivate\[dq] +.RS 2 +.IP \[bu] 2 +Object owner gets OWNER access. +.IP \[bu] 2 +Project team members get access according to their roles. +.RE +.IP \[bu] 2 +\[dq]publicRead\[dq] +.RS 2 +.IP \[bu] 2 +Object owner gets OWNER access. +.IP \[bu] 2 +All Users get READER access. +.RE +.RE +.SS --gcs-bucket-acl +.PP +Access Control List for new buckets. +.PP +Properties: +.IP \[bu] 2 +Config: bucket_acl +.IP \[bu] 2 +Env Var: RCLONE_GCS_BUCKET_ACL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]authenticatedRead\[dq] +.RS 2 +.IP \[bu] 2 +Project team owners get OWNER access. +.IP \[bu] 2 +All Authenticated Users get READER access. +.RE +.IP \[bu] 2 +\[dq]private\[dq] +.RS 2 +.IP \[bu] 2 +Project team owners get OWNER access. +.IP \[bu] 2 +Default if left blank. +.RE +.IP \[bu] 2 +\[dq]projectPrivate\[dq] +.RS 2 +.IP \[bu] 2 +Project team members get access according to their roles. +.RE +.IP \[bu] 2 +\[dq]publicRead\[dq] +.RS 2 +.IP \[bu] 2 +Project team owners get OWNER access. +.IP \[bu] 2 +All Users get READER access. +.RE +.IP \[bu] 2 +\[dq]publicReadWrite\[dq] +.RS 2 +.IP \[bu] 2 +Project team owners get OWNER access. +.IP \[bu] 2 +All Users get WRITER access. +.RE +.RE +.SS --gcs-bucket-policy-only +.PP Access checks should use bucket-level IAM policies. - +.PP If you want to upload objects to a bucket with Bucket Policy Only set then you will need to set this. - +.PP When it is set, rclone: - -- ignores ACLs set on buckets -- ignores ACLs set on objects -- creates buckets with Bucket Policy Only set - +.IP \[bu] 2 +ignores ACLs set on buckets +.IP \[bu] 2 +ignores ACLs set on objects +.IP \[bu] 2 +creates buckets with Bucket Policy Only set +.PP Docs: https://cloud.google.com/storage/docs/bucket-policy-only - - +.PP Properties: - -- Config: bucket_policy_only -- Env Var: RCLONE_GCS_BUCKET_POLICY_ONLY -- Type: bool -- Default: false - -#### --gcs-location - +.IP \[bu] 2 +Config: bucket_policy_only +.IP \[bu] 2 +Env Var: RCLONE_GCS_BUCKET_POLICY_ONLY +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --gcs-location +.PP Location for the newly created buckets. - +.PP Properties: - -- Config: location -- Env Var: RCLONE_GCS_LOCATION -- Type: string -- Required: false -- Examples: - - \[dq]\[dq] - - Empty for default location (US) - - \[dq]asia\[dq] - - Multi-regional location for Asia - - \[dq]eu\[dq] - - Multi-regional location for Europe - - \[dq]us\[dq] - - Multi-regional location for United States - - \[dq]asia-east1\[dq] - - Taiwan - - \[dq]asia-east2\[dq] - - Hong Kong - - \[dq]asia-northeast1\[dq] - - Tokyo - - \[dq]asia-northeast2\[dq] - - Osaka - - \[dq]asia-northeast3\[dq] - - Seoul - - \[dq]asia-south1\[dq] - - Mumbai - - \[dq]asia-south2\[dq] - - Delhi - - \[dq]asia-southeast1\[dq] - - Singapore - - \[dq]asia-southeast2\[dq] - - Jakarta - - \[dq]australia-southeast1\[dq] - - Sydney - - \[dq]australia-southeast2\[dq] - - Melbourne - - \[dq]europe-north1\[dq] - - Finland - - \[dq]europe-west1\[dq] - - Belgium - - \[dq]europe-west2\[dq] - - London - - \[dq]europe-west3\[dq] - - Frankfurt - - \[dq]europe-west4\[dq] - - Netherlands - - \[dq]europe-west6\[dq] - - Z\[:u]rich - - \[dq]europe-central2\[dq] - - Warsaw - - \[dq]us-central1\[dq] - - Iowa - - \[dq]us-east1\[dq] - - South Carolina - - \[dq]us-east4\[dq] - - Northern Virginia - - \[dq]us-west1\[dq] - - Oregon - - \[dq]us-west2\[dq] - - California - - \[dq]us-west3\[dq] - - Salt Lake City - - \[dq]us-west4\[dq] - - Las Vegas - - \[dq]northamerica-northeast1\[dq] - - Montr\['e]al - - \[dq]northamerica-northeast2\[dq] - - Toronto - - \[dq]southamerica-east1\[dq] - - S\[~a]o Paulo - - \[dq]southamerica-west1\[dq] - - Santiago - - \[dq]asia1\[dq] - - Dual region: asia-northeast1 and asia-northeast2. - - \[dq]eur4\[dq] - - Dual region: europe-north1 and europe-west4. - - \[dq]nam4\[dq] - - Dual region: us-central1 and us-east1. - -#### --gcs-storage-class - +.IP \[bu] 2 +Config: location +.IP \[bu] 2 +Env Var: RCLONE_GCS_LOCATION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]\[dq] +.RS 2 +.IP \[bu] 2 +Empty for default location (US) +.RE +.IP \[bu] 2 +\[dq]asia\[dq] +.RS 2 +.IP \[bu] 2 +Multi-regional location for Asia +.RE +.IP \[bu] 2 +\[dq]eu\[dq] +.RS 2 +.IP \[bu] 2 +Multi-regional location for Europe +.RE +.IP \[bu] 2 +\[dq]us\[dq] +.RS 2 +.IP \[bu] 2 +Multi-regional location for United States +.RE +.IP \[bu] 2 +\[dq]asia-east1\[dq] +.RS 2 +.IP \[bu] 2 +Taiwan +.RE +.IP \[bu] 2 +\[dq]asia-east2\[dq] +.RS 2 +.IP \[bu] 2 +Hong Kong +.RE +.IP \[bu] 2 +\[dq]asia-northeast1\[dq] +.RS 2 +.IP \[bu] 2 +Tokyo +.RE +.IP \[bu] 2 +\[dq]asia-northeast2\[dq] +.RS 2 +.IP \[bu] 2 +Osaka +.RE +.IP \[bu] 2 +\[dq]asia-northeast3\[dq] +.RS 2 +.IP \[bu] 2 +Seoul +.RE +.IP \[bu] 2 +\[dq]asia-south1\[dq] +.RS 2 +.IP \[bu] 2 +Mumbai +.RE +.IP \[bu] 2 +\[dq]asia-south2\[dq] +.RS 2 +.IP \[bu] 2 +Delhi +.RE +.IP \[bu] 2 +\[dq]asia-southeast1\[dq] +.RS 2 +.IP \[bu] 2 +Singapore +.RE +.IP \[bu] 2 +\[dq]asia-southeast2\[dq] +.RS 2 +.IP \[bu] 2 +Jakarta +.RE +.IP \[bu] 2 +\[dq]australia-southeast1\[dq] +.RS 2 +.IP \[bu] 2 +Sydney +.RE +.IP \[bu] 2 +\[dq]australia-southeast2\[dq] +.RS 2 +.IP \[bu] 2 +Melbourne +.RE +.IP \[bu] 2 +\[dq]europe-north1\[dq] +.RS 2 +.IP \[bu] 2 +Finland +.RE +.IP \[bu] 2 +\[dq]europe-west1\[dq] +.RS 2 +.IP \[bu] 2 +Belgium +.RE +.IP \[bu] 2 +\[dq]europe-west2\[dq] +.RS 2 +.IP \[bu] 2 +London +.RE +.IP \[bu] 2 +\[dq]europe-west3\[dq] +.RS 2 +.IP \[bu] 2 +Frankfurt +.RE +.IP \[bu] 2 +\[dq]europe-west4\[dq] +.RS 2 +.IP \[bu] 2 +Netherlands +.RE +.IP \[bu] 2 +\[dq]europe-west6\[dq] +.RS 2 +.IP \[bu] 2 +Z\[:u]rich +.RE +.IP \[bu] 2 +\[dq]europe-central2\[dq] +.RS 2 +.IP \[bu] 2 +Warsaw +.RE +.IP \[bu] 2 +\[dq]us-central1\[dq] +.RS 2 +.IP \[bu] 2 +Iowa +.RE +.IP \[bu] 2 +\[dq]us-east1\[dq] +.RS 2 +.IP \[bu] 2 +South Carolina +.RE +.IP \[bu] 2 +\[dq]us-east4\[dq] +.RS 2 +.IP \[bu] 2 +Northern Virginia +.RE +.IP \[bu] 2 +\[dq]us-west1\[dq] +.RS 2 +.IP \[bu] 2 +Oregon +.RE +.IP \[bu] 2 +\[dq]us-west2\[dq] +.RS 2 +.IP \[bu] 2 +California +.RE +.IP \[bu] 2 +\[dq]us-west3\[dq] +.RS 2 +.IP \[bu] 2 +Salt Lake City +.RE +.IP \[bu] 2 +\[dq]us-west4\[dq] +.RS 2 +.IP \[bu] 2 +Las Vegas +.RE +.IP \[bu] 2 +\[dq]northamerica-northeast1\[dq] +.RS 2 +.IP \[bu] 2 +Montr\['e]al +.RE +.IP \[bu] 2 +\[dq]northamerica-northeast2\[dq] +.RS 2 +.IP \[bu] 2 +Toronto +.RE +.IP \[bu] 2 +\[dq]southamerica-east1\[dq] +.RS 2 +.IP \[bu] 2 +S\[~a]o Paulo +.RE +.IP \[bu] 2 +\[dq]southamerica-west1\[dq] +.RS 2 +.IP \[bu] 2 +Santiago +.RE +.IP \[bu] 2 +\[dq]asia1\[dq] +.RS 2 +.IP \[bu] 2 +Dual region: asia-northeast1 and asia-northeast2. +.RE +.IP \[bu] 2 +\[dq]eur4\[dq] +.RS 2 +.IP \[bu] 2 +Dual region: europe-north1 and europe-west4. +.RE +.IP \[bu] 2 +\[dq]nam4\[dq] +.RS 2 +.IP \[bu] 2 +Dual region: us-central1 and us-east1. +.RE +.RE +.SS --gcs-storage-class +.PP The storage class to use when storing objects in Google Cloud Storage. - +.PP Properties: - -- Config: storage_class -- Env Var: RCLONE_GCS_STORAGE_CLASS -- Type: string -- Required: false -- Examples: - - \[dq]\[dq] - - Default - - \[dq]MULTI_REGIONAL\[dq] - - Multi-regional storage class - - \[dq]REGIONAL\[dq] - - Regional storage class - - \[dq]NEARLINE\[dq] - - Nearline storage class - - \[dq]COLDLINE\[dq] - - Coldline storage class - - \[dq]ARCHIVE\[dq] - - Archive storage class - - \[dq]DURABLE_REDUCED_AVAILABILITY\[dq] - - Durable reduced availability storage class - -#### --gcs-env-auth - -Get GCP IAM credentials from runtime (environment variables or instance meta data if no env vars). - -Only applies if service_account_file and service_account_credentials is blank. - +.IP \[bu] 2 +Config: storage_class +.IP \[bu] 2 +Env Var: RCLONE_GCS_STORAGE_CLASS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]\[dq] +.RS 2 +.IP \[bu] 2 +Default +.RE +.IP \[bu] 2 +\[dq]MULTI_REGIONAL\[dq] +.RS 2 +.IP \[bu] 2 +Multi-regional storage class +.RE +.IP \[bu] 2 +\[dq]REGIONAL\[dq] +.RS 2 +.IP \[bu] 2 +Regional storage class +.RE +.IP \[bu] 2 +\[dq]NEARLINE\[dq] +.RS 2 +.IP \[bu] 2 +Nearline storage class +.RE +.IP \[bu] 2 +\[dq]COLDLINE\[dq] +.RS 2 +.IP \[bu] 2 +Coldline storage class +.RE +.IP \[bu] 2 +\[dq]ARCHIVE\[dq] +.RS 2 +.IP \[bu] 2 +Archive storage class +.RE +.IP \[bu] 2 +\[dq]DURABLE_REDUCED_AVAILABILITY\[dq] +.RS 2 +.IP \[bu] 2 +Durable reduced availability storage class +.RE +.RE +.SS --gcs-env-auth +.PP +Get GCP IAM credentials from runtime (environment variables or instance +meta data if no env vars). +.PP +Only applies if service_account_file and service_account_credentials is +blank. +.PP Properties: - -- Config: env_auth -- Env Var: RCLONE_GCS_ENV_AUTH -- Type: bool -- Default: false -- Examples: - - \[dq]false\[dq] - - Enter credentials in the next step. - - \[dq]true\[dq] - - Get GCP IAM credentials from the environment (env vars or IAM). - -### Advanced options - -Here are the Advanced options specific to google cloud storage (Google Cloud Storage (this is not Google Drive)). - -#### --gcs-token - +.IP \[bu] 2 +Config: env_auth +.IP \[bu] 2 +Env Var: RCLONE_GCS_ENV_AUTH +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]false\[dq] +.RS 2 +.IP \[bu] 2 +Enter credentials in the next step. +.RE +.IP \[bu] 2 +\[dq]true\[dq] +.RS 2 +.IP \[bu] 2 +Get GCP IAM credentials from the environment (env vars or IAM). +.RE +.RE +.SS Advanced options +.PP +Here are the Advanced options specific to google cloud storage (Google +Cloud Storage (this is not Google Drive)). +.SS --gcs-token +.PP OAuth Access Token as a JSON blob. - +.PP Properties: - -- Config: token -- Env Var: RCLONE_GCS_TOKEN -- Type: string -- Required: false - -#### --gcs-auth-url - +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_GCS_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-auth-url +.PP Auth server URL. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: auth_url -- Env Var: RCLONE_GCS_AUTH_URL -- Type: string -- Required: false - -#### --gcs-token-url - +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_GCS_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-token-url +.PP Token server url. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: token_url -- Env Var: RCLONE_GCS_TOKEN_URL -- Type: string -- Required: false - -#### --gcs-directory-markers - -Upload an empty object with a trailing slash when a new directory is created - -Empty folders are unsupported for bucket based remotes, this option creates an empty -object ending with \[dq]/\[dq], to persist the folder. - - +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_GCS_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-directory-markers +.PP +Upload an empty object with a trailing slash when a new directory is +created +.PP +Empty folders are unsupported for bucket based remotes, this option +creates an empty object ending with \[dq]/\[dq], to persist the folder. +.PP Properties: - -- Config: directory_markers -- Env Var: RCLONE_GCS_DIRECTORY_MARKERS -- Type: bool -- Default: false - -#### --gcs-no-check-bucket - +.IP \[bu] 2 +Config: directory_markers +.IP \[bu] 2 +Env Var: RCLONE_GCS_DIRECTORY_MARKERS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --gcs-no-check-bucket +.PP If set, don\[aq]t attempt to check the bucket exists or create it. - +.PP This can be useful when trying to minimise the number of transactions rclone does if you know the bucket exists already. - - -Properties: - -- Config: no_check_bucket -- Env Var: RCLONE_GCS_NO_CHECK_BUCKET -- Type: bool -- Default: false - -#### --gcs-decompress - -If set this will decompress gzip encoded objects. - -It is possible to upload objects to GCS with \[dq]Content-Encoding: gzip\[dq] -set. Normally rclone will download these files as compressed objects. - -If this flag is set then rclone will decompress these files with -\[dq]Content-Encoding: gzip\[dq] as they are received. This means that rclone -can\[aq]t check the size and hash but the file contents will be decompressed. - - -Properties: - -- Config: decompress -- Env Var: RCLONE_GCS_DECOMPRESS -- Type: bool -- Default: false - -#### --gcs-endpoint - -Endpoint for the service. - -Leave blank normally. - -Properties: - -- Config: endpoint -- Env Var: RCLONE_GCS_ENDPOINT -- Type: string -- Required: false - -#### --gcs-encoding - -The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - -Properties: - -- Config: encoding -- Env Var: RCLONE_GCS_ENCODING -- Type: Encoding -- Default: Slash,CrLf,InvalidUtf8,Dot - -#### --gcs-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_GCS_DESCRIPTION -- Type: string -- Required: false - - - -## Limitations - -\[ga]rclone about\[ga] is not supported by the Google Cloud Storage backend. Backends without -this capability cannot determine free space for an rclone mount or -use policy \[ga]mfs\[ga] (most free space) as a member of an rclone union -remote. - -See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - -# Google Drive - -Paths are specified as \[ga]drive:path\[ga] - -Drive paths may be as deep as required, e.g. \[ga]drive:directory/subdirectory\[ga]. - -## Configuration - -The initial setup for drive involves getting a token from Google drive -which you need to do in your browser. \[ga]rclone config\[ga] walks you -through it. - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi .PP -No remotes found, make a new one? -n) New remote r) Rename remote c) Copy remote s) Set configuration -password q) Quit config n/r/c/s/q> n name> remote Type of storage to -configure. -Choose a number from below, or type in your own value [snip] XX / Google -Drive \ \[dq]drive\[dq] [snip] Storage> drive Google Application Client -Id - leave blank normally. -client_id> Google Application Client Secret - leave blank normally. -client_secret> Scope that rclone should use when requesting access from -drive. -Choose a number from below, or type in your own value 1 / Full access -all files, excluding Application Data Folder. -\ \[dq]drive\[dq] 2 / Read-only access to file metadata and file -contents. -\ \[dq]drive.readonly\[dq] / Access to files created by rclone only. -3 | These are visible in the drive website. -| File authorization is revoked when the user deauthorizes the app. -\ \[dq]drive.file\[dq] / Allows read and write access to the Application -Data folder. -4 | This is not visible in the drive website. -\ \[dq]drive.appfolder\[dq] / Allows read-only access to file metadata -but 5 | does not allow any access to read or download file content. -\ \[dq]drive.metadata.readonly\[dq] scope> 1 Service Account Credentials -JSON file path - needed only if you want use SA instead of interactive -login. -service_account_file> Remote config Use web browser to automatically -authenticate rclone with remote? -* Say Y if the machine running rclone has a web browser you can use * -Say N if running rclone on a (remote) machine without web browser access -If not sure try Y. -If Y failed, try N. -y) Yes n) No y/n> y If your browser doesn\[aq]t open automatically go to -the following link: http://127.0.0.1:53682/auth Log in and authorize -rclone for access Waiting for code... -Got code Configure this as a Shared Drive (Team Drive)? -y) Yes n) No y/n> n -------------------- [remote] client_id = -client_secret = scope = drive root_folder_id = service_account_file = -token = -{\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]Bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]2014-03-16T13:57:58.955387075Z\[dq]} --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y +Properties: +.IP \[bu] 2 +Config: no_check_bucket +.IP \[bu] 2 +Env Var: RCLONE_GCS_NO_CHECK_BUCKET +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --gcs-decompress +.PP +If set this will decompress gzip encoded objects. +.PP +It is possible to upload objects to GCS with \[dq]Content-Encoding: +gzip\[dq] set. +Normally rclone will download these files as compressed objects. +.PP +If this flag is set then rclone will decompress these files with +\[dq]Content-Encoding: gzip\[dq] as they are received. +This means that rclone can\[aq]t check the size and hash but the file +contents will be decompressed. +.PP +Properties: +.IP \[bu] 2 +Config: decompress +.IP \[bu] 2 +Env Var: RCLONE_GCS_DECOMPRESS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --gcs-endpoint +.PP +Endpoint for the service. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: endpoint +.IP \[bu] 2 +Env Var: RCLONE_GCS_ENDPOINT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gcs-encoding +.PP +The encoding for the backend. +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP +Properties: +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_GCS_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,CrLf,InvalidUtf8,Dot +.SS --gcs-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_GCS_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP +\f[C]rclone about\f[R] is not supported by the Google Cloud Storage +backend. +Backends without this capability cannot determine free space for an +rclone mount or use policy \f[C]mfs\f[R] (most free space) as a member +of an rclone union remote. +.PP +See List of backends that do not support rclone +about (https://rclone.org/overview/#optional-features) and rclone +about (https://rclone.org/commands/rclone_about/) +.SH Google Drive +.PP +Paths are specified as \f[C]drive:path\f[R] +.PP +Drive paths may be as deep as required, e.g. +\f[C]drive:directory/subdirectory\f[R]. +.SS Configuration +.PP +The initial setup for drive involves getting a token from Google drive +which you need to do in your browser. +\f[C]rclone config\f[R] walks you through it. +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: .IP .nf \f[C] -See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a -machine with no Internet browser available. - + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +r) Rename remote +c) Copy remote +s) Set configuration password +q) Quit config +n/r/c/s/q> n +name> remote +Type of storage to configure. +Choose a number from below, or type in your own value +[snip] +XX / Google Drive + \[rs] \[dq]drive\[dq] +[snip] +Storage> drive +Google Application Client Id - leave blank normally. +client_id> +Google Application Client Secret - leave blank normally. +client_secret> +Scope that rclone should use when requesting access from drive. +Choose a number from below, or type in your own value + 1 / Full access all files, excluding Application Data Folder. + \[rs] \[dq]drive\[dq] + 2 / Read-only access to file metadata and file contents. + \[rs] \[dq]drive.readonly\[dq] + / Access to files created by rclone only. + 3 | These are visible in the drive website. + | File authorization is revoked when the user deauthorizes the app. + \[rs] \[dq]drive.file\[dq] + / Allows read and write access to the Application Data folder. + 4 | This is not visible in the drive website. + \[rs] \[dq]drive.appfolder\[dq] + / Allows read-only access to file metadata but + 5 | does not allow any access to read or download file content. + \[rs] \[dq]drive.metadata.readonly\[dq] +scope> 1 +Service Account Credentials JSON file path - needed only if you want use SA instead of interactive login. +service_account_file> +Remote config +Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access +If not sure try Y. If Y failed, try N. +y) Yes +n) No +y/n> y +If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth +Log in and authorize rclone for access +Waiting for code... +Got code +Configure this as a Shared Drive (Team Drive)? +y) Yes +n) No +y/n> n +-------------------- +[remote] +client_id = +client_secret = +scope = drive +root_folder_id = +service_account_file = +token = {\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]Bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]2014-03-16T13:57:58.955387075Z\[dq]} +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +See the remote setup docs (https://rclone.org/remote_setup/) for how to +set it up on a machine with no Internet browser available. +.PP Note that rclone runs a webserver on your local machine to collect the -token as returned from Google if using web browser to automatically -authenticate. This only -runs from the moment it opens your browser to the moment you get back -the verification code. This is on \[ga]http://127.0.0.1:53682/\[ga] and it -may require you to unblock it temporarily if you are running a host -firewall, or use manual mode. - +token as returned from Google if using web browser to automatically +authenticate. +This only runs from the moment it opens your browser to the moment you +get back the verification code. +This is on \f[C]http://127.0.0.1:53682/\f[R] and it may require you to +unblock it temporarily if you are running a host firewall, or use manual +mode. +.PP You can then use it like this, - +.PP List directories in top level of your drive - - rclone lsd remote: - +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP List all the files in your drive - - rclone ls remote: - +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP To copy a local directory to a drive directory called backup - - rclone copy /home/source remote:backup - -### Scopes - +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.SS Scopes +.PP Rclone allows you to select which scope you would like for rclone to -use. This changes what type of token is granted to rclone. [The -scopes are defined -here](https://developers.google.com/drive/v3/web/about-auth). - -A comma-separated list is allowed e.g. \[ga]drive.readonly,drive.file\[ga]. - +use. +This changes what type of token is granted to rclone. +The scopes are defined +here (https://developers.google.com/drive/v3/web/about-auth). +.PP +A comma-separated list is allowed e.g. +\f[C]drive.readonly,drive.file\f[R]. +.PP The scope are - -#### drive - +.SS drive +.PP This is the default scope and allows full access to all files, except for the Application Data Folder (see below). - +.PP Choose this one if you aren\[aq]t sure. - -#### drive.readonly - -This allows read only access to all files. Files may be listed and -downloaded but not uploaded, renamed or deleted. - -#### drive.file - -With this scope rclone can read/view/modify only those files and -folders it creates. - +.SS drive.readonly +.PP +This allows read only access to all files. +Files may be listed and downloaded but not uploaded, renamed or deleted. +.SS drive.file +.PP +With this scope rclone can read/view/modify only those files and folders +it creates. +.PP So if you uploaded files to drive via the web interface (or any other means) they will not be visible to rclone. - +.PP This can be useful if you are using rclone to backup data and you want to be sure confidential data on your drive is not visible to rclone. - +.PP Files created with this scope are visible in the web interface. - -#### drive.appfolder - -This gives rclone its own private area to store files. Rclone will -not be able to see any other files on your drive and you won\[aq]t be able -to see rclone\[aq]s files from the web interface either. - -#### drive.metadata.readonly - -This allows read only access to file names only. It does not allow -rclone to download or upload data, or rename or delete files or -directories. - -### Root folder ID - -This option has been moved to the advanced section. You can set the \[ga]root_folder_id\[ga] for rclone. This is the directory -(identified by its \[ga]Folder ID\[ga]) that rclone considers to be the root -of your drive. - -Normally you will leave this blank and rclone will determine the -correct root to use itself. - +.SS drive.appfolder +.PP +This gives rclone its own private area to store files. +Rclone will not be able to see any other files on your drive and you +won\[aq]t be able to see rclone\[aq]s files from the web interface +either. +.SS drive.metadata.readonly +.PP +This allows read only access to file names only. +It does not allow rclone to download or upload data, or rename or delete +files or directories. +.SS Root folder ID +.PP +This option has been moved to the advanced section. +You can set the \f[C]root_folder_id\f[R] for rclone. +This is the directory (identified by its \f[C]Folder ID\f[R]) that +rclone considers to be the root of your drive. +.PP +Normally you will leave this blank and rclone will determine the correct +root to use itself. +.PP However you can set this to restrict rclone to a specific folder -hierarchy or to access data within the \[dq]Computers\[dq] tab on the drive -web interface (where files from Google\[aq]s Backup and Sync desktop -program go). - -In order to do this you will have to find the \[ga]Folder ID\[ga] of the -directory you wish rclone to display. This will be the last segment -of the URL when you open the relevant folder in the drive web -interface. - +hierarchy or to access data within the \[dq]Computers\[dq] tab on the +drive web interface (where files from Google\[aq]s Backup and Sync +desktop program go). +.PP +In order to do this you will have to find the \f[C]Folder ID\f[R] of the +directory you wish rclone to display. +This will be the last segment of the URL when you open the relevant +folder in the drive web interface. +.PP So if the folder you want rclone to use has a URL which looks like -\[ga]https://drive.google.com/drive/folders/1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh\[ga] -in the browser, then you use \[ga]1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh\[ga] as -the \[ga]root_folder_id\[ga] in the config. - -**NB** folders under the \[dq]Computers\[dq] tab seem to be read only (drive -gives a 500 error) when using rclone. - +\f[C]https://drive.google.com/drive/folders/1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh\f[R] +in the browser, then you use \f[C]1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh\f[R] +as the \f[C]root_folder_id\f[R] in the config. +.PP +\f[B]NB\f[R] folders under the \[dq]Computers\[dq] tab seem to be read +only (drive gives a 500 error) when using rclone. +.PP There doesn\[aq]t appear to be an API to discover the folder IDs of the \[dq]Computers\[dq] tab - please contact us if you know otherwise! - -Note also that rclone can\[aq]t access any data under the \[dq]Backups\[dq] tab on -the google drive web interface yet. - -### Service Account support - -You can set up rclone with Google Drive in an unattended mode, -i.e. not tied to a specific end-user Google account. This is useful -when you want to synchronise files onto machines that don\[aq]t have -actively logged-in users, for example build machines. - -To use a Service Account instead of OAuth2 token flow, enter the path -to your Service Account credentials at the \[ga]service_account_file\[ga] -prompt during \[ga]rclone config\[ga] and rclone won\[aq]t use the browser based -authentication flow. If you\[aq]d rather stuff the contents of the -credentials file into the rclone config file, you can set -\[ga]service_account_credentials\[ga] with the actual contents of the file -instead, or set the equivalent environment variable. - -#### Use case - Google Apps/G-suite account and individual Drive - +.PP +Note also that rclone can\[aq]t access any data under the +\[dq]Backups\[dq] tab on the google drive web interface yet. +.SS Service Account support +.PP +You can set up rclone with Google Drive in an unattended mode, i.e. +not tied to a specific end-user Google account. +This is useful when you want to synchronise files onto machines that +don\[aq]t have actively logged-in users, for example build machines. +.PP +To use a Service Account instead of OAuth2 token flow, enter the path to +your Service Account credentials at the \f[C]service_account_file\f[R] +prompt during \f[C]rclone config\f[R] and rclone won\[aq]t use the +browser based authentication flow. +If you\[aq]d rather stuff the contents of the credentials file into the +rclone config file, you can set \f[C]service_account_credentials\f[R] +with the actual contents of the file instead, or set the equivalent +environment variable. +.SS Use case - Google Apps/G-suite account and individual Drive +.PP Let\[aq]s say that you are the administrator of a Google Apps (old) or G-suite account. -The goal is to store data on an individual\[aq]s Drive account, who IS -a member of the domain. -We\[aq]ll call the domain **example.com**, and the user -**foo\[at]example.com**. - +The goal is to store data on an individual\[aq]s Drive account, who IS a +member of the domain. +We\[aq]ll call the domain \f[B]example.com\f[R], and the user +\f[B]foo\[at]example.com\f[R]. +.PP There\[aq]s a few steps we need to go through to accomplish this: - -##### 1. Create a service account for example.com - - To create a service account and obtain its credentials, go to the -[Google Developer Console](https://console.developers.google.com). - - You must have a project - create one if you don\[aq]t. - - Then go to \[dq]IAM & admin\[dq] -> \[dq]Service Accounts\[dq]. - - Use the \[dq]Create Service Account\[dq] button. Fill in \[dq]Service account name\[dq] -and \[dq]Service account ID\[dq] with something that identifies your client. - - Select \[dq]Create And Continue\[dq]. Step 2 and 3 are optional. - - These credentials are what rclone will use for authentication. -If you ever need to remove access, press the \[dq]Delete service -account key\[dq] button. - -##### 2. Allowing API access to example.com Google Drive - - Go to example.com\[aq]s admin console - - Go into \[dq]Security\[dq] (or use the search bar) - - Select \[dq]Show more\[dq] and then \[dq]Advanced settings\[dq] - - Select \[dq]Manage API client access\[dq] in the \[dq]Authentication\[dq] section - - In the \[dq]Client Name\[dq] field enter the service account\[aq]s +.SS 1. Create a service account for example.com +.IP \[bu] 2 +To create a service account and obtain its credentials, go to the Google +Developer Console (https://console.developers.google.com). +.IP \[bu] 2 +You must have a project - create one if you don\[aq]t. +.IP \[bu] 2 +Then go to \[dq]IAM & admin\[dq] -> \[dq]Service Accounts\[dq]. +.IP \[bu] 2 +Use the \[dq]Create Service Account\[dq] button. +Fill in \[dq]Service account name\[dq] and \[dq]Service account ID\[dq] +with something that identifies your client. +.IP \[bu] 2 +Select \[dq]Create And Continue\[dq]. +Step 2 and 3 are optional. +.IP \[bu] 2 +These credentials are what rclone will use for authentication. +If you ever need to remove access, press the \[dq]Delete service account +key\[dq] button. +.SS 2. Allowing API access to example.com Google Drive +.IP \[bu] 2 +Go to example.com\[aq]s admin console +.IP \[bu] 2 +Go into \[dq]Security\[dq] (or use the search bar) +.IP \[bu] 2 +Select \[dq]Show more\[dq] and then \[dq]Advanced settings\[dq] +.IP \[bu] 2 +Select \[dq]Manage API client access\[dq] in the +\[dq]Authentication\[dq] section +.IP \[bu] 2 +In the \[dq]Client Name\[dq] field enter the service account\[aq]s \[dq]Client ID\[dq] - this can be found in the Developer Console under -\[dq]IAM & Admin\[dq] -> \[dq]Service Accounts\[dq], then \[dq]View Client ID\[dq] for -the newly created service account. +\[dq]IAM & Admin\[dq] -> \[dq]Service Accounts\[dq], then \[dq]View +Client ID\[dq] for the newly created service account. It is a \[ti]21 character numerical string. - - In the next field, \[dq]One or More API Scopes\[dq], enter -\[ga]https://www.googleapis.com/auth/drive\[ga] -to grant access to Google Drive specifically. - -##### 3. Configure rclone, assuming a new install -\f[R] -.fi -.PP +.IP \[bu] 2 +In the next field, \[dq]One or More API Scopes\[dq], enter +\f[C]https://www.googleapis.com/auth/drive\f[R] to grant access to +Google Drive specifically. +.SS 3. Configure rclone, assuming a new install +.IP +.nf +\f[C] rclone config -.PP -n/s/q> n # New name>gdrive # Gdrive is an example name Storage> # Select -the number shown for Google Drive client_id> # Can be left blank -client_secret> # Can be left blank scope> # Select your scope, 1 for -example root_folder_id> # Can be left blank service_account_file> -/home/foo/myJSONfile.json # This is where the JSON file goes! y/n> # -Auto config, n -.IP -.nf -\f[C] -##### 4. Verify that it\[aq]s working - - \[ga]rclone -v --drive-impersonate foo\[at]example.com lsf gdrive:backup\[ga] - - The arguments do: - - \[ga]-v\[ga] - verbose logging - - \[ga]--drive-impersonate foo\[at]example.com\[ga] - this is what does + +n/s/q> n # New +name>gdrive # Gdrive is an example name +Storage> # Select the number shown for Google Drive +client_id> # Can be left blank +client_secret> # Can be left blank +scope> # Select your scope, 1 for example +root_folder_id> # Can be left blank +service_account_file> /home/foo/myJSONfile.json # This is where the JSON file goes! +y/n> # Auto config, n +\f[R] +.fi +.SS 4. Verify that it\[aq]s working +.IP \[bu] 2 +\f[C]rclone -v --drive-impersonate foo\[at]example.com lsf gdrive:backup\f[R] +.IP \[bu] 2 +The arguments do: +.RS 2 +.IP \[bu] 2 +\f[C]-v\f[R] - verbose logging +.IP \[bu] 2 +\f[C]--drive-impersonate foo\[at]example.com\f[R] - this is what does the magic, pretending to be user foo. - - \[ga]lsf\[ga] - list files in a parsing friendly way - - \[ga]gdrive:backup\[ga] - use the remote called gdrive, work in -the folder named backup. - -Note: in case you configured a specific root folder on gdrive and rclone is unable to access the contents of that folder when using \[ga]--drive-impersonate\[ga], do this instead: - - in the gdrive web interface, share your root folder with the user/email of the new Service Account you created/selected at step #1 - - use rclone without specifying the \[ga]--drive-impersonate\[ga] option, like this: - \[ga]rclone -v lsf gdrive:backup\[ga] - - -### Shared drives (team drives) - +.IP \[bu] 2 +\f[C]lsf\f[R] - list files in a parsing friendly way +.IP \[bu] 2 +\f[C]gdrive:backup\f[R] - use the remote called gdrive, work in the +folder named backup. +.RE +.PP +Note: in case you configured a specific root folder on gdrive and rclone +is unable to access the contents of that folder when using +\f[C]--drive-impersonate\f[R], do this instead: - in the gdrive web +interface, share your root folder with the user/email of the new Service +Account you created/selected at step #1 - use rclone without specifying +the \f[C]--drive-impersonate\f[R] option, like this: +\f[C]rclone -v lsf gdrive:backup\f[R] +.SS Shared drives (team drives) +.PP If you want to configure the remote to point to a Google Shared Drive -(previously known as Team Drives) then answer \[ga]y\[ga] to the question -\[ga]Configure this as a Shared Drive (Team Drive)?\[ga]. - +(previously known as Team Drives) then answer \f[C]y\f[R] to the +question \f[C]Configure this as a Shared Drive (Team Drive)?\f[R]. +.PP This will fetch the list of Shared Drives from google and allow you to -configure which one you want to use. You can also type in a Shared -Drive ID if you prefer. - +configure which one you want to use. +You can also type in a Shared Drive ID if you prefer. +.PP For example: -\f[R] -.fi -.PP +.IP +.nf +\f[C] Configure this as a Shared Drive (Team Drive)? -y) Yes n) No y/n> y Fetching Shared Drive list... -Choose a number from below, or type in your own value 1 / Rclone Test -\ \[dq]xxxxxxxxxxxxxxxxxxxx\[dq] 2 / Rclone Test 2 -\ \[dq]yyyyyyyyyyyyyyyyyyyy\[dq] 3 / Rclone Test 3 -\ \[dq]zzzzzzzzzzzzzzzzzzzz\[dq] Enter a Shared Drive ID> 1 --------------------- [remote] client_id = client_secret = token = -{\[dq]AccessToken\[dq]:\[dq]xxxx.x.xxxxx_xxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\[dq],\[dq]RefreshToken\[dq]:\[dq]1/xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxx\[dq],\[dq]Expiry\[dq]:\[dq]2014-03-16T13:57:58.955387075Z\[dq],\[dq]Extra\[dq]:null} -team_drive = xxxxxxxxxxxxxxxxxxxx -------------------- y) Yes this is OK -e) Edit this remote d) Delete this remote y/e/d> y +y) Yes +n) No +y/n> y +Fetching Shared Drive list... +Choose a number from below, or type in your own value + 1 / Rclone Test + \[rs] \[dq]xxxxxxxxxxxxxxxxxxxx\[dq] + 2 / Rclone Test 2 + \[rs] \[dq]yyyyyyyyyyyyyyyyyyyy\[dq] + 3 / Rclone Test 3 + \[rs] \[dq]zzzzzzzzzzzzzzzzzzzz\[dq] +Enter a Shared Drive ID> 1 +-------------------- +[remote] +client_id = +client_secret = +token = {\[dq]AccessToken\[dq]:\[dq]xxxx.x.xxxxx_xxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\[dq],\[dq]RefreshToken\[dq]:\[dq]1/xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxx\[dq],\[dq]Expiry\[dq]:\[dq]2014-03-16T13:57:58.955387075Z\[dq],\[dq]Extra\[dq]:null} +team_drive = xxxxxxxxxxxxxxxxxxxx +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.SS --fast-list +.PP +This remote supports \f[C]--fast-list\f[R] which allows you to use fewer +transactions in exchange for more memory. +See the rclone docs (https://rclone.org/docs/#fast-list) for more +details. +.PP +It does this by combining multiple \f[C]list\f[R] calls into a single +API request. +.PP +This works by combining many \f[C]\[aq]%s\[aq] in parents\f[R] filters +into one expression. +To list the contents of directories a, b and c, the following requests +will be send by the regular \f[C]List\f[R] function: .IP .nf \f[C] -### --fast-list - -This remote supports \[ga]--fast-list\[ga] which allows you to use fewer -transactions in exchange for more memory. See the [rclone -docs](https://rclone.org/docs/#fast-list) for more details. - -It does this by combining multiple \[ga]list\[ga] calls into a single API request. - -This works by combining many \[ga]\[aq]%s\[aq] in parents\[ga] filters into one expression. -To list the contents of directories a, b and c, the following requests will be send by the regular \[ga]List\[ga] function: +trashed=false and \[aq]a\[aq] in parents +trashed=false and \[aq]b\[aq] in parents +trashed=false and \[aq]c\[aq] in parents \f[R] .fi .PP -trashed=false and \[aq]a\[aq] in parents trashed=false and \[aq]b\[aq] -in parents trashed=false and \[aq]c\[aq] in parents -.IP -.nf -\f[C] These can now be combined into a single request: -\f[R] -.fi -.PP -trashed=false and (\[aq]a\[aq] in parents or \[aq]b\[aq] in parents or -\[aq]c\[aq] in parents) .IP .nf \f[C] -The implementation of \[ga]ListR\[ga] will put up to 50 \[ga]parents\[ga] filters into one request. -It will use the \[ga]--checkers\[ga] value to specify the number of requests to run in parallel. - -In tests, these batch requests were up to 20x faster than the regular method. +trashed=false and (\[aq]a\[aq] in parents or \[aq]b\[aq] in parents or \[aq]c\[aq] in parents) +\f[R] +.fi +.PP +The implementation of \f[C]ListR\f[R] will put up to 50 +\f[C]parents\f[R] filters into one request. +It will use the \f[C]--checkers\f[R] value to specify the number of +requests to run in parallel. +.PP +In tests, these batch requests were up to 20x faster than the regular +method. Running the following command against different sized folders gives: -\f[R] -.fi -.PP -rclone lsjson -vv -R --checkers=6 gdrive:folder .IP .nf \f[C] +rclone lsjson -vv -R --checkers=6 gdrive:folder +\f[R] +.fi +.PP small folder (220 directories, 700 files): - -- without \[ga]--fast-list\[ga]: 38s -- with \[ga]--fast-list\[ga]: 10s - +.IP \[bu] 2 +without \f[C]--fast-list\f[R]: 38s +.IP \[bu] 2 +with \f[C]--fast-list\f[R]: 10s +.PP large folder (10600 directories, 39000 files): - -- without \[ga]--fast-list\[ga]: 22:05 min -- with \[ga]--fast-list\[ga]: 58s - -### Modification times and hashes - +.IP \[bu] 2 +without \f[C]--fast-list\f[R]: 22:05 min +.IP \[bu] 2 +with \f[C]--fast-list\f[R]: 58s +.SS Modification times and hashes +.PP Google drive stores modification times accurate to 1 ms. - -Hash algorithms MD5, SHA1 and SHA256 are supported. Note, however, -that a small fraction of files uploaded may not have SHA1 or SHA256 -hashes especially if they were uploaded before 2018. - -### Restricted filename characters - -Only Invalid UTF-8 bytes will be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -In contrast to other backends, \[ga]/\[ga] can also be used in names and \[ga].\[ga] -or \[ga]..\[ga] are valid names. - -### Revisions - -Google drive stores revisions of files. When you upload a change to -an existing file to google drive using rclone it will create a new -revision of that file. - -Revisions follow the standard google policy which at time of writing -was - - * They are deleted after 30 days or 100 revisions (whatever comes first). - * They do not count towards a user storage quota. - -### Deleting files - -By default rclone will send all files to the trash when deleting -files. If deleting them permanently is required then use the -\[ga]--drive-use-trash=false\[ga] flag, or set the equivalent environment -variable. - -### Shortcuts - +.PP +Hash algorithms MD5, SHA1 and SHA256 are supported. +Note, however, that a small fraction of files uploaded may not have SHA1 +or SHA256 hashes especially if they were uploaded before 2018. +.SS Restricted filename characters +.PP +Only Invalid UTF-8 bytes will be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.PP +In contrast to other backends, \f[C]/\f[R] can also be used in names and +\f[C].\f[R] or \f[C]..\f[R] are valid names. +.SS Revisions +.PP +Google drive stores revisions of files. +When you upload a change to an existing file to google drive using +rclone it will create a new revision of that file. +.PP +Revisions follow the standard google policy which at time of writing was +.IP \[bu] 2 +They are deleted after 30 days or 100 revisions (whatever comes first). +.IP \[bu] 2 +They do not count towards a user storage quota. +.SS Deleting files +.PP +By default rclone will send all files to the trash when deleting files. +If deleting them permanently is required then use the +\f[C]--drive-use-trash=false\f[R] flag, or set the equivalent +environment variable. +.SS Shortcuts +.PP In March 2020 Google introduced a new feature in Google Drive called -[drive shortcuts](https://support.google.com/drive/answer/9700156) -([API](https://developers.google.com/drive/api/v3/shortcuts)). These -will (by September 2020) [replace the ability for files or folders to -be in multiple folders at once](https://cloud.google.com/blog/products/g-suite/simplifying-google-drives-folder-structure-and-sharing-models). - +drive shortcuts (https://support.google.com/drive/answer/9700156) +(API (https://developers.google.com/drive/api/v3/shortcuts)). +These will (by September 2020) replace the ability for files or folders +to be in multiple folders at +once (https://cloud.google.com/blog/products/g-suite/simplifying-google-drives-folder-structure-and-sharing-models). +.PP Shortcuts are files that link to other files on Google Drive somewhat like a symlink in unix, except they point to the underlying file data -(e.g. the inode in unix terms) so they don\[aq]t break if the source is +(e.g. +the inode in unix terms) so they don\[aq]t break if the source is renamed or moved about. - +.PP By default rclone treats these as follows. - +.PP For shortcuts pointing to files: - -- When listing a file shortcut appears as the destination file. -- When downloading the contents of the destination file is downloaded. -- When updating shortcut file with a non shortcut file, the shortcut is removed then a new file is uploaded in place of the shortcut. -- When server-side moving (renaming) the shortcut is renamed, not the destination file. -- When server-side copying the shortcut is copied, not the contents of the shortcut. (unless \[ga]--drive-copy-shortcut-content\[ga] is in use in which case the contents of the shortcut gets copied). -- When deleting the shortcut is deleted not the linked file. -- When setting the modification time, the modification time of the linked file will be set. - +.IP \[bu] 2 +When listing a file shortcut appears as the destination file. +.IP \[bu] 2 +When downloading the contents of the destination file is downloaded. +.IP \[bu] 2 +When updating shortcut file with a non shortcut file, the shortcut is +removed then a new file is uploaded in place of the shortcut. +.IP \[bu] 2 +When server-side moving (renaming) the shortcut is renamed, not the +destination file. +.IP \[bu] 2 +When server-side copying the shortcut is copied, not the contents of the +shortcut. +(unless \f[C]--drive-copy-shortcut-content\f[R] is in use in which case +the contents of the shortcut gets copied). +.IP \[bu] 2 +When deleting the shortcut is deleted not the linked file. +.IP \[bu] 2 +When setting the modification time, the modification time of the linked +file will be set. +.PP For shortcuts pointing to folders: - -- When listing the shortcut appears as a folder and that folder will contain the contents of the linked folder appear (including any sub folders) -- When downloading the contents of the linked folder and sub contents are downloaded -- When uploading to a shortcut folder the file will be placed in the linked folder -- When server-side moving (renaming) the shortcut is renamed, not the destination folder -- When server-side copying the contents of the linked folder is copied, not the shortcut. -- When deleting with \[ga]rclone rmdir\[ga] or \[ga]rclone purge\[ga] the shortcut is deleted not the linked folder. -- **NB** When deleting with \[ga]rclone remove\[ga] or \[ga]rclone mount\[ga] the contents of the linked folder will be deleted. - -The [rclone backend](https://rclone.org/commands/rclone_backend/) command can be used to create shortcuts. - -Shortcuts can be completely ignored with the \[ga]--drive-skip-shortcuts\[ga] flag -or the corresponding \[ga]skip_shortcuts\[ga] configuration setting. - -### Emptying trash - -If you wish to empty your trash you can use the \[ga]rclone cleanup remote:\[ga] -command which will permanently delete all your trashed files. This command -does not take any path arguments. - +.IP \[bu] 2 +When listing the shortcut appears as a folder and that folder will +contain the contents of the linked folder appear (including any sub +folders) +.IP \[bu] 2 +When downloading the contents of the linked folder and sub contents are +downloaded +.IP \[bu] 2 +When uploading to a shortcut folder the file will be placed in the +linked folder +.IP \[bu] 2 +When server-side moving (renaming) the shortcut is renamed, not the +destination folder +.IP \[bu] 2 +When server-side copying the contents of the linked folder is copied, +not the shortcut. +.IP \[bu] 2 +When deleting with \f[C]rclone rmdir\f[R] or \f[C]rclone purge\f[R] the +shortcut is deleted not the linked folder. +.IP \[bu] 2 +\f[B]NB\f[R] When deleting with \f[C]rclone remove\f[R] or +\f[C]rclone mount\f[R] the contents of the linked folder will be +deleted. +.PP +The rclone backend (https://rclone.org/commands/rclone_backend/) command +can be used to create shortcuts. +.PP +Shortcuts can be completely ignored with the +\f[C]--drive-skip-shortcuts\f[R] flag or the corresponding +\f[C]skip_shortcuts\f[R] configuration setting. +.PP +If you have shortcuts that lead to an infinite recursion in your drive +(e.g. +a shortcut pointing to a parent folder), \f[C]skip_shortcuts\f[R] might +be mandatory to be able to copy the drive. +.SS Emptying trash +.PP +If you wish to empty your trash you can use the +\f[C]rclone cleanup remote:\f[R] command which will permanently delete +all your trashed files. +This command does not take any path arguments. +.PP Note that Google Drive takes some time (minutes to days) to empty the -trash even though the command returns within a few seconds. No output -is echoed, so there will be no confirmation even using -v or -vv. - -### Quota information - -To view your current quota you can use the \[ga]rclone about remote:\[ga] -command which will display your usage limit (quota), the usage in Google -Drive, the size of all files in the Trash and the space used by other -Google services such as Gmail. This command does not take any path -arguments. - -#### Import/Export of google documents - +trash even though the command returns within a few seconds. +No output is echoed, so there will be no confirmation even using -v or +-vv. +.SS Quota information +.PP +To view your current quota you can use the +\f[C]rclone about remote:\f[R] command which will display your usage +limit (quota), the usage in Google Drive, the size of all files in the +Trash and the space used by other Google services such as Gmail. +This command does not take any path arguments. +.SS Import/Export of google documents +.PP Google documents can be exported from and uploaded to Google Drive. - +.PP When rclone downloads a Google doc it chooses a format to download -depending upon the \[ga]--drive-export-formats\[ga] setting. -By default the export formats are \[ga]docx,xlsx,pptx,svg\[ga] which are a -sensible default for an editable document. - -When choosing a format, rclone runs down the list provided in order -and chooses the first file format the doc can be exported as from the -list. If the file can\[aq]t be exported to a format on the formats list, -then rclone will choose a format from the default list. - -If you prefer an archive copy then you might use \[ga]--drive-export-formats -pdf\[ga], or if you prefer openoffice/libreoffice formats you might use -\[ga]--drive-export-formats ods,odt,odp\[ga]. - +depending upon the \f[C]--drive-export-formats\f[R] setting. +By default the export formats are \f[C]docx,xlsx,pptx,svg\f[R] which are +a sensible default for an editable document. +.PP +When choosing a format, rclone runs down the list provided in order and +chooses the first file format the doc can be exported as from the list. +If the file can\[aq]t be exported to a format on the formats list, then +rclone will choose a format from the default list. +.PP +If you prefer an archive copy then you might use +\f[C]--drive-export-formats pdf\f[R], or if you prefer +openoffice/libreoffice formats you might use +\f[C]--drive-export-formats ods,odt,odp\f[R]. +.PP Note that rclone adds the extension to the google doc, so if it is -called \[ga]My Spreadsheet\[ga] on google docs, it will be exported as \[ga]My -Spreadsheet.xlsx\[ga] or \[ga]My Spreadsheet.pdf\[ga] etc. - -When importing files into Google Drive, rclone will convert all -files with an extension in \[ga]--drive-import-formats\[ga] to their +called \f[C]My Spreadsheet\f[R] on google docs, it will be exported as +\f[C]My Spreadsheet.xlsx\f[R] or \f[C]My Spreadsheet.pdf\f[R] etc. +.PP +When importing files into Google Drive, rclone will convert all files +with an extension in \f[C]--drive-import-formats\f[R] to their associated document type. -rclone will not convert any files by default, since the conversion -is lossy process. - -The conversion must result in a file with the same extension when -the \[ga]--drive-export-formats\[ga] rules are applied to the uploaded document. - +rclone will not convert any files by default, since the conversion is +lossy process. +.PP +The conversion must result in a file with the same extension when the +\f[C]--drive-export-formats\f[R] rules are applied to the uploaded +document. +.PP Here are some examples for allowed and prohibited conversions. - -| export-formats | import-formats | Upload Ext | Document Ext | Allowed | -| -------------- | -------------- | ---------- | ------------ | ------- | -| odt | odt | odt | odt | Yes | -| odt | docx,odt | odt | odt | Yes | -| | docx | docx | docx | Yes | -| | odt | odt | docx | No | -| odt,docx | docx,odt | docx | odt | No | -| docx,odt | docx,odt | docx | docx | Yes | -| docx,odt | docx,odt | odt | docx | No | - -This limitation can be disabled by specifying \[ga]--drive-allow-import-name-change\[ga]. +.PP +.TS +tab(@); +l l l l l. +T{ +export-formats +T}@T{ +import-formats +T}@T{ +Upload Ext +T}@T{ +Document Ext +T}@T{ +Allowed +T} +_ +T{ +odt +T}@T{ +odt +T}@T{ +odt +T}@T{ +odt +T}@T{ +Yes +T} +T{ +odt +T}@T{ +docx,odt +T}@T{ +odt +T}@T{ +odt +T}@T{ +Yes +T} +T{ +T}@T{ +docx +T}@T{ +docx +T}@T{ +docx +T}@T{ +Yes +T} +T{ +T}@T{ +odt +T}@T{ +odt +T}@T{ +docx +T}@T{ +No +T} +T{ +odt,docx +T}@T{ +docx,odt +T}@T{ +docx +T}@T{ +odt +T}@T{ +No +T} +T{ +docx,odt +T}@T{ +docx,odt +T}@T{ +docx +T}@T{ +docx +T}@T{ +Yes +T} +T{ +docx,odt +T}@T{ +docx,odt +T}@T{ +odt +T}@T{ +docx +T}@T{ +No +T} +.TE +.PP +This limitation can be disabled by specifying +\f[C]--drive-allow-import-name-change\f[R]. When using this flag, rclone can convert multiple files types resulting -in the same document type at once, e.g. with \[ga]--drive-import-formats docx,odt,txt\[ga], -all files having these extension would result in a document represented as a docx file. -This brings the additional risk of overwriting a document, if multiple files -have the same stem. Many rclone operations will not handle this name change -in any way. They assume an equal name when copying files and might copy the -file again or delete them when the name changes. - -Here are the possible export extensions with their corresponding mime types. -Most of these can also be used for importing, but there more that are not -listed here. Some of these additional ones might only be available when -the operating system provides the correct MIME type entries. - +in the same document type at once, e.g. +with \f[C]--drive-import-formats docx,odt,txt\f[R], all files having +these extension would result in a document represented as a docx file. +This brings the additional risk of overwriting a document, if multiple +files have the same stem. +Many rclone operations will not handle this name change in any way. +They assume an equal name when copying files and might copy the file +again or delete them when the name changes. +.PP +Here are the possible export extensions with their corresponding mime +types. +Most of these can also be used for importing, but there more that are +not listed here. +Some of these additional ones might only be available when the operating +system provides the correct MIME type entries. +.PP This list can be changed by Google Drive at any time and might not represent the currently available conversions. - -| Extension | Mime Type | Description | -| --------- |-----------| ------------| -| bmp | image/bmp | Windows Bitmap format | -| csv | text/csv | Standard CSV format for Spreadsheets | -| doc | application/msword | Classic Word file | -| docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Microsoft Office Document | -| epub | application/epub+zip | E-book format | -| html | text/html | An HTML Document | -| jpg | image/jpeg | A JPEG Image File | -| json | application/vnd.google-apps.script+json | JSON Text Format for Google Apps scripts | -| odp | application/vnd.oasis.opendocument.presentation | Openoffice Presentation | -| ods | application/vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet | -| ods | application/x-vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet | -| odt | application/vnd.oasis.opendocument.text | Openoffice Document | -| pdf | application/pdf | Adobe PDF Format | -| pjpeg | image/pjpeg | Progressive JPEG Image | -| png | image/png | PNG Image Format| -| pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | Microsoft Office Powerpoint | -| rtf | application/rtf | Rich Text Format | -| svg | image/svg+xml | Scalable Vector Graphics Format | -| tsv | text/tab-separated-values | Standard TSV format for spreadsheets | -| txt | text/plain | Plain Text | -| wmf | application/x-msmetafile | Windows Meta File | -| xls | application/vnd.ms-excel | Classic Excel file | -| xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Microsoft Office Spreadsheet | -| zip | application/zip | A ZIP file of HTML, Images CSS | - -Google documents can also be exported as link files. These files will -open a browser window for the Google Docs website of that document -when opened. The link file extension has to be specified as a -\[ga]--drive-export-formats\[ga] parameter. They will match all available -Google Documents. - -| Extension | Description | OS Support | -| --------- | ----------- | ---------- | -| desktop | freedesktop.org specified desktop entry | Linux | -| link.html | An HTML Document with a redirect | All | -| url | INI style link file | macOS, Windows | -| webloc | macOS specific XML format | macOS | - - -### Standard options - +.PP +.TS +tab(@); +lw(19.7n) lw(24.1n) lw(26.2n). +T{ +Extension +T}@T{ +Mime Type +T}@T{ +Description +T} +_ +T{ +bmp +T}@T{ +image/bmp +T}@T{ +Windows Bitmap format +T} +T{ +csv +T}@T{ +text/csv +T}@T{ +Standard CSV format for Spreadsheets +T} +T{ +doc +T}@T{ +application/msword +T}@T{ +Classic Word file +T} +T{ +docx +T}@T{ +application/vnd.openxmlformats-officedocument.wordprocessingml.document +T}@T{ +Microsoft Office Document +T} +T{ +epub +T}@T{ +application/epub+zip +T}@T{ +E-book format +T} +T{ +html +T}@T{ +text/html +T}@T{ +An HTML Document +T} +T{ +jpg +T}@T{ +image/jpeg +T}@T{ +A JPEG Image File +T} +T{ +json +T}@T{ +application/vnd.google-apps.script+json +T}@T{ +JSON Text Format for Google Apps scripts +T} +T{ +odp +T}@T{ +application/vnd.oasis.opendocument.presentation +T}@T{ +Openoffice Presentation +T} +T{ +ods +T}@T{ +application/vnd.oasis.opendocument.spreadsheet +T}@T{ +Openoffice Spreadsheet +T} +T{ +ods +T}@T{ +application/x-vnd.oasis.opendocument.spreadsheet +T}@T{ +Openoffice Spreadsheet +T} +T{ +odt +T}@T{ +application/vnd.oasis.opendocument.text +T}@T{ +Openoffice Document +T} +T{ +pdf +T}@T{ +application/pdf +T}@T{ +Adobe PDF Format +T} +T{ +pjpeg +T}@T{ +image/pjpeg +T}@T{ +Progressive JPEG Image +T} +T{ +png +T}@T{ +image/png +T}@T{ +PNG Image Format +T} +T{ +pptx +T}@T{ +application/vnd.openxmlformats-officedocument.presentationml.presentation +T}@T{ +Microsoft Office Powerpoint +T} +T{ +rtf +T}@T{ +application/rtf +T}@T{ +Rich Text Format +T} +T{ +svg +T}@T{ +image/svg+xml +T}@T{ +Scalable Vector Graphics Format +T} +T{ +tsv +T}@T{ +text/tab-separated-values +T}@T{ +Standard TSV format for spreadsheets +T} +T{ +txt +T}@T{ +text/plain +T}@T{ +Plain Text +T} +T{ +wmf +T}@T{ +application/x-msmetafile +T}@T{ +Windows Meta File +T} +T{ +xls +T}@T{ +application/vnd.ms-excel +T}@T{ +Classic Excel file +T} +T{ +xlsx +T}@T{ +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet +T}@T{ +Microsoft Office Spreadsheet +T} +T{ +zip +T}@T{ +application/zip +T}@T{ +A ZIP file of HTML, Images CSS +T} +.TE +.PP +Google documents can also be exported as link files. +These files will open a browser window for the Google Docs website of +that document when opened. +The link file extension has to be specified as a +\f[C]--drive-export-formats\f[R] parameter. +They will match all available Google Documents. +.PP +.TS +tab(@); +l l l. +T{ +Extension +T}@T{ +Description +T}@T{ +OS Support +T} +_ +T{ +desktop +T}@T{ +freedesktop.org specified desktop entry +T}@T{ +Linux +T} +T{ +link.html +T}@T{ +An HTML Document with a redirect +T}@T{ +All +T} +T{ +url +T}@T{ +INI style link file +T}@T{ +macOS, Windows +T} +T{ +webloc +T}@T{ +macOS specific XML format +T}@T{ +macOS +T} +.TE +.SS Standard options +.PP Here are the Standard options specific to drive (Google Drive). - -#### --drive-client-id - -Google Application Client Id -Setting your own is recommended. -See https://rclone.org/drive/#making-your-own-client-id for how to create your own. -If you leave this blank, it will use an internal key which is low performance. - +.SS --drive-client-id +.PP +Google Application Client Id Setting your own is recommended. +See https://rclone.org/drive/#making-your-own-client-id for how to +create your own. +If you leave this blank, it will use an internal key which is low +performance. +.PP Properties: - -- Config: client_id -- Env Var: RCLONE_DRIVE_CLIENT_ID -- Type: string -- Required: false - -#### --drive-client-secret - +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-client-secret +.PP OAuth Client Secret. - +.PP Leave blank normally. - +.PP Properties: - -- Config: client_secret -- Env Var: RCLONE_DRIVE_CLIENT_SECRET -- Type: string -- Required: false - -#### --drive-scope - -Comma separated list of scopes that rclone should use when requesting access from drive. - +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-scope +.PP +Comma separated list of scopes that rclone should use when requesting +access from drive. +.PP Properties: - -- Config: scope -- Env Var: RCLONE_DRIVE_SCOPE -- Type: string -- Required: false -- Examples: - - \[dq]drive\[dq] - - Full access all files, excluding Application Data Folder. - - \[dq]drive.readonly\[dq] - - Read-only access to file metadata and file contents. - - \[dq]drive.file\[dq] - - Access to files created by rclone only. - - These are visible in the drive website. - - File authorization is revoked when the user deauthorizes the app. - - \[dq]drive.appfolder\[dq] - - Allows read and write access to the Application Data folder. - - This is not visible in the drive website. - - \[dq]drive.metadata.readonly\[dq] - - Allows read-only access to file metadata but - - does not allow any access to read or download file content. - -#### --drive-service-account-file - +.IP \[bu] 2 +Config: scope +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SCOPE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]drive\[dq] +.RS 2 +.IP \[bu] 2 +Full access all files, excluding Application Data Folder. +.RE +.IP \[bu] 2 +\[dq]drive.readonly\[dq] +.RS 2 +.IP \[bu] 2 +Read-only access to file metadata and file contents. +.RE +.IP \[bu] 2 +\[dq]drive.file\[dq] +.RS 2 +.IP \[bu] 2 +Access to files created by rclone only. +.IP \[bu] 2 +These are visible in the drive website. +.IP \[bu] 2 +File authorization is revoked when the user deauthorizes the app. +.RE +.IP \[bu] 2 +\[dq]drive.appfolder\[dq] +.RS 2 +.IP \[bu] 2 +Allows read and write access to the Application Data folder. +.IP \[bu] 2 +This is not visible in the drive website. +.RE +.IP \[bu] 2 +\[dq]drive.metadata.readonly\[dq] +.RS 2 +.IP \[bu] 2 +Allows read-only access to file metadata but +.IP \[bu] 2 +does not allow any access to read or download file content. +.RE +.RE +.SS --drive-service-account-file +.PP Service Account Credentials JSON file path. - +.PP Leave blank normally. Needed only if you want use SA instead of interactive login. - -Leading \[ga]\[ti]\[ga] will be expanded in the file name as will environment variables such as \[ga]${RCLONE_CONFIG_DIR}\[ga]. - +.PP +Leading \f[C]\[ti]\f[R] will be expanded in the file name as will +environment variables such as \f[C]${RCLONE_CONFIG_DIR}\f[R]. +.PP Properties: - -- Config: service_account_file -- Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_FILE -- Type: string -- Required: false - -#### --drive-alternate-export - +.IP \[bu] 2 +Config: service_account_file +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_FILE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-alternate-export +.PP Deprecated: No longer needed. - +.PP Properties: - -- Config: alternate_export -- Env Var: RCLONE_DRIVE_ALTERNATE_EXPORT -- Type: bool -- Default: false - -### Advanced options - +.IP \[bu] 2 +Config: alternate_export +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_ALTERNATE_EXPORT +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS Advanced options +.PP Here are the Advanced options specific to drive (Google Drive). - -#### --drive-token - +.SS --drive-token +.PP OAuth Access Token as a JSON blob. - +.PP Properties: - -- Config: token -- Env Var: RCLONE_DRIVE_TOKEN -- Type: string -- Required: false - -#### --drive-auth-url - +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-auth-url +.PP Auth server URL. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: auth_url -- Env Var: RCLONE_DRIVE_AUTH_URL -- Type: string -- Required: false - -#### --drive-token-url - +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-token-url +.PP Token server url. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: token_url -- Env Var: RCLONE_DRIVE_TOKEN_URL -- Type: string -- Required: false - -#### --drive-root-folder-id - +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-root-folder-id +.PP ID of the root folder. Leave blank normally. - -Fill in to access \[dq]Computers\[dq] folders (see docs), or for rclone to use -a non root folder as its starting point. - - +.PP +Fill in to access \[dq]Computers\[dq] folders (see docs), or for rclone +to use a non root folder as its starting point. +.PP Properties: - -- Config: root_folder_id -- Env Var: RCLONE_DRIVE_ROOT_FOLDER_ID -- Type: string -- Required: false - -#### --drive-service-account-credentials - +.IP \[bu] 2 +Config: root_folder_id +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_ROOT_FOLDER_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-service-account-credentials +.PP Service Account Credentials JSON blob. - +.PP Leave blank normally. Needed only if you want use SA instead of interactive login. - +.PP Properties: - -- Config: service_account_credentials -- Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_CREDENTIALS -- Type: string -- Required: false - -#### --drive-team-drive - +.IP \[bu] 2 +Config: service_account_credentials +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_CREDENTIALS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-team-drive +.PP ID of the Shared Drive (Team Drive). - +.PP Properties: - -- Config: team_drive -- Env Var: RCLONE_DRIVE_TEAM_DRIVE -- Type: string -- Required: false - -#### --drive-auth-owner-only - +.IP \[bu] 2 +Config: team_drive +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_TEAM_DRIVE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-auth-owner-only +.PP Only consider files owned by the authenticated user. - +.PP Properties: - -- Config: auth_owner_only -- Env Var: RCLONE_DRIVE_AUTH_OWNER_ONLY -- Type: bool -- Default: false - -#### --drive-use-trash - +.IP \[bu] 2 +Config: auth_owner_only +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_AUTH_OWNER_ONLY +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-use-trash +.PP Send files to the trash instead of deleting permanently. - +.PP Defaults to true, namely sending files to the trash. -Use \[ga]--drive-use-trash=false\[ga] to delete files permanently instead. - +Use \f[C]--drive-use-trash=false\f[R] to delete files permanently +instead. +.PP Properties: - -- Config: use_trash -- Env Var: RCLONE_DRIVE_USE_TRASH -- Type: bool -- Default: true - -#### --drive-copy-shortcut-content - +.IP \[bu] 2 +Config: use_trash +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_USE_TRASH +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: true +.SS --drive-copy-shortcut-content +.PP Server side copy contents of shortcuts instead of the shortcut. - +.PP When doing server side copies, normally rclone will copy shortcuts as shortcuts. - +.PP If this flag is used then rclone will copy the contents of shortcuts rather than shortcuts themselves when doing server side copies. - +.PP Properties: - -- Config: copy_shortcut_content -- Env Var: RCLONE_DRIVE_COPY_SHORTCUT_CONTENT -- Type: bool -- Default: false - -#### --drive-skip-gdocs - +.IP \[bu] 2 +Config: copy_shortcut_content +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_COPY_SHORTCUT_CONTENT +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-skip-gdocs +.PP Skip google documents in all listings. - +.PP If given, gdocs practically become invisible to rclone. - +.PP Properties: - -- Config: skip_gdocs -- Env Var: RCLONE_DRIVE_SKIP_GDOCS -- Type: bool -- Default: false - -#### --drive-show-all-gdocs - +.IP \[bu] 2 +Config: skip_gdocs +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SKIP_GDOCS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-show-all-gdocs +.PP Show all Google Docs including non-exportable ones in listings. - +.PP If you try a server side copy on a Google Form without this flag, you will get this error: - - No export formats found for \[dq]application/vnd.google-apps.form\[dq] - +.IP +.nf +\f[C] +No export formats found for \[dq]application/vnd.google-apps.form\[dq] +\f[R] +.fi +.PP However adding this flag will allow the form to be server side copied. - -Note that rclone doesn\[aq]t add extensions to the Google Docs file names -in this mode. - -Do **not** use this flag when trying to download Google Docs - rclone -will fail to download them. - - +.PP +Note that rclone doesn\[aq]t add extensions to the Google Docs file +names in this mode. +.PP +Do \f[B]not\f[R] use this flag when trying to download Google Docs - +rclone will fail to download them. +.PP Properties: - -- Config: show_all_gdocs -- Env Var: RCLONE_DRIVE_SHOW_ALL_GDOCS -- Type: bool -- Default: false - -#### --drive-skip-checksum-gphotos - +.IP \[bu] 2 +Config: show_all_gdocs +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SHOW_ALL_GDOCS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-skip-checksum-gphotos +.PP Skip checksums on Google photos and videos only. - +.PP Use this if you get checksum errors when transferring Google photos or videos. - -Setting this flag will cause Google photos and videos to return a -blank checksums. - +.PP +Setting this flag will cause Google photos and videos to return a blank +checksums. +.PP Google photos are identified by being in the \[dq]photos\[dq] space. - +.PP Corrupted checksums are caused by Google modifying the image/video but not updating the checksum. - +.PP Properties: - -- Config: skip_checksum_gphotos -- Env Var: RCLONE_DRIVE_SKIP_CHECKSUM_GPHOTOS -- Type: bool -- Default: false - -#### --drive-shared-with-me - +.IP \[bu] 2 +Config: skip_checksum_gphotos +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SKIP_CHECKSUM_GPHOTOS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-shared-with-me +.PP Only show files that are shared with me. - -Instructs rclone to operate on your \[dq]Shared with me\[dq] folder (where -Google Drive lets you access the files and folders others have shared -with you). - -This works both with the \[dq]list\[dq] (lsd, lsl, etc.) and the \[dq]copy\[dq] -commands (copy, sync, etc.), and with all other commands too. - +.PP +Instructs rclone to operate on your \[dq]Shared with me\[dq] folder +(where Google Drive lets you access the files and folders others have +shared with you). +.PP +This works both with the \[dq]list\[dq] (lsd, lsl, etc.) and the +\[dq]copy\[dq] commands (copy, sync, etc.), and with all other commands +too. +.PP Properties: - -- Config: shared_with_me -- Env Var: RCLONE_DRIVE_SHARED_WITH_ME -- Type: bool -- Default: false - -#### --drive-trashed-only - +.IP \[bu] 2 +Config: shared_with_me +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SHARED_WITH_ME +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-trashed-only +.PP Only show files that are in the trash. - +.PP This will show trashed files in their original directory structure. - +.PP Properties: - -- Config: trashed_only -- Env Var: RCLONE_DRIVE_TRASHED_ONLY -- Type: bool -- Default: false - -#### --drive-starred-only - +.IP \[bu] 2 +Config: trashed_only +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_TRASHED_ONLY +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-starred-only +.PP Only show files that are starred. - +.PP Properties: - -- Config: starred_only -- Env Var: RCLONE_DRIVE_STARRED_ONLY -- Type: bool -- Default: false - -#### --drive-formats - +.IP \[bu] 2 +Config: starred_only +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_STARRED_ONLY +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-formats +.PP Deprecated: See export_formats. - +.PP Properties: - -- Config: formats -- Env Var: RCLONE_DRIVE_FORMATS -- Type: string -- Required: false - -#### --drive-export-formats - +.IP \[bu] 2 +Config: formats +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_FORMATS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-export-formats +.PP Comma separated list of preferred formats for downloading Google docs. - +.PP Properties: - -- Config: export_formats -- Env Var: RCLONE_DRIVE_EXPORT_FORMATS -- Type: string -- Default: \[dq]docx,xlsx,pptx,svg\[dq] - -#### --drive-import-formats - +.IP \[bu] 2 +Config: export_formats +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_EXPORT_FORMATS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]docx,xlsx,pptx,svg\[dq] +.SS --drive-import-formats +.PP Comma separated list of preferred formats for uploading Google docs. - +.PP Properties: - -- Config: import_formats -- Env Var: RCLONE_DRIVE_IMPORT_FORMATS -- Type: string -- Required: false - -#### --drive-allow-import-name-change - +.IP \[bu] 2 +Config: import_formats +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_IMPORT_FORMATS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-allow-import-name-change +.PP Allow the filetype to change when uploading Google docs. - -E.g. file.doc to file.docx. This will confuse sync and reupload every time. - +.PP +E.g. +file.doc to file.docx. +This will confuse sync and reupload every time. +.PP Properties: - -- Config: allow_import_name_change -- Env Var: RCLONE_DRIVE_ALLOW_IMPORT_NAME_CHANGE -- Type: bool -- Default: false - -#### --drive-use-created-date - +.IP \[bu] 2 +Config: allow_import_name_change +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_ALLOW_IMPORT_NAME_CHANGE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-use-created-date +.PP Use file created date instead of modified date. - +.PP Useful when downloading data and you want the creation date used in place of the last modified date. - -**WARNING**: This flag may have some unexpected consequences. - +.PP +\f[B]WARNING\f[R]: This flag may have some unexpected consequences. +.PP When uploading to your drive all files will be overwritten unless they -haven\[aq]t been modified since their creation. And the inverse will occur -while downloading. This side effect can be avoided by using the -\[dq]--checksum\[dq] flag. - +haven\[aq]t been modified since their creation. +And the inverse will occur while downloading. +This side effect can be avoided by using the \[dq]--checksum\[dq] flag. +.PP This feature was implemented to retain photos capture date as recorded -by google photos. You will first need to check the \[dq]Create a Google -Photos folder\[dq] option in your google drive settings. You can then copy -or move the photos locally and use the date the image was taken -(created) set as the modification date. - +by google photos. +You will first need to check the \[dq]Create a Google Photos folder\[dq] +option in your google drive settings. +You can then copy or move the photos locally and use the date the image +was taken (created) set as the modification date. +.PP Properties: - -- Config: use_created_date -- Env Var: RCLONE_DRIVE_USE_CREATED_DATE -- Type: bool -- Default: false - -#### --drive-use-shared-date - +.IP \[bu] 2 +Config: use_created_date +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_USE_CREATED_DATE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-use-shared-date +.PP Use date file was shared instead of modified date. - -Note that, as with \[dq]--drive-use-created-date\[dq], this flag may have -unexpected consequences when uploading/downloading files. - -If both this flag and \[dq]--drive-use-created-date\[dq] are set, the created -date is used. - +.PP +Note that, as with \[dq]--drive-use-created-date\[dq], this flag may +have unexpected consequences when uploading/downloading files. +.PP +If both this flag and \[dq]--drive-use-created-date\[dq] are set, the +created date is used. +.PP Properties: - -- Config: use_shared_date -- Env Var: RCLONE_DRIVE_USE_SHARED_DATE -- Type: bool -- Default: false - -#### --drive-list-chunk - +.IP \[bu] 2 +Config: use_shared_date +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_USE_SHARED_DATE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-list-chunk +.PP Size of listing chunk 100-1000, 0 to disable. - +.PP Properties: - -- Config: list_chunk -- Env Var: RCLONE_DRIVE_LIST_CHUNK -- Type: int -- Default: 1000 - -#### --drive-impersonate - +.IP \[bu] 2 +Config: list_chunk +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_LIST_CHUNK +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 1000 +.SS --drive-impersonate +.PP Impersonate this user when using a service account. - +.PP Properties: - -- Config: impersonate -- Env Var: RCLONE_DRIVE_IMPERSONATE -- Type: string -- Required: false - -#### --drive-upload-cutoff - +.IP \[bu] 2 +Config: impersonate +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_IMPERSONATE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-upload-cutoff +.PP Cutoff for switching to chunked upload. - +.PP Properties: - -- Config: upload_cutoff -- Env Var: RCLONE_DRIVE_UPLOAD_CUTOFF -- Type: SizeSuffix -- Default: 8Mi - -#### --drive-chunk-size - +.IP \[bu] 2 +Config: upload_cutoff +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_UPLOAD_CUTOFF +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 8Mi +.SS --drive-chunk-size +.PP Upload chunk size. - +.PP Must a power of 2 >= 256k. - -Making this larger will improve performance, but note that each chunk -is buffered in memory one per transfer. - +.PP +Making this larger will improve performance, but note that each chunk is +buffered in memory one per transfer. +.PP Reducing this will reduce memory usage but decrease performance. - +.PP Properties: - -- Config: chunk_size -- Env Var: RCLONE_DRIVE_CHUNK_SIZE -- Type: SizeSuffix -- Default: 8Mi - -#### --drive-acknowledge-abuse - -Set to allow files which return cannotDownloadAbusiveFile to be downloaded. - -If downloading a file returns the error \[dq]This file has been identified -as malware or spam and cannot be downloaded\[dq] with the error code -\[dq]cannotDownloadAbusiveFile\[dq] then supply this flag to rclone to -indicate you acknowledge the risks of downloading the file and rclone -will download it anyway. - +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 8Mi +.SS --drive-acknowledge-abuse +.PP +Set to allow files which return cannotDownloadAbusiveFile to be +downloaded. +.PP +If downloading a file returns the error \[dq]This file has been +identified as malware or spam and cannot be downloaded\[dq] with the +error code \[dq]cannotDownloadAbusiveFile\[dq] then supply this flag to +rclone to indicate you acknowledge the risks of downloading the file and +rclone will download it anyway. +.PP Note that if you are using service account it will need Manager -permission (not Content Manager) to for this flag to work. If the SA -does not have the right permission, Google will just ignore the flag. - +permission (not Content Manager) to for this flag to work. +If the SA does not have the right permission, Google will just ignore +the flag. +.PP Properties: - -- Config: acknowledge_abuse -- Env Var: RCLONE_DRIVE_ACKNOWLEDGE_ABUSE -- Type: bool -- Default: false - -#### --drive-keep-revision-forever - +.IP \[bu] 2 +Config: acknowledge_abuse +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_ACKNOWLEDGE_ABUSE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-keep-revision-forever +.PP Keep new head revision of each file forever. - +.PP Properties: - -- Config: keep_revision_forever -- Env Var: RCLONE_DRIVE_KEEP_REVISION_FOREVER -- Type: bool -- Default: false - -#### --drive-size-as-quota - +.IP \[bu] 2 +Config: keep_revision_forever +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_KEEP_REVISION_FOREVER +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-size-as-quota +.PP Show sizes as storage quota usage, not actual size. - -Show the size of a file as the storage quota used. This is the -current version plus any older versions that have been set to keep -forever. - -**WARNING**: This flag may have some unexpected consequences. - -It is not recommended to set this flag in your config - the -recommended usage is using the flag form --drive-size-as-quota when -doing rclone ls/lsl/lsf/lsjson/etc only. - -If you do use this flag for syncing (not recommended) then you will -need to use --ignore size also. - +.PP +Show the size of a file as the storage quota used. +This is the current version plus any older versions that have been set +to keep forever. +.PP +\f[B]WARNING\f[R]: This flag may have some unexpected consequences. +.PP +It is not recommended to set this flag in your config - the recommended +usage is using the flag form --drive-size-as-quota when doing rclone +ls/lsl/lsf/lsjson/etc only. +.PP +If you do use this flag for syncing (not recommended) then you will need +to use --ignore size also. +.PP Properties: - -- Config: size_as_quota -- Env Var: RCLONE_DRIVE_SIZE_AS_QUOTA -- Type: bool -- Default: false - -#### --drive-v2-download-min-size - +.IP \[bu] 2 +Config: size_as_quota +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SIZE_AS_QUOTA +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-v2-download-min-size +.PP If Object\[aq]s are greater, use drive v2 API to download. - +.PP Properties: - -- Config: v2_download_min_size -- Env Var: RCLONE_DRIVE_V2_DOWNLOAD_MIN_SIZE -- Type: SizeSuffix -- Default: off - -#### --drive-pacer-min-sleep - +.IP \[bu] 2 +Config: v2_download_min_size +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_V2_DOWNLOAD_MIN_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: off +.SS --drive-pacer-min-sleep +.PP Minimum time to sleep between API calls. - +.PP Properties: - -- Config: pacer_min_sleep -- Env Var: RCLONE_DRIVE_PACER_MIN_SLEEP -- Type: Duration -- Default: 100ms - -#### --drive-pacer-burst - +.IP \[bu] 2 +Config: pacer_min_sleep +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_PACER_MIN_SLEEP +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 100ms +.SS --drive-pacer-burst +.PP Number of API calls to allow without sleeping. - +.PP Properties: - -- Config: pacer_burst -- Env Var: RCLONE_DRIVE_PACER_BURST -- Type: int -- Default: 100 - -#### --drive-server-side-across-configs - +.IP \[bu] 2 +Config: pacer_burst +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_PACER_BURST +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 100 +.SS --drive-server-side-across-configs +.PP Deprecated: use --server-side-across-configs instead. - -Allow server-side operations (e.g. copy) to work across different drive configs. - +.PP +Allow server-side operations (e.g. +copy) to work across different drive configs. +.PP This can be useful if you wish to do a server-side copy between two -different Google drives. Note that this isn\[aq]t enabled by default -because it isn\[aq]t easy to tell if it will work between any two -configurations. - +different Google drives. +Note that this isn\[aq]t enabled by default because it isn\[aq]t easy to +tell if it will work between any two configurations. +.PP Properties: - -- Config: server_side_across_configs -- Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS -- Type: bool -- Default: false - -#### --drive-disable-http2 - +.IP \[bu] 2 +Config: server_side_across_configs +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-disable-http2 +.PP Disable drive using http2. - +.PP There is currently an unsolved issue with the google drive backend and -HTTP/2. HTTP/2 is therefore disabled by default for the drive backend -but can be re-enabled here. When the issue is solved this flag will -be removed. - +HTTP/2. +HTTP/2 is therefore disabled by default for the drive backend but can be +re-enabled here. +When the issue is solved this flag will be removed. +.PP See: https://github.com/rclone/rclone/issues/3631 - - - +.PP Properties: - -- Config: disable_http2 -- Env Var: RCLONE_DRIVE_DISABLE_HTTP2 -- Type: bool -- Default: true - -#### --drive-stop-on-upload-limit - +.IP \[bu] 2 +Config: disable_http2 +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_DISABLE_HTTP2 +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: true +.SS --drive-stop-on-upload-limit +.PP Make upload limit errors be fatal. - +.PP At the time of writing it is only possible to upload 750 GiB of data to -Google Drive a day (this is an undocumented limit). When this limit is -reached Google Drive produces a slightly different error message. When -this flag is set it causes these errors to be fatal. These will stop -the in-progress sync. - +Google Drive a day (this is an undocumented limit). +When this limit is reached Google Drive produces a slightly different +error message. +When this flag is set it causes these errors to be fatal. +These will stop the in-progress sync. +.PP Note that this detection is relying on error message strings which Google don\[aq]t document so it may break in the future. - +.PP See: https://github.com/rclone/rclone/issues/3857 - - +.PP Properties: - -- Config: stop_on_upload_limit -- Env Var: RCLONE_DRIVE_STOP_ON_UPLOAD_LIMIT -- Type: bool -- Default: false - -#### --drive-stop-on-download-limit - +.IP \[bu] 2 +Config: stop_on_upload_limit +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_STOP_ON_UPLOAD_LIMIT +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-stop-on-download-limit +.PP Make download limit errors be fatal. - -At the time of writing it is only possible to download 10 TiB of data from -Google Drive a day (this is an undocumented limit). When this limit is -reached Google Drive produces a slightly different error message. When -this flag is set it causes these errors to be fatal. These will stop -the in-progress sync. - +.PP +At the time of writing it is only possible to download 10 TiB of data +from Google Drive a day (this is an undocumented limit). +When this limit is reached Google Drive produces a slightly different +error message. +When this flag is set it causes these errors to be fatal. +These will stop the in-progress sync. +.PP Note that this detection is relying on error message strings which Google don\[aq]t document so it may break in the future. - - +.PP Properties: - -- Config: stop_on_download_limit -- Env Var: RCLONE_DRIVE_STOP_ON_DOWNLOAD_LIMIT -- Type: bool -- Default: false - -#### --drive-skip-shortcuts - +.IP \[bu] 2 +Config: stop_on_download_limit +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_STOP_ON_DOWNLOAD_LIMIT +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-skip-shortcuts +.PP If set skip shortcut files. - +.PP Normally rclone dereferences shortcut files making them appear as if -they are the original file (see [the shortcuts section](#shortcuts)). +they are the original file (see the shortcuts section). If this flag is set then rclone will ignore shortcut files completely. - - +.PP Properties: - -- Config: skip_shortcuts -- Env Var: RCLONE_DRIVE_SKIP_SHORTCUTS -- Type: bool -- Default: false - -#### --drive-skip-dangling-shortcuts - +.IP \[bu] 2 +Config: skip_shortcuts +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SKIP_SHORTCUTS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-skip-dangling-shortcuts +.PP If set skip dangling shortcut files. - -If this is set then rclone will not show any dangling shortcuts in listings. - - +.PP +If this is set then rclone will not show any dangling shortcuts in +listings. +.PP Properties: - -- Config: skip_dangling_shortcuts -- Env Var: RCLONE_DRIVE_SKIP_DANGLING_SHORTCUTS -- Type: bool -- Default: false - -#### --drive-resource-key - +.IP \[bu] 2 +Config: skip_dangling_shortcuts +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_SKIP_DANGLING_SHORTCUTS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --drive-resource-key +.PP Resource key for accessing a link-shared file. - +.PP If you need to access files shared with a link like this - - https://drive.google.com/drive/folders/XXX?resourcekey=YYY&usp=sharing - -Then you will need to use the first part \[dq]XXX\[dq] as the \[dq]root_folder_id\[dq] -and the second part \[dq]YYY\[dq] as the \[dq]resource_key\[dq] otherwise you will get -404 not found errors when trying to access the directory. - +.IP +.nf +\f[C] +https://drive.google.com/drive/folders/XXX?resourcekey=YYY&usp=sharing +\f[R] +.fi +.PP +Then you will need to use the first part \[dq]XXX\[dq] as the +\[dq]root_folder_id\[dq] and the second part \[dq]YYY\[dq] as the +\[dq]resource_key\[dq] otherwise you will get 404 not found errors when +trying to access the directory. +.PP See: https://developers.google.com/drive/api/guides/resource-keys - +.PP This resource key requirement only applies to a subset of old files. - +.PP Note also that opening the folder once in the web interface (with the -user you\[aq]ve authenticated rclone with) seems to be enough so that the -resource key is not needed. - - +user you\[aq]ve authenticated rclone with) seems to be enough so that +the resource key is not needed. +.PP Properties: - -- Config: resource_key -- Env Var: RCLONE_DRIVE_RESOURCE_KEY -- Type: string -- Required: false - -#### --drive-fast-list-bug-fix - +.IP \[bu] 2 +Config: resource_key +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_RESOURCE_KEY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --drive-fast-list-bug-fix +.PP Work around a bug in Google Drive listing. - +.PP Normally rclone will work around a bug in Google Drive when using --fast-list (ListR) where the search \[dq](A in parents) or (B in -parents)\[dq] returns nothing sometimes. See #3114, #4289 and -https://issuetracker.google.com/issues/149522397 - -Rclone detects this by finding no items in more than one directory -when listing and retries them as lists of individual directories. - +parents)\[dq] returns nothing sometimes. +See #3114, #4289 and https://issuetracker.google.com/issues/149522397 +.PP +Rclone detects this by finding no items in more than one directory when +listing and retries them as lists of individual directories. +.PP This means that if you have a lot of empty directories rclone will end -up listing them all individually and this can take many more API -calls. - -This flag allows the work-around to be disabled. This is **not** -recommended in normal use - only if you have a particular case you are -having trouble with like many empty directories. - - +up listing them all individually and this can take many more API calls. +.PP +This flag allows the work-around to be disabled. +This is \f[B]not\f[R] recommended in normal use - only if you have a +particular case you are having trouble with like many empty directories. +.PP Properties: - -- Config: fast_list_bug_fix -- Env Var: RCLONE_DRIVE_FAST_LIST_BUG_FIX -- Type: bool -- Default: true - -#### --drive-metadata-owner - +.IP \[bu] 2 +Config: fast_list_bug_fix +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_FAST_LIST_BUG_FIX +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: true +.SS --drive-metadata-owner +.PP Control whether owner should be read or written in metadata. - -Owner is a standard part of the file metadata so is easy to read. But it -isn\[aq]t always desirable to set the owner from the metadata. - +.PP +Owner is a standard part of the file metadata so is easy to read. +But it isn\[aq]t always desirable to set the owner from the metadata. +.PP Note that you can\[aq]t set the owner on Shared Drives, and that setting ownership will generate an email to the new owner (this can\[aq]t be disabled), and you can\[aq]t transfer ownership to someone outside your organization. - - +.PP Properties: - -- Config: metadata_owner -- Env Var: RCLONE_DRIVE_METADATA_OWNER -- Type: Bits -- Default: read -- Examples: - - \[dq]off\[dq] - - Do not read or write the value - - \[dq]read\[dq] - - Read the value only - - \[dq]write\[dq] - - Write the value only - - \[dq]read,write\[dq] - - Read and Write the value. - -#### --drive-metadata-permissions - +.IP \[bu] 2 +Config: metadata_owner +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_METADATA_OWNER +.IP \[bu] 2 +Type: Bits +.IP \[bu] 2 +Default: read +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]off\[dq] +.RS 2 +.IP \[bu] 2 +Do not read or write the value +.RE +.IP \[bu] 2 +\[dq]read\[dq] +.RS 2 +.IP \[bu] 2 +Read the value only +.RE +.IP \[bu] 2 +\[dq]write\[dq] +.RS 2 +.IP \[bu] 2 +Write the value only +.RE +.IP \[bu] 2 +\[dq]failok\[dq] +.RS 2 +.IP \[bu] 2 +If writing fails log errors only, don\[aq]t fail the transfer +.RE +.IP \[bu] 2 +\[dq]read,write\[dq] +.RS 2 +.IP \[bu] 2 +Read and Write the value. +.RE +.RE +.SS --drive-metadata-permissions +.PP Control whether permissions should be read or written in metadata. - +.PP Reading permissions metadata from files can be done quickly, but it isn\[aq]t always desirable to set the permissions from the metadata. - +.PP Note that rclone drops any inherited permissions on Shared Drives and any owner permission on My Drives as these are duplicated in the owner metadata. - - +.PP Properties: - -- Config: metadata_permissions -- Env Var: RCLONE_DRIVE_METADATA_PERMISSIONS -- Type: Bits -- Default: off -- Examples: - - \[dq]off\[dq] - - Do not read or write the value - - \[dq]read\[dq] - - Read the value only - - \[dq]write\[dq] - - Write the value only - - \[dq]read,write\[dq] - - Read and Write the value. - -#### --drive-metadata-labels - +.IP \[bu] 2 +Config: metadata_permissions +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_METADATA_PERMISSIONS +.IP \[bu] 2 +Type: Bits +.IP \[bu] 2 +Default: off +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]off\[dq] +.RS 2 +.IP \[bu] 2 +Do not read or write the value +.RE +.IP \[bu] 2 +\[dq]read\[dq] +.RS 2 +.IP \[bu] 2 +Read the value only +.RE +.IP \[bu] 2 +\[dq]write\[dq] +.RS 2 +.IP \[bu] 2 +Write the value only +.RE +.IP \[bu] 2 +\[dq]failok\[dq] +.RS 2 +.IP \[bu] 2 +If writing fails log errors only, don\[aq]t fail the transfer +.RE +.IP \[bu] 2 +\[dq]read,write\[dq] +.RS 2 +.IP \[bu] 2 +Read and Write the value. +.RE +.RE +.SS --drive-metadata-labels +.PP Control whether labels should be read or written in metadata. - +.PP Reading labels metadata from files takes an extra API transaction and -will slow down listings. It isn\[aq]t always desirable to set the labels -from the metadata. - +will slow down listings. +It isn\[aq]t always desirable to set the labels from the metadata. +.PP The format of labels is documented in the drive API documentation at -https://developers.google.com/drive/api/reference/rest/v3/Label - -rclone just provides a JSON dump of this format. - +https://developers.google.com/drive/api/reference/rest/v3/Label - rclone +just provides a JSON dump of this format. +.PP When setting labels, the label and fields must already exist - rclone -will not create them. This means that if you are transferring labels -from two different accounts you will have to create the labels in -advance and use the metadata mapper to translate the IDs between the -two accounts. - - +will not create them. +This means that if you are transferring labels from two different +accounts you will have to create the labels in advance and use the +metadata mapper to translate the IDs between the two accounts. +.PP Properties: - -- Config: metadata_labels -- Env Var: RCLONE_DRIVE_METADATA_LABELS -- Type: Bits -- Default: off -- Examples: - - \[dq]off\[dq] - - Do not read or write the value - - \[dq]read\[dq] - - Read the value only - - \[dq]write\[dq] - - Write the value only - - \[dq]read,write\[dq] - - Read and Write the value. - -#### --drive-encoding - +.IP \[bu] 2 +Config: metadata_labels +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_METADATA_LABELS +.IP \[bu] 2 +Type: Bits +.IP \[bu] 2 +Default: off +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]off\[dq] +.RS 2 +.IP \[bu] 2 +Do not read or write the value +.RE +.IP \[bu] 2 +\[dq]read\[dq] +.RS 2 +.IP \[bu] 2 +Read the value only +.RE +.IP \[bu] 2 +\[dq]write\[dq] +.RS 2 +.IP \[bu] 2 +Write the value only +.RE +.IP \[bu] 2 +\[dq]failok\[dq] +.RS 2 +.IP \[bu] 2 +If writing fails log errors only, don\[aq]t fail the transfer +.RE +.IP \[bu] 2 +\[dq]read,write\[dq] +.RS 2 +.IP \[bu] 2 +Read and Write the value. +.RE +.RE +.SS --drive-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_DRIVE_ENCODING -- Type: Encoding -- Default: InvalidUtf8 - -#### --drive-env-auth - -Get IAM credentials from runtime (environment variables or instance meta data if no env vars). - -Only applies if service_account_file and service_account_credentials is blank. - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: InvalidUtf8 +.SS --drive-env-auth +.PP +Get IAM credentials from runtime (environment variables or instance meta +data if no env vars). +.PP +Only applies if service_account_file and service_account_credentials is +blank. +.PP Properties: - -- Config: env_auth -- Env Var: RCLONE_DRIVE_ENV_AUTH -- Type: bool -- Default: false -- Examples: - - \[dq]false\[dq] - - Enter credentials in the next step. - - \[dq]true\[dq] - - Get GCP IAM credentials from the environment (env vars or IAM). - -#### --drive-description - -Description of the remote - +.IP \[bu] 2 +Config: env_auth +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_ENV_AUTH +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]false\[dq] +.RS 2 +.IP \[bu] 2 +Enter credentials in the next step. +.RE +.IP \[bu] 2 +\[dq]true\[dq] +.RS 2 +.IP \[bu] 2 +Get GCP IAM credentials from the environment (env vars or IAM). +.RE +.RE +.SS --drive-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_DRIVE_DESCRIPTION -- Type: string -- Required: false - -### Metadata - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_DRIVE_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Metadata +.PP User metadata is stored in the properties field of the drive object. - +.PP Metadata is supported on files and directories. - +.PP Here are the possible system metadata items for the drive backend. - -| Name | Help | Type | Example | Read Only | -|------|------|------|---------|-----------| -| btime | Time of file birth (creation) with mS accuracy. Note that this is only writable on fresh uploads - it can\[aq]t be written for updates. | RFC 3339 | 2006-01-02T15:04:05.999Z07:00 | N | -| content-type | The MIME type of the file. | string | text/plain | N | -| copy-requires-writer-permission | Whether the options to copy, print, or download this file, should be disabled for readers and commenters. | boolean | true | N | -| description | A short description of the file. | string | Contract for signing | N | -| folder-color-rgb | The color for a folder or a shortcut to a folder as an RGB hex string. | string | 881133 | N | -| labels | Labels attached to this file in a JSON dump of Googled drive format. Enable with --drive-metadata-labels. | JSON | [] | N | -| mtime | Time of last modification with mS accuracy. | RFC 3339 | 2006-01-02T15:04:05.999Z07:00 | N | -| owner | The owner of the file. Usually an email address. Enable with --drive-metadata-owner. | string | user\[at]example.com | N | -| permissions | Permissions in a JSON dump of Google drive format. On shared drives these will only be present if they aren\[aq]t inherited. Enable with --drive-metadata-permissions. | JSON | {} | N | -| starred | Whether the user has starred the file. | boolean | false | N | -| viewed-by-me | Whether the file has been viewed by this user. | boolean | true | **Y** | -| writers-can-share | Whether users with only writer permission can modify the file\[aq]s permissions. Not populated for items in shared drives. | boolean | false | N | - -See the [metadata](https://rclone.org/docs/#metadata) docs for more info. - -## Backend commands - -Here are the commands specific to the drive backend. - -Run them with - - rclone backend COMMAND remote: - -The help below will explain what arguments each command takes. - -See the [backend](https://rclone.org/commands/rclone_backend/) command for more -info on how to pass options and arguments. - -These can be run on a running backend using the rc command -[backend/command](https://rclone.org/rc/#backend-command). - -### get - -Get command for fetching the drive config parameters - - rclone backend get remote: [options] [+] - -This is a get command which will be used to fetch the various drive config parameters - -Usage Examples: - - rclone backend get drive: [-o service_account_file] [-o chunk_size] - rclone rc backend/command command=get fs=drive: [-o service_account_file] [-o chunk_size] - - -Options: - -- \[dq]chunk_size\[dq]: show the current upload chunk size -- \[dq]service_account_file\[dq]: show the current service account file - -### set - -Set command for updating the drive config parameters - - rclone backend set remote: [options] [+] - -This is a set command which will be used to update the various drive config parameters - -Usage Examples: - - rclone backend set drive: [-o service_account_file=sa.json] [-o chunk_size=67108864] - rclone rc backend/command command=set fs=drive: [-o service_account_file=sa.json] [-o chunk_size=67108864] - - -Options: - -- \[dq]chunk_size\[dq]: update the current upload chunk size -- \[dq]service_account_file\[dq]: update the current service account file - -### shortcut - -Create shortcuts from files or directories - - rclone backend shortcut remote: [options] [+] - -This command creates shortcuts from files or directories. - -Usage: - - rclone backend shortcut drive: source_item destination_shortcut - rclone backend shortcut drive: source_item -o target=drive2: destination_shortcut - -In the first example this creates a shortcut from the \[dq]source_item\[dq] -which can be a file or a directory to the \[dq]destination_shortcut\[dq]. The -\[dq]source_item\[dq] and the \[dq]destination_shortcut\[dq] should be relative paths -from \[dq]drive:\[dq] - -In the second example this creates a shortcut from the \[dq]source_item\[dq] -relative to \[dq]drive:\[dq] to the \[dq]destination_shortcut\[dq] relative to -\[dq]drive2:\[dq]. This may fail with a permission error if the user -authenticated with \[dq]drive2:\[dq] can\[aq]t read files from \[dq]drive:\[dq]. - - -Options: - -- \[dq]target\[dq]: optional target remote for the shortcut destination - -### drives - -List the Shared Drives available to this account - - rclone backend drives remote: [options] [+] - -This command lists the Shared Drives (Team Drives) available to this -account. - -Usage: - - rclone backend [-o config] drives drive: - -This will return a JSON list of objects like this - - [ - { - \[dq]id\[dq]: \[dq]0ABCDEF-01234567890\[dq], - \[dq]kind\[dq]: \[dq]drive#teamDrive\[dq], - \[dq]name\[dq]: \[dq]My Drive\[dq] - }, - { - \[dq]id\[dq]: \[dq]0ABCDEFabcdefghijkl\[dq], - \[dq]kind\[dq]: \[dq]drive#teamDrive\[dq], - \[dq]name\[dq]: \[dq]Test Drive\[dq] - } - ] - -With the -o config parameter it will output the list in a format -suitable for adding to a config file to make aliases for all the -drives found and a combined drive. - - [My Drive] - type = alias - remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=: - - [Test Drive] - type = alias - remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=: - - [AllDrives] - type = combine - upstreams = \[dq]My Drive=My Drive:\[dq] \[dq]Test Drive=Test Drive:\[dq] - -Adding this to the rclone config file will cause those team drives to -be accessible with the aliases shown. Any illegal characters will be -substituted with \[dq]_\[dq] and duplicate names will have numbers suffixed. -It will also add a remote called AllDrives which shows all the shared -drives combined into one directory tree. - - -### untrash - -Untrash files and directories - - rclone backend untrash remote: [options] [+] - -This command untrashes all the files and directories in the directory -passed in recursively. - -Usage: - -This takes an optional directory to trash which make this easier to -use via the API. - - rclone backend untrash drive:directory - rclone backend --interactive untrash drive:directory subdir - -Use the --interactive/-i or --dry-run flag to see what would be restored before restoring it. - -Result: - - { - \[dq]Untrashed\[dq]: 17, - \[dq]Errors\[dq]: 0 - } - - -### copyid - -Copy files by ID - - rclone backend copyid remote: [options] [+] - -This command copies files by ID - -Usage: - - rclone backend copyid drive: ID path - rclone backend copyid drive: ID1 path1 ID2 path2 - -It copies the drive file with ID given to the path (an rclone path which -will be passed internally to rclone copyto). The ID and path pairs can be -repeated. - -The path should end with a / to indicate copy the file as named to -this directory. If it doesn\[aq]t end with a / then the last path -component will be used as the file name. - -If the destination is a drive backend then server-side copying will be -attempted if possible. - -Use the --interactive/-i or --dry-run flag to see what would be copied before copying. - - -### exportformats - -Dump the export formats for debug purposes - - rclone backend exportformats remote: [options] [+] - -### importformats - -Dump the import formats for debug purposes - - rclone backend importformats remote: [options] [+] - - - -## Limitations - -Drive has quite a lot of rate limiting. This causes rclone to be -limited to transferring about 2 files per second only. Individual -files may be transferred much faster at 100s of MiB/s but lots of -small files can take a long time. - -Server side copies are also subject to a separate rate limit. If you -see User rate limit exceeded errors, wait at least 24 hours and retry. -You can disable server-side copies with \[ga]--disable copy\[ga] to download -and upload the files if you prefer. - -### Limitations of Google Docs - -Google docs will appear as size -1 in \[ga]rclone ls\[ga], \[ga]rclone ncdu\[ga] etc, -and as size 0 in anything which uses the VFS layer, e.g. \[ga]rclone mount\[ga] -and \[ga]rclone serve\[ga]. When calculating directory totals, e.g. in -\[ga]rclone size\[ga] and \[ga]rclone ncdu\[ga], they will be counted in as empty -files. - -This is because rclone can\[aq]t find out the size of the Google docs -without downloading them. - -Google docs will transfer correctly with \[ga]rclone sync\[ga], \[ga]rclone copy\[ga] -etc as rclone knows to ignore the size when doing the transfer. - -However an unfortunate consequence of this is that you may not be able -to download Google docs using \[ga]rclone mount\[ga]. If it doesn\[aq]t work you -will get a 0 sized file. If you try again the doc may gain its -correct size and be downloadable. Whether it will work on not depends -on the application accessing the mount and the OS you are running - -experiment to find out if it does work for you! - -### Duplicated files - -Sometimes, for no reason I\[aq]ve been able to track down, drive will -duplicate a file that rclone uploads. Drive unlike all the other -remotes can have duplicated files. - -Duplicated files cause problems with the syncing and you will see -messages in the log about duplicates. - -Use \[ga]rclone dedupe\[ga] to fix duplicated files. - -Note that this isn\[aq]t just a problem with rclone, even Google Photos on -Android duplicates files on drive sometimes. - -### Rclone appears to be re-copying files it shouldn\[aq]t - -The most likely cause of this is the duplicated file issue above - run -\[ga]rclone dedupe\[ga] and check your logs for duplicate object or directory -messages. - -This can also be caused by a delay/caching on google drive\[aq]s end when -comparing directory listings. Specifically with team drives used in -combination with --fast-list. Files that were uploaded recently may -not appear on the directory list sent to rclone when using --fast-list. - -Waiting a moderate period of time between attempts (estimated to be -approximately 1 hour) and/or not using --fast-list both seem to be -effective in preventing the problem. - -### SHA1 or SHA256 hashes may be missing - -All files have MD5 hashes, but a small fraction of files uploaded may -not have SHA1 or SHA256 hashes especially if they were uploaded before 2018. - -## Making your own client_id - -When you use rclone with Google drive in its default configuration you -are using rclone\[aq]s client_id. This is shared between all the rclone -users. There is a global rate limit on the number of queries per -second that each client_id can do set by Google. rclone already has a -high quota and I will continue to make sure it is high enough by -contacting Google. - -It is strongly recommended to use your own client ID as the default rclone ID is heavily used. If you have multiple services running, it is recommended to use an API key for each service. The default Google quota is 10 transactions per second so it is recommended to stay under that number as if you use more than that, it will cause rclone to rate limit and make things slower. - -Here is how to create your own Google Drive client ID for rclone: - -1. Log into the [Google API -Console](https://console.developers.google.com/) with your Google -account. It doesn\[aq]t matter what Google account you use. (It need not -be the same account as the Google Drive you want to access) - -2. Select a project or create a new project. - -3. Under \[dq]ENABLE APIS AND SERVICES\[dq] search for \[dq]Drive\[dq], and enable the -\[dq]Google Drive API\[dq]. - -4. Click \[dq]Credentials\[dq] in the left-side panel (not \[dq]Create -credentials\[dq], which opens the wizard). - -5. If you already configured an \[dq]Oauth Consent Screen\[dq], then skip -to the next step; if not, click on \[dq]CONFIGURE CONSENT SCREEN\[dq] button -(near the top right corner of the right panel), then select \[dq]External\[dq] -and click on \[dq]CREATE\[dq]; on the next screen, enter an \[dq]Application name\[dq] -(\[dq]rclone\[dq] is OK); enter \[dq]User Support Email\[dq] (your own email is OK); -enter \[dq]Developer Contact Email\[dq] (your own email is OK); then click on -\[dq]Save\[dq] (all other data is optional). You will also have to add some scopes, -including \[ga].../auth/docs\[ga] and \[ga].../auth/drive\[ga] in order to be able to edit, -create and delete files with RClone. You may also want to include the -\[ga]../auth/drive.metadata.readonly\[ga] scope. After adding scopes, click -\[dq]Save and continue\[dq] to add test users. Be sure to add your own account to -the test users. Once you\[aq]ve added yourself as a test user and saved the -changes, click again on \[dq]Credentials\[dq] on the left panel to go back to -the \[dq]Credentials\[dq] screen. - - (PS: if you are a GSuite user, you could also select \[dq]Internal\[dq] instead -of \[dq]External\[dq] above, but this will restrict API use to Google Workspace -users in your organisation). - -6. Click on the \[dq]+ CREATE CREDENTIALS\[dq] button at the top of the screen, -then select \[dq]OAuth client ID\[dq]. - -7. Choose an application type of \[dq]Desktop app\[dq] and click \[dq]Create\[dq]. (the default name is fine) - -8. It will show you a client ID and client secret. Make a note of these. - - (If you selected \[dq]External\[dq] at Step 5 continue to Step 9. - If you chose \[dq]Internal\[dq] you don\[aq]t need to publish and can skip straight to - Step 10 but your destination drive must be part of the same Google Workspace.) - -9. Go to \[dq]Oauth consent screen\[dq] and then click \[dq]PUBLISH APP\[dq] button and confirm. - You will also want to add yourself as a test user. - -10. Provide the noted client ID and client secret to rclone. - -Be aware that, due to the \[dq]enhanced security\[dq] recently introduced by -Google, you are theoretically expected to \[dq]submit your app for verification\[dq] -and then wait a few weeks(!) for their response; in practice, you can go right -ahead and use the client ID and client secret with rclone, the only issue will -be a very scary confirmation screen shown when you connect via your browser -for rclone to be able to get its token-id (but as this only happens during -the remote configuration, it\[aq]s not such a big deal). Keeping the application in -\[dq]Testing\[dq] will work as well, but the limitation is that any grants will expire -after a week, which can be annoying to refresh constantly. If, for whatever -reason, a short grant time is not a problem, then keeping the application in -testing mode would also be sufficient. - -(Thanks to \[at]balazer on github for these instructions.) - -Sometimes, creation of an OAuth consent in Google API Console fails due to an error message -\[lq]The request failed because changes to one of the field of the resource is not supported\[rq]. -As a convenient workaround, the necessary Google Drive API key can be created on the -[Python Quickstart](https://developers.google.com/drive/api/v3/quickstart/python) page. -Just push the Enable the Drive API button to receive the Client ID and Secret. -Note that it will automatically create a new project in the API Console. - -# Google Photos - -The rclone backend for [Google Photos](https://www.google.com/photos/about/) is -a specialized backend for transferring photos and videos to and from -Google Photos. - -**NB** The Google Photos API which rclone uses has quite a few -limitations, so please read the [limitations section](#limitations) -carefully to make sure it is suitable for your use. - -## Configuration - -The initial setup for google cloud storage involves getting a token from Google Photos -which you need to do in your browser. \[ga]rclone config\[ga] walks you -through it. - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi -.PP -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. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value [snip] XX / Google -Photos \ \[dq]google photos\[dq] [snip] Storage> google photos ** See -help for google photos backend at: https://rclone.org/googlephotos/ ** -.PP -Google Application Client Id Leave blank normally. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -client_id> Google Application Client Secret Leave blank normally. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -client_secret> Set to make the Google Photos backend read only. -.PP -If you choose read only then rclone will only request read only access -to your photos, otherwise rclone will request full access. -Enter a boolean value (true or false). -Press Enter for the default (\[dq]false\[dq]). -read_only> Edit advanced config? -(y/n) y) Yes n) No y/n> n Remote config Use web browser to automatically -authenticate rclone with remote? -* Say Y if the machine running rclone has a web browser you can use * -Say N if running rclone on a (remote) machine without web browser access -If not sure try Y. -If Y failed, try N. -y) Yes n) No y/n> y If your browser doesn\[aq]t open automatically go to -the following link: http://127.0.0.1:53682/auth Log in and authorize -rclone for access Waiting for code... -Got code -.PP -*** IMPORTANT: All media items uploaded to Google Photos with rclone *** -are stored in full resolution at original quality. -These uploads *** will count towards storage in your Google Account. .PP .TS tab(@); -lw(20.4n). +lw(11.1n) lw(11.1n) lw(11.1n) lw(16.6n) lw(20.3n). T{ -[remote] type = google photos token = -{\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]Bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]2019-06-28T17:38:04.644930156+01:00\[dq]} +Name +T}@T{ +Help +T}@T{ +Type +T}@T{ +Example +T}@T{ +Read Only T} _ T{ -y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y -\[ga]\[ga]\[ga] +btime +T}@T{ +Time of file birth (creation) with mS accuracy. +Note that this is only writable on fresh uploads - it can\[aq]t be +written for updates. +T}@T{ +RFC 3339 +T}@T{ +2006-01-02T15:04:05.999Z07:00 +T}@T{ +N T} T{ +content-type +T}@T{ +The MIME type of the file. +T}@T{ +string +T}@T{ +text/plain +T}@T{ +N +T} +T{ +copy-requires-writer-permission +T}@T{ +Whether the options to copy, print, or download this file, should be +disabled for readers and commenters. +T}@T{ +boolean +T}@T{ +true +T}@T{ +N +T} +T{ +description +T}@T{ +A short description of the file. +T}@T{ +string +T}@T{ +Contract for signing +T}@T{ +N +T} +T{ +folder-color-rgb +T}@T{ +The color for a folder or a shortcut to a folder as an RGB hex string. +T}@T{ +string +T}@T{ +881133 +T}@T{ +N +T} +T{ +labels +T}@T{ +Labels attached to this file in a JSON dump of Googled drive format. +Enable with --drive-metadata-labels. +T}@T{ +JSON +T}@T{ +[] +T}@T{ +N +T} +T{ +mtime +T}@T{ +Time of last modification with mS accuracy. +T}@T{ +RFC 3339 +T}@T{ +2006-01-02T15:04:05.999Z07:00 +T}@T{ +N +T} +T{ +owner +T}@T{ +The owner of the file. +Usually an email address. +Enable with --drive-metadata-owner. +T}@T{ +string +T}@T{ +user\[at]example.com +T}@T{ +N +T} +T{ +permissions +T}@T{ +Permissions in a JSON dump of Google drive format. +On shared drives these will only be present if they aren\[aq]t +inherited. +Enable with --drive-metadata-permissions. +T}@T{ +JSON +T}@T{ +{} +T}@T{ +N +T} +T{ +starred +T}@T{ +Whether the user has starred the file. +T}@T{ +boolean +T}@T{ +false +T}@T{ +N +T} +T{ +viewed-by-me +T}@T{ +Whether the file has been viewed by this user. +T}@T{ +boolean +T}@T{ +true +T}@T{ +\f[B]Y\f[R] +T} +T{ +writers-can-share +T}@T{ +Whether users with only writer permission can modify the file\[aq]s +permissions. +Not populated and ignored when setting for items in shared drives. +T}@T{ +boolean +T}@T{ +false +T}@T{ +N +T} +.TE +.PP +See the metadata (https://rclone.org/docs/#metadata) docs for more info. +.SS Backend commands +.PP +Here are the commands specific to the drive backend. +.PP +Run them with +.IP +.nf +\f[C] +rclone backend COMMAND remote: +\f[R] +.fi +.PP +The help below will explain what arguments each command takes. +.PP +See the backend (https://rclone.org/commands/rclone_backend/) command +for more info on how to pass options and arguments. +.PP +These can be run on a running backend using the rc command +backend/command (https://rclone.org/rc/#backend-command). +.SS get +.PP +Get command for fetching the drive config parameters +.IP +.nf +\f[C] +rclone backend get remote: [options] [+] +\f[R] +.fi +.PP +This is a get command which will be used to fetch the various drive +config parameters +.PP +Usage Examples: +.IP +.nf +\f[C] +rclone backend get drive: [-o service_account_file] [-o chunk_size] +rclone rc backend/command command=get fs=drive: [-o service_account_file] [-o chunk_size] +\f[R] +.fi +.PP +Options: +.IP \[bu] 2 +\[dq]chunk_size\[dq]: show the current upload chunk size +.IP \[bu] 2 +\[dq]service_account_file\[dq]: show the current service account file +.SS set +.PP +Set command for updating the drive config parameters +.IP +.nf +\f[C] +rclone backend set remote: [options] [+] +\f[R] +.fi +.PP +This is a set command which will be used to update the various drive +config parameters +.PP +Usage Examples: +.IP +.nf +\f[C] +rclone backend set drive: [-o service_account_file=sa.json] [-o chunk_size=67108864] +rclone rc backend/command command=set fs=drive: [-o service_account_file=sa.json] [-o chunk_size=67108864] +\f[R] +.fi +.PP +Options: +.IP \[bu] 2 +\[dq]chunk_size\[dq]: update the current upload chunk size +.IP \[bu] 2 +\[dq]service_account_file\[dq]: update the current service account file +.SS shortcut +.PP +Create shortcuts from files or directories +.IP +.nf +\f[C] +rclone backend shortcut remote: [options] [+] +\f[R] +.fi +.PP +This command creates shortcuts from files or directories. +.PP +Usage: +.IP +.nf +\f[C] +rclone backend shortcut drive: source_item destination_shortcut +rclone backend shortcut drive: source_item -o target=drive2: destination_shortcut +\f[R] +.fi +.PP +In the first example this creates a shortcut from the +\[dq]source_item\[dq] which can be a file or a directory to the +\[dq]destination_shortcut\[dq]. +The \[dq]source_item\[dq] and the \[dq]destination_shortcut\[dq] should +be relative paths from \[dq]drive:\[dq] +.PP +In the second example this creates a shortcut from the +\[dq]source_item\[dq] relative to \[dq]drive:\[dq] to the +\[dq]destination_shortcut\[dq] relative to \[dq]drive2:\[dq]. +This may fail with a permission error if the user authenticated with +\[dq]drive2:\[dq] can\[aq]t read files from \[dq]drive:\[dq]. +.PP +Options: +.IP \[bu] 2 +\[dq]target\[dq]: optional target remote for the shortcut destination +.SS drives +.PP +List the Shared Drives available to this account +.IP +.nf +\f[C] +rclone backend drives remote: [options] [+] +\f[R] +.fi +.PP +This command lists the Shared Drives (Team Drives) available to this +account. +.PP +Usage: +.IP +.nf +\f[C] +rclone backend [-o config] drives drive: +\f[R] +.fi +.PP +This will return a JSON list of objects like this +.IP +.nf +\f[C] +[ + { + \[dq]id\[dq]: \[dq]0ABCDEF-01234567890\[dq], + \[dq]kind\[dq]: \[dq]drive#teamDrive\[dq], + \[dq]name\[dq]: \[dq]My Drive\[dq] + }, + { + \[dq]id\[dq]: \[dq]0ABCDEFabcdefghijkl\[dq], + \[dq]kind\[dq]: \[dq]drive#teamDrive\[dq], + \[dq]name\[dq]: \[dq]Test Drive\[dq] + } +] +\f[R] +.fi +.PP +With the -o config parameter it will output the list in a format +suitable for adding to a config file to make aliases for all the drives +found and a combined drive. +.IP +.nf +\f[C] +[My Drive] +type = alias +remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=: + +[Test Drive] +type = alias +remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=: + +[AllDrives] +type = combine +upstreams = \[dq]My Drive=My Drive:\[dq] \[dq]Test Drive=Test Drive:\[dq] +\f[R] +.fi +.PP +Adding this to the rclone config file will cause those team drives to be +accessible with the aliases shown. +Any illegal characters will be substituted with \[dq]_\[dq] and +duplicate names will have numbers suffixed. +It will also add a remote called AllDrives which shows all the shared +drives combined into one directory tree. +.SS untrash +.PP +Untrash files and directories +.IP +.nf +\f[C] +rclone backend untrash remote: [options] [+] +\f[R] +.fi +.PP +This command untrashes all the files and directories in the directory +passed in recursively. +.PP +Usage: +.PP +This takes an optional directory to trash which make this easier to use +via the API. +.IP +.nf +\f[C] +rclone backend untrash drive:directory +rclone backend --interactive untrash drive:directory subdir +\f[R] +.fi +.PP +Use the --interactive/-i or --dry-run flag to see what would be restored +before restoring it. +.PP +Result: +.IP +.nf +\f[C] +{ + \[dq]Untrashed\[dq]: 17, + \[dq]Errors\[dq]: 0 +} +\f[R] +.fi +.SS copyid +.PP +Copy files by ID +.IP +.nf +\f[C] +rclone backend copyid remote: [options] [+] +\f[R] +.fi +.PP +This command copies files by ID +.PP +Usage: +.IP +.nf +\f[C] +rclone backend copyid drive: ID path +rclone backend copyid drive: ID1 path1 ID2 path2 +\f[R] +.fi +.PP +It copies the drive file with ID given to the path (an rclone path which +will be passed internally to rclone copyto). +The ID and path pairs can be repeated. +.PP +The path should end with a / to indicate copy the file as named to this +directory. +If it doesn\[aq]t end with a / then the last path component will be used +as the file name. +.PP +If the destination is a drive backend then server-side copying will be +attempted if possible. +.PP +Use the --interactive/-i or --dry-run flag to see what would be copied +before copying. +.SS exportformats +.PP +Dump the export formats for debug purposes +.IP +.nf +\f[C] +rclone backend exportformats remote: [options] [+] +\f[R] +.fi +.SS importformats +.PP +Dump the import formats for debug purposes +.IP +.nf +\f[C] +rclone backend importformats remote: [options] [+] +\f[R] +.fi +.SS query +.PP +List files using Google Drive query language +.IP +.nf +\f[C] +rclone backend query remote: [options] [+] +\f[R] +.fi +.PP +This command lists files based on a query +.PP +Usage: +.IP +.nf +\f[C] +rclone backend query drive: query +\f[R] +.fi +.PP +The query syntax is documented at Google Drive Search query terms and +operators (https://developers.google.com/drive/api/guides/ref-search-terms). +.PP +For example: +.IP +.nf +\f[C] +rclone backend query drive: \[dq]\[aq]0ABc9DEFGHIJKLMNop0QRatUVW3X\[aq] in parents and name contains \[aq]foo\[aq]\[dq] +\f[R] +.fi +.PP +If the query contains literal \[aq] or \ characters, these need to be +escaped with \ characters. +\[dq]\[aq]\[dq] becomes \[dq]\[aq]\[dq] and \[dq]\[dq] becomes +\[dq]\[rs]\[dq], for example to match a file named \[dq]foo \[aq] +\&.txt\[dq]: +.IP +.nf +\f[C] +rclone backend query drive: \[dq]name = \[aq]foo \[rs]\[aq] \[rs]\[rs]\[rs].txt\[aq]\[dq] +\f[R] +.fi +.PP +The result is a JSON array of matches, for example: +.IP +.nf +\f[C] +[ +{ + \[dq]createdTime\[dq]: \[dq]2017-06-29T19:58:28.537Z\[dq], + \[dq]id\[dq]: \[dq]0AxBe_CDEF4zkGHI4d0FjYko2QkD\[dq], + \[dq]md5Checksum\[dq]: \[dq]68518d16be0c6fbfab918be61d658032\[dq], + \[dq]mimeType\[dq]: \[dq]text/plain\[dq], + \[dq]modifiedTime\[dq]: \[dq]2024-02-02T10:40:02.874Z\[dq], + \[dq]name\[dq]: \[dq]foo \[aq] \[rs]\[rs].txt\[dq], + \[dq]parents\[dq]: [ + \[dq]0BxAe_BCDE4zkFGZpcWJGek0xbzC\[dq] + ], + \[dq]resourceKey\[dq]: \[dq]0-ABCDEFGHIXJQpIGqBJq3MC\[dq], + \[dq]sha1Checksum\[dq]: \[dq]8f284fa768bfb4e45d076a579ab3905ab6bfa893\[dq], + \[dq]size\[dq]: \[dq]311\[dq], + \[dq]webViewLink\[dq]: \[dq]https://drive.google.com/file/d/0AxBe_CDEF4zkGHI4d0FjYko2QkD/view?usp=drivesdk\[rs]u0026resourcekey=0-ABCDEFGHIXJQpIGqBJq3MC\[dq] +} +] +\f[R] +.fi +.SS Limitations +.PP +Drive has quite a lot of rate limiting. +This causes rclone to be limited to transferring about 2 files per +second only. +Individual files may be transferred much faster at 100s of MiB/s but +lots of small files can take a long time. +.PP +Server side copies are also subject to a separate rate limit. +If you see User rate limit exceeded errors, wait at least 24 hours and +retry. +You can disable server-side copies with \f[C]--disable copy\f[R] to +download and upload the files if you prefer. +.SS Limitations of Google Docs +.PP +Google docs will appear as size -1 in \f[C]rclone ls\f[R], +\f[C]rclone ncdu\f[R] etc, and as size 0 in anything which uses the VFS +layer, e.g. +\f[C]rclone mount\f[R] and \f[C]rclone serve\f[R]. +When calculating directory totals, e.g. +in \f[C]rclone size\f[R] and \f[C]rclone ncdu\f[R], they will be counted +in as empty files. +.PP +This is because rclone can\[aq]t find out the size of the Google docs +without downloading them. +.PP +Google docs will transfer correctly with \f[C]rclone sync\f[R], +\f[C]rclone copy\f[R] etc as rclone knows to ignore the size when doing +the transfer. +.PP +However an unfortunate consequence of this is that you may not be able +to download Google docs using \f[C]rclone mount\f[R]. +If it doesn\[aq]t work you will get a 0 sized file. +If you try again the doc may gain its correct size and be downloadable. +Whether it will work on not depends on the application accessing the +mount and the OS you are running - experiment to find out if it does +work for you! +.SS Duplicated files +.PP +Sometimes, for no reason I\[aq]ve been able to track down, drive will +duplicate a file that rclone uploads. +Drive unlike all the other remotes can have duplicated files. +.PP +Duplicated files cause problems with the syncing and you will see +messages in the log about duplicates. +.PP +Use \f[C]rclone dedupe\f[R] to fix duplicated files. +.PP +Note that this isn\[aq]t just a problem with rclone, even Google Photos +on Android duplicates files on drive sometimes. +.SS Rclone appears to be re-copying files it shouldn\[aq]t +.PP +The most likely cause of this is the duplicated file issue above - run +\f[C]rclone dedupe\f[R] and check your logs for duplicate object or +directory messages. +.PP +This can also be caused by a delay/caching on google drive\[aq]s end +when comparing directory listings. +Specifically with team drives used in combination with --fast-list. +Files that were uploaded recently may not appear on the directory list +sent to rclone when using --fast-list. +.PP +Waiting a moderate period of time between attempts (estimated to be +approximately 1 hour) and/or not using --fast-list both seem to be +effective in preventing the problem. +.SS SHA1 or SHA256 hashes may be missing +.PP +All files have MD5 hashes, but a small fraction of files uploaded may +not have SHA1 or SHA256 hashes especially if they were uploaded before +2018. +.SS Making your own client_id +.PP +When you use rclone with Google drive in its default configuration you +are using rclone\[aq]s client_id. +This is shared between all the rclone users. +There is a global rate limit on the number of queries per second that +each client_id can do set by Google. +rclone already has a high quota and I will continue to make sure it is +high enough by contacting Google. +.PP +It is strongly recommended to use your own client ID as the default +rclone ID is heavily used. +If you have multiple services running, it is recommended to use an API +key for each service. +The default Google quota is 10 transactions per second so it is +recommended to stay under that number as if you use more than that, it +will cause rclone to rate limit and make things slower. +.PP +Here is how to create your own Google Drive client ID for rclone: +.IP "1." 3 +Log into the Google API Console (https://console.developers.google.com/) +with your Google account. +It doesn\[aq]t matter what Google account you use. +(It need not be the same account as the Google Drive you want to access) +.IP "2." 3 +Select a project or create a new project. +.IP "3." 3 +Under \[dq]ENABLE APIS AND SERVICES\[dq] search for \[dq]Drive\[dq], and +enable the \[dq]Google Drive API\[dq]. +.IP "4." 3 +Click \[dq]Credentials\[dq] in the left-side panel (not \[dq]Create +credentials\[dq], which opens the wizard). +.IP "5." 3 +If you already configured an \[dq]Oauth Consent Screen\[dq], then skip +to the next step; if not, click on \[dq]CONFIGURE CONSENT SCREEN\[dq] +button (near the top right corner of the right panel), then select +\[dq]External\[dq] and click on \[dq]CREATE\[dq]; on the next screen, +enter an \[dq]Application name\[dq] (\[dq]rclone\[dq] is OK); enter +\[dq]User Support Email\[dq] (your own email is OK); enter +\[dq]Developer Contact Email\[dq] (your own email is OK); then click on +\[dq]Save\[dq] (all other data is optional). +You will also have to add some +scopes (https://developers.google.com/drive/api/guides/api-specific-auth), +including +.IP \[bu] 2 +\f[C]https://www.googleapis.com/auth/docs\f[R] +.IP \[bu] 2 +\f[C]https://www.googleapis.com/auth/drive\f[R] in order to be able to +edit, create and delete files with RClone. +.IP \[bu] 2 +\f[C]https://www.googleapis.com/auth/drive.metadata.readonly\f[R] which +you may also want to add. +.IP \[bu] 2 +If you want to add all at once, comma separated it would be +\f[C]https://www.googleapis.com/auth/docs,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.metadata.readonly\f[R]. +.IP " 6." 4 +After adding scopes, click \[dq]Save and continue\[dq] to add test +users. +Be sure to add your own account to the test users. +Once you\[aq]ve added yourself as a test user and saved the changes, +click again on \[dq]Credentials\[dq] on the left panel to go back to the +\[dq]Credentials\[dq] screen. +.RS 4 +.PP +(PS: if you are a GSuite user, you could also select \[dq]Internal\[dq] +instead of \[dq]External\[dq] above, but this will restrict API use to +Google Workspace users in your organisation). +.RE +.IP " 7." 4 +Click on the \[dq]+ CREATE CREDENTIALS\[dq] button at the top of the +screen, then select \[dq]OAuth client ID\[dq]. +.IP " 8." 4 +Choose an application type of \[dq]Desktop app\[dq] and click +\[dq]Create\[dq]. +(the default name is fine) +.IP " 9." 4 +It will show you a client ID and client secret. +Make a note of these. +.RS 4 +.PP +(If you selected \[dq]External\[dq] at Step 5 continue to Step 9. +If you chose \[dq]Internal\[dq] you don\[aq]t need to publish and can +skip straight to Step 10 but your destination drive must be part of the +same Google Workspace.) +.RE +.IP "10." 4 +Go to \[dq]Oauth consent screen\[dq] and then click \[dq]PUBLISH +APP\[dq] button and confirm. +You will also want to add yourself as a test user. +.IP "11." 4 +Provide the noted client ID and client secret to rclone. +.PP +Be aware that, due to the \[dq]enhanced security\[dq] recently +introduced by Google, you are theoretically expected to \[dq]submit your +app for verification\[dq] and then wait a few weeks(!) for their +response; in practice, you can go right ahead and use the client ID and +client secret with rclone, the only issue will be a very scary +confirmation screen shown when you connect via your browser for rclone +to be able to get its token-id (but as this only happens during the +remote configuration, it\[aq]s not such a big deal). +Keeping the application in \[dq]Testing\[dq] will work as well, but the +limitation is that any grants will expire after a week, which can be +annoying to refresh constantly. +If, for whatever reason, a short grant time is not a problem, then +keeping the application in testing mode would also be sufficient. +.PP +(Thanks to \[at]balazer on github for these instructions.) +.PP +Sometimes, creation of an OAuth consent in Google API Console fails due +to an error message \[lq]The request failed because changes to one of +the field of the resource is not supported\[rq]. +As a convenient workaround, the necessary Google Drive API key can be +created on the Python +Quickstart (https://developers.google.com/drive/api/v3/quickstart/python) +page. +Just push the Enable the Drive API button to receive the Client ID and +Secret. +Note that it will automatically create a new project in the API Console. +.SH Google Photos +.PP +The rclone backend for Google +Photos (https://www.google.com/photos/about/) is a specialized backend +for transferring photos and videos to and from Google Photos. +.PP +\f[B]NB\f[R] The Google Photos API which rclone uses has quite a few +limitations, so please read the limitations section carefully to make +sure it is suitable for your use. +.SS Configuration +.PP +The initial setup for google cloud storage involves getting a token from +Google Photos which you need to do in your browser. +\f[C]rclone config\f[R] walks you through it. +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +[snip] +XX / Google Photos + \[rs] \[dq]google photos\[dq] +[snip] +Storage> google photos +** See help for google photos backend at: https://rclone.org/googlephotos/ ** + +Google Application Client Id +Leave blank normally. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +client_id> +Google Application Client Secret +Leave blank normally. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +client_secret> +Set to make the Google Photos backend read only. + +If you choose read only then rclone will only request read only access +to your photos, otherwise rclone will request full access. +Enter a boolean value (true or false). Press Enter for the default (\[dq]false\[dq]). +read_only> +Edit advanced config? (y/n) +y) Yes +n) No +y/n> n +Remote config +Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access +If not sure try Y. If Y failed, try N. +y) Yes +n) No +y/n> y +If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth +Log in and authorize rclone for access +Waiting for code... +Got code + +*** IMPORTANT: All media items uploaded to Google Photos with rclone +*** are stored in full resolution at original quality. These uploads +*** will count towards storage in your Google Account. + +-------------------- +[remote] +type = google photos +token = {\[dq]access_token\[dq]:\[dq]XXX\[dq],\[dq]token_type\[dq]:\[dq]Bearer\[dq],\[dq]refresh_token\[dq]:\[dq]XXX\[dq],\[dq]expiry\[dq]:\[dq]2019-06-28T17:38:04.644930156+01:00\[dq]} +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP See the remote setup docs (https://rclone.org/remote_setup/) for how to set it up on a machine with no Internet browser available. -T} -T{ +.PP Note that rclone runs a webserver on your local machine to collect the token as returned from Google if using web browser to automatically authenticate. @@ -45039,43 +48307,46 @@ get back the verification code. This is on \f[C]http://127.0.0.1:53682/\f[R] and this may require you to unblock it temporarily if you are running a host firewall, or use manual mode. -T} -T{ +.PP This remote is called \f[C]remote\f[R] and can now be used like this -T} -T{ +.PP See all the albums in your photos -T} -T{ +.IP +.nf +\f[C] rclone lsd remote:album -T} -T{ +\f[R] +.fi +.PP Make a new album -T} -T{ +.IP +.nf +\f[C] rclone mkdir remote:album/newAlbum -T} -T{ +\f[R] +.fi +.PP List the contents of an album -T} -T{ +.IP +.nf +\f[C] rclone ls remote:album/newAlbum -T} -T{ +\f[R] +.fi +.PP Sync \f[C]/home/local/images\f[R] to the Google Photos, removing any excess files in the album. -T} -T{ +.IP +.nf +\f[C] rclone sync --interactive /home/local/image remote:album/newAlbum -T} -T{ -### Layout -T} -T{ +\f[R] +.fi +.SS Layout +.PP As Google Photos is not a general purpose cloud storage system, the backend is laid out to help you navigate it. -T} -T{ +.PP The directories under \f[C]media\f[R] show different ways of categorizing the media. Each file will appear multiple times. @@ -45083,20 +48354,65 @@ So if you want to make a backup of your google photos you might choose to backup \f[C]remote:media/by-month\f[R]. (\f[B]NB\f[R] \f[C]remote:media/by-day\f[R] is rather slow at the moment so avoid for syncing.) -T} -T{ +.PP Note that all your photos and videos will appear somewhere under \f[C]media\f[R], but they may not appear under \f[C]album\f[R] unless you\[aq]ve put them into albums. -T} -T{ -\f[C]/ - upload - file1.jpg - file2.jpg - ... - media - all - file1.jpg - file2.jpg - ... - by-year - 2000 - file1.jpg - ... - 2001 - file2.jpg - ... - ... - by-month - 2000 - 2000-01 - file1.jpg - ... - 2000-02 - file2.jpg - ... - ... - by-day - 2000 - 2000-01-01 - file1.jpg - ... - 2000-01-02 - file2.jpg - ... - ... - album - album name - album name/sub - shared-album - album name - album name/sub - feature - favorites - file1.jpg - file2.jpg\f[R] -T} -T{ +.IP +.nf +\f[C] +/ +- upload + - file1.jpg + - file2.jpg + - ... +- media + - all + - file1.jpg + - file2.jpg + - ... + - by-year + - 2000 + - file1.jpg + - ... + - 2001 + - file2.jpg + - ... + - ... + - by-month + - 2000 + - 2000-01 + - file1.jpg + - ... + - 2000-02 + - file2.jpg + - ... + - ... + - by-day + - 2000 + - 2000-01-01 + - file1.jpg + - ... + - 2000-01-02 + - file2.jpg + - ... + - ... +- album + - album name + - album name/sub +- shared-album + - album name + - album name/sub +- feature + - favorites + - file1.jpg + - file2.jpg +\f[R] +.fi +.PP There are two writable parts of the tree, the \f[C]upload\f[R] directory and sub directories of the \f[C]album\f[R] directory. -T} -T{ +.PP The \f[C]upload\f[R] directory is for uploading files you don\[aq]t want to put into albums. This will be empty to start with and will contain the files you\[aq]ve @@ -45105,405 +48421,388 @@ restart rclone. The use case for this would be if you have a load of files you just want to once off dump into Google Photos. For repeated syncing, uploading to \f[C]album\f[R] will work better. -T} -T{ +.PP Directories within the \f[C]album\f[R] directory are also writeable and you may create new directories (albums) under \f[C]album\f[R]. If you copy files with a directory hierarchy in there then rclone will create albums with the \f[C]/\f[R] character in them. For example if you do -T} -T{ +.IP +.nf +\f[C] rclone copy /path/to/images remote:album/images -T} -T{ +\f[R] +.fi +.PP and the images directory contains -T} -T{ -\f[C]images - file1.jpg dir file2.jpg dir2 dir3 file3.jpg\f[R] -T} -T{ +.IP +.nf +\f[C] +images + - file1.jpg + dir + file2.jpg + dir2 + dir3 + file3.jpg +\f[R] +.fi +.PP Then rclone will create the following albums with the following files in -T} -T{ -- images - file1.jpg - images/dir - file2.jpg - images/dir2/dir3 - +.IP \[bu] 2 +images +.RS 2 +.IP \[bu] 2 +file1.jpg +.RE +.IP \[bu] 2 +images/dir +.RS 2 +.IP \[bu] 2 +file2.jpg +.RE +.IP \[bu] 2 +images/dir2/dir3 +.RS 2 +.IP \[bu] 2 file3.jpg -T} -T{ +.RE +.PP This means that you can use the \f[C]album\f[R] path pretty much like a normal filesystem and it is a good target for repeated syncing. -T} -T{ +.PP The \f[C]shared-album\f[R] directory shows albums shared with you or by you. This is similar to the Sharing tab in the Google Photos web interface. -T} -T{ -### Standard options -T} -T{ +.SS Standard options +.PP Here are the Standard options specific to google photos (Google Photos). -T} -T{ -#### --gphotos-client-id -T} -T{ +.SS --gphotos-client-id +.PP OAuth Client Id. -T} -T{ +.PP Leave blank normally. -T} -T{ +.PP Properties: -T} -T{ -- Config: client_id - Env Var: RCLONE_GPHOTOS_CLIENT_ID - Type: string - +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 Required: false -T} -T{ -#### --gphotos-client-secret -T} -T{ +.SS --gphotos-client-secret +.PP OAuth Client Secret. -T} -T{ +.PP Leave blank normally. -T} -T{ +.PP Properties: -T} -T{ -- Config: client_secret - Env Var: RCLONE_GPHOTOS_CLIENT_SECRET - Type: -string - Required: false -T} -T{ -#### --gphotos-read-only -T} -T{ +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --gphotos-read-only +.PP Set to make the Google Photos backend read only. -T} -T{ +.PP If you choose read only then rclone will only request read only access to your photos, otherwise rclone will request full access. -T} -T{ +.PP Properties: -T} -T{ -- Config: read_only - Env Var: RCLONE_GPHOTOS_READ_ONLY - Type: bool - +.IP \[bu] 2 +Config: read_only +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_READ_ONLY +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 Default: false -T} -T{ -### Advanced options -T} -T{ +.SS Advanced options +.PP Here are the Advanced options specific to google photos (Google Photos). -T} -T{ -#### --gphotos-token -T} -T{ +.SS --gphotos-token +.PP OAuth Access Token as a JSON blob. -T} -T{ +.PP Properties: -T} -T{ -- Config: token - Env Var: RCLONE_GPHOTOS_TOKEN - Type: string - +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 Required: false -T} -T{ -#### --gphotos-auth-url -T} -T{ +.SS --gphotos-auth-url +.PP Auth server URL. -T} -T{ +.PP Leave blank to use the provider defaults. -T} -T{ +.PP Properties: -T} -T{ -- Config: auth_url - Env Var: RCLONE_GPHOTOS_AUTH_URL - Type: string - +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 Required: false -T} -T{ -#### --gphotos-token-url -T} -T{ +.SS --gphotos-token-url +.PP Token server url. -T} -T{ +.PP Leave blank to use the provider defaults. -T} -T{ +.PP Properties: -T} -T{ -- Config: token_url - Env Var: RCLONE_GPHOTOS_TOKEN_URL - Type: string - +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 Required: false -T} -T{ -#### --gphotos-read-size -T} -T{ +.SS --gphotos-read-size +.PP Set to read the size of media items. -T} -T{ +.PP Normally rclone does not read the size of media items since this takes another transaction. This isn\[aq]t necessary for syncing. However rclone mount needs to know the size of files in advance of reading them, so setting this flag when using rclone mount is recommended if you want to read the media. -T} -T{ +.PP Properties: -T} -T{ -- Config: read_size - Env Var: RCLONE_GPHOTOS_READ_SIZE - Type: bool - +.IP \[bu] 2 +Config: read_size +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_READ_SIZE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 Default: false -T} -T{ -#### --gphotos-start-year -T} -T{ +.SS --gphotos-start-year +.PP Year limits the photos to be downloaded to those which are uploaded after the given year. -T} -T{ +.PP Properties: -T} -T{ -- Config: start_year - Env Var: RCLONE_GPHOTOS_START_YEAR - Type: int - +.IP \[bu] 2 +Config: start_year +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_START_YEAR +.IP \[bu] 2 +Type: int +.IP \[bu] 2 Default: 2000 -T} -T{ -#### --gphotos-include-archived -T} -T{ +.SS --gphotos-include-archived +.PP Also view and download archived media. -T} -T{ +.PP By default, rclone does not request archived media. Thus, when syncing, archived media is not visible in directory listings or transferred. -T} -T{ +.PP Note that media in albums is always visible and synced, no matter their archive status. -T} -T{ +.PP With this flag, archived media are always visible in directory listings and transferred. -T} -T{ +.PP Without this flag, archived media will not be visible in directory listings and won\[aq]t be transferred. -T} -T{ +.PP Properties: -T} -T{ -- Config: include_archived - Env Var: RCLONE_GPHOTOS_INCLUDE_ARCHIVED - -Type: bool - Default: false -T} -T{ -#### --gphotos-encoding -T} -T{ +.IP \[bu] 2 +Config: include_archived +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_INCLUDE_ARCHIVED +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --gphotos-encoding +.PP The encoding for the backend. -T} -T{ +.PP See the encoding section in the overview (https://rclone.org/overview/#encoding) for more info. -T} -T{ +.PP Properties: -T} -T{ -- Config: encoding - Env Var: RCLONE_GPHOTOS_ENCODING - Type: Encoding - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 Default: Slash,CrLf,InvalidUtf8,Dot -T} -T{ -#### --gphotos-batch-mode -T} -T{ +.SS --gphotos-batch-mode +.PP Upload file batching sync|async|off. -T} -T{ +.PP This sets the batch mode used by rclone. -T} -T{ +.PP This has 3 possible values -T} -T{ -- off - no batching - sync - batch uploads and check completion -(default) - async - batch upload and don\[aq]t check completion -T} -T{ +.IP \[bu] 2 +off - no batching +.IP \[bu] 2 +sync - batch uploads and check completion (default) +.IP \[bu] 2 +async - batch upload and don\[aq]t check completion +.PP Rclone will close any outstanding batches when it exits which may make a delay on quit. -T} -T{ +.PP Properties: -T} -T{ -- Config: batch_mode - Env Var: RCLONE_GPHOTOS_BATCH_MODE - Type: string -- Default: \[dq]sync\[dq] -T} -T{ -#### --gphotos-batch-size -T} -T{ +.IP \[bu] 2 +Config: batch_mode +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_BATCH_MODE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]sync\[dq] +.SS --gphotos-batch-size +.PP Max number of files in upload batch. -T} -T{ +.PP This sets the batch size of files to upload. It has to be less than 50. -T} -T{ +.PP By default this is 0 which means rclone which calculate the batch size depending on the setting of batch_mode. -T} -T{ -- batch_mode: async - default batch_size is 50 - batch_mode: sync - -default batch_size is the same as --transfers - batch_mode: off - not in -use -T} -T{ +.IP \[bu] 2 +batch_mode: async - default batch_size is 50 +.IP \[bu] 2 +batch_mode: sync - default batch_size is the same as --transfers +.IP \[bu] 2 +batch_mode: off - not in use +.PP Rclone will close any outstanding batches when it exits which may make a delay on quit. -T} -T{ +.PP Setting this is a great idea if you are uploading lots of small files as it will make them a lot quicker. You can use --transfers 32 to maximise throughput. -T} -T{ +.PP Properties: -T} -T{ -- Config: batch_size - Env Var: RCLONE_GPHOTOS_BATCH_SIZE - Type: int - +.IP \[bu] 2 +Config: batch_size +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_BATCH_SIZE +.IP \[bu] 2 +Type: int +.IP \[bu] 2 Default: 0 -T} -T{ -#### --gphotos-batch-timeout -T} -T{ +.SS --gphotos-batch-timeout +.PP Max time to allow an idle upload batch before uploading. -T} -T{ +.PP If an upload batch is idle for more than this long then it will be uploaded. -T} -T{ +.PP The default for this is 0 which means rclone will choose a sensible default based on the batch_mode in use. -T} -T{ -- batch_mode: async - default batch_timeout is 10s - batch_mode: sync - -default batch_timeout is 1s - batch_mode: off - not in use -T} -T{ +.IP \[bu] 2 +batch_mode: async - default batch_timeout is 10s +.IP \[bu] 2 +batch_mode: sync - default batch_timeout is 1s +.IP \[bu] 2 +batch_mode: off - not in use +.PP Properties: -T} -T{ -- Config: batch_timeout - Env Var: RCLONE_GPHOTOS_BATCH_TIMEOUT - Type: -Duration - Default: 0s -T} -T{ -#### --gphotos-batch-commit-timeout -T} -T{ +.IP \[bu] 2 +Config: batch_timeout +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_BATCH_TIMEOUT +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 0s +.SS --gphotos-batch-commit-timeout +.PP Max time to wait for a batch to finish committing -T} -T{ +.PP Properties: -T} -T{ -- Config: batch_commit_timeout - Env Var: -RCLONE_GPHOTOS_BATCH_COMMIT_TIMEOUT - Type: Duration - Default: 10m0s -T} -T{ -#### --gphotos-description -T} -T{ -Description of the remote -T} -T{ +.IP \[bu] 2 +Config: batch_commit_timeout +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_BATCH_COMMIT_TIMEOUT +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 10m0s +.SS --gphotos-description +.PP +Description of the remote. +.PP Properties: -T} -T{ -- Config: description - Env Var: RCLONE_GPHOTOS_DESCRIPTION - Type: -string - Required: false -T} -T{ -## Limitations -T} -T{ +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_GPHOTOS_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP Only images and videos can be uploaded. If you attempt to upload non videos or images or formats that Google Photos doesn\[aq]t understand, rclone will upload the file, then Google Photos will give an error when it is put turned into a media item. -T} -T{ +.PP Note that all media items uploaded to Google Photos through the API are stored in full resolution at \[dq]original quality\[dq] and \f[B]will\f[R] count towards your storage quota in your Google Account. The API does \f[B]not\f[R] offer a way to upload in \[dq]high quality\[dq] mode.. -T} -T{ +.PP \f[C]rclone about\f[R] is not supported by the Google Photos backend. Backends without this capability cannot determine free space for an rclone mount or use policy \f[C]mfs\f[R] (most free space) as a member of an rclone union remote. -T} -T{ +.PP See List of backends that do not support rclone about (https://rclone.org/overview/#optional-features) See rclone about (https://rclone.org/commands/rclone_about/) -T} -T{ -### Downloading Images -T} -T{ +.SS Downloading Images +.PP When Images are downloaded this strips EXIF location (according to the docs and my tests). This is a limitation of the Google Photos API and is covered by bug #112096115 (https://issuetracker.google.com/issues/112096115). -T} -T{ +.PP \f[B]The current google API does not allow photos to be downloaded at original resolution. This is very important if you are, for example, relying on \[dq]Google Photos\[dq] as a backup of your photos. You will not be able to use rclone to redownload original images. You could use \[aq]google takeout\[aq] to recover the original photos as a last resort\f[R] -T} -T{ -### Downloading Videos -T} -T{ +.SS Downloading Videos +.PP When videos are downloaded they are downloaded in a really compressed version of the video compared to downloading it via the Google Photos web interface. This is covered by bug #113672044 (https://issuetracker.google.com/issues/113672044). -T} -T{ -### Duplicates -T} -T{ +.SS Duplicates +.PP If a file name is duplicated in a directory then rclone will add the file ID into its name. So two files called \f[C]file.jpg\f[R] would then appear as \f[C]file {123456}.jpg\f[R] and \f[C]file {ABCDEF}.jpg\f[R] (the actual IDs are a lot longer alas!). -T} -T{ +.PP If you upload the same image (with the same binary data) twice then Google Photos will deduplicate it. However it will retain the filename from the first upload which may @@ -45513,6070 +48812,8547 @@ the same image to \f[C]album/my_album\f[R] the filename of the image in \f[C]album/my_album\f[R] will be what it was uploaded with initially, not what you uploaded it with to \f[C]album\f[R]. In practise this shouldn\[aq]t cause too many problems. -T} -T{ -### Modification times -T} -T{ +.SS Modification times +.PP The date shown of media in Google Photos is the creation date as determined by the EXIF information, or the upload date if that is not known. -T} -T{ +.PP This is not changeable by rclone and is not the modification date of the media on local disk. This means that rclone cannot use the dates from Google Photos for syncing purposes. -T} -T{ -### Size -T} -T{ +.SS Size +.PP The Google Photos API does not return the size of media. This means that when syncing to Google Photos, rclone can only do a file existence check. -T} -T{ +.PP It is possible to read the size of the media, but this needs an extra HTTP HEAD request per media item so is \f[B]very slow\f[R] and uses up a lot of transactions. This can be enabled with the \f[C]--gphotos-read-size\f[R] option or the \f[C]read_size = true\f[R] config parameter. -T} -T{ +.PP If you want to use the backend with \f[C]rclone mount\f[R] you may need to enable this flag (depending on your OS and application using the photos) otherwise you may not be able to read media off the mount. You\[aq]ll need to experiment to see if it works for you without the flag. -T} -T{ -### Albums -T} -T{ +.SS Albums +.PP Rclone can only upload files to albums it created. This is a limitation of the Google Photos API (https://developers.google.com/photos/library/guides/manage-albums). -T} -T{ +.PP Rclone can remove files it uploaded from albums it created only. -T} -T{ -### Deleting files -T} -T{ +.SS Deleting files +.PP Rclone can remove files from albums it created, but note that the Google Photos API does not allow media to be deleted permanently so this media will still remain. See bug #109759781 (https://issuetracker.google.com/issues/109759781). -T} -T{ +.PP Rclone cannot delete files anywhere except under \f[C]album\f[R]. -T} -T{ -### Deleting albums -T} -T{ +.SS Deleting albums +.PP The Google Photos API does not support deleting albums - see bug #135714733 (https://issuetracker.google.com/issues/135714733). -T} -T{ -# Hasher -T} -T{ +.SH Hasher +.PP Hasher is a special overlay backend to create remotes which handle checksums for other remotes. It\[aq]s main functions include: - Emulate hash types unimplemented by backends - Cache checksums to help with slow hashing of large local or (S)FTP files - Warm up checksum cache from external SUM files -T} -T{ -## Getting started -T} -T{ +.SS Getting started +.PP To use Hasher, first set up the underlying remote following the configuration instructions for that remote. You can also use a local pathname instead of a remote. Check that your base remote is working. -T} -T{ +.PP Let\[aq]s call the base remote \f[C]myRemote:path\f[R] here. Note that anything inside \f[C]myRemote:path\f[R] will be handled by hasher and anything outside won\[aq]t. This means that if you are using a bucket based remote (S3, B2, Swift) then you should put the bucket in the remote \f[C]s3:bucket\f[R]. -T} -T{ +.PP Now proceed to interactive or manual configuration. -T} -T{ -### Interactive configuration -T} -T{ -Run \f[C]rclone config\f[R]: \[ga]\[ga]\[ga] No remotes found, make a -new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -name> Hasher1 Type of storage to configure. -Choose a number from below, or type in your own value [snip] XX / Handle -checksums for other remotes \ \[dq]hasher\[dq] [snip] Storage> hasher +.SS Interactive configuration +.PP +Run \f[C]rclone config\f[R]: +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n +name> Hasher1 +Type of storage to configure. +Choose a number from below, or type in your own value +[snip] +XX / Handle checksums for other remotes + \[rs] \[dq]hasher\[dq] +[snip] +Storage> hasher Remote to cache checksums for, like myremote:mypath. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -remote> myRemote:path Comma separated list of supported checksum types. -Enter a string value. -Press Enter for the default (\[dq]md5,sha1\[dq]). -hashsums> md5 Maximum time to keep checksums in cache. -0 = no cache, off = cache forever. -max_age> off Edit advanced config? -(y/n) y) Yes n) No y/n> n Remote config +Enter a string value. Press Enter for the default (\[dq]\[dq]). +remote> myRemote:path +Comma separated list of supported checksum types. +Enter a string value. Press Enter for the default (\[dq]md5,sha1\[dq]). +hashsums> md5 +Maximum time to keep checksums in cache. 0 = no cache, off = cache forever. +max_age> off +Edit advanced config? (y/n) +y) Yes +n) No +y/n> n +Remote config +-------------------- +[Hasher1] +type = hasher +remote = myRemote:path +hashsums = md5 +max_age = off +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.SS Manual configuration +.PP +Run \f[C]rclone config path\f[R] to see the path of current active +config file, usually \f[C]YOURHOME/.config/rclone/rclone.conf\f[R]. +Open it in your favorite text editor, find section for the base remote +and create new section for hasher like in the following examples: +.IP +.nf +\f[C] +[Hasher1] +type = hasher +remote = myRemote:path +hashes = md5 +max_age = off + +[Hasher2] +type = hasher +remote = /local/path +hashes = dropbox,sha1 +max_age = 24h +\f[R] +.fi +.PP +Hasher takes basically the following parameters: - \f[C]remote\f[R] is +required, - \f[C]hashes\f[R] is a comma separated list of supported +checksums (by default \f[C]md5,sha1\f[R]), - \f[C]max_age\f[R] - maximum +time to keep a checksum value in the cache, \f[C]0\f[R] will disable +caching completely, \f[C]off\f[R] will cache \[dq]forever\[dq] (that is +until the files get changed). +.PP +Make sure the \f[C]remote\f[R] has \f[C]:\f[R] (colon) in. +If you specify the remote without a colon then rclone will use a local +directory of that name. +So if you use a remote of \f[C]/local/path\f[R] then rclone will handle +hashes for that directory. +If you use \f[C]remote = name\f[R] literally then rclone will put files +\f[B]in a directory called \f[CB]name\f[B] located under current +directory\f[R]. +.SS Usage +.SS Basic operations +.PP +Now you can use it as \f[C]Hasher2:subdir/file\f[R] instead of base +remote. +Hasher will transparently update cache with new checksums when a file is +fully read or overwritten, like: +.IP +.nf +\f[C] +rclone copy External:path/file Hasher:dest/path + +rclone cat Hasher:path/to/file > /dev/null +\f[R] +.fi +.PP +The way to refresh \f[B]all\f[R] cached checksums (even unsupported by +the base backend) for a subtree is to \f[B]re-download\f[R] all files in +the subtree. +For example, use \f[C]hashsum --download\f[R] using \f[B]any\f[R] +supported hashsum on the command line (we just care to re-read): +.IP +.nf +\f[C] +rclone hashsum MD5 --download Hasher:path/to/subtree > /dev/null + +rclone backend dump Hasher:path/to/subtree +\f[R] +.fi +.PP +You can print or drop hashsum cache using custom backend commands: +.IP +.nf +\f[C] +rclone backend dump Hasher:dir/subdir + +rclone backend drop Hasher: +\f[R] +.fi +.SS Pre-Seed from a SUM File +.PP +Hasher supports two backend commands: generic SUM file \f[C]import\f[R] +and faster but less consistent \f[C]stickyimport\f[R]. +.IP +.nf +\f[C] +rclone backend import Hasher:dir/subdir SHA1 /path/to/SHA1SUM [--checkers 4] +\f[R] +.fi +.PP +Instead of SHA1 it can be any hash supported by the remote. +The last argument can point to either a local or an +\f[C]other-remote:path\f[R] text file in SUM format. +The command will parse the SUM file, then walk down the path given by +the first argument, snapshot current fingerprints and fill in the cache +entries correspondingly. +- Paths in the SUM file are treated as relative to +\f[C]hasher:dir/subdir\f[R]. +- The command will \f[B]not\f[R] check that supplied values are correct. +You \f[B]must know\f[R] what you are doing. +- This is a one-time action. +The SUM file will not get \[dq]attached\[dq] to the remote. +Cache entries can still be overwritten later, should the object\[aq]s +fingerprint change. +- The tree walk can take long depending on the tree size. +You can increase \f[C]--checkers\f[R] to make it faster. +Or use \f[C]stickyimport\f[R] if you don\[aq]t care about fingerprints +and consistency. +.IP +.nf +\f[C] +rclone backend stickyimport hasher:path/to/data sha1 remote:/path/to/sum.sha1 +\f[R] +.fi +.PP +\f[C]stickyimport\f[R] is similar to \f[C]import\f[R] but works much +faster because it does not need to stat existing files and skips initial +tree walk. +Instead of binding cache entries to file fingerprints it creates +\f[I]sticky\f[R] entries bound to the file name alone ignoring size, +modification time etc. +Such hash entries can be replaced only by \f[C]purge\f[R], +\f[C]delete\f[R], \f[C]backend drop\f[R] or by full re-read/re-write of +the files. +.SS Configuration reference +.SS Standard options +.PP +Here are the Standard options specific to hasher (Better checksums for +other remotes). +.SS --hasher-remote +.PP +Remote to cache checksums for (e.g. +myRemote:path). +.PP +Properties: +.IP \[bu] 2 +Config: remote +.IP \[bu] 2 +Env Var: RCLONE_HASHER_REMOTE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --hasher-hashes +.PP +Comma separated list of supported checksum types. +.PP +Properties: +.IP \[bu] 2 +Config: hashes +.IP \[bu] 2 +Env Var: RCLONE_HASHER_HASHES +.IP \[bu] 2 +Type: CommaSepList +.IP \[bu] 2 +Default: md5,sha1 +.SS --hasher-max-age +.PP +Maximum time to keep checksums in cache (0 = no cache, off = cache +forever). +.PP +Properties: +.IP \[bu] 2 +Config: max_age +.IP \[bu] 2 +Env Var: RCLONE_HASHER_MAX_AGE +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: off +.SS Advanced options +.PP +Here are the Advanced options specific to hasher (Better checksums for +other remotes). +.SS --hasher-auto-size +.PP +Auto-update checksum for files smaller than this size (disabled by +default). +.PP +Properties: +.IP \[bu] 2 +Config: auto_size +.IP \[bu] 2 +Env Var: RCLONE_HASHER_AUTO_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 0 +.SS --hasher-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_HASHER_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Metadata +.PP +Any metadata supported by the underlying remote is read and written. +.PP +See the metadata (https://rclone.org/docs/#metadata) docs for more info. +.SS Backend commands +.PP +Here are the commands specific to the hasher backend. +.PP +Run them with +.IP +.nf +\f[C] +rclone backend COMMAND remote: +\f[R] +.fi +.PP +The help below will explain what arguments each command takes. +.PP +See the backend (https://rclone.org/commands/rclone_backend/) command +for more info on how to pass options and arguments. +.PP +These can be run on a running backend using the rc command +backend/command (https://rclone.org/rc/#backend-command). +.SS drop +.PP +Drop cache +.IP +.nf +\f[C] +rclone backend drop remote: [options] [+] +\f[R] +.fi +.PP +Completely drop checksum cache. +Usage Example: rclone backend drop hasher: +.SS dump +.PP +Dump the database +.IP +.nf +\f[C] +rclone backend dump remote: [options] [+] +\f[R] +.fi +.PP +Dump cache records covered by the current remote +.SS fulldump +.PP +Full dump of the database +.IP +.nf +\f[C] +rclone backend fulldump remote: [options] [+] +\f[R] +.fi +.PP +Dump all cache records in the database +.SS import +.PP +Import a SUM file +.IP +.nf +\f[C] +rclone backend import remote: [options] [+] +\f[R] +.fi +.PP +Amend hash cache from a SUM file and bind checksums to files by +size/time. +Usage Example: rclone backend import hasher:subdir md5 /path/to/sum.md5 +.SS stickyimport +.PP +Perform fast import of a SUM file +.IP +.nf +\f[C] +rclone backend stickyimport remote: [options] [+] +\f[R] +.fi +.PP +Fill hash cache from a SUM file without verifying file fingerprints. +Usage Example: rclone backend stickyimport hasher:subdir md5 +remote:path/to/sum.md5 +.SS Implementation details (advanced) +.PP +This section explains how various rclone operations work on a hasher +remote. +.PP +\f[B]Disclaimer. This section describes current implementation which can +change in future rclone versions!.\f[R] +.SS Hashsum command +.PP +The \f[C]rclone hashsum\f[R] (or \f[C]md5sum\f[R] or \f[C]sha1sum\f[R]) +command will: +.IP "1." 3 +if requested hash is supported by lower level, just pass it. +.IP "2." 3 +if object size is below \f[C]auto_size\f[R] then download object and +calculate \f[I]requested\f[R] hashes on the fly. +.IP "3." 3 +if unsupported and the size is big enough, build object +\f[C]fingerprint\f[R] (including size, modtime if supported, first-found +\f[I]other\f[R] hash if any). +.IP "4." 3 +if the strict match is found in cache for the requested remote, return +the stored hash. +.IP "5." 3 +if remote found but fingerprint mismatched, then purge the entry and +proceed to step 6. +.IP "6." 3 +if remote not found or had no requested hash type or after step 5: +download object, calculate all \f[I]supported\f[R] hashes on the fly and +store in cache; return requested hash. +.SS Other operations +.IP \[bu] 2 +whenever a file is uploaded or downloaded \f[B]in full\f[R], capture the +stream to calculate all supported hashes on the fly and update database +.IP \[bu] 2 +server-side \f[C]move\f[R] will update keys of existing cache entries +.IP \[bu] 2 +\f[C]deletefile\f[R] will remove a single cache entry +.IP \[bu] 2 +\f[C]purge\f[R] will remove all cache entries under the purged path +.PP +Note that setting \f[C]max_age = 0\f[R] will disable checksum caching +completely. +.PP +If you set \f[C]max_age = off\f[R], checksums in cache will never age, +unless you fully rewrite or delete the file. +.SS Cache storage +.PP +Cached checksums are stored as \f[C]bolt\f[R] database files under +rclone cache directory, usually \f[C]\[ti]/.cache/rclone/kv/\f[R]. +Databases are maintained one per \f[I]base\f[R] backend, named like +\f[C]BaseRemote\[ti]hasher.bolt\f[R]. +Checksums for multiple \f[C]alias\f[R]-es into a single base backend +will be stored in the single database. +All local paths are treated as aliases into the \f[C]local\f[R] backend +(unless encrypted or chunked) and stored in +\f[C]\[ti]/.cache/rclone/kv/local\[ti]hasher.bolt\f[R]. +Databases can be shared between multiple rclone processes. +.SH HDFS +.PP +HDFS (https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html) +is a distributed file-system, part of the Apache +Hadoop (https://hadoop.apache.org/) framework. +.PP +Paths are specified as \f[C]remote:\f[R] or +\f[C]remote:path/to/dir\f[R]. +.SS Configuration +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +[skip] +XX / Hadoop distributed file system + \[rs] \[dq]hdfs\[dq] +[skip] +Storage> hdfs +** See help for hdfs backend at: https://rclone.org/hdfs/ ** + +hadoop name node and port +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value + 1 / Connect to host namenode at port 8020 + \[rs] \[dq]namenode:8020\[dq] +namenode> namenode.hadoop:8020 +hadoop user name +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value + 1 / Connect to hdfs as root + \[rs] \[dq]root\[dq] +username> root +Edit advanced config? (y/n) +y) Yes +n) No (default) +y/n> n +Remote config +-------------------- +[remote] +type = hdfs +namenode = namenode.hadoop:8020 +username = root +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +Current remotes: + +Name Type +==== ==== +hadoop hdfs + +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 +\f[R] +.fi +.PP +This remote is called \f[C]remote\f[R] and can now be used like this +.PP +See all the top level directories +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +List the contents of a directory +.IP +.nf +\f[C] +rclone ls remote:directory +\f[R] +.fi +.PP +Sync the remote \f[C]directory\f[R] to \f[C]/home/local/directory\f[R], +deleting any excess files. +.IP +.nf +\f[C] +rclone sync --interactive remote:directory /home/local/directory +\f[R] +.fi +.SS Setting up your own HDFS instance for testing +.PP +You may start with a manual +setup (https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html) +or use the docker image from the tests: +.PP +If you want to build the docker image +.IP +.nf +\f[C] +git clone https://github.com/rclone/rclone.git +cd rclone/fstest/testserver/images/test-hdfs +docker build --rm -t rclone/test-hdfs . +\f[R] +.fi +.PP +Or you can just use the latest one pushed +.IP +.nf +\f[C] +docker run --rm --name \[dq]rclone-hdfs\[dq] -p 127.0.0.1:9866:9866 -p 127.0.0.1:8020:8020 --hostname \[dq]rclone-hdfs\[dq] rclone/test-hdfs +\f[R] +.fi +.PP +\f[B]NB\f[R] it need few seconds to startup. +.PP +For this docker image the remote needs to be configured like this: +.IP +.nf +\f[C] +[remote] +type = hdfs +namenode = 127.0.0.1:8020 +username = root +\f[R] +.fi +.PP +You can stop this image with \f[C]docker kill rclone-hdfs\f[R] +(\f[B]NB\f[R] it does not use volumes, so all data uploaded will be +lost.) +.SS Modification times +.PP +Time accurate to 1 second is stored. +.SS Checksum +.PP +No checksums are implemented. +.SS Usage information +.PP +You can use the \f[C]rclone about remote:\f[R] command which will +display filesystem size and current usage. +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +: +T}@T{ +0x3A +T}@T{ +\[uFF1A] T} .TE .PP -[Hasher1] type = hasher remote = myRemote:path hashsums = md5 max_age = -off -------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y -.IP -.nf -\f[C] -### Manual configuration - -Run \[ga]rclone config path\[ga] to see the path of current active config file, -usually \[ga]YOURHOME/.config/rclone/rclone.conf\[ga]. -Open it in your favorite text editor, find section for the base remote -and create new section for hasher like in the following examples: -\f[R] -.fi +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8). +.SS Standard options .PP -[Hasher1] type = hasher remote = myRemote:path hashes = md5 max_age = -off +Here are the Standard options specific to hdfs (Hadoop distributed file +system). +.SS --hdfs-namenode .PP -[Hasher2] type = hasher remote = /local/path hashes = dropbox,sha1 -max_age = 24h -.IP -.nf -\f[C] -Hasher takes basically the following parameters: -- \[ga]remote\[ga] is required, -- \[ga]hashes\[ga] is a comma separated list of supported checksums - (by default \[ga]md5,sha1\[ga]), -- \[ga]max_age\[ga] - maximum time to keep a checksum value in the cache, - \[ga]0\[ga] will disable caching completely, - \[ga]off\[ga] will cache \[dq]forever\[dq] (that is until the files get changed). - -Make sure the \[ga]remote\[ga] has \[ga]:\[ga] (colon) in. If you specify the remote without -a colon then rclone will use a local directory of that name. So if you use -a remote of \[ga]/local/path\[ga] then rclone will handle hashes for that directory. -If you use \[ga]remote = name\[ga] literally then rclone will put files -**in a directory called \[ga]name\[ga] located under current directory**. - -## Usage - -### Basic operations - -Now you can use it as \[ga]Hasher2:subdir/file\[ga] instead of base remote. -Hasher will transparently update cache with new checksums when a file -is fully read or overwritten, like: -\f[R] -.fi -.PP -rclone copy External:path/file Hasher:dest/path -.PP -rclone cat Hasher:path/to/file > /dev/null -.IP -.nf -\f[C] -The way to refresh **all** cached checksums (even unsupported by the base backend) -for a subtree is to **re-download** all files in the subtree. For example, -use \[ga]hashsum --download\[ga] using **any** supported hashsum on the command line -(we just care to re-read): -\f[R] -.fi -.PP -rclone hashsum MD5 --download Hasher:path/to/subtree > /dev/null -.PP -rclone backend dump Hasher:path/to/subtree -.IP -.nf -\f[C] -You can print or drop hashsum cache using custom backend commands: -\f[R] -.fi -.PP -rclone backend dump Hasher:dir/subdir -.PP -rclone backend drop Hasher: -.IP -.nf -\f[C] -### Pre-Seed from a SUM File - -Hasher supports two backend commands: generic SUM file \[ga]import\[ga] and faster -but less consistent \[ga]stickyimport\[ga]. -\f[R] -.fi -.PP -rclone backend import Hasher:dir/subdir SHA1 /path/to/SHA1SUM -[--checkers 4] -.IP -.nf -\f[C] -Instead of SHA1 it can be any hash supported by the remote. The last argument -can point to either a local or an \[ga]other-remote:path\[ga] text file in SUM format. -The command will parse the SUM file, then walk down the path given by the -first argument, snapshot current fingerprints and fill in the cache entries -correspondingly. -- Paths in the SUM file are treated as relative to \[ga]hasher:dir/subdir\[ga]. -- The command will **not** check that supplied values are correct. - You **must know** what you are doing. -- This is a one-time action. The SUM file will not get \[dq]attached\[dq] to the - remote. Cache entries can still be overwritten later, should the object\[aq]s - fingerprint change. -- The tree walk can take long depending on the tree size. You can increase - \[ga]--checkers\[ga] to make it faster. Or use \[ga]stickyimport\[ga] if you don\[aq]t care - about fingerprints and consistency. -\f[R] -.fi -.PP -rclone backend stickyimport hasher:path/to/data sha1 -remote:/path/to/sum.sha1 -.IP -.nf -\f[C] -\[ga]stickyimport\[ga] is similar to \[ga]import\[ga] but works much faster because it -does not need to stat existing files and skips initial tree walk. -Instead of binding cache entries to file fingerprints it creates _sticky_ -entries bound to the file name alone ignoring size, modification time etc. -Such hash entries can be replaced only by \[ga]purge\[ga], \[ga]delete\[ga], \[ga]backend drop\[ga] -or by full re-read/re-write of the files. - -## Configuration reference - - -### Standard options - -Here are the Standard options specific to hasher (Better checksums for other remotes). - -#### --hasher-remote - -Remote to cache checksums for (e.g. myRemote:path). - -Properties: - -- Config: remote -- Env Var: RCLONE_HASHER_REMOTE -- Type: string -- Required: true - -#### --hasher-hashes - -Comma separated list of supported checksum types. - -Properties: - -- Config: hashes -- Env Var: RCLONE_HASHER_HASHES -- Type: CommaSepList -- Default: md5,sha1 - -#### --hasher-max-age - -Maximum time to keep checksums in cache (0 = no cache, off = cache forever). - -Properties: - -- Config: max_age -- Env Var: RCLONE_HASHER_MAX_AGE -- Type: Duration -- Default: off - -### Advanced options - -Here are the Advanced options specific to hasher (Better checksums for other remotes). - -#### --hasher-auto-size - -Auto-update checksum for files smaller than this size (disabled by default). - -Properties: - -- Config: auto_size -- Env Var: RCLONE_HASHER_AUTO_SIZE -- Type: SizeSuffix -- Default: 0 - -#### --hasher-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_HASHER_DESCRIPTION -- Type: string -- Required: false - -### Metadata - -Any metadata supported by the underlying remote is read and written. - -See the [metadata](https://rclone.org/docs/#metadata) docs for more info. - -## Backend commands - -Here are the commands specific to the hasher backend. - -Run them with - - rclone backend COMMAND remote: - -The help below will explain what arguments each command takes. - -See the [backend](https://rclone.org/commands/rclone_backend/) command for more -info on how to pass options and arguments. - -These can be run on a running backend using the rc command -[backend/command](https://rclone.org/rc/#backend-command). - -### drop - -Drop cache - - rclone backend drop remote: [options] [+] - -Completely drop checksum cache. -Usage Example: - rclone backend drop hasher: - - -### dump - -Dump the database - - rclone backend dump remote: [options] [+] - -Dump cache records covered by the current remote - -### fulldump - -Full dump of the database - - rclone backend fulldump remote: [options] [+] - -Dump all cache records in the database - -### import - -Import a SUM file - - rclone backend import remote: [options] [+] - -Amend hash cache from a SUM file and bind checksums to files by size/time. -Usage Example: - rclone backend import hasher:subdir md5 /path/to/sum.md5 - - -### stickyimport - -Perform fast import of a SUM file - - rclone backend stickyimport remote: [options] [+] - -Fill hash cache from a SUM file without verifying file fingerprints. -Usage Example: - rclone backend stickyimport hasher:subdir md5 remote:path/to/sum.md5 - - - - -## Implementation details (advanced) - -This section explains how various rclone operations work on a hasher remote. - -**Disclaimer. This section describes current implementation which can -change in future rclone versions!.** - -### Hashsum command - -The \[ga]rclone hashsum\[ga] (or \[ga]md5sum\[ga] or \[ga]sha1sum\[ga]) command will: - -1. if requested hash is supported by lower level, just pass it. -2. if object size is below \[ga]auto_size\[ga] then download object and calculate - _requested_ hashes on the fly. -3. if unsupported and the size is big enough, build object \[ga]fingerprint\[ga] - (including size, modtime if supported, first-found _other_ hash if any). -4. if the strict match is found in cache for the requested remote, return - the stored hash. -5. if remote found but fingerprint mismatched, then purge the entry and - proceed to step 6. -6. if remote not found or had no requested hash type or after step 5: - download object, calculate all _supported_ hashes on the fly and store - in cache; return requested hash. - -### Other operations - -- whenever a file is uploaded or downloaded **in full**, capture the stream - to calculate all supported hashes on the fly and update database -- server-side \[ga]move\[ga] will update keys of existing cache entries -- \[ga]deletefile\[ga] will remove a single cache entry -- \[ga]purge\[ga] will remove all cache entries under the purged path - -Note that setting \[ga]max_age = 0\[ga] will disable checksum caching completely. - -If you set \[ga]max_age = off\[ga], checksums in cache will never age, unless you -fully rewrite or delete the file. - -### Cache storage - -Cached checksums are stored as \[ga]bolt\[ga] database files under rclone cache -directory, usually \[ga]\[ti]/.cache/rclone/kv/\[ga]. Databases are maintained -one per _base_ backend, named like \[ga]BaseRemote\[ti]hasher.bolt\[ga]. -Checksums for multiple \[ga]alias\[ga]-es into a single base backend -will be stored in the single database. All local paths are treated as -aliases into the \[ga]local\[ga] backend (unless encrypted or chunked) and stored -in \[ga]\[ti]/.cache/rclone/kv/local\[ti]hasher.bolt\[ga]. -Databases can be shared between multiple rclone processes. - -# HDFS - -[HDFS](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html) is a -distributed file-system, part of the [Apache Hadoop](https://hadoop.apache.org/) framework. - -Paths are specified as \[ga]remote:\[ga] or \[ga]remote:path/to/dir\[ga]. - -## Configuration - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi -.PP -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. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value [skip] XX / Hadoop -distributed file system \ \[dq]hdfs\[dq] [skip] Storage> hdfs ** See -help for hdfs backend at: https://rclone.org/hdfs/ ** -.PP -hadoop name node and port Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value 1 / Connect to -host namenode at port 8020 \ \[dq]namenode:8020\[dq] namenode> -namenode.hadoop:8020 hadoop user name Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value 1 / Connect to -hdfs as root \ \[dq]root\[dq] username> root Edit advanced config? -(y/n) y) Yes n) No (default) y/n> n Remote config -------------------- -[remote] type = hdfs namenode = namenode.hadoop:8020 username = root --------------------- y) Yes this is OK (default) e) Edit this remote d) -Delete this remote y/e/d> y Current remotes: -.PP -Name Type ==== ==== hadoop hdfs -.IP "e)" 3 -Edit existing remote -.IP "f)" 3 -New remote -.IP "g)" 3 -Delete remote -.IP "h)" 3 -Rename remote -.IP "i)" 3 -Copy remote -.IP "j)" 3 -Set configuration password -.IP "k)" 3 -Quit config e/n/d/r/c/s/q> q -.IP -.nf -\f[C] -This remote is called \[ga]remote\[ga] and can now be used like this - -See all the top level directories - - rclone lsd remote: - -List the contents of a directory - - rclone ls remote:directory - -Sync the remote \[ga]directory\[ga] to \[ga]/home/local/directory\[ga], deleting any excess files. - - rclone sync --interactive remote:directory /home/local/directory - -### Setting up your own HDFS instance for testing - -You may start with a [manual setup](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html) -or use the docker image from the tests: - -If you want to build the docker image -\f[R] -.fi -.PP -git clone https://github.com/rclone/rclone.git cd -rclone/fstest/testserver/images/test-hdfs docker build --rm -t -rclone/test-hdfs . -.IP -.nf -\f[C] -Or you can just use the latest one pushed -\f[R] -.fi -.PP -docker run --rm --name \[dq]rclone-hdfs\[dq] -p 127.0.0.1:9866:9866 -p -127.0.0.1:8020:8020 --hostname \[dq]rclone-hdfs\[dq] rclone/test-hdfs -.IP -.nf -\f[C] -**NB** it need few seconds to startup. - -For this docker image the remote needs to be configured like this: -\f[R] -.fi -.PP -[remote] type = hdfs namenode = 127.0.0.1:8020 username = root -.IP -.nf -\f[C] -You can stop this image with \[ga]docker kill rclone-hdfs\[ga] (**NB** it does not use volumes, so all data -uploaded will be lost.) - -### Modification times - -Time accurate to 1 second is stored. - -### Checksum - -No checksums are implemented. - -### Usage information - -You can use the \[ga]rclone about remote:\[ga] command which will display filesystem size and current usage. - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| : | 0x3A | \[uFF1A] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8). - - -### Standard options - -Here are the Standard options specific to hdfs (Hadoop distributed file system). - -#### --hdfs-namenode - Hadoop name nodes and ports. - -E.g. \[dq]namenode-1:8020,namenode-2:8020,...\[dq] to connect to host namenodes at port 8020. - +.PP +E.g. +\[dq]namenode-1:8020,namenode-2:8020,...\[dq] to connect to host +namenodes at port 8020. +.PP Properties: - -- Config: namenode -- Env Var: RCLONE_HDFS_NAMENODE -- Type: CommaSepList -- Default: - -#### --hdfs-username - +.IP \[bu] 2 +Config: namenode +.IP \[bu] 2 +Env Var: RCLONE_HDFS_NAMENODE +.IP \[bu] 2 +Type: CommaSepList +.IP \[bu] 2 +Default: +.SS --hdfs-username +.PP Hadoop user name. - +.PP Properties: - -- Config: username -- Env Var: RCLONE_HDFS_USERNAME -- Type: string -- Required: false -- Examples: - - \[dq]root\[dq] - - Connect to hdfs as root. - -### Advanced options - -Here are the Advanced options specific to hdfs (Hadoop distributed file system). - -#### --hdfs-service-principal-name - +.IP \[bu] 2 +Config: username +.IP \[bu] 2 +Env Var: RCLONE_HDFS_USERNAME +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]root\[dq] +.RS 2 +.IP \[bu] 2 +Connect to hdfs as root. +.RE +.RE +.SS Advanced options +.PP +Here are the Advanced options specific to hdfs (Hadoop distributed file +system). +.SS --hdfs-service-principal-name +.PP Kerberos service principal name for the namenode. - -Enables KERBEROS authentication. Specifies the Service Principal Name -(SERVICE/FQDN) for the namenode. E.g. \[rs]\[dq]hdfs/namenode.hadoop.docker\[rs]\[dq] -for namenode running as service \[aq]hdfs\[aq] with FQDN \[aq]namenode.hadoop.docker\[aq]. - +.PP +Enables KERBEROS authentication. +Specifies the Service Principal Name (SERVICE/FQDN) for the namenode. +E.g. +\[dq]hdfs/namenode.hadoop.docker\[dq] for namenode running as service +\[aq]hdfs\[aq] with FQDN \[aq]namenode.hadoop.docker\[aq]. +.PP Properties: - -- Config: service_principal_name -- Env Var: RCLONE_HDFS_SERVICE_PRINCIPAL_NAME -- Type: string -- Required: false - -#### --hdfs-data-transfer-protection - +.IP \[bu] 2 +Config: service_principal_name +.IP \[bu] 2 +Env Var: RCLONE_HDFS_SERVICE_PRINCIPAL_NAME +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --hdfs-data-transfer-protection +.PP Kerberos data transfer protection: authentication|integrity|privacy. - +.PP Specifies whether or not authentication, data signature integrity -checks, and wire encryption are required when communicating with -the datanodes. Possible values are \[aq]authentication\[aq], \[aq]integrity\[aq] -and \[aq]privacy\[aq]. Used only with KERBEROS enabled. - +checks, and wire encryption are required when communicating with the +datanodes. +Possible values are \[aq]authentication\[aq], \[aq]integrity\[aq] and +\[aq]privacy\[aq]. +Used only with KERBEROS enabled. +.PP Properties: - -- Config: data_transfer_protection -- Env Var: RCLONE_HDFS_DATA_TRANSFER_PROTECTION -- Type: string -- Required: false -- Examples: - - \[dq]privacy\[dq] - - Ensure authentication, integrity and encryption enabled. - -#### --hdfs-encoding - +.IP \[bu] 2 +Config: data_transfer_protection +.IP \[bu] 2 +Env Var: RCLONE_HDFS_DATA_TRANSFER_PROTECTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]privacy\[dq] +.RS 2 +.IP \[bu] 2 +Ensure authentication, integrity and encryption enabled. +.RE +.RE +.SS --hdfs-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_HDFS_ENCODING -- Type: Encoding -- Default: Slash,Colon,Del,Ctl,InvalidUtf8,Dot - -#### --hdfs-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_HDFS_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,Colon,Del,Ctl,InvalidUtf8,Dot +.SS --hdfs-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_HDFS_DESCRIPTION -- Type: string -- Required: false - - - -## Limitations - -- No server-side \[ga]Move\[ga] or \[ga]DirMove\[ga]. -- Checksums not implemented. - -# HiDrive - -Paths are specified as \[ga]remote:path\[ga] - -Paths may be as deep as required, e.g. \[ga]remote:directory/subdirectory\[ga]. - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_HDFS_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.IP \[bu] 2 +No server-side \f[C]Move\f[R] or \f[C]DirMove\f[R]. +.IP \[bu] 2 +Checksums not implemented. +.SH HiDrive +.PP +Paths are specified as \f[C]remote:path\f[R] +.PP +Paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R]. +.PP The initial setup for hidrive involves getting a token from HiDrive which you need to do in your browser. -\[ga]rclone config\[ga] walks you through it. - -## Configuration - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi +\f[C]rclone config\f[R] walks you through it. +.SS Configuration .PP -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 [snip] XX / -HiDrive \ \[dq]hidrive\[dq] [snip] Storage> hidrive OAuth Client Id - -Leave blank normally. -client_id> OAuth Client Secret - Leave blank normally. -client_secret> Access permissions that rclone should use when requesting -access from HiDrive. -Leave blank normally. -scope_access> Edit advanced config? -y/n> n Use web browser to automatically authenticate rclone with remote? -* Say Y if the machine running rclone has a web browser you can use * -Say N if running rclone on a (remote) machine without web browser access -If not sure try Y. -If Y failed, try N. -y/n> y If your browser doesn\[aq]t open automatically go to the -following link: http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx -Log in and authorize rclone for access Waiting for code... -Got code -------------------- [remote] type = hidrive token = -{\[dq]access_token\[dq]:\[dq]xxxxxxxxxxxxxxxxxxxx\[dq],\[dq]token_type\[dq]:\[dq]Bearer\[dq],\[dq]refresh_token\[dq]:\[dq]xxxxxxxxxxxxxxxxxxxxxxx\[dq],\[dq]expiry\[dq]:\[dq]xxxxxxxxxxxxxxxxxxxxxxx\[dq]} --------------------- y) Yes this is OK (default) e) Edit this remote d) -Delete this remote y/e/d> y +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: .IP .nf \f[C] -**You should be aware that OAuth-tokens can be used to access your account -and hence should not be shared with other persons.** -See the [below section](#keeping-your-tokens-safe) for more information. - -See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a -machine with no Internet browser available. - -Note that rclone runs a webserver on your local machine to collect the -token as returned from HiDrive. This only runs from the moment it opens -your browser to the moment you get back the verification code. -The webserver runs on \[ga]http://127.0.0.1:53682/\[ga]. -If local port \[ga]53682\[ga] is protected by a firewall you may need to temporarily -unblock the firewall to complete authorization. - -Once configured you can then use \[ga]rclone\[ga] like this, - -List directories in top level of your HiDrive root folder - - rclone lsd remote: - -List all the files in your HiDrive filesystem - - rclone ls remote: - -To copy a local directory to a HiDrive directory called backup - - rclone copy /home/source remote:backup - -### Keeping your tokens safe - -Any OAuth-tokens will be stored by rclone in the remote\[aq]s configuration file as unencrypted text. -Anyone can use a valid refresh-token to access your HiDrive filesystem without knowing your password. -Therefore you should make sure no one else can access your configuration. - -It is possible to encrypt rclone\[aq]s configuration file. -You can find information on securing your configuration file by viewing the [configuration encryption docs](https://rclone.org/docs/#configuration-encryption). - -### Invalid refresh token - -As can be verified [here](https://developer.hidrive.com/basics-flows/), -each \[ga]refresh_token\[ga] (for Native Applications) is valid for 60 days. -If used to access HiDrivei, its validity will be automatically extended. - -This means that if you - - * Don\[aq]t use the HiDrive remote for 60 days - -then rclone will return an error which includes a text -that implies the refresh token is *invalid* or *expired*. - -To fix this you will need to authorize rclone to access your HiDrive account again. - -Using - - rclone config reconnect remote: - -the process is very similar to the process of initial setup exemplified before. - -### Modification times and hashes - -HiDrive allows modification times to be set on objects accurate to 1 second. - -HiDrive supports [its own hash type](https://static.hidrive.com/dev/0001) -which is used to verify the integrity of file contents after successful transfers. - -### Restricted filename characters - -HiDrive cannot store files or folders that include -\[ga]/\[ga] (0x2F) or null-bytes (0x00) in their name. -Any other characters can be used in the names of files or folders. -Additionally, files or folders cannot be named either of the following: \[ga].\[ga] or \[ga]..\[ga] - -Therefore rclone will automatically replace these characters, -if files or folders are stored or accessed with such names. - -You can read about how this filename encoding works in general -[here](overview/#restricted-filenames). - -Keep in mind that HiDrive only supports file or folder names -with a length of 255 characters or less. - -### Transfers - -HiDrive limits file sizes per single request to a maximum of 2 GiB. -To allow storage of larger files and allow for better upload performance, -the hidrive backend will use a chunked transfer for files larger than 96 MiB. -Rclone will upload multiple parts/chunks of the file at the same time. -Chunks in the process of being uploaded are buffered in memory, -so you may want to restrict this behaviour on systems with limited resources. - -You can customize this behaviour using the following options: - -* \[ga]chunk_size\[ga]: size of file parts -* \[ga]upload_cutoff\[ga]: files larger or equal to this in size will use a chunked transfer -* \[ga]upload_concurrency\[ga]: number of file-parts to upload at the same time - -See the below section about configuration options for more details. - -### Root folder - -You can set the root folder for rclone. -This is the directory that rclone considers to be the root of your HiDrive. - -Usually, you will leave this blank, and rclone will use the root of the account. - -However, you can set this to restrict rclone to a specific folder hierarchy. - -This works by prepending the contents of the \[ga]root_prefix\[ga] option -to any paths accessed by rclone. -For example, the following two ways to access the home directory are equivalent: - - rclone lsd --hidrive-root-prefix=\[dq]/users/test/\[dq] remote:path - - rclone lsd remote:/users/test/path - -See the below section about configuration options for more details. - -### Directory member count - -By default, rclone will know the number of directory members contained in a directory. -For example, \[ga]rclone lsd\[ga] uses this information. - -The acquisition of this information will result in additional time costs for HiDrive\[aq]s API. -When dealing with large directory structures, it may be desirable to circumvent this time cost, -especially when this information is not explicitly needed. -For this, the \[ga]disable_fetching_member_count\[ga] option can be used. - -See the below section about configuration options for more details. - - -### Standard options - -Here are the Standard options specific to hidrive (HiDrive). - -#### --hidrive-client-id - -OAuth Client Id. - -Leave blank normally. - -Properties: - -- Config: client_id -- Env Var: RCLONE_HIDRIVE_CLIENT_ID -- Type: string -- Required: false - -#### --hidrive-client-secret - -OAuth Client Secret. - -Leave blank normally. - -Properties: - -- Config: client_secret -- Env Var: RCLONE_HIDRIVE_CLIENT_SECRET -- Type: string -- Required: false - -#### --hidrive-scope-access - + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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 +[snip] +XX / HiDrive + \[rs] \[dq]hidrive\[dq] +[snip] +Storage> hidrive +OAuth Client Id - Leave blank normally. +client_id> +OAuth Client Secret - Leave blank normally. +client_secret> Access permissions that rclone should use when requesting access from HiDrive. +Leave blank normally. +scope_access> +Edit advanced config? +y/n> n +Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access +If not sure try Y. If Y failed, try N. +y/n> y +If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx +Log in and authorize rclone for access +Waiting for code... +Got code +-------------------- +[remote] +type = hidrive +token = {\[dq]access_token\[dq]:\[dq]xxxxxxxxxxxxxxxxxxxx\[dq],\[dq]token_type\[dq]:\[dq]Bearer\[dq],\[dq]refresh_token\[dq]:\[dq]xxxxxxxxxxxxxxxxxxxxxxx\[dq],\[dq]expiry\[dq]:\[dq]xxxxxxxxxxxxxxxxxxxxxxx\[dq]} +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +\f[B]You should be aware that OAuth-tokens can be used to access your +account and hence should not be shared with other persons.\f[R] See the +below section for more information. +.PP +See the remote setup docs (https://rclone.org/remote_setup/) for how to +set it up on a machine with no Internet browser available. +.PP +Note that rclone runs a webserver on your local machine to collect the +token as returned from HiDrive. +This only runs from the moment it opens your browser to the moment you +get back the verification code. +The webserver runs on \f[C]http://127.0.0.1:53682/\f[R]. +If local port \f[C]53682\f[R] is protected by a firewall you may need to +temporarily unblock the firewall to complete authorization. +.PP +Once configured you can then use \f[C]rclone\f[R] like this, +.PP +List directories in top level of your HiDrive root folder +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +List all the files in your HiDrive filesystem +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP +To copy a local directory to a HiDrive directory called backup +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.SS Keeping your tokens safe +.PP +Any OAuth-tokens will be stored by rclone in the remote\[aq]s +configuration file as unencrypted text. +Anyone can use a valid refresh-token to access your HiDrive filesystem +without knowing your password. +Therefore you should make sure no one else can access your +configuration. +.PP +It is possible to encrypt rclone\[aq]s configuration file. +You can find information on securing your configuration file by viewing +the configuration encryption +docs (https://rclone.org/docs/#configuration-encryption). +.SS Invalid refresh token +.PP +As can be verified here (https://developer.hidrive.com/basics-flows/), +each \f[C]refresh_token\f[R] (for Native Applications) is valid for 60 +days. +If used to access HiDrivei, its validity will be automatically extended. +.PP +This means that if you +.IP \[bu] 2 +Don\[aq]t use the HiDrive remote for 60 days +.PP +then rclone will return an error which includes a text that implies the +refresh token is \f[I]invalid\f[R] or \f[I]expired\f[R]. +.PP +To fix this you will need to authorize rclone to access your HiDrive +account again. +.PP +Using +.IP +.nf +\f[C] +rclone config reconnect remote: +\f[R] +.fi +.PP +the process is very similar to the process of initial setup exemplified +before. +.SS Modification times and hashes +.PP +HiDrive allows modification times to be set on objects accurate to 1 +second. +.PP +HiDrive supports its own hash type (https://static.hidrive.com/dev/0001) +which is used to verify the integrity of file contents after successful +transfers. +.SS Restricted filename characters +.PP +HiDrive cannot store files or folders that include \f[C]/\f[R] (0x2F) or +null-bytes (0x00) in their name. +Any other characters can be used in the names of files or folders. +Additionally, files or folders cannot be named either of the following: +\f[C].\f[R] or \f[C]..\f[R] +.PP +Therefore rclone will automatically replace these characters, if files +or folders are stored or accessed with such names. +.PP +You can read about how this filename encoding works in general here. +.PP +Keep in mind that HiDrive only supports file or folder names with a +length of 255 characters or less. +.SS Transfers +.PP +HiDrive limits file sizes per single request to a maximum of 2 GiB. +To allow storage of larger files and allow for better upload +performance, the hidrive backend will use a chunked transfer for files +larger than 96 MiB. +Rclone will upload multiple parts/chunks of the file at the same time. +Chunks in the process of being uploaded are buffered in memory, so you +may want to restrict this behaviour on systems with limited resources. +.PP +You can customize this behaviour using the following options: +.IP \[bu] 2 +\f[C]chunk_size\f[R]: size of file parts +.IP \[bu] 2 +\f[C]upload_cutoff\f[R]: files larger or equal to this in size will use +a chunked transfer +.IP \[bu] 2 +\f[C]upload_concurrency\f[R]: number of file-parts to upload at the same +time +.PP +See the below section about configuration options for more details. +.SS Root folder +.PP +You can set the root folder for rclone. +This is the directory that rclone considers to be the root of your +HiDrive. +.PP +Usually, you will leave this blank, and rclone will use the root of the +account. +.PP +However, you can set this to restrict rclone to a specific folder +hierarchy. +.PP +This works by prepending the contents of the \f[C]root_prefix\f[R] +option to any paths accessed by rclone. +For example, the following two ways to access the home directory are +equivalent: +.IP +.nf +\f[C] +rclone lsd --hidrive-root-prefix=\[dq]/users/test/\[dq] remote:path +rclone lsd remote:/users/test/path +\f[R] +.fi +.PP +See the below section about configuration options for more details. +.SS Directory member count +.PP +By default, rclone will know the number of directory members contained +in a directory. +For example, \f[C]rclone lsd\f[R] uses this information. +.PP +The acquisition of this information will result in additional time costs +for HiDrive\[aq]s API. +When dealing with large directory structures, it may be desirable to +circumvent this time cost, especially when this information is not +explicitly needed. +For this, the \f[C]disable_fetching_member_count\f[R] option can be +used. +.PP +See the below section about configuration options for more details. +.SS Standard options +.PP +Here are the Standard options specific to hidrive (HiDrive). +.SS --hidrive-client-id +.PP +OAuth Client Id. +.PP +Leave blank normally. +.PP Properties: - -- Config: scope_access -- Env Var: RCLONE_HIDRIVE_SCOPE_ACCESS -- Type: string -- Default: \[dq]rw\[dq] -- Examples: - - \[dq]rw\[dq] - - Read and write access to resources. - - \[dq]ro\[dq] - - Read-only access to resources. - -### Advanced options - +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --hidrive-client-secret +.PP +OAuth Client Secret. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --hidrive-scope-access +.PP +Access permissions that rclone should use when requesting access from +HiDrive. +.PP +Properties: +.IP \[bu] 2 +Config: scope_access +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_SCOPE_ACCESS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]rw\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]rw\[dq] +.RS 2 +.IP \[bu] 2 +Read and write access to resources. +.RE +.IP \[bu] 2 +\[dq]ro\[dq] +.RS 2 +.IP \[bu] 2 +Read-only access to resources. +.RE +.RE +.SS Advanced options +.PP Here are the Advanced options specific to hidrive (HiDrive). - -#### --hidrive-token - +.SS --hidrive-token +.PP OAuth Access Token as a JSON blob. - +.PP Properties: - -- Config: token -- Env Var: RCLONE_HIDRIVE_TOKEN -- Type: string -- Required: false - -#### --hidrive-auth-url - +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --hidrive-auth-url +.PP Auth server URL. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: auth_url -- Env Var: RCLONE_HIDRIVE_AUTH_URL -- Type: string -- Required: false - -#### --hidrive-token-url - +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --hidrive-token-url +.PP Token server url. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: token_url -- Env Var: RCLONE_HIDRIVE_TOKEN_URL -- Type: string -- Required: false - -#### --hidrive-scope-role - +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --hidrive-scope-role +.PP User-level that rclone should use when requesting access from HiDrive. - +.PP Properties: - -- Config: scope_role -- Env Var: RCLONE_HIDRIVE_SCOPE_ROLE -- Type: string -- Default: \[dq]user\[dq] -- Examples: - - \[dq]user\[dq] - - User-level access to management permissions. - - This will be sufficient in most cases. - - \[dq]admin\[dq] - - Extensive access to management permissions. - - \[dq]owner\[dq] - - Full access to management permissions. - -#### --hidrive-root-prefix - +.IP \[bu] 2 +Config: scope_role +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_SCOPE_ROLE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]user\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]user\[dq] +.RS 2 +.IP \[bu] 2 +User-level access to management permissions. +.IP \[bu] 2 +This will be sufficient in most cases. +.RE +.IP \[bu] 2 +\[dq]admin\[dq] +.RS 2 +.IP \[bu] 2 +Extensive access to management permissions. +.RE +.IP \[bu] 2 +\[dq]owner\[dq] +.RS 2 +.IP \[bu] 2 +Full access to management permissions. +.RE +.RE +.SS --hidrive-root-prefix +.PP The root/parent folder for all paths. - -Fill in to use the specified folder as the parent for all paths given to the remote. +.PP +Fill in to use the specified folder as the parent for all paths given to +the remote. This way rclone can use any folder as its starting point. - +.PP Properties: - -- Config: root_prefix -- Env Var: RCLONE_HIDRIVE_ROOT_PREFIX -- Type: string -- Default: \[dq]/\[dq] -- Examples: - - \[dq]/\[dq] - - The topmost directory accessible by rclone. - - This will be equivalent with \[dq]root\[dq] if rclone uses a regular HiDrive user account. - - \[dq]root\[dq] - - The topmost directory of the HiDrive user account - - \[dq]\[dq] - - This specifies that there is no root-prefix for your paths. - - When using this you will always need to specify paths to this remote with a valid parent e.g. \[dq]remote:/path/to/dir\[dq] or \[dq]remote:root/path/to/dir\[dq]. - -#### --hidrive-endpoint - +.IP \[bu] 2 +Config: root_prefix +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_ROOT_PREFIX +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]/\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]/\[dq] +.RS 2 +.IP \[bu] 2 +The topmost directory accessible by rclone. +.IP \[bu] 2 +This will be equivalent with \[dq]root\[dq] if rclone uses a regular +HiDrive user account. +.RE +.IP \[bu] 2 +\[dq]root\[dq] +.RS 2 +.IP \[bu] 2 +The topmost directory of the HiDrive user account +.RE +.IP \[bu] 2 +\[dq]\[dq] +.RS 2 +.IP \[bu] 2 +This specifies that there is no root-prefix for your paths. +.IP \[bu] 2 +When using this you will always need to specify paths to this remote +with a valid parent e.g. +\[dq]remote:/path/to/dir\[dq] or \[dq]remote:root/path/to/dir\[dq]. +.RE +.RE +.SS --hidrive-endpoint +.PP Endpoint for the service. - +.PP This is the URL that API-calls will be made to. - +.PP Properties: - -- Config: endpoint -- Env Var: RCLONE_HIDRIVE_ENDPOINT -- Type: string -- Default: \[dq]https://api.hidrive.strato.com/2.1\[dq] - -#### --hidrive-disable-fetching-member-count - -Do not fetch number of objects in directories unless it is absolutely necessary. - -Requests may be faster if the number of objects in subdirectories is not fetched. - +.IP \[bu] 2 +Config: endpoint +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_ENDPOINT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]https://api.hidrive.strato.com/2.1\[dq] +.SS --hidrive-disable-fetching-member-count +.PP +Do not fetch number of objects in directories unless it is absolutely +necessary. +.PP +Requests may be faster if the number of objects in subdirectories is not +fetched. +.PP Properties: - -- Config: disable_fetching_member_count -- Env Var: RCLONE_HIDRIVE_DISABLE_FETCHING_MEMBER_COUNT -- Type: bool -- Default: false - -#### --hidrive-chunk-size - +.IP \[bu] 2 +Config: disable_fetching_member_count +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_DISABLE_FETCHING_MEMBER_COUNT +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --hidrive-chunk-size +.PP Chunksize for chunked uploads. - -Any files larger than the configured cutoff (or files of unknown size) will be uploaded in chunks of this size. - +.PP +Any files larger than the configured cutoff (or files of unknown size) +will be uploaded in chunks of this size. +.PP The upper limit for this is 2147483647 bytes (about 2.000Gi). -That is the maximum amount of bytes a single upload-operation will support. -Setting this above the upper limit or to a negative value will cause uploads to fail. - -Setting this to larger values may increase the upload speed at the cost of using more memory. +That is the maximum amount of bytes a single upload-operation will +support. +Setting this above the upper limit or to a negative value will cause +uploads to fail. +.PP +Setting this to larger values may increase the upload speed at the cost +of using more memory. It can be set to smaller values smaller to save on memory. - +.PP Properties: - -- Config: chunk_size -- Env Var: RCLONE_HIDRIVE_CHUNK_SIZE -- Type: SizeSuffix -- Default: 48Mi - -#### --hidrive-upload-cutoff - +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 48Mi +.SS --hidrive-upload-cutoff +.PP Cutoff/Threshold for chunked uploads. - -Any files larger than this will be uploaded in chunks of the configured chunksize. - +.PP +Any files larger than this will be uploaded in chunks of the configured +chunksize. +.PP The upper limit for this is 2147483647 bytes (about 2.000Gi). -That is the maximum amount of bytes a single upload-operation will support. +That is the maximum amount of bytes a single upload-operation will +support. Setting this above the upper limit will cause uploads to fail. - +.PP Properties: - -- Config: upload_cutoff -- Env Var: RCLONE_HIDRIVE_UPLOAD_CUTOFF -- Type: SizeSuffix -- Default: 96Mi - -#### --hidrive-upload-concurrency - +.IP \[bu] 2 +Config: upload_cutoff +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_UPLOAD_CUTOFF +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 96Mi +.SS --hidrive-upload-concurrency +.PP Concurrency for chunked uploads. - -This is the upper limit for how many transfers for the same file are running concurrently. -Setting this above to a value smaller than 1 will cause uploads to deadlock. - +.PP +This is the upper limit for how many transfers for the same file are +running concurrently. +Setting this above to a value smaller than 1 will cause uploads to +deadlock. +.PP If you are uploading small numbers of large files over high-speed links and these uploads do not fully utilize your bandwidth, then increasing this may help to speed up the transfers. - +.PP Properties: - -- Config: upload_concurrency -- Env Var: RCLONE_HIDRIVE_UPLOAD_CONCURRENCY -- Type: int -- Default: 4 - -#### --hidrive-encoding - +.IP \[bu] 2 +Config: upload_concurrency +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_UPLOAD_CONCURRENCY +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 4 +.SS --hidrive-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_HIDRIVE_ENCODING -- Type: Encoding -- Default: Slash,Dot - -#### --hidrive-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,Dot +.SS --hidrive-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_HIDRIVE_DESCRIPTION -- Type: string -- Required: false - - - -## Limitations - -### Symbolic links - -HiDrive is able to store symbolic links (*symlinks*) by design, +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_HIDRIVE_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.SS Symbolic links +.PP +HiDrive is able to store symbolic links (\f[I]symlinks\f[R]) by design, for example, when unpacked from a zip archive. - +.PP There exists no direct mechanism to manage native symlinks in remotes. -As such this implementation has chosen to ignore any native symlinks present in the remote. -rclone will not be able to access or show any symlinks stored in the hidrive-remote. +As such this implementation has chosen to ignore any native symlinks +present in the remote. +rclone will not be able to access or show any symlinks stored in the +hidrive-remote. This means symlinks cannot be individually removed, copied, or moved, except when removing, copying, or moving the parent folder. - -*This does not affect the \[ga].rclonelink\[ga]-files -that rclone uses to encode and store symbolic links.* - -### Sparse files - +.PP +\f[I]This does not affect the \f[CI].rclonelink\f[I]-files that rclone +uses to encode and store symbolic links.\f[R] +.SS Sparse files +.PP It is possible to store sparse files in HiDrive. - -Note that copying a sparse file will expand the holes -into null-byte (0x00) regions that will then consume disk space. -Likewise, when downloading a sparse file, -the resulting file will have null-byte regions in the place of file holes. - -# HTTP - -The HTTP remote is a read only remote for reading files of a -webserver. The webserver should provide file listings which rclone -will read and turn into a remote. This has been tested with common -webservers such as Apache/Nginx/Caddy and will likely work with file -listings from most web servers. (If it doesn\[aq]t then please file an -issue, or send a pull request!) - -Paths are specified as \[ga]remote:\[ga] or \[ga]remote:path\[ga]. - -The \[ga]remote:\[ga] represents the configured [url](#http-url), and any path following -it will be resolved relative to this url, according to the URL standard. This -means with remote url \[ga]https://beta.rclone.org/branch\[ga] and path \[ga]fix\[ga], the -resolved URL will be \[ga]https://beta.rclone.org/branch/fix\[ga], while with path -\[ga]/fix\[ga] the resolved URL will be \[ga]https://beta.rclone.org/fix\[ga] as the absolute -path is resolved from the root of the domain. - -If the path following the \[ga]remote:\[ga] ends with \[ga]/\[ga] it will be assumed to point -to a directory. If the path does not end with \[ga]/\[ga], then a HEAD request is sent -and the response used to decide if it it is treated as a file or a directory -(run with \[ga]-vv\[ga] to see details). When [--http-no-head](#http-no-head) is -specified, a path without ending \[ga]/\[ga] is always assumed to be a file. If rclone -incorrectly assumes the path is a file, the solution is to specify the path with -ending \[ga]/\[ga]. When you know the path is a directory, ending it with \[ga]/\[ga] is always -better as it avoids the initial HEAD request. - +.PP +Note that copying a sparse file will expand the holes into null-byte +(0x00) regions that will then consume disk space. +Likewise, when downloading a sparse file, the resulting file will have +null-byte regions in the place of file holes. +.SH HTTP +.PP +The HTTP remote is a read only remote for reading files of a webserver. +The webserver should provide file listings which rclone will read and +turn into a remote. +This has been tested with common webservers such as Apache/Nginx/Caddy +and will likely work with file listings from most web servers. +(If it doesn\[aq]t then please file an issue, or send a pull request!) +.PP +Paths are specified as \f[C]remote:\f[R] or \f[C]remote:path\f[R]. +.PP +The \f[C]remote:\f[R] represents the configured url, and any path +following it will be resolved relative to this url, according to the URL +standard. +This means with remote url \f[C]https://beta.rclone.org/branch\f[R] and +path \f[C]fix\f[R], the resolved URL will be +\f[C]https://beta.rclone.org/branch/fix\f[R], while with path +\f[C]/fix\f[R] the resolved URL will be +\f[C]https://beta.rclone.org/fix\f[R] as the absolute path is resolved +from the root of the domain. +.PP +If the path following the \f[C]remote:\f[R] ends with \f[C]/\f[R] it +will be assumed to point to a directory. +If the path does not end with \f[C]/\f[R], then a HEAD request is sent +and the response used to decide if it it is treated as a file or a +directory (run with \f[C]-vv\f[R] to see details). +When --http-no-head is specified, a path without ending \f[C]/\f[R] is +always assumed to be a file. +If rclone incorrectly assumes the path is a file, the solution is to +specify the path with ending \f[C]/\f[R]. +When you know the path is a directory, ending it with \f[C]/\f[R] is +always better as it avoids the initial HEAD request. +.PP To just download a single file it is easier to use -[copyurl](https://rclone.org/commands/rclone_copyurl/). - -## Configuration - -Here is an example of how to make a remote called \[ga]remote\[ga]. First -run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi +copyurl (https://rclone.org/commands/rclone_copyurl/). +.SS Configuration .PP -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 [snip] XX / HTTP -\ \[dq]http\[dq] [snip] Storage> http URL of http host to connect to -Choose a number from below, or type in your own value 1 / Connect to -example.com \ \[dq]https://example.com\[dq] url> https://beta.rclone.org -Remote config -------------------- [remote] url = -https://beta.rclone.org -------------------- y) Yes this is OK e) Edit -this remote d) Delete this remote y/e/d> y Current remotes: -.PP -Name Type ==== ==== remote http -.IP "e)" 3 -Edit existing remote -.IP "f)" 3 -New remote -.IP "g)" 3 -Delete remote -.IP "h)" 3 -Rename remote -.IP "i)" 3 -Copy remote -.IP "j)" 3 -Set configuration password -.IP "k)" 3 -Quit config e/n/d/r/c/s/q> q +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: .IP .nf \f[C] -This remote is called \[ga]remote\[ga] and can now be used like this + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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 +[snip] +XX / HTTP + \[rs] \[dq]http\[dq] +[snip] +Storage> http +URL of http host to connect to +Choose a number from below, or type in your own value + 1 / Connect to example.com + \[rs] \[dq]https://example.com\[dq] +url> https://beta.rclone.org +Remote config +-------------------- +[remote] +url = https://beta.rclone.org +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +Current remotes: +Name Type +==== ==== +remote http + +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 +\f[R] +.fi +.PP +This remote is called \f[C]remote\f[R] and can now be used like this +.PP See all the top level directories - - rclone lsd remote: - +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP List the contents of a directory - - rclone ls remote:directory - -Sync the remote \[ga]directory\[ga] to \[ga]/home/local/directory\[ga], deleting any excess files. - - rclone sync --interactive remote:directory /home/local/directory - -### Read only - +.IP +.nf +\f[C] +rclone ls remote:directory +\f[R] +.fi +.PP +Sync the remote \f[C]directory\f[R] to \f[C]/home/local/directory\f[R], +deleting any excess files. +.IP +.nf +\f[C] +rclone sync --interactive remote:directory /home/local/directory +\f[R] +.fi +.SS Read only +.PP This remote is read only - you can\[aq]t upload files to an HTTP server. - -### Modification times - +.SS Modification times +.PP Most HTTP servers store time accurate to 1 second. - -### Checksum - +.SS Checksum +.PP No checksums are stored. - -### Usage without a config file - +.SS Usage without a config file +.PP Since the http remote only has one config parameter it is easy to use without a config file: - - rclone lsd --http-url https://beta.rclone.org :http: - +.IP +.nf +\f[C] +rclone lsd --http-url https://beta.rclone.org :http: +\f[R] +.fi +.PP or: - - rclone lsd :http,url=\[aq]https://beta.rclone.org\[aq]: - - -### Standard options - +.IP +.nf +\f[C] +rclone lsd :http,url=\[aq]https://beta.rclone.org\[aq]: +\f[R] +.fi +.SS Standard options +.PP Here are the Standard options specific to http (HTTP). - -#### --http-url - +.SS --http-url +.PP URL of HTTP host to connect to. - -E.g. \[dq]https://example.com\[dq], or \[dq]https://user:pass\[at]example.com\[dq] to use a username and password. - +.PP +E.g. +\[dq]https://example.com\[dq], or +\[dq]https://user:pass\[at]example.com\[dq] to use a username and +password. +.PP Properties: - -- Config: url -- Env Var: RCLONE_HTTP_URL -- Type: string -- Required: true - -### Advanced options - +.IP \[bu] 2 +Config: url +.IP \[bu] 2 +Env Var: RCLONE_HTTP_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --http-no-escape +.PP +Do not escape URL metacharacters in path names. +.PP +Properties: +.IP \[bu] 2 +Config: no_escape +.IP \[bu] 2 +Env Var: RCLONE_HTTP_NO_ESCAPE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS Advanced options +.PP Here are the Advanced options specific to http (HTTP). - -#### --http-headers - +.SS --http-headers +.PP Set HTTP headers for all transactions. - +.PP Use this to set additional HTTP headers for all transactions. - -The input format is comma separated list of key,value pairs. Standard -[CSV encoding](https://godoc.org/encoding/csv) may be used. - -For example, to set a Cookie use \[aq]Cookie,name=value\[aq], or \[aq]\[dq]Cookie\[dq],\[dq]name=value\[dq]\[aq]. - -You can set multiple headers, e.g. \[aq]\[dq]Cookie\[dq],\[dq]name=value\[dq],\[dq]Authorization\[dq],\[dq]xxx\[dq]\[aq]. - +.PP +The input format is comma separated list of key,value pairs. +Standard CSV encoding (https://godoc.org/encoding/csv) may be used. +.PP +For example, to set a Cookie use \[aq]Cookie,name=value\[aq], or +\[aq]\[dq]Cookie\[dq],\[dq]name=value\[dq]\[aq]. +.PP +You can set multiple headers, e.g. +\[aq]\[dq]Cookie\[dq],\[dq]name=value\[dq],\[dq]Authorization\[dq],\[dq]xxx\[dq]\[aq]. +.PP Properties: - -- Config: headers -- Env Var: RCLONE_HTTP_HEADERS -- Type: CommaSepList -- Default: - -#### --http-no-slash - +.IP \[bu] 2 +Config: headers +.IP \[bu] 2 +Env Var: RCLONE_HTTP_HEADERS +.IP \[bu] 2 +Type: CommaSepList +.IP \[bu] 2 +Default: +.SS --http-no-slash +.PP Set this if the site doesn\[aq]t end directories with /. - +.PP Use this if your target website does not use / on the end of directories. - +.PP A / on the end of a path is how rclone normally tells the difference -between files and directories. If this flag is set, then rclone will -treat all files with Content-Type: text/html as directories and read -URLs from them rather than downloading them. - +between files and directories. +If this flag is set, then rclone will treat all files with Content-Type: +text/html as directories and read URLs from them rather than downloading +them. +.PP Note that this may cause rclone to confuse genuine HTML files with directories. - +.PP Properties: - -- Config: no_slash -- Env Var: RCLONE_HTTP_NO_SLASH -- Type: bool -- Default: false - -#### --http-no-head - +.IP \[bu] 2 +Config: no_slash +.IP \[bu] 2 +Env Var: RCLONE_HTTP_NO_SLASH +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --http-no-head +.PP Don\[aq]t use HEAD requests. - +.PP HEAD requests are mainly used to find file sizes in dir listing. If your site is being very slow to load then you can try this option. Normally rclone does a HEAD request for each potential file in a directory listing to: - -- find its size -- check it really exists -- check to see if it is a directory - -If you set this option, rclone will not do the HEAD request. This will mean -that directory listings are much quicker, but rclone won\[aq]t have the times or -sizes of any files, and some files that don\[aq]t exist may be in the listing. - -Properties: - -- Config: no_head -- Env Var: RCLONE_HTTP_NO_HEAD -- Type: bool -- Default: false - -#### --http-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_HTTP_DESCRIPTION -- Type: string -- Required: false - -## Backend commands - -Here are the commands specific to the http backend. - -Run them with - - rclone backend COMMAND remote: - -The help below will explain what arguments each command takes. - -See the [backend](https://rclone.org/commands/rclone_backend/) command for more -info on how to pass options and arguments. - -These can be run on a running backend using the rc command -[backend/command](https://rclone.org/rc/#backend-command). - -### set - -Set command for updating the config parameters. - - rclone backend set remote: [options] [+] - -This set command can be used to update the config parameters -for a running http backend. - -Usage Examples: - - rclone backend set remote: [-o opt_name=opt_value] [-o opt_name2=opt_value2] - rclone rc backend/command command=set fs=remote: [-o opt_name=opt_value] [-o opt_name2=opt_value2] - rclone rc backend/command command=set fs=remote: -o url=https://example.com - -The option keys are named as they are in the config file. - -This rebuilds the connection to the http backend when it is called with -the new parameters. Only new parameters need be passed as the values -will default to those currently in use. - -It doesn\[aq]t return anything. - - - - -## Limitations - -\[ga]rclone about\[ga] is not supported by the HTTP backend. Backends without -this capability cannot determine free space for an rclone mount or -use policy \[ga]mfs\[ga] (most free space) as a member of an rclone union -remote. - -See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - -# ImageKit -This is a backend for the [ImageKit.io](https://imagekit.io/) storage service. - -#### About ImageKit -[ImageKit.io](https://imagekit.io/) provides real-time image and video optimizations, transformations, and CDN delivery. Over 1,000 businesses and 70,000 developers trust ImageKit with their images and videos on the web. - - -#### Accounts & Pricing - -To use this backend, you need to [create an account](https://imagekit.io/registration/) on ImageKit. Start with a free plan with generous usage limits. Then, as your requirements grow, upgrade to a plan that best fits your needs. See [the pricing details](https://imagekit.io/plans). - -## Configuration - -Here is an example of making an imagekit configuration. - -Firstly create a [ImageKit.io](https://imagekit.io/) account and choose a plan. - -You will need to log in and get the \[ga]publicKey\[ga] and \[ga]privateKey\[ga] for your account from the developer section. - -Now run -\f[R] -.fi +.IP \[bu] 2 +find its size +.IP \[bu] 2 +check it really exists +.IP \[bu] 2 +check to see if it is a directory .PP -rclone config +If you set this option, rclone will not do the HEAD request. +This will mean that directory listings are much quicker, but rclone +won\[aq]t have the times or sizes of any files, and some files that +don\[aq]t exist may be in the listing. +.PP +Properties: +.IP \[bu] 2 +Config: no_head +.IP \[bu] 2 +Env Var: RCLONE_HTTP_NO_HEAD +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --http-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_HTTP_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Backend commands +.PP +Here are the commands specific to the http backend. +.PP +Run them with .IP .nf \f[C] -This will guide you through an interactive setup process: +rclone backend COMMAND remote: \f[R] .fi .PP -No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n +The help below will explain what arguments each command takes. .PP +See the backend (https://rclone.org/commands/rclone_backend/) command +for more info on how to pass options and arguments. +.PP +These can be run on a running backend using the rc command +backend/command (https://rclone.org/rc/#backend-command). +.SS set +.PP +Set command for updating the config parameters. +.IP +.nf +\f[C] +rclone backend set remote: [options] [+] +\f[R] +.fi +.PP +This set command can be used to update the config parameters for a +running http backend. +.PP +Usage Examples: +.IP +.nf +\f[C] +rclone backend set remote: [-o opt_name=opt_value] [-o opt_name2=opt_value2] +rclone rc backend/command command=set fs=remote: [-o opt_name=opt_value] [-o opt_name2=opt_value2] +rclone rc backend/command command=set fs=remote: -o url=https://example.com +\f[R] +.fi +.PP +The option keys are named as they are in the config file. +.PP +This rebuilds the connection to the http backend when it is called with +the new parameters. +Only new parameters need be passed as the values will default to those +currently in use. +.PP +It doesn\[aq]t return anything. +.SS Limitations +.PP +\f[C]rclone about\f[R] is not supported by the HTTP backend. +Backends without this capability cannot determine free space for an +rclone mount or use policy \f[C]mfs\f[R] (most free space) as a member +of an rclone union remote. +.PP +See List of backends that do not support rclone +about (https://rclone.org/overview/#optional-features) and rclone +about (https://rclone.org/commands/rclone_about/) +.SH ImageKit +.PP +This is a backend for the ImageKit.io (https://imagekit.io/) storage +service. +.SS About ImageKit +.PP +ImageKit.io (https://imagekit.io/) provides real-time image and video +optimizations, transformations, and CDN delivery. +Over 1,000 businesses and 70,000 developers trust ImageKit with their +images and videos on the web. +.SS Accounts & Pricing +.PP +To use this backend, you need to create an +account (https://imagekit.io/registration/) on ImageKit. +Start with a free plan with generous usage limits. +Then, as your requirements grow, upgrade to a plan that best fits your +needs. +See the pricing details (https://imagekit.io/plans). +.SS Configuration +.PP +Here is an example of making an imagekit configuration. +.PP +Firstly create a ImageKit.io (https://imagekit.io/) account and choose a +plan. +.PP +You will need to log in and get the \f[C]publicKey\f[R] and +\f[C]privateKey\f[R] for your account from the developer section. +.PP +Now run +.IP +.nf +\f[C] +rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n + Enter the name for the new remote. name> imagekit-media-library -.PP + Option Storage. Type of storage to configure. Choose a number from below, or type in your own value. -[snip] XX / ImageKit.io \ (imagekit) [snip] Storage> imagekit -.PP +[snip] +XX / ImageKit.io +\[rs] (imagekit) +[snip] +Storage> imagekit + Option endpoint. -You can find your ImageKit.io URL endpoint in your -dashboard (https://imagekit.io/dashboard/developer/api-keys) Enter a -value. -endpoint> https://ik.imagekit.io/imagekit_id -.PP -Option public_key. -You can find your ImageKit.io public key in your -dashboard (https://imagekit.io/dashboard/developer/api-keys) Enter a -value. -public_key> public_**************************** -.PP -Option private_key. -You can find your ImageKit.io private key in your -dashboard (https://imagekit.io/dashboard/developer/api-keys) Enter a -value. -private_key> private_**************************** -.PP -Edit advanced config? -y) Yes n) No (default) y/n> n -.PP -Configuration complete. -Options: - type: imagekit - endpoint: https://ik.imagekit.io/imagekit_id -- public_key: public_**************************** - private_key: -private_**************************** -.PP -Keep this \[dq]imagekit-media-library\[dq] remote? -y) Yes this is OK (default) e) Edit this remote d) Delete this remote -y/e/d> y -.IP -.nf -\f[C] -List directories in the top level of your Media Library -\f[R] -.fi -.PP -rclone lsd imagekit-media-library: -.IP -.nf -\f[C] -Make a new directory. -\f[R] -.fi -.PP -rclone mkdir imagekit-media-library:directory -.IP -.nf -\f[C] -List the contents of a directory. -\f[R] -.fi -.PP -rclone ls imagekit-media-library:directory -.IP -.nf -\f[C] -### Modified time and hashes - -ImageKit does not support modification times or hashes yet. - -### Checksums - -No checksums are supported. - - -### Standard options - -Here are the Standard options specific to imagekit (ImageKit.io). - -#### --imagekit-endpoint - You can find your ImageKit.io URL endpoint in your [dashboard](https://imagekit.io/dashboard/developer/api-keys) +Enter a value. +endpoint> https://ik.imagekit.io/imagekit_id -Properties: - -- Config: endpoint -- Env Var: RCLONE_IMAGEKIT_ENDPOINT -- Type: string -- Required: true - -#### --imagekit-public-key - +Option public_key. You can find your ImageKit.io public key in your [dashboard](https://imagekit.io/dashboard/developer/api-keys) +Enter a value. +public_key> public_**************************** -Properties: - -- Config: public_key -- Env Var: RCLONE_IMAGEKIT_PUBLIC_KEY -- Type: string -- Required: true - -#### --imagekit-private-key - +Option private_key. You can find your ImageKit.io private key in your [dashboard](https://imagekit.io/dashboard/developer/api-keys) +Enter a value. +private_key> private_**************************** +Edit advanced config? +y) Yes +n) No (default) +y/n> n + +Configuration complete. +Options: +- type: imagekit +- endpoint: https://ik.imagekit.io/imagekit_id +- public_key: public_**************************** +- private_key: private_**************************** + +Keep this \[dq]imagekit-media-library\[dq] remote? +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +List directories in the top level of your Media Library +.IP +.nf +\f[C] +rclone lsd imagekit-media-library: +\f[R] +.fi +.PP +Make a new directory. +.IP +.nf +\f[C] +rclone mkdir imagekit-media-library:directory +\f[R] +.fi +.PP +List the contents of a directory. +.IP +.nf +\f[C] +rclone ls imagekit-media-library:directory +\f[R] +.fi +.SS Modified time and hashes +.PP +ImageKit does not support modification times or hashes yet. +.SS Checksums +.PP +No checksums are supported. +.SS Standard options +.PP +Here are the Standard options specific to imagekit (ImageKit.io). +.SS --imagekit-endpoint +.PP +You can find your ImageKit.io URL endpoint in your +dashboard (https://imagekit.io/dashboard/developer/api-keys) +.PP Properties: - -- Config: private_key -- Env Var: RCLONE_IMAGEKIT_PRIVATE_KEY -- Type: string -- Required: true - -### Advanced options - +.IP \[bu] 2 +Config: endpoint +.IP \[bu] 2 +Env Var: RCLONE_IMAGEKIT_ENDPOINT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --imagekit-public-key +.PP +You can find your ImageKit.io public key in your +dashboard (https://imagekit.io/dashboard/developer/api-keys) +.PP +Properties: +.IP \[bu] 2 +Config: public_key +.IP \[bu] 2 +Env Var: RCLONE_IMAGEKIT_PUBLIC_KEY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --imagekit-private-key +.PP +You can find your ImageKit.io private key in your +dashboard (https://imagekit.io/dashboard/developer/api-keys) +.PP +Properties: +.IP \[bu] 2 +Config: private_key +.IP \[bu] 2 +Env Var: RCLONE_IMAGEKIT_PRIVATE_KEY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS Advanced options +.PP Here are the Advanced options specific to imagekit (ImageKit.io). - -#### --imagekit-only-signed - -If you have configured \[ga]Restrict unsigned image URLs\[ga] in your dashboard settings, set this to true. - +.SS --imagekit-only-signed +.PP +If you have configured \f[C]Restrict unsigned image URLs\f[R] in your +dashboard settings, set this to true. +.PP Properties: - -- Config: only_signed -- Env Var: RCLONE_IMAGEKIT_ONLY_SIGNED -- Type: bool -- Default: false - -#### --imagekit-versions - +.IP \[bu] 2 +Config: only_signed +.IP \[bu] 2 +Env Var: RCLONE_IMAGEKIT_ONLY_SIGNED +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --imagekit-versions +.PP Include old versions in directory listings. - +.PP Properties: - -- Config: versions -- Env Var: RCLONE_IMAGEKIT_VERSIONS -- Type: bool -- Default: false - -#### --imagekit-upload-tags - -Tags to add to the uploaded files, e.g. \[dq]tag1,tag2\[dq]. - +.IP \[bu] 2 +Config: versions +.IP \[bu] 2 +Env Var: RCLONE_IMAGEKIT_VERSIONS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --imagekit-upload-tags +.PP +Tags to add to the uploaded files, e.g. +\[dq]tag1,tag2\[dq]. +.PP Properties: - -- Config: upload_tags -- Env Var: RCLONE_IMAGEKIT_UPLOAD_TAGS -- Type: string -- Required: false - -#### --imagekit-encoding - +.IP \[bu] 2 +Config: upload_tags +.IP \[bu] 2 +Env Var: RCLONE_IMAGEKIT_UPLOAD_TAGS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --imagekit-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_IMAGEKIT_ENCODING -- Type: Encoding -- Default: Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket - -#### --imagekit-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_IMAGEKIT_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: +Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket +.SS --imagekit-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_IMAGEKIT_DESCRIPTION -- Type: string -- Required: false - -### Metadata - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_IMAGEKIT_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Metadata +.PP Any metadata supported by the underlying remote is read and written. - +.PP Here are the possible system metadata items for the imagekit backend. - -| Name | Help | Type | Example | Read Only | -|------|------|------|---------|-----------| -| aws-tags | AI generated tags by AWS Rekognition associated with the image | string | tag1,tag2 | **Y** | -| btime | Time of file birth (creation) read from Last-Modified header | RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | **Y** | -| custom-coordinates | Custom coordinates of the file | string | 0,0,100,100 | **Y** | -| file-type | Type of the file | string | image | **Y** | -| google-tags | AI generated tags by Google Cloud Vision associated with the image | string | tag1,tag2 | **Y** | -| has-alpha | Whether the image has alpha channel or not | bool | | **Y** | -| height | Height of the image or video in pixels | int | | **Y** | -| is-private-file | Whether the file is private or not | bool | | **Y** | -| size | Size of the object in bytes | int64 | | **Y** | -| tags | Tags associated with the file | string | tag1,tag2 | **Y** | -| width | Width of the image or video in pixels | int | | **Y** | - -See the [metadata](https://rclone.org/docs/#metadata) docs for more info. - - - -# Internet Archive - -The Internet Archive backend utilizes Items on [archive.org](https://archive.org/) - -Refer to [IAS3 API documentation](https://archive.org/services/docs/api/ias3.html) for the API this backend uses. - -Paths are specified as \[ga]remote:bucket\[ga] (or \[ga]remote:\[ga] for the \[ga]lsd\[ga] -command.) You may put subdirectories in too, e.g. \[ga]remote:item/path/to/dir\[ga]. - +.PP +.TS +tab(@); +lw(11.1n) lw(11.1n) lw(11.1n) lw(16.6n) lw(20.3n). +T{ +Name +T}@T{ +Help +T}@T{ +Type +T}@T{ +Example +T}@T{ +Read Only +T} +_ +T{ +aws-tags +T}@T{ +AI generated tags by AWS Rekognition associated with the image +T}@T{ +string +T}@T{ +tag1,tag2 +T}@T{ +\f[B]Y\f[R] +T} +T{ +btime +T}@T{ +Time of file birth (creation) read from Last-Modified header +T}@T{ +RFC 3339 +T}@T{ +2006-01-02T15:04:05.999999999Z07:00 +T}@T{ +\f[B]Y\f[R] +T} +T{ +custom-coordinates +T}@T{ +Custom coordinates of the file +T}@T{ +string +T}@T{ +0,0,100,100 +T}@T{ +\f[B]Y\f[R] +T} +T{ +file-type +T}@T{ +Type of the file +T}@T{ +string +T}@T{ +image +T}@T{ +\f[B]Y\f[R] +T} +T{ +google-tags +T}@T{ +AI generated tags by Google Cloud Vision associated with the image +T}@T{ +string +T}@T{ +tag1,tag2 +T}@T{ +\f[B]Y\f[R] +T} +T{ +has-alpha +T}@T{ +Whether the image has alpha channel or not +T}@T{ +bool +T}@T{ +T}@T{ +\f[B]Y\f[R] +T} +T{ +height +T}@T{ +Height of the image or video in pixels +T}@T{ +int +T}@T{ +T}@T{ +\f[B]Y\f[R] +T} +T{ +is-private-file +T}@T{ +Whether the file is private or not +T}@T{ +bool +T}@T{ +T}@T{ +\f[B]Y\f[R] +T} +T{ +size +T}@T{ +Size of the object in bytes +T}@T{ +int64 +T}@T{ +T}@T{ +\f[B]Y\f[R] +T} +T{ +tags +T}@T{ +Tags associated with the file +T}@T{ +string +T}@T{ +tag1,tag2 +T}@T{ +\f[B]Y\f[R] +T} +T{ +width +T}@T{ +Width of the image or video in pixels +T}@T{ +int +T}@T{ +T}@T{ +\f[B]Y\f[R] +T} +.TE +.PP +See the metadata (https://rclone.org/docs/#metadata) docs for more info. +.SH Internet Archive +.PP +The Internet Archive backend utilizes Items on +archive.org (https://archive.org/) +.PP +Refer to IAS3 API +documentation (https://archive.org/services/docs/api/ias3.html) for the +API this backend uses. +.PP +Paths are specified as \f[C]remote:bucket\f[R] (or \f[C]remote:\f[R] for +the \f[C]lsd\f[R] command.) You may put subdirectories in too, e.g. +\f[C]remote:item/path/to/dir\f[R]. +.PP Unlike S3, listing up all items uploaded by you isn\[aq]t supported. - +.PP Once you have made a remote, you can use it like this: - +.PP Make a new item - - rclone mkdir remote:item - +.IP +.nf +\f[C] +rclone mkdir remote:item +\f[R] +.fi +.PP List the contents of a item - - rclone ls remote:item - -Sync \[ga]/home/local/directory\[ga] to the remote item, deleting any excess -files in the item. - - rclone sync --interactive /home/local/directory remote:item - -## Notes -Because of Internet Archive\[aq]s architecture, it enqueues write operations (and extra post-processings) in a per-item queue. You can check item\[aq]s queue at https://catalogd.archive.org/history/item-name-here . Because of that, all uploads/deletes will not show up immediately and takes some time to be available. -The per-item queue is enqueued to an another queue, Item Deriver Queue. [You can check the status of Item Deriver Queue here.](https://catalogd.archive.org/catalog.php?whereami=1) This queue has a limit, and it may block you from uploading, or even deleting. You should avoid uploading a lot of small files for better behavior. - -You can optionally wait for the server\[aq]s processing to finish, by setting non-zero value to \[ga]wait_archive\[ga] key. +.IP +.nf +\f[C] +rclone ls remote:item +\f[R] +.fi +.PP +Sync \f[C]/home/local/directory\f[R] to the remote item, deleting any +excess files in the item. +.IP +.nf +\f[C] +rclone sync --interactive /home/local/directory remote:item +\f[R] +.fi +.SS Notes +.PP +Because of Internet Archive\[aq]s architecture, it enqueues write +operations (and extra post-processings) in a per-item queue. +You can check item\[aq]s queue at +https://catalogd.archive.org/history/item-name-here . +Because of that, all uploads/deletes will not show up immediately and +takes some time to be available. +The per-item queue is enqueued to an another queue, Item Deriver Queue. +You can check the status of Item Deriver Queue +here. (https://catalogd.archive.org/catalog.php?whereami=1) This queue +has a limit, and it may block you from uploading, or even deleting. +You should avoid uploading a lot of small files for better behavior. +.PP +You can optionally wait for the server\[aq]s processing to finish, by +setting non-zero value to \f[C]wait_archive\f[R] key. By making it wait, rclone can do normal file comparison. -Make sure to set a large enough value (e.g. \[ga]30m0s\[ga] for smaller files) as it can take a long time depending on server\[aq]s queue. - -## About metadata -This backend supports setting, updating and reading metadata of each file. +Make sure to set a large enough value (e.g. +\f[C]30m0s\f[R] for smaller files) as it can take a long time depending +on server\[aq]s queue. +.SS About metadata +.PP +This backend supports setting, updating and reading metadata of each +file. The metadata will appear as file metadata on Internet Archive. However, some fields are reserved by both Internet Archive and rclone. - -The following are reserved by Internet Archive: -- \[ga]name\[ga] -- \[ga]source\[ga] -- \[ga]size\[ga] -- \[ga]md5\[ga] -- \[ga]crc32\[ga] -- \[ga]sha1\[ga] -- \[ga]format\[ga] -- \[ga]old_version\[ga] -- \[ga]viruscheck\[ga] -- \[ga]summation\[ga] - +.PP +The following are reserved by Internet Archive: - \f[C]name\f[R] - +\f[C]source\f[R] - \f[C]size\f[R] - \f[C]md5\f[R] - \f[C]crc32\f[R] - +\f[C]sha1\f[R] - \f[C]format\f[R] - \f[C]old_version\f[R] - +\f[C]viruscheck\f[R] - \f[C]summation\f[R] +.PP Trying to set values to these keys is ignored with a warning. -Only setting \[ga]mtime\[ga] is an exception. Doing so make it the identical behavior as setting ModTime. - -rclone reserves all the keys starting with \[ga]rclone-\[ga]. Setting value for these keys will give you warnings, but values are set according to request. - +Only setting \f[C]mtime\f[R] is an exception. +Doing so make it the identical behavior as setting ModTime. +.PP +rclone reserves all the keys starting with \f[C]rclone-\f[R]. +Setting value for these keys will give you warnings, but values are set +according to request. +.PP If there are multiple values for a key, only the first one is returned. This is a limitation of rclone, that supports one value per one key. It can be triggered when you did a server-side copy. - -Reading metadata will also provide custom (non-standard nor reserved) ones. - -## Filtering auto generated files - -The Internet Archive automatically creates metadata files after -upload. These can cause problems when doing an \[ga]rclone sync\[ga] as rclone -will try, and fail, to delete them. These metadata files are not -changeable, as they are created by the Internet Archive automatically. - -These auto-created files can be excluded from the sync using [metadata -filtering](https://rclone.org/filtering/#metadata). - - rclone sync ... --metadata-exclude \[dq]source=metadata\[dq] --metadata-exclude \[dq]format=Metadata\[dq] - -Which excludes from the sync any files which have the -\[ga]source=metadata\[ga] or \[ga]format=Metadata\[ga] flags which are added to -Internet Archive auto-created files. - -## Configuration - -Here is an example of making an internetarchive configuration. -Most applies to the other providers as well, any differences are described [below](#providers). - -First run - - rclone config - -This will guide you through an interactive setup process. +.PP +Reading metadata will also provide custom (non-standard nor reserved) +ones. +.SS Filtering auto generated files +.PP +The Internet Archive automatically creates metadata files after upload. +These can cause problems when doing an \f[C]rclone sync\f[R] as rclone +will try, and fail, to delete them. +These metadata files are not changeable, as they are created by the +Internet Archive automatically. +.PP +These auto-created files can be excluded from the sync using metadata +filtering (https://rclone.org/filtering/#metadata). +.IP +.nf +\f[C] +rclone sync ... --metadata-exclude \[dq]source=metadata\[dq] --metadata-exclude \[dq]format=Metadata\[dq] \f[R] .fi .PP +Which excludes from the sync any files which have the +\f[C]source=metadata\f[R] or \f[C]format=Metadata\f[R] flags which are +added to Internet Archive auto-created files. +.SS Configuration +.PP +Here is an example of making an internetarchive configuration. +Most applies to the other providers as well, any differences are +described below. +.PP +First run +.IP +.nf +\f[C] +rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process. +.IP +.nf +\f[C] No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -name> remote Option Storage. +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n +name> remote +Option Storage. Type of storage to configure. Choose a number from below, or type in your own value. -XX / InternetArchive Items \ (internetarchive) Storage> internetarchive +XX / InternetArchive Items + \[rs] (internetarchive) +Storage> internetarchive Option access_key_id. IAS3 Access Key. Leave blank for anonymous access. -You can find one here: https://archive.org/account/s3.php Enter a value. -Press Enter to leave empty. -access_key_id> XXXX Option secret_access_key. +You can find one here: https://archive.org/account/s3.php +Enter a value. Press Enter to leave empty. +access_key_id> XXXX +Option secret_access_key. IAS3 Secret Key (password). Leave blank for anonymous access. -Enter a value. -Press Enter to leave empty. -secret_access_key> XXXX Edit advanced config? -y) Yes n) No (default) y/n> y Option endpoint. +Enter a value. Press Enter to leave empty. +secret_access_key> XXXX +Edit advanced config? +y) Yes +n) No (default) +y/n> y +Option endpoint. IAS3 Endpoint. Leave blank for default value. -Enter a string value. -Press Enter for the default (https://s3.us.archive.org). -endpoint> Option front_endpoint. +Enter a string value. Press Enter for the default (https://s3.us.archive.org). +endpoint> +Option front_endpoint. Host of InternetArchive Frontend. Leave blank for default value. -Enter a string value. -Press Enter for the default (https://archive.org). -front_endpoint> Option disable_checksum. +Enter a string value. Press Enter for the default (https://archive.org). +front_endpoint> +Option disable_checksum. Don\[aq]t store MD5 checksum with object metadata. Normally rclone will calculate the MD5 checksum of the input before +uploading it so it can ask the server to check the object against checksum. +This is great for data integrity checking but can cause long delays for +large files to start uploading. +Enter a boolean value (true or false). Press Enter for the default (true). +disable_checksum> true +Option encoding. +The encoding for the backend. +See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. +Enter a encoder.MultiEncoder value. Press Enter for the default (Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot). +encoding> +Edit advanced config? +y) Yes +n) No (default) +y/n> n +-------------------- +[remote] +type = internetarchive +access_key_id = XXXX +secret_access_key = XXXX +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.SS Standard options +.PP +Here are the Standard options specific to internetarchive (Internet +Archive). +.SS --internetarchive-access-key-id +.PP +IAS3 Access Key. +.PP +Leave blank for anonymous access. +You can find one here: https://archive.org/account/s3.php +.PP +Properties: +.IP \[bu] 2 +Config: access_key_id +.IP \[bu] 2 +Env Var: RCLONE_INTERNETARCHIVE_ACCESS_KEY_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --internetarchive-secret-access-key +.PP +IAS3 Secret Key (password). +.PP +Leave blank for anonymous access. +.PP +Properties: +.IP \[bu] 2 +Config: secret_access_key +.IP \[bu] 2 +Env Var: RCLONE_INTERNETARCHIVE_SECRET_ACCESS_KEY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Advanced options +.PP +Here are the Advanced options specific to internetarchive (Internet +Archive). +.SS --internetarchive-endpoint +.PP +IAS3 Endpoint. +.PP +Leave blank for default value. +.PP +Properties: +.IP \[bu] 2 +Config: endpoint +.IP \[bu] 2 +Env Var: RCLONE_INTERNETARCHIVE_ENDPOINT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]https://s3.us.archive.org\[dq] +.SS --internetarchive-front-endpoint +.PP +Host of InternetArchive Frontend. +.PP +Leave blank for default value. +.PP +Properties: +.IP \[bu] 2 +Config: front_endpoint +.IP \[bu] 2 +Env Var: RCLONE_INTERNETARCHIVE_FRONT_ENDPOINT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]https://archive.org\[dq] +.SS --internetarchive-disable-checksum +.PP +Don\[aq]t ask the server to test against MD5 checksum calculated by +rclone. +Normally rclone will calculate the MD5 checksum of the input before uploading it so it can ask the server to check the object against checksum. This is great for data integrity checking but can cause long delays for large files to start uploading. -Enter a boolean value (true or false). -Press Enter for the default (true). -disable_checksum> true Option encoding. +.PP +Properties: +.IP \[bu] 2 +Config: disable_checksum +.IP \[bu] 2 +Env Var: RCLONE_INTERNETARCHIVE_DISABLE_CHECKSUM +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: true +.SS --internetarchive-wait-archive +.PP +Timeout for waiting the server\[aq]s processing tasks (specifically +archive and book_op) to finish. +Only enable if you need to be guaranteed to be reflected after write +operations. +0 to disable waiting. +No errors to be thrown in case of timeout. +.PP +Properties: +.IP \[bu] 2 +Config: wait_archive +.IP \[bu] 2 +Env Var: RCLONE_INTERNETARCHIVE_WAIT_ARCHIVE +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 0s +.SS --internetarchive-encoding +.PP The encoding for the backend. +.PP See the encoding section in the overview (https://rclone.org/overview/#encoding) for more info. -Enter a encoder.MultiEncoder value. -Press Enter for the default -(Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot). -encoding> Edit advanced config? -y) Yes n) No (default) y/n> n -------------------- [remote] type = -internetarchive access_key_id = XXXX secret_access_key = XXXX --------------------- y) Yes this is OK (default) e) Edit this remote d) -Delete this remote y/e/d> y -.IP -.nf -\f[C] - -### Standard options - -Here are the Standard options specific to internetarchive (Internet Archive). - -#### --internetarchive-access-key-id - -IAS3 Access Key. - -Leave blank for anonymous access. -You can find one here: https://archive.org/account/s3.php - +.PP Properties: - -- Config: access_key_id -- Env Var: RCLONE_INTERNETARCHIVE_ACCESS_KEY_ID -- Type: string -- Required: false - -#### --internetarchive-secret-access-key - -IAS3 Secret Key (password). - -Leave blank for anonymous access. - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_INTERNETARCHIVE_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot +.SS --internetarchive-description +.PP +Description of the remote. +.PP Properties: - -- Config: secret_access_key -- Env Var: RCLONE_INTERNETARCHIVE_SECRET_ACCESS_KEY -- Type: string -- Required: false - -### Advanced options - -Here are the Advanced options specific to internetarchive (Internet Archive). - -#### --internetarchive-endpoint - -IAS3 Endpoint. - -Leave blank for default value. - -Properties: - -- Config: endpoint -- Env Var: RCLONE_INTERNETARCHIVE_ENDPOINT -- Type: string -- Default: \[dq]https://s3.us.archive.org\[dq] - -#### --internetarchive-front-endpoint - -Host of InternetArchive Frontend. - -Leave blank for default value. - -Properties: - -- Config: front_endpoint -- Env Var: RCLONE_INTERNETARCHIVE_FRONT_ENDPOINT -- Type: string -- Default: \[dq]https://archive.org\[dq] - -#### --internetarchive-disable-checksum - -Don\[aq]t ask the server to test against MD5 checksum calculated by rclone. -Normally rclone will calculate the MD5 checksum of the input before -uploading it so it can ask the server to check the object against checksum. -This is great for data integrity checking but can cause long delays for -large files to start uploading. - -Properties: - -- Config: disable_checksum -- Env Var: RCLONE_INTERNETARCHIVE_DISABLE_CHECKSUM -- Type: bool -- Default: true - -#### --internetarchive-wait-archive - -Timeout for waiting the server\[aq]s processing tasks (specifically archive and book_op) to finish. -Only enable if you need to be guaranteed to be reflected after write operations. -0 to disable waiting. No errors to be thrown in case of timeout. - -Properties: - -- Config: wait_archive -- Env Var: RCLONE_INTERNETARCHIVE_WAIT_ARCHIVE -- Type: Duration -- Default: 0s - -#### --internetarchive-encoding - -The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - -Properties: - -- Config: encoding -- Env Var: RCLONE_INTERNETARCHIVE_ENCODING -- Type: Encoding -- Default: Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot - -#### --internetarchive-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_INTERNETARCHIVE_DESCRIPTION -- Type: string -- Required: false - -### Metadata - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_INTERNETARCHIVE_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Metadata +.PP Metadata fields provided by Internet Archive. If there are multiple values for a key, only the first one is returned. This is a limitation of Rclone, that supports one value per one key. - -Owner is able to add custom keys. Metadata feature grabs all the keys including them. - -Here are the possible system metadata items for the internetarchive backend. - -| Name | Help | Type | Example | Read Only | -|------|------|------|---------|-----------| -| crc32 | CRC32 calculated by Internet Archive | string | 01234567 | **Y** | -| format | Name of format identified by Internet Archive | string | Comma-Separated Values | **Y** | -| md5 | MD5 hash calculated by Internet Archive | string | 01234567012345670123456701234567 | **Y** | -| mtime | Time of last modification, managed by Rclone | RFC 3339 | 2006-01-02T15:04:05.999999999Z | **Y** | -| name | Full file path, without the bucket part | filename | backend/internetarchive/internetarchive.go | **Y** | -| old_version | Whether the file was replaced and moved by keep-old-version flag | boolean | true | **Y** | -| rclone-ia-mtime | Time of last modification, managed by Internet Archive | RFC 3339 | 2006-01-02T15:04:05.999999999Z | N | -| rclone-mtime | Time of last modification, managed by Rclone | RFC 3339 | 2006-01-02T15:04:05.999999999Z | N | -| rclone-update-track | Random value used by Rclone for tracking changes inside Internet Archive | string | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | N | -| sha1 | SHA1 hash calculated by Internet Archive | string | 0123456701234567012345670123456701234567 | **Y** | -| size | File size in bytes | decimal number | 123456 | **Y** | -| source | The source of the file | string | original | **Y** | -| summation | Check https://forum.rclone.org/t/31922 for how it is used | string | md5 | **Y** | -| viruscheck | The last time viruscheck process was run for the file (?) | unixtime | 1654191352 | **Y** | - -See the [metadata](https://rclone.org/docs/#metadata) docs for more info. - - - -# Jottacloud - -Jottacloud is a cloud storage service provider from a Norwegian company, using its own datacenters -in Norway. In addition to the official service at [jottacloud.com](https://www.jottacloud.com/), -it also provides white-label solutions to different companies, such as: -* Telia - * Telia Cloud (cloud.telia.se) - * Telia Sky (sky.telia.no) -* Tele2 - * Tele2 Cloud (mittcloud.tele2.se) -* Onlime - * Onlime Cloud Storage (onlime.dk) -* Elkj\[/o]p (with subsidiaries): - * Elkj\[/o]p Cloud (cloud.elkjop.no) - * Elgiganten Sweden (cloud.elgiganten.se) - * Elgiganten Denmark (cloud.elgiganten.dk) - * Giganti Cloud (cloud.gigantti.fi) - * ELKO Cloud (cloud.elko.is) - -Most of the white-label versions are supported by this backend, although may require different -authentication setup - described below. - -Paths are specified as \[ga]remote:path\[ga] - -Paths may be as deep as required, e.g. \[ga]remote:directory/subdirectory\[ga]. - -## Authentication types - -Some of the whitelabel versions uses a different authentication method than the official service, -and you have to choose the correct one when setting up the remote. - -### Standard authentication - -The standard authentication method used by the official service (jottacloud.com), as well as -some of the whitelabel services, requires you to generate a single-use personal login token -from the account security settings in the service\[aq]s web interface. Log in to your account, -go to \[dq]Settings\[dq] and then \[dq]Security\[dq], or use the direct link presented to you by rclone when -configuring the remote: . Scroll down to the section -\[dq]Personal login token\[dq], and click the \[dq]Generate\[dq] button. Note that if you are using a -whitelabel service you probably can\[aq]t use the direct link, you need to find the same page in -their dedicated web interface, and also it may be in a different location than described above. - -To access your account from multiple instances of rclone, you need to configure each of them -with a separate personal login token. E.g. you create a Jottacloud remote with rclone in one -location, and copy the configuration file to a second location where you also want to run -rclone and access the same remote. Then you need to replace the token for one of them, using -the [config reconnect](https://rclone.org/commands/rclone_config_reconnect/) command, which -requires you to generate a new personal login token and supply as input. If you do not -do this, the token may easily end up being invalidated, resulting in both instances failing -with an error message something along the lines of: - - oauth2: cannot fetch token: 400 Bad Request - Response: {\[dq]error\[dq]:\[dq]invalid_grant\[dq],\[dq]error_description\[dq]:\[dq]Stale token\[dq]} - -When this happens, you need to replace the token as described above to be able to use your -remote again. - -All personal login tokens you have taken into use will be listed in the web interface under -\[dq]My logged in devices\[dq], and from the right side of that list you can click the \[dq]X\[dq] button to -revoke individual tokens. - -### Legacy authentication - -If you are using one of the whitelabel versions (e.g. from Elkj\[/o]p) you may not have the option -to generate a CLI token. In this case you\[aq]ll have to use the legacy authentication. To do this select -yes when the setup asks for legacy authentication and enter your username and password. +.PP +Owner is able to add custom keys. +Metadata feature grabs all the keys including them. +.PP +Here are the possible system metadata items for the internetarchive +backend. +.PP +.TS +tab(@); +lw(11.1n) lw(11.1n) lw(11.1n) lw(16.6n) lw(20.3n). +T{ +Name +T}@T{ +Help +T}@T{ +Type +T}@T{ +Example +T}@T{ +Read Only +T} +_ +T{ +crc32 +T}@T{ +CRC32 calculated by Internet Archive +T}@T{ +string +T}@T{ +01234567 +T}@T{ +\f[B]Y\f[R] +T} +T{ +format +T}@T{ +Name of format identified by Internet Archive +T}@T{ +string +T}@T{ +Comma-Separated Values +T}@T{ +\f[B]Y\f[R] +T} +T{ +md5 +T}@T{ +MD5 hash calculated by Internet Archive +T}@T{ +string +T}@T{ +01234567012345670123456701234567 +T}@T{ +\f[B]Y\f[R] +T} +T{ +mtime +T}@T{ +Time of last modification, managed by Rclone +T}@T{ +RFC 3339 +T}@T{ +2006-01-02T15:04:05.999999999Z +T}@T{ +\f[B]Y\f[R] +T} +T{ +name +T}@T{ +Full file path, without the bucket part +T}@T{ +filename +T}@T{ +backend/internetarchive/internetarchive.go +T}@T{ +\f[B]Y\f[R] +T} +T{ +old_version +T}@T{ +Whether the file was replaced and moved by keep-old-version flag +T}@T{ +boolean +T}@T{ +true +T}@T{ +\f[B]Y\f[R] +T} +T{ +rclone-ia-mtime +T}@T{ +Time of last modification, managed by Internet Archive +T}@T{ +RFC 3339 +T}@T{ +2006-01-02T15:04:05.999999999Z +T}@T{ +N +T} +T{ +rclone-mtime +T}@T{ +Time of last modification, managed by Rclone +T}@T{ +RFC 3339 +T}@T{ +2006-01-02T15:04:05.999999999Z +T}@T{ +N +T} +T{ +rclone-update-track +T}@T{ +Random value used by Rclone for tracking changes inside Internet Archive +T}@T{ +string +T}@T{ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +T}@T{ +N +T} +T{ +sha1 +T}@T{ +SHA1 hash calculated by Internet Archive +T}@T{ +string +T}@T{ +0123456701234567012345670123456701234567 +T}@T{ +\f[B]Y\f[R] +T} +T{ +size +T}@T{ +File size in bytes +T}@T{ +decimal number +T}@T{ +123456 +T}@T{ +\f[B]Y\f[R] +T} +T{ +source +T}@T{ +The source of the file +T}@T{ +string +T}@T{ +original +T}@T{ +\f[B]Y\f[R] +T} +T{ +summation +T}@T{ +Check https://forum.rclone.org/t/31922 for how it is used +T}@T{ +string +T}@T{ +md5 +T}@T{ +\f[B]Y\f[R] +T} +T{ +viruscheck +T}@T{ +The last time viruscheck process was run for the file (?) +T}@T{ +unixtime +T}@T{ +1654191352 +T}@T{ +\f[B]Y\f[R] +T} +.TE +.PP +See the metadata (https://rclone.org/docs/#metadata) docs for more info. +.SH Jottacloud +.PP +Jottacloud is a cloud storage service provider from a Norwegian company, +using its own datacenters in Norway. +In addition to the official service at +jottacloud.com (https://www.jottacloud.com/), it also provides +white-label solutions to different companies, such as: * Telia * Telia +Cloud (cloud.telia.se) * Telia Sky (sky.telia.no) * Tele2 * Tele2 Cloud +(mittcloud.tele2.se) * Onlime * Onlime Cloud Storage (onlime.dk) * +Elkj\[/o]p (with subsidiaries): * Elkj\[/o]p Cloud (cloud.elkjop.no) * +Elgiganten Sweden (cloud.elgiganten.se) * Elgiganten Denmark +(cloud.elgiganten.dk) * Giganti Cloud (cloud.gigantti.fi) * ELKO Cloud +(cloud.elko.is) +.PP +Most of the white-label versions are supported by this backend, although +may require different authentication setup - described below. +.PP +Paths are specified as \f[C]remote:path\f[R] +.PP +Paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R]. +.SS Authentication types +.PP +Some of the whitelabel versions uses a different authentication method +than the official service, and you have to choose the correct one when +setting up the remote. +.SS Standard authentication +.PP +The standard authentication method used by the official service +(jottacloud.com), as well as some of the whitelabel services, requires +you to generate a single-use personal login token from the account +security settings in the service\[aq]s web interface. +Log in to your account, go to \[dq]Settings\[dq] and then +\[dq]Security\[dq], or use the direct link presented to you by rclone +when configuring the remote: . +Scroll down to the section \[dq]Personal login token\[dq], and click the +\[dq]Generate\[dq] button. +Note that if you are using a whitelabel service you probably can\[aq]t +use the direct link, you need to find the same page in their dedicated +web interface, and also it may be in a different location than described +above. +.PP +To access your account from multiple instances of rclone, you need to +configure each of them with a separate personal login token. +E.g. +you create a Jottacloud remote with rclone in one location, and copy the +configuration file to a second location where you also want to run +rclone and access the same remote. +Then you need to replace the token for one of them, using the config +reconnect (https://rclone.org/commands/rclone_config_reconnect/) +command, which requires you to generate a new personal login token and +supply as input. +If you do not do this, the token may easily end up being invalidated, +resulting in both instances failing with an error message something +along the lines of: +.IP +.nf +\f[C] +oauth2: cannot fetch token: 400 Bad Request +Response: {\[dq]error\[dq]:\[dq]invalid_grant\[dq],\[dq]error_description\[dq]:\[dq]Stale token\[dq]} +\f[R] +.fi +.PP +When this happens, you need to replace the token as described above to +be able to use your remote again. +.PP +All personal login tokens you have taken into use will be listed in the +web interface under \[dq]My logged in devices\[dq], and from the right +side of that list you can click the \[dq]X\[dq] button to revoke +individual tokens. +.SS Legacy authentication +.PP +If you are using one of the whitelabel versions (e.g. +from Elkj\[/o]p) you may not have the option to generate a CLI token. +In this case you\[aq]ll have to use the legacy authentication. +To do this select yes when the setup asks for legacy authentication and +enter your username and password. The rest of the setup is identical to the default setup. - -### Telia Cloud authentication - -Similar to other whitelabel versions Telia Cloud doesn\[aq]t offer the option of creating a CLI token, and -additionally uses a separate authentication flow where the username is generated internally. To setup -rclone to use Telia Cloud, choose Telia Cloud authentication in the setup. The rest of the setup is -identical to the default setup. - -### Tele2 Cloud authentication - -As Tele2-Com Hem merger was completed this authentication can be used for former Com Hem Cloud and -Tele2 Cloud customers as no support for creating a CLI token exists, and additionally uses a separate -authentication flow where the username is generated internally. To setup rclone to use Tele2 Cloud, -choose Tele2 Cloud authentication in the setup. The rest of the setup is identical to the default setup. - -### Onlime Cloud Storage authentication - -Onlime has sold access to Jottacloud proper, while providing localized support to Danish Customers, but -have recently set up their own hosting, transferring their customers from Jottacloud servers to their -own ones. - -This, of course, necessitates using their servers for authentication, but otherwise functionality and -architecture seems equivalent to Jottacloud. - -To setup rclone to use Onlime Cloud Storage, choose Onlime Cloud authentication in the setup. The rest -of the setup is identical to the default setup. - -## Configuration - -Here is an example of how to make a remote called \[ga]remote\[ga] with the default setup. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi +.SS Telia Cloud authentication .PP -No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -name> remote Option Storage. -Type of storage to configure. -Choose a number from below, or type in your own value. -[snip] XX / Jottacloud \ (jottacloud) [snip] Storage> jottacloud Edit -advanced config? -y) Yes n) No (default) y/n> n Option config_type. -Select authentication type. -Choose a number from below, or type in an existing string value. -Press Enter for the default (standard). -/ Standard authentication. -1 | Use this if you\[aq]re a normal Jottacloud user. -\ (standard) / Legacy authentication. -2 | This is only required for certain whitelabel versions of Jottacloud -and not recommended for normal users. -\ (legacy) / Telia Cloud authentication. -3 | Use this if you are using Telia Cloud. -\ (telia) / Tele2 Cloud authentication. -4 | Use this if you are using Tele2 Cloud. -\ (tele2) / Onlime Cloud authentication. -5 | Use this if you are using Onlime Cloud. -\ (onlime) config_type> 1 Personal login token. -Generate here: https://www.jottacloud.com/web/secure Login Token> Use a -non-standard device/mountpoint? -Choosing no, the default, will let you access the storage used for the -archive section of the official Jottacloud client. -If you instead want to access the sync or the backup section, for -example, you must choose yes. -y) Yes n) No (default) y/n> y Option config_device. -The device to use. -In standard setup the built-in Jotta device is used, which contains -predefined mountpoints for archive, sync etc. -All other devices are treated as backup devices by the official -Jottacloud client. -You may create a new by entering a unique name. -Choose a number from below, or type in your own string value. -Press Enter for the default (DESKTOP-3H31129). -1 > DESKTOP-3H31129 2 > Jotta config_device> 2 Option config_mountpoint. -The mountpoint to use for the built-in device Jotta. -The standard setup is to use the Archive mountpoint. -Most other mountpoints have very limited support in rclone and should -generally be avoided. -Choose a number from below, or type in an existing string value. -Press Enter for the default (Archive). -1 > Archive 2 > Shared 3 > Sync config_mountpoint> 1 --------------------- [remote] type = jottacloud configVersion = 1 -client_id = jottacli client_secret = tokenURL = -https://id.jottacloud.com/auth/realms/jottacloud/protocol/openid-connect/token -token = {........} username = 2940e57271a93d987d6f8a21 device = Jotta -mountpoint = Archive -------------------- y) Yes this is OK (default) e) -Edit this remote d) Delete this remote y/e/d> y -.IP -.nf -\f[C] -Once configured you can then use \[ga]rclone\[ga] like this, - -List directories in top level of your Jottacloud - - rclone lsd remote: - -List all the files in your Jottacloud - - rclone ls remote: - -To copy a local directory to an Jottacloud directory called backup - - rclone copy /home/source remote:backup - -### Devices and Mountpoints - -The official Jottacloud client registers a device for each computer you install -it on, and shows them in the backup section of the user interface. For each -folder you select for backup it will create a mountpoint within this device. -A built-in device called Jotta is special, and contains mountpoints Archive, -Sync and some others, used for corresponding features in official clients. - -With rclone you\[aq]ll want to use the standard Jotta/Archive device/mountpoint in -most cases. However, you may for example want to access files from the sync or -backup functionality provided by the official clients, and rclone therefore -provides the option to select other devices and mountpoints during config. - -You are allowed to create new devices and mountpoints. All devices except the -built-in Jotta device are treated as backup devices by official Jottacloud -clients, and the mountpoints on them are individual backup sets. - -With the built-in Jotta device, only existing, built-in, mountpoints can be -selected. In addition to the mentioned Archive and Sync, it may contain -several other mountpoints such as: Latest, Links, Shared and Trash. All of -these are special mountpoints with a different internal representation than -the \[dq]regular\[dq] mountpoints. Rclone will only to a very limited degree support -them. Generally you should avoid these, unless you know what you are doing. - -### --fast-list - -This backend supports \[ga]--fast-list\[ga] which allows you to use fewer -transactions in exchange for more memory. See the [rclone -docs](https://rclone.org/docs/#fast-list) for more details. - -Note that the implementation in Jottacloud always uses only a single -API request to get the entire list, so for large folders this could -lead to long wait time before the first results are shown. - -Note also that with rclone version 1.58 and newer, information about -[MIME types](https://rclone.org/overview/#mime-type) and metadata item [utime](#metadata) -are not available when using \[ga]--fast-list\[ga]. - -### Modification times and hashes - -Jottacloud allows modification times to be set on objects accurate to 1 -second. These will be used to detect whether objects need syncing or -not. - -Jottacloud supports MD5 type hashes, so you can use the \[ga]--checksum\[ga] -flag. - -Note that Jottacloud requires the MD5 hash before upload so if the -source does not have an MD5 checksum then the file will be cached -temporarily on disk (in location given by -[--temp-dir](https://rclone.org/docs/#temp-dir-dir)) before it is uploaded. -Small files will be cached in memory - see the -[--jottacloud-md5-memory-limit](#jottacloud-md5-memory-limit) flag. -When uploading from local disk the source checksum is always available, -so this does not apply. Starting with rclone version 1.52 the same is -true for encrypted remotes (in older versions the crypt backend would not -calculate hashes for uploads from local disk, so the Jottacloud -backend had to do it as described above). - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| \[dq] | 0x22 | \[uFF02] | -| * | 0x2A | \[uFF0A] | -| : | 0x3A | \[uFF1A] | -| < | 0x3C | \[uFF1C] | -| > | 0x3E | \[uFF1E] | -| ? | 0x3F | \[uFF1F] | -| \[rs]| | 0x7C | \[uFF5C] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in XML strings. - -### Deleting files - -By default, rclone will send all files to the trash when deleting files. They will be permanently -deleted automatically after 30 days. You may bypass the trash and permanently delete files immediately -by using the [--jottacloud-hard-delete](#jottacloud-hard-delete) flag, or set the equivalent environment variable. -Emptying the trash is supported by the [cleanup](https://rclone.org/commands/rclone_cleanup/) command. - -### Versions - -Jottacloud supports file versioning. When rclone uploads a new version of a file it creates a new version of it. -Currently rclone only supports retrieving the current version but older versions can be accessed via the Jottacloud Website. - -Versioning can be disabled by \[ga]--jottacloud-no-versions\[ga] option. This is achieved by deleting the remote file prior to uploading -a new version. If the upload the fails no version of the file will be available in the remote. - -### Quota information - -To view your current quota you can use the \[ga]rclone about remote:\[ga] -command which will display your usage limit (unless it is unlimited) -and the current usage. - - -### Standard options - -Here are the Standard options specific to jottacloud (Jottacloud). - -#### --jottacloud-client-id - -OAuth Client Id. - -Leave blank normally. - -Properties: - -- Config: client_id -- Env Var: RCLONE_JOTTACLOUD_CLIENT_ID -- Type: string -- Required: false - -#### --jottacloud-client-secret - -OAuth Client Secret. - -Leave blank normally. - -Properties: - -- Config: client_secret -- Env Var: RCLONE_JOTTACLOUD_CLIENT_SECRET -- Type: string -- Required: false - -### Advanced options - -Here are the Advanced options specific to jottacloud (Jottacloud). - -#### --jottacloud-token - -OAuth Access Token as a JSON blob. - -Properties: - -- Config: token -- Env Var: RCLONE_JOTTACLOUD_TOKEN -- Type: string -- Required: false - -#### --jottacloud-auth-url - -Auth server URL. - -Leave blank to use the provider defaults. - -Properties: - -- Config: auth_url -- Env Var: RCLONE_JOTTACLOUD_AUTH_URL -- Type: string -- Required: false - -#### --jottacloud-token-url - -Token server url. - -Leave blank to use the provider defaults. - -Properties: - -- Config: token_url -- Env Var: RCLONE_JOTTACLOUD_TOKEN_URL -- Type: string -- Required: false - -#### --jottacloud-md5-memory-limit - -Files bigger than this will be cached on disk to calculate the MD5 if required. - -Properties: - -- Config: md5_memory_limit -- Env Var: RCLONE_JOTTACLOUD_MD5_MEMORY_LIMIT -- Type: SizeSuffix -- Default: 10Mi - -#### --jottacloud-trashed-only - -Only show files that are in the trash. - -This will show trashed files in their original directory structure. - -Properties: - -- Config: trashed_only -- Env Var: RCLONE_JOTTACLOUD_TRASHED_ONLY -- Type: bool -- Default: false - -#### --jottacloud-hard-delete - -Delete files permanently rather than putting them into the trash. - -Properties: - -- Config: hard_delete -- Env Var: RCLONE_JOTTACLOUD_HARD_DELETE -- Type: bool -- Default: false - -#### --jottacloud-upload-resume-limit - -Files bigger than this can be resumed if the upload fail\[aq]s. - -Properties: - -- Config: upload_resume_limit -- Env Var: RCLONE_JOTTACLOUD_UPLOAD_RESUME_LIMIT -- Type: SizeSuffix -- Default: 10Mi - -#### --jottacloud-no-versions - -Avoid server side versioning by deleting files and recreating files instead of overwriting them. - -Properties: - -- Config: no_versions -- Env Var: RCLONE_JOTTACLOUD_NO_VERSIONS -- Type: bool -- Default: false - -#### --jottacloud-encoding - -The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - -Properties: - -- Config: encoding -- Env Var: RCLONE_JOTTACLOUD_ENCODING -- Type: Encoding -- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot - -#### --jottacloud-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_JOTTACLOUD_DESCRIPTION -- Type: string -- Required: false - -### Metadata - -Jottacloud has limited support for metadata, currently an extended set of timestamps. - -Here are the possible system metadata items for the jottacloud backend. - -| Name | Help | Type | Example | Read Only | -|------|------|------|---------|-----------| -| btime | Time of file birth (creation), read from rclone metadata | RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | N | -| content-type | MIME type, also known as media type | string | text/plain | **Y** | -| mtime | Time of last modification, read from rclone metadata | RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | N | -| utime | Time of last upload, when current revision was created, generated by backend | RFC 3339 | 2006-01-02T15:04:05.999999999Z07:00 | **Y** | - -See the [metadata](https://rclone.org/docs/#metadata) docs for more info. - - - -## Limitations - -Note that Jottacloud is case insensitive so you can\[aq]t have a file called -\[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. - -There are quite a few characters that can\[aq]t be in Jottacloud file names. Rclone will map these names to and from an identical -looking unicode equivalent. For example if a file has a ? in it will be mapped to \[uFF1F] instead. - -Jottacloud only supports filenames up to 255 characters in length. - -## Troubleshooting - -Jottacloud exhibits some inconsistent behaviours regarding deleted files and folders which may cause Copy, Move and DirMove -operations to previously deleted paths to fail. Emptying the trash should help in such cases. - -# Koofr - -Paths are specified as \[ga]remote:path\[ga] - -Paths may be as deep as required, e.g. \[ga]remote:directory/subdirectory\[ga]. - -## Configuration - -The initial setup for Koofr involves creating an application password for -rclone. You can do that by opening the Koofr -[web application](https://app.koofr.net/app/admin/preferences/password), -giving the password a nice name like \[ga]rclone\[ga] and clicking on generate. - -Here is an example of how to make a remote called \[ga]koofr\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi +Similar to other whitelabel versions Telia Cloud doesn\[aq]t offer the +option of creating a CLI token, and additionally uses a separate +authentication flow where the username is generated internally. +To setup rclone to use Telia Cloud, choose Telia Cloud authentication in +the setup. +The rest of the setup is identical to the default setup. +.SS Tele2 Cloud authentication .PP -No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -name> koofr Option Storage. -Type of storage to configure. -Choose a number from below, or type in your own value. -[snip] 22 / Koofr, Digi Storage and other Koofr-compatible storage -providers \ (koofr) [snip] Storage> koofr Option provider. -Choose your storage provider. -Choose a number from below, or type in your own value. -Press Enter to leave empty. -1 / Koofr, https://app.koofr.net/ \ (koofr) 2 / Digi Storage, -https://storage.rcs-rds.ro/ \ (digistorage) 3 / Any other Koofr API -compatible storage service \ (other) provider> 1 -.PD 0 -.P -.PD -Option user. -Your user name. -Enter a value. -user> USERNAME Option password. -Your password for rclone (generate one at -https://app.koofr.net/app/admin/preferences/password). -Choose an alternative below. -y) Yes, type in my own password g) Generate random password y/g> y Enter -the password: password: Confirm the password: password: Edit advanced -config? -y) Yes n) No (default) y/n> n Remote config -------------------- [koofr] -type = koofr provider = koofr user = USERNAME password = *** ENCRYPTED -*** -------------------- y) Yes this is OK (default) e) Edit this remote -d) Delete this remote y/e/d> y -.IP -.nf -\f[C] -You can choose to edit advanced config in order to enter your own service URL -if you use an on-premise or white label Koofr instance, or choose an alternative -mount instead of your primary storage. - -Once configured you can then use \[ga]rclone\[ga] like this, - -List directories in top level of your Koofr - - rclone lsd koofr: - -List all the files in your Koofr - - rclone ls koofr: - -To copy a local directory to an Koofr directory called backup - - rclone copy /home/source koofr:backup - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| \[rs] | 0x5C | \[uFF3C] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in XML strings. - - -### Standard options - -Here are the Standard options specific to koofr (Koofr, Digi Storage and other Koofr-compatible storage providers). - -#### --koofr-provider - -Choose your storage provider. - -Properties: - -- Config: provider -- Env Var: RCLONE_KOOFR_PROVIDER -- Type: string -- Required: false -- Examples: - - \[dq]koofr\[dq] - - Koofr, https://app.koofr.net/ - - \[dq]digistorage\[dq] - - Digi Storage, https://storage.rcs-rds.ro/ - - \[dq]other\[dq] - - Any other Koofr API compatible storage service - -#### --koofr-endpoint - -The Koofr API endpoint to use. - -Properties: - -- Config: endpoint -- Env Var: RCLONE_KOOFR_ENDPOINT -- Provider: other -- Type: string -- Required: true - -#### --koofr-user - -Your user name. - -Properties: - -- Config: user -- Env Var: RCLONE_KOOFR_USER -- Type: string -- Required: true - -#### --koofr-password - -Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password). - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - -Properties: - -- Config: password -- Env Var: RCLONE_KOOFR_PASSWORD -- Provider: koofr -- Type: string -- Required: true - -### Advanced options - -Here are the Advanced options specific to koofr (Koofr, Digi Storage and other Koofr-compatible storage providers). - -#### --koofr-mountid - -Mount ID of the mount to use. - -If omitted, the primary mount is used. - -Properties: - -- Config: mountid -- Env Var: RCLONE_KOOFR_MOUNTID -- Type: string -- Required: false - -#### --koofr-setmtime - -Does the backend support setting modification time. - -Set this to false if you use a mount ID that points to a Dropbox or Amazon Drive backend. - -Properties: - -- Config: setmtime -- Env Var: RCLONE_KOOFR_SETMTIME -- Type: bool -- Default: true - -#### --koofr-encoding - -The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - -Properties: - -- Config: encoding -- Env Var: RCLONE_KOOFR_ENCODING -- Type: Encoding -- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot - -#### --koofr-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_KOOFR_DESCRIPTION -- Type: string -- Required: false - - - -## Limitations - -Note that Koofr is case insensitive so you can\[aq]t have a file called -\[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. - -## Providers - -### Koofr - -This is the original [Koofr](https://koofr.eu) storage provider used as main example and described in the [configuration](#configuration) section above. - -### Digi Storage - -[Digi Storage](https://www.digi.ro/servicii/online/digi-storage) is a cloud storage service run by [Digi.ro](https://www.digi.ro/) that -provides a Koofr API. - -Here is an example of how to make a remote called \[ga]ds\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi +As Tele2-Com Hem merger was completed this authentication can be used +for former Com Hem Cloud and Tele2 Cloud customers as no support for +creating a CLI token exists, and additionally uses a separate +authentication flow where the username is generated internally. +To setup rclone to use Tele2 Cloud, choose Tele2 Cloud authentication in +the setup. +The rest of the setup is identical to the default setup. +.SS Onlime Cloud Storage authentication .PP -No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -name> ds Option Storage. -Type of storage to configure. -Choose a number from below, or type in your own value. -[snip] 22 / Koofr, Digi Storage and other Koofr-compatible storage -providers \ (koofr) [snip] Storage> koofr Option provider. -Choose your storage provider. -Choose a number from below, or type in your own value. -Press Enter to leave empty. -1 / Koofr, https://app.koofr.net/ \ (koofr) 2 / Digi Storage, -https://storage.rcs-rds.ro/ \ (digistorage) 3 / Any other Koofr API -compatible storage service \ (other) provider> 2 Option user. -Your user name. -Enter a value. -user> USERNAME Option password. -Your password for rclone (generate one at -https://storage.rcs-rds.ro/app/admin/preferences/password). -Choose an alternative below. -y) Yes, type in my own password g) Generate random password y/g> y Enter -the password: password: Confirm the password: password: Edit advanced -config? -y) Yes n) No (default) y/n> n -------------------- [ds] type = koofr -provider = digistorage user = USERNAME password = *** ENCRYPTED *** --------------------- y) Yes this is OK (default) e) Edit this remote d) -Delete this remote y/e/d> y -.IP -.nf -\f[C] -### Other - -You may also want to use another, public or private storage provider that runs a Koofr API compatible service, by simply providing the base URL to connect to. - -Here is an example of how to make a remote called \[ga]other\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi +Onlime has sold access to Jottacloud proper, while providing localized +support to Danish Customers, but have recently set up their own hosting, +transferring their customers from Jottacloud servers to their own ones. .PP -No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -name> other Option Storage. -Type of storage to configure. -Choose a number from below, or type in your own value. -[snip] 22 / Koofr, Digi Storage and other Koofr-compatible storage -providers \ (koofr) [snip] Storage> koofr Option provider. -Choose your storage provider. -Choose a number from below, or type in your own value. -Press Enter to leave empty. -1 / Koofr, https://app.koofr.net/ \ (koofr) 2 / Digi Storage, -https://storage.rcs-rds.ro/ \ (digistorage) 3 / Any other Koofr API -compatible storage service \ (other) provider> 3 Option endpoint. -The Koofr API endpoint to use. -Enter a value. -endpoint> https://koofr.other.org Option user. -Your user name. -Enter a value. -user> USERNAME Option password. -Your password for rclone (generate one at your service\[aq]s settings -page). -Choose an alternative below. -y) Yes, type in my own password g) Generate random password y/g> y Enter -the password: password: Confirm the password: password: Edit advanced -config? -y) Yes n) No (default) y/n> n -------------------- [other] type = koofr -provider = other endpoint = https://koofr.other.org user = USERNAME -password = *** ENCRYPTED *** -------------------- y) Yes this is OK -(default) e) Edit this remote d) Delete this remote y/e/d> y -.IP -.nf -\f[C] -# Linkbox - -Linkbox is [a private cloud drive](https://linkbox.to/). - -## Configuration - -Here is an example of making a remote for Linkbox. - +This, of course, necessitates using their servers for authentication, +but otherwise functionality and architecture seems equivalent to +Jottacloud. +.PP +To setup rclone to use Onlime Cloud Storage, choose Onlime Cloud +authentication in the setup. +The rest of the setup is identical to the default setup. +.SS Configuration +.PP +Here is an example of how to make a remote called \f[C]remote\f[R] with +the default setup. First run: - - rclone config - -This will guide you through an interactive setup process: +.IP +.nf +\f[C] +rclone config \f[R] .fi .PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] No remotes found, make a new one? -n) New remote s) Set configuration password q) Quit config n/s/q> n -.PP -Enter name for new remote. +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n name> remote -.PP Option Storage. Type of storage to configure. Choose a number from below, or type in your own value. -XX / Linkbox \ (linkbox) Storage> XX -.PP -Option token. -Token from https://www.linkbox.to/admin/account Enter a value. -token> testFromCLToken -.PP -Configuration complete. -Options: - type: linkbox - token: XXXXXXXXXXX Keep this -\[dq]linkbox\[dq] remote? -y) Yes this is OK (default) e) Edit this remote d) Delete this remote +[snip] +XX / Jottacloud + \[rs] (jottacloud) +[snip] +Storage> jottacloud +Edit advanced config? +y) Yes +n) No (default) +y/n> n +Option config_type. +Select authentication type. +Choose a number from below, or type in an existing string value. +Press Enter for the default (standard). + / Standard authentication. + 1 | Use this if you\[aq]re a normal Jottacloud user. + \[rs] (standard) + / Legacy authentication. + 2 | This is only required for certain whitelabel versions of Jottacloud and not recommended for normal users. + \[rs] (legacy) + / Telia Cloud authentication. + 3 | Use this if you are using Telia Cloud. + \[rs] (telia) + / Tele2 Cloud authentication. + 4 | Use this if you are using Tele2 Cloud. + \[rs] (tele2) + / Onlime Cloud authentication. + 5 | Use this if you are using Onlime Cloud. + \[rs] (onlime) +config_type> 1 +Personal login token. +Generate here: https://www.jottacloud.com/web/secure +Login Token> +Use a non-standard device/mountpoint? +Choosing no, the default, will let you access the storage used for the archive +section of the official Jottacloud client. If you instead want to access the +sync or the backup section, for example, you must choose yes. +y) Yes +n) No (default) +y/n> y +Option config_device. +The device to use. In standard setup the built-in Jotta device is used, +which contains predefined mountpoints for archive, sync etc. All other devices +are treated as backup devices by the official Jottacloud client. You may create +a new by entering a unique name. +Choose a number from below, or type in your own string value. +Press Enter for the default (DESKTOP-3H31129). + 1 > DESKTOP-3H31129 + 2 > Jotta +config_device> 2 +Option config_mountpoint. +The mountpoint to use for the built-in device Jotta. +The standard setup is to use the Archive mountpoint. Most other mountpoints +have very limited support in rclone and should generally be avoided. +Choose a number from below, or type in an existing string value. +Press Enter for the default (Archive). + 1 > Archive + 2 > Shared + 3 > Sync +config_mountpoint> 1 +-------------------- +[remote] +type = jottacloud +configVersion = 1 +client_id = jottacli +client_secret = +tokenURL = https://id.jottacloud.com/auth/realms/jottacloud/protocol/openid-connect/token +token = {........} +username = 2940e57271a93d987d6f8a21 +device = Jotta +mountpoint = Archive +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote y/e/d> y -.IP -.nf -\f[C] - -### Standard options - -Here are the Standard options specific to linkbox (Linkbox). - -#### --linkbox-token - -Token from https://www.linkbox.to/admin/account - -Properties: - -- Config: token -- Env Var: RCLONE_LINKBOX_TOKEN -- Type: string -- Required: true - -### Advanced options - -Here are the Advanced options specific to linkbox (Linkbox). - -#### --linkbox-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_LINKBOX_DESCRIPTION -- Type: string -- Required: false - - - -## Limitations - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -# Mail.ru Cloud - -[Mail.ru Cloud](https://cloud.mail.ru/) is a cloud storage provided by a Russian internet company [Mail.Ru Group](https://mail.ru). The official desktop client is [Disk-O:](https://disk-o.cloud/en), available on Windows and Mac OS. - -## Features highlights - -- Paths may be as deep as required, e.g. \[ga]remote:directory/subdirectory\[ga] -- Files have a \[ga]last modified time\[ga] property, directories don\[aq]t -- Deleted files are by default moved to the trash -- Files and directories can be shared via public links -- Partial uploads or streaming are not supported, file size must be known before upload -- Maximum file size is limited to 2G for a free account, unlimited for paid accounts -- Storage keeps hash for all files and performs transparent deduplication, - the hash algorithm is a modified SHA1 -- If a particular file is already present in storage, one can quickly submit file hash - instead of long file upload (this optimization is supported by rclone) - -## Configuration - -Here is an example of making a mailru configuration. - -First create a Mail.ru Cloud account and choose a tariff. - -You will need to log in and create an app password for rclone. Rclone -**will not work** with your normal username and password - it will -give an error like \[ga]oauth2: server response missing access_token\[ga]. - -- Click on your user icon in the top right -- Go to Security / \[dq]\[u041F]\[u0430]\[u0440]\[u043E]\[u043B]\[u044C] \[u0438] \[u0431]\[u0435]\[u0437]\[u043E]\[u043F]\[u0430]\[u0441]\[u043D]\[u043E]\[u0441]\[u0442]\[u044C]\[dq] -- Click password for apps / \[dq]\[u041F]\[u0430]\[u0440]\[u043E]\[u043B]\[u0438] \[u0434]\[u043B]\[u044F] \[u0432]\[u043D]\[u0435]\[u0448]\[u043D]\[u0438]\[u0445] \[u043F]\[u0440]\[u0438]\[u043B]\[u043E]\[u0436]\[u0435]\[u043D]\[u0438]\[u0439]\[dq] -- Add the password - give it a name - eg \[dq]rclone\[dq] -- Copy the password and use this password below - your normal login password won\[aq]t work. - -Now run - - rclone config - -This will guide you through an interactive setup process: \f[R] .fi .PP +Once configured you can then use \f[C]rclone\f[R] like this, +.PP +List directories in top level of your Jottacloud +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +List all the files in your Jottacloud +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP +To copy a local directory to an Jottacloud directory called backup +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.SS Devices and Mountpoints +.PP +The official Jottacloud client registers a device for each computer you +install it on, and shows them in the backup section of the user +interface. +For each folder you select for backup it will create a mountpoint within +this device. +A built-in device called Jotta is special, and contains mountpoints +Archive, Sync and some others, used for corresponding features in +official clients. +.PP +With rclone you\[aq]ll want to use the standard Jotta/Archive +device/mountpoint in most cases. +However, you may for example want to access files from the sync or +backup functionality provided by the official clients, and rclone +therefore provides the option to select other devices and mountpoints +during config. +.PP +You are allowed to create new devices and mountpoints. +All devices except the built-in Jotta device are treated as backup +devices by official Jottacloud clients, and the mountpoints on them are +individual backup sets. +.PP +With the built-in Jotta device, only existing, built-in, mountpoints can +be selected. +In addition to the mentioned Archive and Sync, it may contain several +other mountpoints such as: Latest, Links, Shared and Trash. +All of these are special mountpoints with a different internal +representation than the \[dq]regular\[dq] mountpoints. +Rclone will only to a very limited degree support them. +Generally you should avoid these, unless you know what you are doing. +.SS --fast-list +.PP +This backend supports \f[C]--fast-list\f[R] which allows you to use +fewer transactions in exchange for more memory. +See the rclone docs (https://rclone.org/docs/#fast-list) for more +details. +.PP +Note that the implementation in Jottacloud always uses only a single API +request to get the entire list, so for large folders this could lead to +long wait time before the first results are shown. +.PP +Note also that with rclone version 1.58 and newer, information about +MIME types (https://rclone.org/overview/#mime-type) and metadata item +utime are not available when using \f[C]--fast-list\f[R]. +.SS Modification times and hashes +.PP +Jottacloud allows modification times to be set on objects accurate to 1 +second. +These will be used to detect whether objects need syncing or not. +.PP +Jottacloud supports MD5 type hashes, so you can use the +\f[C]--checksum\f[R] flag. +.PP +Note that Jottacloud requires the MD5 hash before upload so if the +source does not have an MD5 checksum then the file will be cached +temporarily on disk (in location given by +--temp-dir (https://rclone.org/docs/#temp-dir-dir)) before it is +uploaded. +Small files will be cached in memory - see the +--jottacloud-md5-memory-limit flag. +When uploading from local disk the source checksum is always available, +so this does not apply. +Starting with rclone version 1.52 the same is true for encrypted remotes +(in older versions the crypt backend would not calculate hashes for +uploads from local disk, so the Jottacloud backend had to do it as +described above). +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\[dq] +T}@T{ +0x22 +T}@T{ +\[uFF02] +T} +T{ +* +T}@T{ +0x2A +T}@T{ +\[uFF0A] +T} +T{ +: +T}@T{ +0x3A +T}@T{ +\[uFF1A] +T} +T{ +< +T}@T{ +0x3C +T}@T{ +\[uFF1C] +T} +T{ +> +T}@T{ +0x3E +T}@T{ +\[uFF1E] +T} +T{ +? +T}@T{ +0x3F +T}@T{ +\[uFF1F] +T} +T{ +| +T}@T{ +0x7C +T}@T{ +\[uFF5C] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in XML strings. +.SS Deleting files +.PP +By default, rclone will send all files to the trash when deleting files. +They will be permanently deleted automatically after 30 days. +You may bypass the trash and permanently delete files immediately by +using the --jottacloud-hard-delete flag, or set the equivalent +environment variable. +Emptying the trash is supported by the +cleanup (https://rclone.org/commands/rclone_cleanup/) command. +.SS Versions +.PP +Jottacloud supports file versioning. +When rclone uploads a new version of a file it creates a new version of +it. +Currently rclone only supports retrieving the current version but older +versions can be accessed via the Jottacloud Website. +.PP +Versioning can be disabled by \f[C]--jottacloud-no-versions\f[R] option. +This is achieved by deleting the remote file prior to uploading a new +version. +If the upload the fails no version of the file will be available in the +remote. +.SS Quota information +.PP +To view your current quota you can use the +\f[C]rclone about remote:\f[R] command which will display your usage +limit (unless it is unlimited) and the current usage. +.SS Standard options +.PP +Here are the Standard options specific to jottacloud (Jottacloud). +.SS --jottacloud-client-id +.PP +OAuth Client Id. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --jottacloud-client-secret +.PP +OAuth Client Secret. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Advanced options +.PP +Here are the Advanced options specific to jottacloud (Jottacloud). +.SS --jottacloud-token +.PP +OAuth Access Token as a JSON blob. +.PP +Properties: +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --jottacloud-auth-url +.PP +Auth server URL. +.PP +Leave blank to use the provider defaults. +.PP +Properties: +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --jottacloud-token-url +.PP +Token server url. +.PP +Leave blank to use the provider defaults. +.PP +Properties: +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --jottacloud-md5-memory-limit +.PP +Files bigger than this will be cached on disk to calculate the MD5 if +required. +.PP +Properties: +.IP \[bu] 2 +Config: md5_memory_limit +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_MD5_MEMORY_LIMIT +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 10Mi +.SS --jottacloud-trashed-only +.PP +Only show files that are in the trash. +.PP +This will show trashed files in their original directory structure. +.PP +Properties: +.IP \[bu] 2 +Config: trashed_only +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_TRASHED_ONLY +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --jottacloud-hard-delete +.PP +Delete files permanently rather than putting them into the trash. +.PP +Properties: +.IP \[bu] 2 +Config: hard_delete +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_HARD_DELETE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --jottacloud-upload-resume-limit +.PP +Files bigger than this can be resumed if the upload fail\[aq]s. +.PP +Properties: +.IP \[bu] 2 +Config: upload_resume_limit +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_UPLOAD_RESUME_LIMIT +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 10Mi +.SS --jottacloud-no-versions +.PP +Avoid server side versioning by deleting files and recreating files +instead of overwriting them. +.PP +Properties: +.IP \[bu] 2 +Config: no_versions +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_NO_VERSIONS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --jottacloud-encoding +.PP +The encoding for the backend. +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP +Properties: +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: +Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot +.SS --jottacloud-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_JOTTACLOUD_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Metadata +.PP +Jottacloud has limited support for metadata, currently an extended set +of timestamps. +.PP +Here are the possible system metadata items for the jottacloud backend. +.PP +.TS +tab(@); +lw(11.1n) lw(11.1n) lw(11.1n) lw(16.6n) lw(20.3n). +T{ +Name +T}@T{ +Help +T}@T{ +Type +T}@T{ +Example +T}@T{ +Read Only +T} +_ +T{ +btime +T}@T{ +Time of file birth (creation), read from rclone metadata +T}@T{ +RFC 3339 +T}@T{ +2006-01-02T15:04:05.999999999Z07:00 +T}@T{ +N +T} +T{ +content-type +T}@T{ +MIME type, also known as media type +T}@T{ +string +T}@T{ +text/plain +T}@T{ +\f[B]Y\f[R] +T} +T{ +mtime +T}@T{ +Time of last modification, read from rclone metadata +T}@T{ +RFC 3339 +T}@T{ +2006-01-02T15:04:05.999999999Z07:00 +T}@T{ +N +T} +T{ +utime +T}@T{ +Time of last upload, when current revision was created, generated by +backend +T}@T{ +RFC 3339 +T}@T{ +2006-01-02T15:04:05.999999999Z07:00 +T}@T{ +\f[B]Y\f[R] +T} +.TE +.PP +See the metadata (https://rclone.org/docs/#metadata) docs for more info. +.SS Limitations +.PP +Note that Jottacloud is case insensitive so you can\[aq]t have a file +called \[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. +.PP +There are quite a few characters that can\[aq]t be in Jottacloud file +names. +Rclone will map these names to and from an identical looking unicode +equivalent. +For example if a file has a ? +in it will be mapped to \[uFF1F] instead. +.PP +Jottacloud only supports filenames up to 255 characters in length. +.SS Troubleshooting +.PP +Jottacloud exhibits some inconsistent behaviours regarding deleted files +and folders which may cause Copy, Move and DirMove operations to +previously deleted paths to fail. +Emptying the trash should help in such cases. +.SH Koofr +.PP +Paths are specified as \f[C]remote:path\f[R] +.PP +Paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R]. +.SS Configuration +.PP +The initial setup for Koofr involves creating an application password +for rclone. +You can do that by opening the Koofr web +application (https://app.koofr.net/app/admin/preferences/password), +giving the password a nice name like \f[C]rclone\f[R] and clicking on +generate. +.PP +Here is an example of how to make a remote called \f[C]koofr\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] 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. +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n +name> koofr +Option Storage. Type of storage to configure. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value [snip] XX / -Mail.ru Cloud \ \[dq]mailru\[dq] [snip] Storage> mailru User name -(usually email) Enter a string value. -Press Enter for the default (\[dq]\[dq]). -user> username\[at]mail.ru Password +Choose a number from below, or type in your own value. +[snip] +22 / Koofr, Digi Storage and other Koofr-compatible storage providers + \[rs] (koofr) +[snip] +Storage> koofr +Option provider. +Choose your storage provider. +Choose a number from below, or type in your own value. +Press Enter to leave empty. + 1 / Koofr, https://app.koofr.net/ + \[rs] (koofr) + 2 / Digi Storage, https://storage.rcs-rds.ro/ + \[rs] (digistorage) + 3 / Any other Koofr API compatible storage service + \[rs] (other) +provider> 1 +Option user. +Your user name. +Enter a value. +user> USERNAME +Option password. +Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password). +Choose an alternative below. +y) Yes, type in my own password +g) Generate random password +y/g> y +Enter the password: +password: +Confirm the password: +password: +Edit advanced config? +y) Yes +n) No (default) +y/n> n +Remote config +-------------------- +[koofr] +type = koofr +provider = koofr +user = USERNAME +password = *** ENCRYPTED *** +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +You can choose to edit advanced config in order to enter your own +service URL if you use an on-premise or white label Koofr instance, or +choose an alternative mount instead of your primary storage. +.PP +Once configured you can then use \f[C]rclone\f[R] like this, +.PP +List directories in top level of your Koofr +.IP +.nf +\f[C] +rclone lsd koofr: +\f[R] +.fi +.PP +List all the files in your Koofr +.IP +.nf +\f[C] +rclone ls koofr: +\f[R] +.fi +.PP +To copy a local directory to an Koofr directory called backup +.IP +.nf +\f[C] +rclone copy /home/source koofr:backup +\f[R] +.fi +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in XML strings. +.SS Standard options +.PP +Here are the Standard options specific to koofr (Koofr, Digi Storage and +other Koofr-compatible storage providers). +.SS --koofr-provider +.PP +Choose your storage provider. +.PP +Properties: +.IP \[bu] 2 +Config: provider +.IP \[bu] 2 +Env Var: RCLONE_KOOFR_PROVIDER +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]koofr\[dq] +.RS 2 +.IP \[bu] 2 +Koofr, https://app.koofr.net/ +.RE +.IP \[bu] 2 +\[dq]digistorage\[dq] +.RS 2 +.IP \[bu] 2 +Digi Storage, https://storage.rcs-rds.ro/ +.RE +.IP \[bu] 2 +\[dq]other\[dq] +.RS 2 +.IP \[bu] 2 +Any other Koofr API compatible storage service +.RE +.RE +.SS --koofr-endpoint +.PP +The Koofr API endpoint to use. +.PP +Properties: +.IP \[bu] 2 +Config: endpoint +.IP \[bu] 2 +Env Var: RCLONE_KOOFR_ENDPOINT +.IP \[bu] 2 +Provider: other +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --koofr-user +.PP +Your user name. +.PP +Properties: +.IP \[bu] 2 +Config: user +.IP \[bu] 2 +Env Var: RCLONE_KOOFR_USER +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --koofr-password +.PP +Your password for rclone generate one at +https://app.koofr.net/app/admin/preferences/password. +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP +Properties: +.IP \[bu] 2 +Config: password +.IP \[bu] 2 +Env Var: RCLONE_KOOFR_PASSWORD +.IP \[bu] 2 +Provider: koofr +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS Advanced options +.PP +Here are the Advanced options specific to koofr (Koofr, Digi Storage and +other Koofr-compatible storage providers). +.SS --koofr-mountid +.PP +Mount ID of the mount to use. +.PP +If omitted, the primary mount is used. +.PP +Properties: +.IP \[bu] 2 +Config: mountid +.IP \[bu] 2 +Env Var: RCLONE_KOOFR_MOUNTID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --koofr-setmtime +.PP +Does the backend support setting modification time. +.PP +Set this to false if you use a mount ID that points to a Dropbox or +Amazon Drive backend. +.PP +Properties: +.IP \[bu] 2 +Config: setmtime +.IP \[bu] 2 +Env Var: RCLONE_KOOFR_SETMTIME +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: true +.SS --koofr-encoding +.PP +The encoding for the backend. +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP +Properties: +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_KOOFR_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot +.SS --koofr-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_KOOFR_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP +Note that Koofr is case insensitive so you can\[aq]t have a file called +\[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. +.SS Providers +.SS Koofr +.PP +This is the original Koofr (https://koofr.eu) storage provider used as +main example and described in the configuration section above. +.SS Digi Storage +.PP +Digi Storage (https://www.digi.ro/servicii/online/digi-storage) is a +cloud storage service run by Digi.ro (https://www.digi.ro/) that +provides a Koofr API. +.PP +Here is an example of how to make a remote called \f[C]ds\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n +name> ds +Option Storage. +Type of storage to configure. +Choose a number from below, or type in your own value. +[snip] +22 / Koofr, Digi Storage and other Koofr-compatible storage providers + \[rs] (koofr) +[snip] +Storage> koofr +Option provider. +Choose your storage provider. +Choose a number from below, or type in your own value. +Press Enter to leave empty. + 1 / Koofr, https://app.koofr.net/ + \[rs] (koofr) + 2 / Digi Storage, https://storage.rcs-rds.ro/ + \[rs] (digistorage) + 3 / Any other Koofr API compatible storage service + \[rs] (other) +provider> 2 +Option user. +Your user name. +Enter a value. +user> USERNAME +Option password. +Your password for rclone (generate one at https://storage.rcs-rds.ro/app/admin/preferences/password). +Choose an alternative below. +y) Yes, type in my own password +g) Generate random password +y/g> y +Enter the password: +password: +Confirm the password: +password: +Edit advanced config? +y) Yes +n) No (default) +y/n> n +-------------------- +[ds] +type = koofr +provider = digistorage +user = USERNAME +password = *** ENCRYPTED *** +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.SS Other +.PP +You may also want to use another, public or private storage provider +that runs a Koofr API compatible service, by simply providing the base +URL to connect to. +.PP +Here is an example of how to make a remote called \f[C]other\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n +name> other +Option Storage. +Type of storage to configure. +Choose a number from below, or type in your own value. +[snip] +22 / Koofr, Digi Storage and other Koofr-compatible storage providers + \[rs] (koofr) +[snip] +Storage> koofr +Option provider. +Choose your storage provider. +Choose a number from below, or type in your own value. +Press Enter to leave empty. + 1 / Koofr, https://app.koofr.net/ + \[rs] (koofr) + 2 / Digi Storage, https://storage.rcs-rds.ro/ + \[rs] (digistorage) + 3 / Any other Koofr API compatible storage service + \[rs] (other) +provider> 3 +Option endpoint. +The Koofr API endpoint to use. +Enter a value. +endpoint> https://koofr.other.org +Option user. +Your user name. +Enter a value. +user> USERNAME +Option password. +Your password for rclone (generate one at your service\[aq]s settings page). +Choose an alternative below. +y) Yes, type in my own password +g) Generate random password +y/g> y +Enter the password: +password: +Confirm the password: +password: +Edit advanced config? +y) Yes +n) No (default) +y/n> n +-------------------- +[other] +type = koofr +provider = other +endpoint = https://koofr.other.org +user = USERNAME +password = *** ENCRYPTED *** +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.SH Linkbox +.PP +Linkbox is a private cloud drive (https://linkbox.to/). +.SS Configuration +.PP +Here is an example of making a remote for Linkbox. +.PP +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +No remotes found, make a new one? +n) New remote +s) Set configuration password +q) Quit config +n/s/q> n + +Enter name for new remote. +name> remote + +Option Storage. +Type of storage to configure. +Choose a number from below, or type in your own value. +XX / Linkbox + \[rs] (linkbox) +Storage> XX + +Option token. +Token from https://www.linkbox.to/admin/account +Enter a value. +token> testFromCLToken + +Configuration complete. +Options: +- type: linkbox +- token: XXXXXXXXXXX +Keep this \[dq]linkbox\[dq] remote? +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.SS Standard options +.PP +Here are the Standard options specific to linkbox (Linkbox). +.SS --linkbox-token +.PP +Token from https://www.linkbox.to/admin/account +.PP +Properties: +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_LINKBOX_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS Advanced options +.PP +Here are the Advanced options specific to linkbox (Linkbox). +.SS --linkbox-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_LINKBOX_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SH Mail.ru Cloud +.PP +Mail.ru Cloud (https://cloud.mail.ru/) is a cloud storage provided by a +Russian internet company Mail.Ru Group (https://mail.ru). +The official desktop client is Disk-O: (https://disk-o.cloud/en), +available on Windows and Mac OS. +.SS Features highlights +.IP \[bu] 2 +Paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R] +.IP \[bu] 2 +Files have a \f[C]last modified time\f[R] property, directories +don\[aq]t +.IP \[bu] 2 +Deleted files are by default moved to the trash +.IP \[bu] 2 +Files and directories can be shared via public links +.IP \[bu] 2 +Partial uploads or streaming are not supported, file size must be known +before upload +.IP \[bu] 2 +Maximum file size is limited to 2G for a free account, unlimited for +paid accounts +.IP \[bu] 2 +Storage keeps hash for all files and performs transparent deduplication, +the hash algorithm is a modified SHA1 +.IP \[bu] 2 +If a particular file is already present in storage, one can quickly +submit file hash instead of long file upload (this optimization is +supported by rclone) +.SS Configuration +.PP +Here is an example of making a mailru configuration. +.PP +First create a Mail.ru Cloud account and choose a tariff. +.PP +You will need to log in and create an app password for rclone. +Rclone \f[B]will not work\f[R] with your normal username and password - +it will give an error like +\f[C]oauth2: server response missing access_token\f[R]. +.IP \[bu] 2 +Click on your user icon in the top right +.IP \[bu] 2 +Go to Security / \[dq]\[u041F]\[u0430]\[u0440]\[u043E]\[u043B]\[u044C] +\[u0438] +\[u0431]\[u0435]\[u0437]\[u043E]\[u043F]\[u0430]\[u0441]\[u043D]\[u043E]\[u0441]\[u0442]\[u044C]\[dq] +.IP \[bu] 2 +Click password for apps / +\[dq]\[u041F]\[u0430]\[u0440]\[u043E]\[u043B]\[u0438] +\[u0434]\[u043B]\[u044F] +\[u0432]\[u043D]\[u0435]\[u0448]\[u043D]\[u0438]\[u0445] +\[u043F]\[u0440]\[u0438]\[u043B]\[u043E]\[u0436]\[u0435]\[u043D]\[u0438]\[u0439]\[dq] +.IP \[bu] 2 +Add the password - give it a name - eg \[dq]rclone\[dq] +.IP \[bu] 2 +Copy the password and use this password below - your normal login +password won\[aq]t work. +.PP +Now run +.IP +.nf +\f[C] +rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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. +Type of storage to configure. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +[snip] +XX / Mail.ru Cloud + \[rs] \[dq]mailru\[dq] +[snip] +Storage> mailru +User name (usually email) +Enter a string value. Press Enter for the default (\[dq]\[dq]). +user> username\[at]mail.ru +Password + +This must be an app password - rclone will not work with your normal +password. See the Configuration section in the docs for how to make an +app password. +y) Yes type in my own password +g) Generate random password +y/g> y +Enter the password: +password: +Confirm the password: +password: +Skip full upload if there is another file with same data hash. +This feature is called \[dq]speedup\[dq] or \[dq]put by hash\[dq]. It is especially efficient +in case of generally available files like popular books, video or audio clips +[snip] +Enter a boolean value (true or false). Press Enter for the default (\[dq]true\[dq]). +Choose a number from below, or type in your own value + 1 / Enable + \[rs] \[dq]true\[dq] + 2 / Disable + \[rs] \[dq]false\[dq] +speedup_enable> 1 +Edit advanced config? (y/n) +y) Yes +n) No +y/n> n +Remote config +-------------------- +[remote] +type = mailru +user = username\[at]mail.ru +pass = *** ENCRYPTED *** +speedup_enable = true +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +Configuration of this backend does not require a local web browser. +You can use the configured backend as shown below: +.PP +See top level directories +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +Make a new directory +.IP +.nf +\f[C] +rclone mkdir remote:directory +\f[R] +.fi +.PP +List the contents of a directory +.IP +.nf +\f[C] +rclone ls remote:directory +\f[R] +.fi +.PP +Sync \f[C]/home/local/directory\f[R] to the remote path, deleting any +excess files in the path. +.IP +.nf +\f[C] +rclone sync --interactive /home/local/directory remote:directory +\f[R] +.fi +.SS Modification times and hashes +.PP +Files support a modification time attribute with up to 1 second +precision. +Directories do not have a modification time, which is shown as \[dq]Jan +1 1970\[dq]. +.PP +File hashes are supported, with a custom Mail.ru algorithm based on +SHA1. +If file size is less than or equal to the SHA1 block size (20 bytes), +its hash is simply its data right-padded with zero bytes. +Hashes of a larger file is computed as a SHA1 of the file data bytes +concatenated with a decimal representation of the data length. +.SS Emptying Trash +.PP +Removing a file or directory actually moves it to the trash, which is +not visible to rclone but can be seen in a web browser. +The trashed file still occupies part of total quota. +If you wish to empty your trash and free some quota, you can use the +\f[C]rclone cleanup remote:\f[R] command, which will permanently delete +all your trashed files. +This command does not take any path arguments. +.SS Quota information +.PP +To view your current quota you can use the +\f[C]rclone about remote:\f[R] command which will display your usage +limit (quota) and the current usage. +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\[dq] +T}@T{ +0x22 +T}@T{ +\[uFF02] +T} +T{ +* +T}@T{ +0x2A +T}@T{ +\[uFF0A] +T} +T{ +: +T}@T{ +0x3A +T}@T{ +\[uFF1A] +T} +T{ +< +T}@T{ +0x3C +T}@T{ +\[uFF1C] +T} +T{ +> +T}@T{ +0x3E +T}@T{ +\[uFF1E] +T} +T{ +? +T}@T{ +0x3F +T}@T{ +\[uFF1F] +T} +T{ +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] +T} +T{ +| +T}@T{ +0x7C +T}@T{ +\[uFF5C] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Standard options +.PP +Here are the Standard options specific to mailru (Mail.ru Cloud). +.SS --mailru-client-id +.PP +OAuth Client Id. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --mailru-client-secret +.PP +OAuth Client Secret. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --mailru-user +.PP +User name (usually email). +.PP +Properties: +.IP \[bu] 2 +Config: user +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_USER +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --mailru-pass +.PP +Password. .PP This must be an app password - rclone will not work with your normal password. See the Configuration section in the docs for how to make an app password. -y) Yes type in my own password g) Generate random password y/g> y Enter -the password: password: Confirm the password: password: Skip full upload -if there is another file with same data hash. +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP +Properties: +.IP \[bu] 2 +Config: pass +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_PASS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --mailru-speedup-enable +.PP +Skip full upload if there is another file with same data hash. +.PP This feature is called \[dq]speedup\[dq] or \[dq]put by hash\[dq]. It is especially efficient in case of generally available files like -popular books, video or audio clips [snip] Enter a boolean value (true -or false). -Press Enter for the default (\[dq]true\[dq]). -Choose a number from below, or type in your own value 1 / Enable -\ \[dq]true\[dq] 2 / Disable \ \[dq]false\[dq] speedup_enable> 1 Edit -advanced config? -(y/n) y) Yes n) No y/n> n Remote config -------------------- [remote] -type = mailru user = username\[at]mail.ru pass = *** ENCRYPTED *** -speedup_enable = true -------------------- y) Yes this is OK e) Edit -this remote d) Delete this remote y/e/d> y -.IP -.nf -\f[C] -Configuration of this backend does not require a local web browser. -You can use the configured backend as shown below: - -See top level directories - - rclone lsd remote: - -Make a new directory - - rclone mkdir remote:directory - -List the contents of a directory - - rclone ls remote:directory - -Sync \[ga]/home/local/directory\[ga] to the remote path, deleting any -excess files in the path. - - rclone sync --interactive /home/local/directory remote:directory - -### Modification times and hashes - -Files support a modification time attribute with up to 1 second precision. -Directories do not have a modification time, which is shown as \[dq]Jan 1 1970\[dq]. - -File hashes are supported, with a custom Mail.ru algorithm based on SHA1. -If file size is less than or equal to the SHA1 block size (20 bytes), -its hash is simply its data right-padded with zero bytes. -Hashes of a larger file is computed as a SHA1 of the file data -bytes concatenated with a decimal representation of the data length. - -### Emptying Trash - -Removing a file or directory actually moves it to the trash, which is not -visible to rclone but can be seen in a web browser. The trashed file -still occupies part of total quota. If you wish to empty your trash -and free some quota, you can use the \[ga]rclone cleanup remote:\[ga] command, -which will permanently delete all your trashed files. -This command does not take any path arguments. - -### Quota information - -To view your current quota you can use the \[ga]rclone about remote:\[ga] -command which will display your usage limit (quota) and the current usage. - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| \[dq] | 0x22 | \[uFF02] | -| * | 0x2A | \[uFF0A] | -| : | 0x3A | \[uFF1A] | -| < | 0x3C | \[uFF1C] | -| > | 0x3E | \[uFF1E] | -| ? | 0x3F | \[uFF1F] | -| \[rs] | 0x5C | \[uFF3C] | -| \[rs]| | 0x7C | \[uFF5C] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - - -### Standard options - -Here are the Standard options specific to mailru (Mail.ru Cloud). - -#### --mailru-client-id - -OAuth Client Id. - -Leave blank normally. - -Properties: - -- Config: client_id -- Env Var: RCLONE_MAILRU_CLIENT_ID -- Type: string -- Required: false - -#### --mailru-client-secret - -OAuth Client Secret. - -Leave blank normally. - -Properties: - -- Config: client_secret -- Env Var: RCLONE_MAILRU_CLIENT_SECRET -- Type: string -- Required: false - -#### --mailru-user - -User name (usually email). - -Properties: - -- Config: user -- Env Var: RCLONE_MAILRU_USER -- Type: string -- Required: true - -#### --mailru-pass - -Password. - -This must be an app password - rclone will not work with your normal -password. See the Configuration section in the docs for how to make an -app password. - - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - -Properties: - -- Config: pass -- Env Var: RCLONE_MAILRU_PASS -- Type: string -- Required: true - -#### --mailru-speedup-enable - -Skip full upload if there is another file with same data hash. - -This feature is called \[dq]speedup\[dq] or \[dq]put by hash\[dq]. It is especially efficient -in case of generally available files like popular books, video or audio clips, -because files are searched by hash in all accounts of all mailru users. +popular books, video or audio clips, because files are searched by hash +in all accounts of all mailru users. It is meaningless and ineffective if source file is unique or encrypted. -Please note that rclone may need local memory and disk space to calculate -content hash in advance and decide whether full upload is required. -Also, if rclone does not know file size in advance (e.g. in case of -streaming or partial uploads), it will not even try this optimization. - +Please note that rclone may need local memory and disk space to +calculate content hash in advance and decide whether full upload is +required. +Also, if rclone does not know file size in advance (e.g. +in case of streaming or partial uploads), it will not even try this +optimization. +.PP Properties: - -- Config: speedup_enable -- Env Var: RCLONE_MAILRU_SPEEDUP_ENABLE -- Type: bool -- Default: true -- Examples: - - \[dq]true\[dq] - - Enable - - \[dq]false\[dq] - - Disable - -### Advanced options - +.IP \[bu] 2 +Config: speedup_enable +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_SPEEDUP_ENABLE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: true +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]true\[dq] +.RS 2 +.IP \[bu] 2 +Enable +.RE +.IP \[bu] 2 +\[dq]false\[dq] +.RS 2 +.IP \[bu] 2 +Disable +.RE +.RE +.SS Advanced options +.PP Here are the Advanced options specific to mailru (Mail.ru Cloud). - -#### --mailru-token - +.SS --mailru-token +.PP OAuth Access Token as a JSON blob. - +.PP Properties: - -- Config: token -- Env Var: RCLONE_MAILRU_TOKEN -- Type: string -- Required: false - -#### --mailru-auth-url - +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --mailru-auth-url +.PP Auth server URL. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: auth_url -- Env Var: RCLONE_MAILRU_AUTH_URL -- Type: string -- Required: false - -#### --mailru-token-url - +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --mailru-token-url +.PP Token server url. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: token_url -- Env Var: RCLONE_MAILRU_TOKEN_URL -- Type: string -- Required: false - -#### --mailru-speedup-file-patterns - -Comma separated list of file name patterns eligible for speedup (put by hash). - -Patterns are case insensitive and can contain \[aq]*\[aq] or \[aq]?\[aq] meta characters. - +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --mailru-speedup-file-patterns +.PP +Comma separated list of file name patterns eligible for speedup (put by +hash). +.PP +Patterns are case insensitive and can contain \[aq]*\[aq] or \[aq]?\[aq] +meta characters. +.PP Properties: - -- Config: speedup_file_patterns -- Env Var: RCLONE_MAILRU_SPEEDUP_FILE_PATTERNS -- Type: string -- Default: \[dq]*.mkv,*.avi,*.mp4,*.mp3,*.zip,*.gz,*.rar,*.pdf\[dq] -- Examples: - - \[dq]\[dq] - - Empty list completely disables speedup (put by hash). - - \[dq]*\[dq] - - All files will be attempted for speedup. - - \[dq]*.mkv,*.avi,*.mp4,*.mp3\[dq] - - Only common audio/video files will be tried for put by hash. - - \[dq]*.zip,*.gz,*.rar,*.pdf\[dq] - - Only common archives or PDF books will be tried for speedup. - -#### --mailru-speedup-max-disk - +.IP \[bu] 2 +Config: speedup_file_patterns +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_SPEEDUP_FILE_PATTERNS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: +\[dq]\f[I].mkv,\f[R].avi,\f[I].mp4,\f[R].mp3,\f[I].zip,\f[R].gz,\f[I].rar,\f[R].pdf\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]\[dq] +.RS 2 +.IP \[bu] 2 +Empty list completely disables speedup (put by hash). +.RE +.IP \[bu] 2 +\[dq]*\[dq] +.RS 2 +.IP \[bu] 2 +All files will be attempted for speedup. +.RE +.IP \[bu] 2 +\[dq]\f[I].mkv,\f[R].avi,\f[I].mp4,\f[R].mp3\[dq] +.RS 2 +.IP \[bu] 2 +Only common audio/video files will be tried for put by hash. +.RE +.IP \[bu] 2 +\[dq]\f[I].zip,\f[R].gz,\f[I].rar,\f[R].pdf\[dq] +.RS 2 +.IP \[bu] 2 +Only common archives or PDF books will be tried for speedup. +.RE +.RE +.SS --mailru-speedup-max-disk +.PP This option allows you to disable speedup (put by hash) for large files. - +.PP Reason is that preliminary hashing can exhaust your RAM or disk space. - +.PP Properties: - -- Config: speedup_max_disk -- Env Var: RCLONE_MAILRU_SPEEDUP_MAX_DISK -- Type: SizeSuffix -- Default: 3Gi -- Examples: - - \[dq]0\[dq] - - Completely disable speedup (put by hash). - - \[dq]1G\[dq] - - Files larger than 1Gb will be uploaded directly. - - \[dq]3G\[dq] - - Choose this option if you have less than 3Gb free on local disk. - -#### --mailru-speedup-max-memory - +.IP \[bu] 2 +Config: speedup_max_disk +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_SPEEDUP_MAX_DISK +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 3Gi +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]0\[dq] +.RS 2 +.IP \[bu] 2 +Completely disable speedup (put by hash). +.RE +.IP \[bu] 2 +\[dq]1G\[dq] +.RS 2 +.IP \[bu] 2 +Files larger than 1Gb will be uploaded directly. +.RE +.IP \[bu] 2 +\[dq]3G\[dq] +.RS 2 +.IP \[bu] 2 +Choose this option if you have less than 3Gb free on local disk. +.RE +.RE +.SS --mailru-speedup-max-memory +.PP Files larger than the size given below will always be hashed on disk. - +.PP Properties: - -- Config: speedup_max_memory -- Env Var: RCLONE_MAILRU_SPEEDUP_MAX_MEMORY -- Type: SizeSuffix -- Default: 32Mi -- Examples: - - \[dq]0\[dq] - - Preliminary hashing will always be done in a temporary disk location. - - \[dq]32M\[dq] - - Do not dedicate more than 32Mb RAM for preliminary hashing. - - \[dq]256M\[dq] - - You have at most 256Mb RAM free for hash calculations. - -#### --mailru-check-hash - +.IP \[bu] 2 +Config: speedup_max_memory +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_SPEEDUP_MAX_MEMORY +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 32Mi +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]0\[dq] +.RS 2 +.IP \[bu] 2 +Preliminary hashing will always be done in a temporary disk location. +.RE +.IP \[bu] 2 +\[dq]32M\[dq] +.RS 2 +.IP \[bu] 2 +Do not dedicate more than 32Mb RAM for preliminary hashing. +.RE +.IP \[bu] 2 +\[dq]256M\[dq] +.RS 2 +.IP \[bu] 2 +You have at most 256Mb RAM free for hash calculations. +.RE +.RE +.SS --mailru-check-hash +.PP What should copy do if file checksum is mismatched or invalid. - +.PP Properties: - -- Config: check_hash -- Env Var: RCLONE_MAILRU_CHECK_HASH -- Type: bool -- Default: true -- Examples: - - \[dq]true\[dq] - - Fail with error. - - \[dq]false\[dq] - - Ignore and continue. - -#### --mailru-user-agent - +.IP \[bu] 2 +Config: check_hash +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_CHECK_HASH +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: true +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]true\[dq] +.RS 2 +.IP \[bu] 2 +Fail with error. +.RE +.IP \[bu] 2 +\[dq]false\[dq] +.RS 2 +.IP \[bu] 2 +Ignore and continue. +.RE +.RE +.SS --mailru-user-agent +.PP HTTP user agent used internally by client. - -Defaults to \[dq]rclone/VERSION\[dq] or \[dq]--user-agent\[dq] provided on command line. - +.PP +Defaults to \[dq]rclone/VERSION\[dq] or \[dq]--user-agent\[dq] provided +on command line. +.PP Properties: - -- Config: user_agent -- Env Var: RCLONE_MAILRU_USER_AGENT -- Type: string -- Required: false - -#### --mailru-quirks - +.IP \[bu] 2 +Config: user_agent +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_USER_AGENT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --mailru-quirks +.PP Comma separated list of internal maintenance flags. - -This option must not be used by an ordinary user. It is intended only to -facilitate remote troubleshooting of backend issues. Strict meaning of -flags is not documented and not guaranteed to persist between releases. +.PP +This option must not be used by an ordinary user. +It is intended only to facilitate remote troubleshooting of backend +issues. +Strict meaning of flags is not documented and not guaranteed to persist +between releases. Quirks will be removed when the backend grows stable. Supported quirks: atomicmkdir binlist unknowndirs - +.PP Properties: - -- Config: quirks -- Env Var: RCLONE_MAILRU_QUIRKS -- Type: string -- Required: false - -#### --mailru-encoding - +.IP \[bu] 2 +Config: quirks +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_QUIRKS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --mailru-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_MAILRU_ENCODING -- Type: Encoding -- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot - -#### --mailru-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: +Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot +.SS --mailru-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_MAILRU_DESCRIPTION -- Type: string -- Required: false - - - -## Limitations - -File size limits depend on your account. A single file size is limited by 2G -for a free account and unlimited for paid tariffs. Please refer to the Mail.ru -site for the total uploaded size limits. - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_MAILRU_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP +File size limits depend on your account. +A single file size is limited by 2G for a free account and unlimited for +paid tariffs. +Please refer to the Mail.ru site for the total uploaded size limits. +.PP Note that Mailru is case insensitive so you can\[aq]t have a file called \[dq]Hello.doc\[dq] and one called \[dq]hello.doc\[dq]. - -# Mega - -[Mega](https://mega.nz/) is a cloud storage and file hosting service +.SH Mega +.PP +Mega (https://mega.nz/) is a cloud storage and file hosting service known for its security feature where all files are encrypted locally -before they are uploaded. This prevents anyone (including employees of -Mega) from accessing the files without knowledge of the key used for -encryption. - +before they are uploaded. +This prevents anyone (including employees of Mega) from accessing the +files without knowledge of the key used for encryption. +.PP This is an rclone backend for Mega which supports the file transfer features of Mega using the same client side encryption. - -Paths are specified as \[ga]remote:path\[ga] - -Paths may be as deep as required, e.g. \[ga]remote:directory/subdirectory\[ga]. - -## Configuration - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi .PP -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 [snip] XX / Mega -\ \[dq]mega\[dq] [snip] Storage> mega User name user> -you\[at]example.com Password. -y) Yes type in my own password g) Generate random password n) No leave -this optional password blank y/g/n> y Enter the password: password: -Confirm the password: password: Remote config -------------------- -[remote] type = mega user = you\[at]example.com pass = *** ENCRYPTED *** --------------------- y) Yes this is OK e) Edit this remote d) Delete -this remote y/e/d> y +Paths are specified as \f[C]remote:path\f[R] +.PP +Paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R]. +.SS Configuration +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: .IP .nf \f[C] -**NOTE:** The encryption keys need to have been already generated after a regular login -via the browser, otherwise attempting to use the credentials in \[ga]rclone\[ga] will fail. - -Once configured you can then use \[ga]rclone\[ga] like this, - + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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 +[snip] +XX / Mega + \[rs] \[dq]mega\[dq] +[snip] +Storage> mega +User name +user> you\[at]example.com +Password. +y) Yes type in my own password +g) Generate random password +n) No leave this optional password blank +y/g/n> y +Enter the password: +password: +Confirm the password: +password: +Remote config +-------------------- +[remote] +type = mega +user = you\[at]example.com +pass = *** ENCRYPTED *** +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +\f[B]NOTE:\f[R] The encryption keys need to have been already generated +after a regular login via the browser, otherwise attempting to use the +credentials in \f[C]rclone\f[R] will fail. +.PP +Once configured you can then use \f[C]rclone\f[R] like this, +.PP List directories in top level of your Mega - - rclone lsd remote: - +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP List all the files in your Mega - - rclone ls remote: - +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP To copy a local directory to an Mega directory called backup - - rclone copy /home/source remote:backup - -### Modification times and hashes - +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.SS Modification times and hashes +.PP Mega does not support modification times or hashes yet. - -### Restricted filename characters - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| NUL | 0x00 | \[u2400] | -| / | 0x2F | \[uFF0F] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -### Duplicated files - +.SS Restricted filename characters +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +NUL +T}@T{ +0x00 +T}@T{ +\[u2400] +T} +T{ +/ +T}@T{ +0x2F +T}@T{ +\[uFF0F] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Duplicated files +.PP Mega can have two files with exactly the same name and path (unlike a normal file system). - +.PP Duplicated files cause problems with the syncing and you will see messages in the log about duplicates. - -Use \[ga]rclone dedupe\[ga] to fix duplicated files. - -### Failure to log-in - -#### Object not found - -If you are connecting to your Mega remote for the first time, -to test access and synchronization, you may receive an error such as -\f[R] -.fi .PP -Failed to create file system for \[dq]my-mega-remote:\[dq]: couldn\[aq]t -login: Object (typically, node or user) not found +Use \f[C]rclone dedupe\f[R] to fix duplicated files. +.SS Failure to log-in +.SS Object not found +.PP +If you are connecting to your Mega remote for the first time, to test +access and synchronization, you may receive an error such as .IP .nf \f[C] -The diagnostic steps often recommended in the [rclone forum](https://forum.rclone.org/search?q=mega) -start with the **MEGAcmd** utility. Note that this refers to -the official C++ command from https://github.com/meganz/MEGAcmd -and not the go language built command from t3rm1n4l/megacmd -that is no longer maintained. - -Follow the instructions for installing MEGAcmd and try accessing -your remote as they recommend. You can establish whether or not -you can log in using MEGAcmd, and obtain diagnostic information -to help you, and search or work with others in the forum. +Failed to create file system for \[dq]my-mega-remote:\[dq]: +couldn\[aq]t login: Object (typically, node or user) not found \f[R] .fi .PP -MEGA CMD> login me\[at]example.com Password: Fetching nodes ... -Loading transfers from local cache Login complete as me\[at]example.com -me\[at]example.com:/$ +The diagnostic steps often recommended in the rclone +forum (https://forum.rclone.org/search?q=mega) start with the +\f[B]MEGAcmd\f[R] utility. +Note that this refers to the official C++ command from +https://github.com/meganz/MEGAcmd and not the go language built command +from t3rm1n4l/megacmd that is no longer maintained. +.PP +Follow the instructions for installing MEGAcmd and try accessing your +remote as they recommend. +You can establish whether or not you can log in using MEGAcmd, and +obtain diagnostic information to help you, and search or work with +others in the forum. .IP .nf \f[C] -Note that some have found issues with passwords containing special -characters. If you can not log on with rclone, but MEGAcmd logs on -just fine, then consider changing your password temporarily to -pure alphanumeric characters, in case that helps. - - -#### Repeated commands blocks access - -Mega remotes seem to get blocked (reject logins) under \[dq]heavy use\[dq]. +MEGA CMD> login me\[at]example.com +Password: +Fetching nodes ... +Loading transfers from local cache +Login complete as me\[at]example.com +me\[at]example.com:/$ +\f[R] +.fi +.PP +Note that some have found issues with passwords containing special +characters. +If you can not log on with rclone, but MEGAcmd logs on just fine, then +consider changing your password temporarily to pure alphanumeric +characters, in case that helps. +.SS Repeated commands blocks access +.PP +Mega remotes seem to get blocked (reject logins) under \[dq]heavy +use\[dq]. We haven\[aq]t worked out the exact blocking rules but it seems to be related to fast paced, successive rclone commands. - -For example, executing this command 90 times in a row \[ga]rclone link -remote:file\[ga] will cause the remote to become \[dq]blocked\[dq]. This is not an -abnormal situation, for example if you wish to get the public links of -a directory with hundred of files... After more or less a week, the -remote will remote accept rclone logins normally again. - -You can mitigate this issue by mounting the remote it with \[ga]rclone -mount\[ga]. This will log-in when mounting and a log-out when unmounting -only. You can also run \[ga]rclone rcd\[ga] and then use \[ga]rclone rc\[ga] to run -the commands over the API to avoid logging in each time. - +.PP +For example, executing this command 90 times in a row +\f[C]rclone link remote:file\f[R] will cause the remote to become +\[dq]blocked\[dq]. +This is not an abnormal situation, for example if you wish to get the +public links of a directory with hundred of files... +After more or less a week, the remote will remote accept rclone logins +normally again. +.PP +You can mitigate this issue by mounting the remote it with +\f[C]rclone mount\f[R]. +This will log-in when mounting and a log-out when unmounting only. +You can also run \f[C]rclone rcd\f[R] and then use \f[C]rclone rc\f[R] +to run the commands over the API to avoid logging in each time. +.PP Rclone does not currently close mega sessions (you can see them in the web interface), however closing the sessions does not solve the issue. - +.PP If you space rclone commands by 3 seconds it will avoid blocking the -remote. We haven\[aq]t identified the exact blocking rules, so perhaps one -could execute the command 80 times without waiting and avoid blocking -by waiting 3 seconds, then continuing... - -Note that this has been observed by trial and error and might not be -set in stone. - +remote. +We haven\[aq]t identified the exact blocking rules, so perhaps one could +execute the command 80 times without waiting and avoid blocking by +waiting 3 seconds, then continuing... +.PP +Note that this has been observed by trial and error and might not be set +in stone. +.PP Other tools seem not to produce this blocking effect, as they use a different working approach (state-based, using sessionIDs instead of log-in) which isn\[aq]t compatible with the current stateless rclone approach. - -Note that once blocked, the use of other tools (such as megacmd) is -not a sure workaround: following megacmd login times have been -observed in succession for blocked remote: 7 minutes, 20 min, 30min, 30 -min, 30min. Web access looks unaffected though. - +.PP +Note that once blocked, the use of other tools (such as megacmd) is not +a sure workaround: following megacmd login times have been observed in +succession for blocked remote: 7 minutes, 20 min, 30min, 30 min, 30min. +Web access looks unaffected though. +.PP Investigation is continuing in relation to workarounds based on timeouts, pacers, retrials and tpslimits - if you discover something relevant, please post on the forum. - +.PP So, if rclone was working nicely and suddenly you are unable to log-in -and you are sure the user and the password are correct, likely you -have got the remote blocked for a while. - - -### Standard options - +and you are sure the user and the password are correct, likely you have +got the remote blocked for a while. +.SS Standard options +.PP Here are the Standard options specific to mega (Mega). - -#### --mega-user - +.SS --mega-user +.PP User name. - +.PP Properties: - -- Config: user -- Env Var: RCLONE_MEGA_USER -- Type: string -- Required: true - -#### --mega-pass - +.IP \[bu] 2 +Config: user +.IP \[bu] 2 +Env Var: RCLONE_MEGA_USER +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --mega-pass +.PP Password. - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP Properties: - -- Config: pass -- Env Var: RCLONE_MEGA_PASS -- Type: string -- Required: true - -### Advanced options - +.IP \[bu] 2 +Config: pass +.IP \[bu] 2 +Env Var: RCLONE_MEGA_PASS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS Advanced options +.PP Here are the Advanced options specific to mega (Mega). - -#### --mega-debug - +.SS --mega-debug +.PP Output more debug from Mega. - +.PP If this flag is set (along with -vv) it will print further debugging information from the mega backend. - +.PP Properties: - -- Config: debug -- Env Var: RCLONE_MEGA_DEBUG -- Type: bool -- Default: false - -#### --mega-hard-delete - +.IP \[bu] 2 +Config: debug +.IP \[bu] 2 +Env Var: RCLONE_MEGA_DEBUG +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --mega-hard-delete +.PP Delete files permanently rather than putting them into the trash. - +.PP Normally the mega backend will put all deletions into the trash rather -than permanently deleting them. If you specify this then rclone will -permanently delete objects instead. - +than permanently deleting them. +If you specify this then rclone will permanently delete objects instead. +.PP Properties: - -- Config: hard_delete -- Env Var: RCLONE_MEGA_HARD_DELETE -- Type: bool -- Default: false - -#### --mega-use-https - +.IP \[bu] 2 +Config: hard_delete +.IP \[bu] 2 +Env Var: RCLONE_MEGA_HARD_DELETE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --mega-use-https +.PP Use HTTPS for transfers. - +.PP MEGA uses plain text HTTP connections by default. -Some ISPs throttle HTTP connections, this causes transfers to become very slow. +Some ISPs throttle HTTP connections, this causes transfers to become +very slow. Enabling this will force MEGA to use HTTPS for all transfers. -HTTPS is normally not necessary since all data is already encrypted anyway. +HTTPS is normally not necessary since all data is already encrypted +anyway. Enabling it will increase CPU usage and add network overhead. - +.PP Properties: - -- Config: use_https -- Env Var: RCLONE_MEGA_USE_HTTPS -- Type: bool -- Default: false - -#### --mega-encoding - +.IP \[bu] 2 +Config: use_https +.IP \[bu] 2 +Env Var: RCLONE_MEGA_USE_HTTPS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --mega-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_MEGA_ENCODING -- Type: Encoding -- Default: Slash,InvalidUtf8,Dot - -#### --mega-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_MEGA_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,InvalidUtf8,Dot +.SS --mega-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_MEGA_DESCRIPTION -- Type: string -- Required: false - - - -### Process \[ga]killed\[ga] - -On accounts with large files or something else, memory usage can significantly increase when executing list/sync instructions. When running on cloud providers (like AWS with EC2), check if the instance type has sufficient memory/CPU to execute the commands. Use the resource monitoring tools to inspect after sending the commands. Look [at this issue](https://forum.rclone.org/t/rclone-with-mega-appears-to-work-only-in-some-accounts/40233/4). - -## Limitations - -This backend uses the [go-mega go library](https://github.com/t3rm1n4l/go-mega) which is an opensource -go library implementing the Mega API. There doesn\[aq]t appear to be any -documentation for the mega protocol beyond the [mega C++ SDK](https://github.com/meganz/sdk) source code -so there are likely quite a few errors still remaining in this library. - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_MEGA_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Process \f[C]killed\f[R] +.PP +On accounts with large files or something else, memory usage can +significantly increase when executing list/sync instructions. +When running on cloud providers (like AWS with EC2), check if the +instance type has sufficient memory/CPU to execute the commands. +Use the resource monitoring tools to inspect after sending the commands. +Look at this +issue (https://forum.rclone.org/t/rclone-with-mega-appears-to-work-only-in-some-accounts/40233/4). +.SS Limitations +.PP +This backend uses the go-mega go +library (https://github.com/t3rm1n4l/go-mega) which is an opensource go +library implementing the Mega API. +There doesn\[aq]t appear to be any documentation for the mega protocol +beyond the mega C++ SDK (https://github.com/meganz/sdk) source code so +there are likely quite a few errors still remaining in this library. +.PP Mega allows duplicate files which may confuse rclone. +.SH Memory +.PP +The memory backend is an in RAM backend. +It does not persist its data - use the local backend for that. +.PP +The memory backend behaves like a bucket-based remote (e.g. +like s3). +Because it has no parameters you can just use it with the +\f[C]:memory:\f[R] remote name. +.SS Configuration +.PP +You can configure it as a remote like this with \f[C]rclone config\f[R] +too if you want to: +.IP +.nf +\f[C] +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. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +[snip] +XX / Memory + \[rs] \[dq]memory\[dq] +[snip] +Storage> memory +** See help for memory backend at: https://rclone.org/memory/ ** -# Memory +Remote config -The memory backend is an in RAM backend. It does not persist its -data - use the local backend for that. - -The memory backend behaves like a bucket-based remote (e.g. like -s3). Because it has no parameters you can just use it with the -\[ga]:memory:\[ga] remote name. - -## Configuration - -You can configure it as a remote like this with \[ga]rclone config\[ga] too if -you want to: +-------------------- +[remote] +type = memory +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y \f[R] .fi .PP -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. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value [snip] XX / Memory -\ \[dq]memory\[dq] [snip] Storage> memory ** See help for memory backend -at: https://rclone.org/memory/ ** +Because the memory backend isn\[aq]t persistent it is most useful for +testing or with an rclone server or rclone mount, e.g. +.IP +.nf +\f[C] +rclone mount :memory: /mnt/tmp +rclone serve webdav :memory: +rclone serve sftp :memory: +\f[R] +.fi +.SS Modification times and hashes .PP +The memory backend supports MD5 hashes and modification times accurate +to 1 nS. +.SS Restricted filename characters +.PP +The memory backend replaces the default restricted characters +set (https://rclone.org/overview/#restricted-characters). +.SS Advanced options +.PP +Here are the Advanced options specific to memory (In memory object +storage system.). +.SS --memory-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_MEMORY_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SH Akamai NetStorage +.PP +Paths are specified as \f[C]remote:\f[R] You may put subdirectories in +too, e.g. +\f[C]remote:/path/to/dir\f[R]. +If you have a CP code you can use that as the folder after the domain +such as //. +.PP +For example, this is commonly configured with or without a CP code: * +\f[B]With a CP code\f[R]. +\f[C][your-domain-prefix]-nsu.akamaihd.net/123456/subdirectory/\f[R] * +\f[B]Without a CP code\f[R]. +\f[C][your-domain-prefix]-nsu.akamaihd.net\f[R] +.PP +See all buckets rclone lsd remote: The initial setup for Netstorage +involves getting an account and secret. +Use \f[C]rclone config\f[R] to walk you through the setup process. +.SS Configuration +.PP +Here\[aq]s an example of how to make a remote called \f[C]ns1\f[R]. +.IP "1." 3 +To begin the interactive configuration process, enter this command: +.IP +.nf +\f[C] +rclone config +\f[R] +.fi +.IP "2." 3 +Type \f[C]n\f[R] to create a new remote. +.IP +.nf +\f[C] +n) New remote +d) Delete remote +q) Quit config +e/n/d/q> n +\f[R] +.fi +.IP "3." 3 +For this example, enter \f[C]ns1\f[R] when you reach the name> prompt. +.IP +.nf +\f[C] +name> ns1 +\f[R] +.fi +.IP "4." 3 +Enter \f[C]netstorage\f[R] as the type of storage to configure. +.IP +.nf +\f[C] +Type of storage to configure. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +XX / NetStorage + \[rs] \[dq]netstorage\[dq] +Storage> netstorage +\f[R] +.fi +.IP "5." 3 +Select between the HTTP or HTTPS protocol. +Most users should choose HTTPS, which is the default. +HTTP is provided primarily for debugging purposes. +.IP +.nf +\f[C] +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value + 1 / HTTP protocol + \[rs] \[dq]http\[dq] + 2 / HTTPS protocol + \[rs] \[dq]https\[dq] +protocol> 1 +\f[R] +.fi +.IP "6." 3 +Specify your NetStorage host, CP code, and any necessary content paths +using this format: \f[C]///\f[R] +.IP +.nf +\f[C] +Enter a string value. Press Enter for the default (\[dq]\[dq]). +host> baseball-nsu.akamaihd.net/123456/content/ +\f[R] +.fi +.IP "7." 3 +Set the netstorage account name +.IP +.nf +\f[C] +Enter a string value. Press Enter for the default (\[dq]\[dq]). +account> username +\f[R] +.fi +.IP "8." 3 +Set the Netstorage account secret/G2O key which will be used for +authentication purposes. +Select the \f[C]y\f[R] option to set your own password then enter your +secret. +Note: The secret is stored in the \f[C]rclone.conf\f[R] file with +hex-encoded encryption. +.IP +.nf +\f[C] +y) Yes type in my own password +g) Generate random password +y/g> y +Enter the password: +password: +Confirm the password: +password: +\f[R] +.fi +.IP "9." 3 +View the summary and confirm your remote configuration. +.IP +.nf +\f[C] +[ns1] +type = netstorage +protocol = http +host = baseball-nsu.akamaihd.net/123456/content/ +account = username +secret = *** ENCRYPTED *** +-------------------- +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +This remote is called \f[C]ns1\f[R] and can now be used. +.SS Example operations +.PP +Get started with rclone and NetStorage with these examples. +For additional rclone commands, visit https://rclone.org/commands/. +.SS See contents of a directory in your project +.IP +.nf +\f[C] +rclone lsd ns1:/974012/testing/ +\f[R] +.fi +.SS Sync the contents local with remote +.IP +.nf +\f[C] +rclone sync . ns1:/974012/testing/ +\f[R] +.fi +.SS Upload local content to remote +.IP +.nf +\f[C] +rclone copy notes.txt ns1:/974012/testing/ +\f[R] +.fi +.SS Delete content on remote +.IP +.nf +\f[C] +rclone delete ns1:/974012/testing/notes.txt +\f[R] +.fi +.SS Move or copy content between CP codes. +.PP +Your credentials must have access to two CP codes on the same remote. +You can\[aq]t perform operations between different remotes. +.IP +.nf +\f[C] +rclone move ns1:/974012/testing/notes.txt ns1:/974450/testing2/ +\f[R] +.fi +.SS Features +.SS Symlink Support +.PP +The Netstorage backend changes the rclone \f[C]--links, -l\f[R] +behavior. +When uploading, instead of creating the .rclonelink file, use the +\[dq]symlink\[dq] API in order to create the corresponding symlink on +the remote. +The .rclonelink file will not be created, the upload will be intercepted +and only the symlink file that matches the source file name with no +suffix will be created on the remote. +.PP +This will effectively allow commands like copy/copyto, move/moveto and +sync to upload from local to remote and download from remote to local +directories with symlinks. +Due to internal rclone limitations, it is not possible to upload an +individual symlink file to any remote backend. +You can always use the \[dq]backend symlink\[dq] command to create a +symlink on the NetStorage server, refer to \[dq]symlink\[dq] section +below. +.PP +Individual symlink files on the remote can be used with the commands +like \[dq]cat\[dq] to print the destination name, or \[dq]delete\[dq] to +delete symlink, or copy, copy/to and move/moveto to download from the +remote to local. +Note: individual symlink files on the remote should be specified +including the suffix .rclonelink. +.PP +\f[B]Note\f[R]: No file with the suffix .rclonelink should ever exist on +the server since it is not possible to actually upload/create a file +with .rclonelink suffix with rclone, it can only exist if it is manually +created through a non-rclone method on the remote. +.SS Implicit vs. Explicit Directories +.PP +With NetStorage, directories can exist in one of two forms: +.IP "1." 3 +\f[B]Explicit Directory\f[R]. +This is an actual, physical directory that you have created in a storage +group. +.IP "2." 3 +\f[B]Implicit Directory\f[R]. +This refers to a directory within a path that has not been physically +created. +For example, during upload of a file, nonexistent subdirectories can be +specified in the target path. +NetStorage creates these as \[dq]implicit.\[dq] While the directories +aren\[aq]t physically created, they exist implicitly and the noted path +is connected with the uploaded file. +.PP +Rclone will intercept all file uploads and mkdir commands for the +NetStorage remote and will explicitly issue the mkdir command for each +directory in the uploading path. +This will help with the interoperability with the other Akamai services +such as SFTP and the Content Management Shell (CMShell). +Rclone will not guarantee correctness of operations with implicit +directories which might have been created as a result of using an upload +API directly. +.SS \f[C]--fast-list\f[R] / ListR support +.PP +NetStorage remote supports the ListR feature by using the \[dq]list\[dq] +NetStorage API action to return a lexicographical list of all objects +within the specified CP code, recursing into subdirectories as +they\[aq]re encountered. +.IP \[bu] 2 +\f[B]Rclone will use the ListR method for some commands by default\f[R]. +Commands such as \f[C]lsf -R\f[R] will use ListR by default. +To disable this, include the \f[C]--disable listR\f[R] option to use the +non-recursive method of listing objects. +.IP \[bu] 2 +\f[B]Rclone will not use the ListR method for some commands\f[R]. +Commands such as \f[C]sync\f[R] don\[aq]t use ListR by default. +To force using the ListR method, include the \f[C]--fast-list\f[R] +option. +.PP +There are pros and cons of using the ListR method, refer to rclone +documentation (https://rclone.org/docs/#fast-list). +In general, the sync command over an existing deep tree on the remote +will run faster with the \[dq]--fast-list\[dq] flag but with extra +memory usage as a side effect. +It might also result in higher CPU utilization but the whole task can be +completed faster. +.PP +\f[B]Note\f[R]: There is a known limitation that \[dq]lsf -R\[dq] will +display number of files in the directory and directory size as -1 when +ListR method is used. +The workaround is to pass \[dq]--disable listR\[dq] flag if these +numbers are important in the output. +.SS Purge +.PP +NetStorage remote supports the purge feature by using the +\[dq]quick-delete\[dq] NetStorage API action. +The quick-delete action is disabled by default for security reasons and +can be enabled for the account through the Akamai portal. +Rclone will first try to use quick-delete action for the purge command +and if this functionality is disabled then will fall back to a standard +delete method. +.PP +\f[B]Note\f[R]: Read the NetStorage Usage +API (https://learn.akamai.com/en-us/webhelp/netstorage/netstorage-http-api-developer-guide/GUID-15836617-9F50-405A-833C-EA2556756A30.html) +for considerations when using \[dq]quick-delete\[dq]. +In general, using quick-delete method will not delete the tree +immediately and objects targeted for quick-delete may still be +accessible. +.SS Standard options +.PP +Here are the Standard options specific to netstorage (Akamai +NetStorage). +.SS --netstorage-host +.PP +Domain+path of NetStorage host to connect to. +.PP +Format should be \f[C]/\f[R] +.PP +Properties: +.IP \[bu] 2 +Config: host +.IP \[bu] 2 +Env Var: RCLONE_NETSTORAGE_HOST +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --netstorage-account +.PP +Set the NetStorage account name +.PP +Properties: +.IP \[bu] 2 +Config: account +.IP \[bu] 2 +Env Var: RCLONE_NETSTORAGE_ACCOUNT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS --netstorage-secret +.PP +Set the NetStorage account secret/G2O key for authentication. +.PP +Please choose the \[aq]y\[aq] option to set your own password then enter +your secret. +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP +Properties: +.IP \[bu] 2 +Config: secret +.IP \[bu] 2 +Env Var: RCLONE_NETSTORAGE_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: true +.SS Advanced options +.PP +Here are the Advanced options specific to netstorage (Akamai +NetStorage). +.SS --netstorage-protocol +.PP +Select between HTTP or HTTPS protocol. +.PP +Most users should choose HTTPS, which is the default. +HTTP is provided primarily for debugging purposes. +.PP +Properties: +.IP \[bu] 2 +Config: protocol +.IP \[bu] 2 +Env Var: RCLONE_NETSTORAGE_PROTOCOL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]https\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]http\[dq] +.RS 2 +.IP \[bu] 2 +HTTP protocol +.RE +.IP \[bu] 2 +\[dq]https\[dq] +.RS 2 +.IP \[bu] 2 +HTTPS protocol +.RE +.RE +.SS --netstorage-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_NETSTORAGE_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Backend commands +.PP +Here are the commands specific to the netstorage backend. +.PP +Run them with +.IP +.nf +\f[C] +rclone backend COMMAND remote: +\f[R] +.fi +.PP +The help below will explain what arguments each command takes. +.PP +See the backend (https://rclone.org/commands/rclone_backend/) command +for more info on how to pass options and arguments. +.PP +These can be run on a running backend using the rc command +backend/command (https://rclone.org/rc/#backend-command). +.SS du +.PP +Return disk usage information for a specified directory +.IP +.nf +\f[C] +rclone backend du remote: [options] [+] +\f[R] +.fi +.PP +The usage information returned, includes the targeted directory as well +as all files stored in any sub-directories that may exist. +.SS symlink +.PP +You can create a symbolic link in ObjectStore with the symlink action. +.IP +.nf +\f[C] +rclone backend symlink remote: [options] [+] +\f[R] +.fi +.PP +The desired path location (including applicable sub-directories) ending +in the object that will be the target of the symlink (for example, +/links/mylink). +Include the file extension for the object, if applicable. +\f[C]rclone backend symlink \f[R] +.SH Microsoft Azure Blob Storage +.PP +Paths are specified as \f[C]remote:container\f[R] (or \f[C]remote:\f[R] +for the \f[C]lsd\f[R] command.) You may put subdirectories in too, e.g. +\f[C]remote:container/path/to/dir\f[R]. +.SS Configuration +.PP +Here is an example of making a Microsoft Azure Blob Storage +configuration. +For a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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 +[snip] +XX / Microsoft Azure Blob Storage + \[rs] \[dq]azureblob\[dq] +[snip] +Storage> azureblob +Storage Account Name +account> account_name +Storage Account Key +key> base64encodedkey== +Endpoint for the service - leave blank normally. +endpoint> Remote config +-------------------- +[remote] +account = account_name +key = base64encodedkey== +endpoint = +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +See all containers +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +Make a new container +.IP +.nf +\f[C] +rclone mkdir remote:container +\f[R] +.fi +.PP +List the contents of a container +.IP +.nf +\f[C] +rclone ls remote:container +\f[R] +.fi +.PP +Sync \f[C]/home/local/directory\f[R] to the remote container, deleting +any excess files in the container. +.IP +.nf +\f[C] +rclone sync --interactive /home/local/directory remote:container +\f[R] +.fi +.SS --fast-list +.PP +This remote supports \f[C]--fast-list\f[R] which allows you to use fewer +transactions in exchange for more memory. +See the rclone docs (https://rclone.org/docs/#fast-list) for more +details. +.SS Modification times and hashes +.PP +The modification time is stored as metadata on the object with the +\f[C]mtime\f[R] key. +It is stored using RFC3339 Format time with nanosecond precision. +The metadata is supplied during directory listings so there is no +performance overhead to using it. +.PP +If you wish to use the Azure standard \f[C]LastModified\f[R] time stored +on the object as the modified time, then use the +\f[C]--use-server-modtime\f[R] flag. +Note that rclone can\[aq]t set \f[C]LastModified\f[R], so using the +\f[C]--update\f[R] flag when syncing is recommended if using +\f[C]--use-server-modtime\f[R]. +.PP +MD5 hashes are stored with blobs. +However blobs that were uploaded in chunks only have an MD5 if the +source remote was capable of MD5 hashes, e.g. +the local disk. +.SS Performance +.PP +When uploading large files, increasing the value of +\f[C]--azureblob-upload-concurrency\f[R] will increase performance at +the cost of using more memory. +The default of 16 is set quite conservatively to use less memory. +It maybe be necessary raise it to 64 or higher to fully utilize a 1 +GBit/s link with a single file transfer. +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: .PP .TS tab(@); -l. +l c c. T{ -[remote] +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +/ +T}@T{ +0x2F +T}@T{ +\[uFF0F] T} T{ -type = memory +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] T} .TE -.IP "y)" 3 -Yes this is OK (default) -.IP "z)" 3 -Edit this remote -.IP "a)" 3 -Delete this remote y/e/d> y -.IP -.nf -\f[C] -Because the memory backend isn\[aq]t persistent it is most useful for -testing or with an rclone server or rclone mount, e.g. - - rclone mount :memory: /mnt/tmp - rclone serve webdav :memory: - rclone serve sftp :memory: - -### Modification times and hashes - -The memory backend supports MD5 hashes and modification times accurate to 1 nS. - -### Restricted filename characters - -The memory backend replaces the [default restricted characters -set](https://rclone.org/overview/#restricted-characters). - - -### Advanced options - -Here are the Advanced options specific to memory (In memory object storage system.). - -#### --memory-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_MEMORY_DESCRIPTION -- Type: string -- Required: false - - - -# Akamai NetStorage - -Paths are specified as \[ga]remote:\[ga] -You may put subdirectories in too, e.g. \[ga]remote:/path/to/dir\[ga]. -If you have a CP code you can use that as the folder after the domain such as \[rs]\[rs]/\[rs]\[rs]/\[rs]. - -For example, this is commonly configured with or without a CP code: -* **With a CP code**. \[ga][your-domain-prefix]-nsu.akamaihd.net/123456/subdirectory/\[ga] -* **Without a CP code**. \[ga][your-domain-prefix]-nsu.akamaihd.net\[ga] - - -See all buckets - rclone lsd remote: -The initial setup for Netstorage involves getting an account and secret. Use \[ga]rclone config\[ga] to walk you through the setup process. - -## Configuration - -Here\[aq]s an example of how to make a remote called \[ga]ns1\[ga]. - -1. To begin the interactive configuration process, enter this command: -\f[R] -.fi .PP -rclone config -.IP -.nf -\f[C] -2. Type \[ga]n\[ga] to create a new remote. -\f[R] -.fi -.IP "n)" 3 -New remote -.IP "o)" 3 -Delete remote -.IP "p)" 3 -Quit config e/n/d/q> n -.IP -.nf -\f[C] -3. For this example, enter \[ga]ns1\[ga] when you reach the name> prompt. -\f[R] -.fi -.PP -name> ns1 -.IP -.nf -\f[C] -4. Enter \[ga]netstorage\[ga] as the type of storage to configure. -\f[R] -.fi -.PP -Type of storage to configure. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value XX / NetStorage -\ \[dq]netstorage\[dq] Storage> netstorage -.IP -.nf -\f[C] -5. Select between the HTTP or HTTPS protocol. Most users should choose HTTPS, which is the default. HTTP is provided primarily for debugging purposes. - -\f[R] -.fi -.PP -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value 1 / HTTP protocol -\ \[dq]http\[dq] 2 / HTTPS protocol \ \[dq]https\[dq] protocol> 1 -.IP -.nf -\f[C] -6. Specify your NetStorage host, CP code, and any necessary content paths using this format: \[ga]///\[ga] -\f[R] -.fi -.PP -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -host> baseball-nsu.akamaihd.net/123456/content/ -.IP -.nf -\f[C] -7. Set the netstorage account name -\f[R] -.fi -.PP -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -account> username -.IP -.nf -\f[C] -8. Set the Netstorage account secret/G2O key which will be used for authentication purposes. Select the \[ga]y\[ga] option to set your own password then enter your secret. -Note: The secret is stored in the \[ga]rclone.conf\[ga] file with hex-encoded encryption. -\f[R] -.fi -.IP "y)" 3 -Yes type in my own password -.IP "z)" 3 -Generate random password y/g> y Enter the password: password: Confirm -the password: password: -.IP -.nf -\f[C] -9. View the summary and confirm your remote configuration. -\f[R] -.fi -.PP -[ns1] type = netstorage protocol = http host = -baseball-nsu.akamaihd.net/123456/content/ account = username secret = -*** ENCRYPTED *** -------------------- y) Yes this is OK (default) e) -Edit this remote d) Delete this remote y/e/d> y -.IP -.nf -\f[C] -This remote is called \[ga]ns1\[ga] and can now be used. - -## Example operations - -Get started with rclone and NetStorage with these examples. For additional rclone commands, visit https://rclone.org/commands/. - -### See contents of a directory in your project - - rclone lsd ns1:/974012/testing/ - -### Sync the contents local with remote - - rclone sync . ns1:/974012/testing/ - -### Upload local content to remote - rclone copy notes.txt ns1:/974012/testing/ - -### Delete content on remote - rclone delete ns1:/974012/testing/notes.txt - -### Move or copy content between CP codes. - -Your credentials must have access to two CP codes on the same remote. You can\[aq]t perform operations between different remotes. - - rclone move ns1:/974012/testing/notes.txt ns1:/974450/testing2/ - -## Features - -### Symlink Support - -The Netstorage backend changes the rclone \[ga]--links, -l\[ga] behavior. When uploading, instead of creating the .rclonelink file, use the \[dq]symlink\[dq] API in order to create the corresponding symlink on the remote. The .rclonelink file will not be created, the upload will be intercepted and only the symlink file that matches the source file name with no suffix will be created on the remote. - -This will effectively allow commands like copy/copyto, move/moveto and sync to upload from local to remote and download from remote to local directories with symlinks. Due to internal rclone limitations, it is not possible to upload an individual symlink file to any remote backend. You can always use the \[dq]backend symlink\[dq] command to create a symlink on the NetStorage server, refer to \[dq]symlink\[dq] section below. - -Individual symlink files on the remote can be used with the commands like \[dq]cat\[dq] to print the destination name, or \[dq]delete\[dq] to delete symlink, or copy, copy/to and move/moveto to download from the remote to local. Note: individual symlink files on the remote should be specified including the suffix .rclonelink. - -**Note**: No file with the suffix .rclonelink should ever exist on the server since it is not possible to actually upload/create a file with .rclonelink suffix with rclone, it can only exist if it is manually created through a non-rclone method on the remote. - -### Implicit vs. Explicit Directories - -With NetStorage, directories can exist in one of two forms: - -1. **Explicit Directory**. This is an actual, physical directory that you have created in a storage group. -2. **Implicit Directory**. This refers to a directory within a path that has not been physically created. For example, during upload of a file, nonexistent subdirectories can be specified in the target path. NetStorage creates these as \[dq]implicit.\[dq] While the directories aren\[aq]t physically created, they exist implicitly and the noted path is connected with the uploaded file. - -Rclone will intercept all file uploads and mkdir commands for the NetStorage remote and will explicitly issue the mkdir command for each directory in the uploading path. This will help with the interoperability with the other Akamai services such as SFTP and the Content Management Shell (CMShell). Rclone will not guarantee correctness of operations with implicit directories which might have been created as a result of using an upload API directly. - -### \[ga]--fast-list\[ga] / ListR support - -NetStorage remote supports the ListR feature by using the \[dq]list\[dq] NetStorage API action to return a lexicographical list of all objects within the specified CP code, recursing into subdirectories as they\[aq]re encountered. - -* **Rclone will use the ListR method for some commands by default**. Commands such as \[ga]lsf -R\[ga] will use ListR by default. To disable this, include the \[ga]--disable listR\[ga] option to use the non-recursive method of listing objects. - -* **Rclone will not use the ListR method for some commands**. Commands such as \[ga]sync\[ga] don\[aq]t use ListR by default. To force using the ListR method, include the \[ga]--fast-list\[ga] option. - -There are pros and cons of using the ListR method, refer to [rclone documentation](https://rclone.org/docs/#fast-list). In general, the sync command over an existing deep tree on the remote will run faster with the \[dq]--fast-list\[dq] flag but with extra memory usage as a side effect. It might also result in higher CPU utilization but the whole task can be completed faster. - -**Note**: There is a known limitation that \[dq]lsf -R\[dq] will display number of files in the directory and directory size as -1 when ListR method is used. The workaround is to pass \[dq]--disable listR\[dq] flag if these numbers are important in the output. - -### Purge - -NetStorage remote supports the purge feature by using the \[dq]quick-delete\[dq] NetStorage API action. The quick-delete action is disabled by default for security reasons and can be enabled for the account through the Akamai portal. Rclone will first try to use quick-delete action for the purge command and if this functionality is disabled then will fall back to a standard delete method. - -**Note**: Read the [NetStorage Usage API](https://learn.akamai.com/en-us/webhelp/netstorage/netstorage-http-api-developer-guide/GUID-15836617-9F50-405A-833C-EA2556756A30.html) for considerations when using \[dq]quick-delete\[dq]. In general, using quick-delete method will not delete the tree immediately and objects targeted for quick-delete may still be accessible. - - -### Standard options - -Here are the Standard options specific to netstorage (Akamai NetStorage). - -#### --netstorage-host - -Domain+path of NetStorage host to connect to. - -Format should be \[ga]/\[ga] - -Properties: - -- Config: host -- Env Var: RCLONE_NETSTORAGE_HOST -- Type: string -- Required: true - -#### --netstorage-account - -Set the NetStorage account name - -Properties: - -- Config: account -- Env Var: RCLONE_NETSTORAGE_ACCOUNT -- Type: string -- Required: true - -#### --netstorage-secret - -Set the NetStorage account secret/G2O key for authentication. - -Please choose the \[aq]y\[aq] option to set your own password then enter your secret. - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - -Properties: - -- Config: secret -- Env Var: RCLONE_NETSTORAGE_SECRET -- Type: string -- Required: true - -### Advanced options - -Here are the Advanced options specific to netstorage (Akamai NetStorage). - -#### --netstorage-protocol - -Select between HTTP or HTTPS protocol. - -Most users should choose HTTPS, which is the default. -HTTP is provided primarily for debugging purposes. - -Properties: - -- Config: protocol -- Env Var: RCLONE_NETSTORAGE_PROTOCOL -- Type: string -- Default: \[dq]https\[dq] -- Examples: - - \[dq]http\[dq] - - HTTP protocol - - \[dq]https\[dq] - - HTTPS protocol - -#### --netstorage-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_NETSTORAGE_DESCRIPTION -- Type: string -- Required: false - -## Backend commands - -Here are the commands specific to the netstorage backend. - -Run them with - - rclone backend COMMAND remote: - -The help below will explain what arguments each command takes. - -See the [backend](https://rclone.org/commands/rclone_backend/) command for more -info on how to pass options and arguments. - -These can be run on a running backend using the rc command -[backend/command](https://rclone.org/rc/#backend-command). - -### du - -Return disk usage information for a specified directory - - rclone backend du remote: [options] [+] - -The usage information returned, includes the targeted directory as well as all -files stored in any sub-directories that may exist. - -### symlink - -You can create a symbolic link in ObjectStore with the symlink action. - - rclone backend symlink remote: [options] [+] - -The desired path location (including applicable sub-directories) ending in -the object that will be the target of the symlink (for example, /links/mylink). -Include the file extension for the object, if applicable. -\[ga]rclone backend symlink \[ga] - - - -# Microsoft Azure Blob Storage - -Paths are specified as \[ga]remote:container\[ga] (or \[ga]remote:\[ga] for the \[ga]lsd\[ga] -command.) You may put subdirectories in too, e.g. -\[ga]remote:container/path/to/dir\[ga]. - -## Configuration - -Here is an example of making a Microsoft Azure Blob Storage -configuration. For a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: -\f[R] -.fi -.PP -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 [snip] XX / -Microsoft Azure Blob Storage \ \[dq]azureblob\[dq] [snip] Storage> -azureblob Storage Account Name account> account_name Storage Account Key -key> base64encodedkey== Endpoint for the service - leave blank normally. -endpoint> Remote config -------------------- [remote] account = -account_name key = base64encodedkey== endpoint = -------------------- y) -Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y -.IP -.nf -\f[C] -See all containers - - rclone lsd remote: - -Make a new container - - rclone mkdir remote:container - -List the contents of a container - - rclone ls remote:container - -Sync \[ga]/home/local/directory\[ga] to the remote container, deleting any excess -files in the container. - - rclone sync --interactive /home/local/directory remote:container - -### --fast-list - -This remote supports \[ga]--fast-list\[ga] which allows you to use fewer -transactions in exchange for more memory. See the [rclone -docs](https://rclone.org/docs/#fast-list) for more details. - -### Modification times and hashes - -The modification time is stored as metadata on the object with the -\[ga]mtime\[ga] key. It is stored using RFC3339 Format time with nanosecond -precision. The metadata is supplied during directory listings so -there is no performance overhead to using it. - -If you wish to use the Azure standard \[ga]LastModified\[ga] time stored on -the object as the modified time, then use the \[ga]--use-server-modtime\[ga] -flag. Note that rclone can\[aq]t set \[ga]LastModified\[ga], so using the -\[ga]--update\[ga] flag when syncing is recommended if using -\[ga]--use-server-modtime\[ga]. - -MD5 hashes are stored with blobs. However blobs that were uploaded in -chunks only have an MD5 if the source remote was capable of MD5 -hashes, e.g. the local disk. - -### Performance - -When uploading large files, increasing the value of -\[ga]--azureblob-upload-concurrency\[ga] will increase performance at the cost -of using more memory. The default of 16 is set quite conservatively to -use less memory. It maybe be necessary raise it to 64 or higher to -fully utilize a 1 GBit/s link with a single file transfer. - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| / | 0x2F | \[uFF0F] | -| \[rs] | 0x5C | \[uFF3C] | - File names can also not end with the following characters. These only get replaced if they are the last character in the name: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| . | 0x2E | \[uFF0E] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -### Authentication {#authentication} - +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\&. +T}@T{ +0x2E +T}@T{ +\[uFF0E] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Authentication +.PP There are a number of ways of supplying credentials for Azure Blob -Storage. Rclone tries them in the order of the sections below. - -#### Env Auth - -If the \[ga]env_auth\[ga] config parameter is \[ga]true\[ga] then rclone will pull -credentials from the environment or runtime. - +Storage. +Rclone tries them in the order of the sections below. +.SS Env Auth +.PP +If the \f[C]env_auth\f[R] config parameter is \f[C]true\f[R] then rclone +will pull credentials from the environment or runtime. +.PP It tries these authentication methods in this order: - -1. Environment Variables -2. Managed Service Identity Credentials -3. Azure CLI credentials (as used by the az tool) - +.IP "1." 3 +Environment Variables +.IP "2." 3 +Managed Service Identity Credentials +.IP "3." 3 +Azure CLI credentials (as used by the az tool) +.PP These are described in the following sections - -##### Env Auth: 1. Environment Variables - -If \[ga]env_auth\[ga] is set and environment variables are present rclone -authenticates a service principal with a secret or certificate, or a -user with a password, depending on which environment variable are set. +.SS Env Auth: 1. Environment Variables +.PP +If \f[C]env_auth\f[R] is set and environment variables are present +rclone authenticates a service principal with a secret or certificate, +or a user with a password, depending on which environment variable are +set. It reads configuration from these variables, in the following order: - -1. Service principal with client secret - - \[ga]AZURE_TENANT_ID\[ga]: ID of the service principal\[aq]s tenant. Also called its \[dq]directory\[dq] ID. - - \[ga]AZURE_CLIENT_ID\[ga]: the service principal\[aq]s client ID - - \[ga]AZURE_CLIENT_SECRET\[ga]: one of the service principal\[aq]s client secrets -2. Service principal with certificate - - \[ga]AZURE_TENANT_ID\[ga]: ID of the service principal\[aq]s tenant. Also called its \[dq]directory\[dq] ID. - - \[ga]AZURE_CLIENT_ID\[ga]: the service principal\[aq]s client ID - - \[ga]AZURE_CLIENT_CERTIFICATE_PATH\[ga]: path to a PEM or PKCS12 certificate file including the private key. - - \[ga]AZURE_CLIENT_CERTIFICATE_PASSWORD\[ga]: (optional) password for the certificate file. - - \[ga]AZURE_CLIENT_SEND_CERTIFICATE_CHAIN\[ga]: (optional) Specifies whether an authentication request will include an x5c header to support subject name / issuer based authentication. When set to \[dq]true\[dq] or \[dq]1\[dq], authentication requests include the x5c header. -3. User with username and password - - \[ga]AZURE_TENANT_ID\[ga]: (optional) tenant to authenticate in. Defaults to \[dq]organizations\[dq]. - - \[ga]AZURE_CLIENT_ID\[ga]: client ID of the application the user will authenticate to - - \[ga]AZURE_USERNAME\[ga]: a username (usually an email address) - - \[ga]AZURE_PASSWORD\[ga]: the user\[aq]s password -4. Workload Identity - - \[ga]AZURE_TENANT_ID\[ga]: Tenant to authenticate in. - - \[ga]AZURE_CLIENT_ID\[ga]: Client ID of the application the user will authenticate to. - - \[ga]AZURE_FEDERATED_TOKEN_FILE\[ga]: Path to projected service account token file. - - \[ga]AZURE_AUTHORITY_HOST\[ga]: Authority of an Azure Active Directory endpoint (default: login.microsoftonline.com). - - -##### Env Auth: 2. Managed Service Identity Credentials - -When using Managed Service Identity if the VM(SS) on which this -program is running has a system-assigned identity, it will be used by -default. If the resource has no system-assigned but exactly one -user-assigned identity, the user-assigned identity will be used by -default. - +.IP "1." 3 +Service principal with client secret +.RS 4 +.IP \[bu] 2 +\f[C]AZURE_TENANT_ID\f[R]: ID of the service principal\[aq]s tenant. +Also called its \[dq]directory\[dq] ID. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_ID\f[R]: the service principal\[aq]s client ID +.IP \[bu] 2 +\f[C]AZURE_CLIENT_SECRET\f[R]: one of the service principal\[aq]s client +secrets +.RE +.IP "2." 3 +Service principal with certificate +.RS 4 +.IP \[bu] 2 +\f[C]AZURE_TENANT_ID\f[R]: ID of the service principal\[aq]s tenant. +Also called its \[dq]directory\[dq] ID. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_ID\f[R]: the service principal\[aq]s client ID +.IP \[bu] 2 +\f[C]AZURE_CLIENT_CERTIFICATE_PATH\f[R]: path to a PEM or PKCS12 +certificate file including the private key. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_CERTIFICATE_PASSWORD\f[R]: (optional) password for the +certificate file. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_SEND_CERTIFICATE_CHAIN\f[R]: (optional) Specifies +whether an authentication request will include an x5c header to support +subject name / issuer based authentication. +When set to \[dq]true\[dq] or \[dq]1\[dq], authentication requests +include the x5c header. +.RE +.IP "3." 3 +User with username and password +.RS 4 +.IP \[bu] 2 +\f[C]AZURE_TENANT_ID\f[R]: (optional) tenant to authenticate in. +Defaults to \[dq]organizations\[dq]. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_ID\f[R]: client ID of the application the user will +authenticate to +.IP \[bu] 2 +\f[C]AZURE_USERNAME\f[R]: a username (usually an email address) +.IP \[bu] 2 +\f[C]AZURE_PASSWORD\f[R]: the user\[aq]s password +.RE +.IP "4." 3 +Workload Identity +.RS 4 +.IP \[bu] 2 +\f[C]AZURE_TENANT_ID\f[R]: Tenant to authenticate in. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_ID\f[R]: Client ID of the application the user will +authenticate to. +.IP \[bu] 2 +\f[C]AZURE_FEDERATED_TOKEN_FILE\f[R]: Path to projected service account +token file. +.IP \[bu] 2 +\f[C]AZURE_AUTHORITY_HOST\f[R]: Authority of an Azure Active Directory +endpoint (default: login.microsoftonline.com). +.RE +.SS Env Auth: 2. Managed Service Identity Credentials +.PP +When using Managed Service Identity if the VM(SS) on which this program +is running has a system-assigned identity, it will be used by default. +If the resource has no system-assigned but exactly one user-assigned +identity, the user-assigned identity will be used by default. +.PP If the resource has multiple user-assigned identities you will need to -unset \[ga]env_auth\[ga] and set \[ga]use_msi\[ga] instead. See the [\[ga]use_msi\[ga] -section](#use_msi). - -##### Env Auth: 3. Azure CLI credentials (as used by the az tool) - -Credentials created with the \[ga]az\[ga] tool can be picked up using \[ga]env_auth\[ga]. - +unset \f[C]env_auth\f[R] and set \f[C]use_msi\f[R] instead. +See the \f[C]use_msi\f[R] section. +.SS Env Auth: 3. Azure CLI credentials (as used by the az tool) +.PP +Credentials created with the \f[C]az\f[R] tool can be picked up using +\f[C]env_auth\f[R]. +.PP For example if you were to login with a service principal like this: - - az login --service-principal -u XXX -p XXX --tenant XXX - +.IP +.nf +\f[C] +az login --service-principal -u XXX -p XXX --tenant XXX +\f[R] +.fi +.PP Then you could access rclone resources like this: - - rclone lsf :azureblob,env_auth,account=ACCOUNT:CONTAINER - +.IP +.nf +\f[C] +rclone lsf :azureblob,env_auth,account=ACCOUNT:CONTAINER +\f[R] +.fi +.PP Or - - rclone lsf --azureblob-env-auth --azureblob-account=ACCOUNT :azureblob:CONTAINER - -Which is analogous to using the \[ga]az\[ga] tool: - - az storage blob list --container-name CONTAINER --account-name ACCOUNT --auth-mode login - -#### Account and Shared Key - -This is the most straight forward and least flexible way. Just fill -in the \[ga]account\[ga] and \[ga]key\[ga] lines and leave the rest blank. - -#### SAS URL - +.IP +.nf +\f[C] +rclone lsf --azureblob-env-auth --azureblob-account=ACCOUNT :azureblob:CONTAINER +\f[R] +.fi +.PP +Which is analogous to using the \f[C]az\f[R] tool: +.IP +.nf +\f[C] +az storage blob list --container-name CONTAINER --account-name ACCOUNT --auth-mode login +\f[R] +.fi +.SS Account and Shared Key +.PP +This is the most straight forward and least flexible way. +Just fill in the \f[C]account\f[R] and \f[C]key\f[R] lines and leave the +rest blank. +.SS SAS URL +.PP This can be an account level SAS URL or container level SAS URL. - -To use it leave \[ga]account\[ga] and \[ga]key\[ga] blank and fill in \[ga]sas_url\[ga]. - -An account level SAS URL or container level SAS URL can be obtained -from the Azure portal or the Azure Storage Explorer. To get a -container level SAS URL right click on a container in the Azure Blob -explorer in the Azure portal. - +.PP +To use it leave \f[C]account\f[R] and \f[C]key\f[R] blank and fill in +\f[C]sas_url\f[R]. +.PP +An account level SAS URL or container level SAS URL can be obtained from +the Azure portal or the Azure Storage Explorer. +To get a container level SAS URL right click on a container in the Azure +Blob explorer in the Azure portal. +.PP If you use a container level SAS URL, rclone operations are permitted only on a particular container, e.g. - - rclone ls azureblob:container - -You can also list the single container from the root. This will only -show the container specified by the SAS URL. - - $ rclone lsd azureblob: - container/ - +.IP +.nf +\f[C] +rclone ls azureblob:container +\f[R] +.fi +.PP +You can also list the single container from the root. +This will only show the container specified by the SAS URL. +.IP +.nf +\f[C] +$ rclone lsd azureblob: +container/ +\f[R] +.fi +.PP Note that you can\[aq]t see or access any other containers - this will fail - - rclone ls azureblob:othercontainer - +.IP +.nf +\f[C] +rclone ls azureblob:othercontainer +\f[R] +.fi +.PP Container level SAS URLs are useful for temporarily allowing third parties access to a single container or putting credentials into an untrusted environment such as a CI build server. - -#### Service principal with client secret - -If these variables are set, rclone will authenticate with a service principal with a client secret. - -- \[ga]tenant\[ga]: ID of the service principal\[aq]s tenant. Also called its \[dq]directory\[dq] ID. -- \[ga]client_id\[ga]: the service principal\[aq]s client ID -- \[ga]client_secret\[ga]: one of the service principal\[aq]s client secrets - +.SS Service principal with client secret +.PP +If these variables are set, rclone will authenticate with a service +principal with a client secret. +.IP \[bu] 2 +\f[C]tenant\f[R]: ID of the service principal\[aq]s tenant. +Also called its \[dq]directory\[dq] ID. +.IP \[bu] 2 +\f[C]client_id\f[R]: the service principal\[aq]s client ID +.IP \[bu] 2 +\f[C]client_secret\f[R]: one of the service principal\[aq]s client +secrets +.PP The credentials can also be placed in a file using the -\[ga]service_principal_file\[ga] configuration option. - -#### Service principal with certificate - -If these variables are set, rclone will authenticate with a service principal with certificate. - -- \[ga]tenant\[ga]: ID of the service principal\[aq]s tenant. Also called its \[dq]directory\[dq] ID. -- \[ga]client_id\[ga]: the service principal\[aq]s client ID -- \[ga]client_certificate_path\[ga]: path to a PEM or PKCS12 certificate file including the private key. -- \[ga]client_certificate_password\[ga]: (optional) password for the certificate file. -- \[ga]client_send_certificate_chain\[ga]: (optional) Specifies whether an authentication request will include an x5c header to support subject name / issuer based authentication. When set to \[dq]true\[dq] or \[dq]1\[dq], authentication requests include the x5c header. - -**NB** \[ga]client_certificate_password\[ga] must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - -#### User with username and password - -If these variables are set, rclone will authenticate with username and password. - -- \[ga]tenant\[ga]: (optional) tenant to authenticate in. Defaults to \[dq]organizations\[dq]. -- \[ga]client_id\[ga]: client ID of the application the user will authenticate to -- \[ga]username\[ga]: a username (usually an email address) -- \[ga]password\[ga]: the user\[aq]s password - -Microsoft doesn\[aq]t recommend this kind of authentication, because it\[aq]s -less secure than other authentication flows. This method is not -interactive, so it isn\[aq]t compatible with any form of multi-factor -authentication, and the application must already have user or admin -consent. This credential can only authenticate work and school -accounts; it can\[aq]t authenticate Microsoft accounts. - -**NB** \[ga]password\[ga] must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - -#### Managed Service Identity Credentials {#use_msi} - -If \[ga]use_msi\[ga] is set then managed service identity credentials are -used. This authentication only works when running in an Azure service. -\[ga]env_auth\[ga] needs to be unset to use this. - +\f[C]service_principal_file\f[R] configuration option. +.SS Service principal with certificate +.PP +If these variables are set, rclone will authenticate with a service +principal with certificate. +.IP \[bu] 2 +\f[C]tenant\f[R]: ID of the service principal\[aq]s tenant. +Also called its \[dq]directory\[dq] ID. +.IP \[bu] 2 +\f[C]client_id\f[R]: the service principal\[aq]s client ID +.IP \[bu] 2 +\f[C]client_certificate_path\f[R]: path to a PEM or PKCS12 certificate +file including the private key. +.IP \[bu] 2 +\f[C]client_certificate_password\f[R]: (optional) password for the +certificate file. +.IP \[bu] 2 +\f[C]client_send_certificate_chain\f[R]: (optional) Specifies whether an +authentication request will include an x5c header to support subject +name / issuer based authentication. +When set to \[dq]true\[dq] or \[dq]1\[dq], authentication requests +include the x5c header. +.PP +\f[B]NB\f[R] \f[C]client_certificate_password\f[R] must be obscured - +see rclone obscure (https://rclone.org/commands/rclone_obscure/). +.SS User with username and password +.PP +If these variables are set, rclone will authenticate with username and +password. +.IP \[bu] 2 +\f[C]tenant\f[R]: (optional) tenant to authenticate in. +Defaults to \[dq]organizations\[dq]. +.IP \[bu] 2 +\f[C]client_id\f[R]: client ID of the application the user will +authenticate to +.IP \[bu] 2 +\f[C]username\f[R]: a username (usually an email address) +.IP \[bu] 2 +\f[C]password\f[R]: the user\[aq]s password +.PP +Microsoft doesn\[aq]t recommend this kind of authentication, because +it\[aq]s less secure than other authentication flows. +This method is not interactive, so it isn\[aq]t compatible with any form +of multi-factor authentication, and the application must already have +user or admin consent. +This credential can only authenticate work and school accounts; it +can\[aq]t authenticate Microsoft accounts. +.PP +\f[B]NB\f[R] \f[C]password\f[R] must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.SS Managed Service Identity Credentials +.PP +If \f[C]use_msi\f[R] is set then managed service identity credentials +are used. +This authentication only works when running in an Azure service. +\f[C]env_auth\f[R] needs to be unset to use this. +.PP However if you have multiple user identities to choose from these must -be explicitly specified using exactly one of the \[ga]msi_object_id\[ga], -\[ga]msi_client_id\[ga], or \[ga]msi_mi_res_id\[ga] parameters. - -If none of \[ga]msi_object_id\[ga], \[ga]msi_client_id\[ga], or \[ga]msi_mi_res_id\[ga] is -set, this is is equivalent to using \[ga]env_auth\[ga]. - - -### Standard options - -Here are the Standard options specific to azureblob (Microsoft Azure Blob Storage). - -#### --azureblob-account - +be explicitly specified using exactly one of the +\f[C]msi_object_id\f[R], \f[C]msi_client_id\f[R], or +\f[C]msi_mi_res_id\f[R] parameters. +.PP +If none of \f[C]msi_object_id\f[R], \f[C]msi_client_id\f[R], or +\f[C]msi_mi_res_id\f[R] is set, this is is equivalent to using +\f[C]env_auth\f[R]. +.SS Standard options +.PP +Here are the Standard options specific to azureblob (Microsoft Azure +Blob Storage). +.SS --azureblob-account +.PP Azure Storage Account Name. - +.PP Set this to the Azure Storage Account Name in use. - +.PP Leave blank to use SAS URL or Emulator, otherwise it needs to be set. - +.PP If this is blank and if env_auth is set it will be read from the -environment variable \[ga]AZURE_STORAGE_ACCOUNT_NAME\[ga] if possible. - - +environment variable \f[C]AZURE_STORAGE_ACCOUNT_NAME\f[R] if possible. +.PP Properties: - -- Config: account -- Env Var: RCLONE_AZUREBLOB_ACCOUNT -- Type: string -- Required: false - -#### --azureblob-env-auth - +.IP \[bu] 2 +Config: account +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_ACCOUNT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-env-auth +.PP Read credentials from runtime (environment variables, CLI or MSI). - -See the [authentication docs](/azureblob#authentication) for full info. - +.PP +See the authentication docs for full info. +.PP Properties: - -- Config: env_auth -- Env Var: RCLONE_AZUREBLOB_ENV_AUTH -- Type: bool -- Default: false - -#### --azureblob-key - +.IP \[bu] 2 +Config: env_auth +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_ENV_AUTH +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-key +.PP Storage Account Shared Key. - +.PP Leave blank to use SAS URL or Emulator. - +.PP Properties: - -- Config: key -- Env Var: RCLONE_AZUREBLOB_KEY -- Type: string -- Required: false - -#### --azureblob-sas-url - +.IP \[bu] 2 +Config: key +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_KEY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-sas-url +.PP SAS URL for container level access only. - +.PP Leave blank if using account/key or Emulator. - +.PP Properties: - -- Config: sas_url -- Env Var: RCLONE_AZUREBLOB_SAS_URL -- Type: string -- Required: false - -#### --azureblob-tenant - -ID of the service principal\[aq]s tenant. Also called its directory ID. - -Set this if using -- Service principal with client secret -- Service principal with certificate -- User with username and password - - +.IP \[bu] 2 +Config: sas_url +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_SAS_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-tenant +.PP +ID of the service principal\[aq]s tenant. +Also called its directory ID. +.PP +Set this if using - Service principal with client secret - Service +principal with certificate - User with username and password +.PP Properties: - -- Config: tenant -- Env Var: RCLONE_AZUREBLOB_TENANT -- Type: string -- Required: false - -#### --azureblob-client-id - +.IP \[bu] 2 +Config: tenant +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_TENANT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-client-id +.PP The ID of the client in use. - -Set this if using -- Service principal with client secret -- Service principal with certificate -- User with username and password - - +.PP +Set this if using - Service principal with client secret - Service +principal with certificate - User with username and password +.PP Properties: - -- Config: client_id -- Env Var: RCLONE_AZUREBLOB_CLIENT_ID -- Type: string -- Required: false - -#### --azureblob-client-secret - +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-client-secret +.PP One of the service principal\[aq]s client secrets - -Set this if using -- Service principal with client secret - - +.PP +Set this if using - Service principal with client secret +.PP Properties: - -- Config: client_secret -- Env Var: RCLONE_AZUREBLOB_CLIENT_SECRET -- Type: string -- Required: false - -#### --azureblob-client-certificate-path - +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-client-certificate-path +.PP Path to a PEM or PKCS12 certificate file including the private key. - -Set this if using -- Service principal with certificate - - +.PP +Set this if using - Service principal with certificate +.PP Properties: - -- Config: client_certificate_path -- Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PATH -- Type: string -- Required: false - -#### --azureblob-client-certificate-password - +.IP \[bu] 2 +Config: client_certificate_path +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PATH +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-client-certificate-password +.PP Password for the certificate file (optional). - -Optionally set this if using -- Service principal with certificate - +.PP +Optionally set this if using - Service principal with certificate +.PP And the certificate has a password. - - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP Properties: - -- Config: client_certificate_password -- Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PASSWORD -- Type: string -- Required: false - -### Advanced options - -Here are the Advanced options specific to azureblob (Microsoft Azure Blob Storage). - -#### --azureblob-client-send-certificate-chain - +.IP \[bu] 2 +Config: client_certificate_password +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PASSWORD +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Advanced options +.PP +Here are the Advanced options specific to azureblob (Microsoft Azure +Blob Storage). +.SS --azureblob-client-send-certificate-chain +.PP Send the certificate chain when using certificate auth. - +.PP Specifies whether an authentication request will include an x5c header -to support subject name / issuer based authentication. When set to -true, authentication requests include the x5c header. - -Optionally set this if using -- Service principal with certificate - - +to support subject name / issuer based authentication. +When set to true, authentication requests include the x5c header. +.PP +Optionally set this if using - Service principal with certificate +.PP Properties: - -- Config: client_send_certificate_chain -- Env Var: RCLONE_AZUREBLOB_CLIENT_SEND_CERTIFICATE_CHAIN -- Type: bool -- Default: false - -#### --azureblob-username - +.IP \[bu] 2 +Config: client_send_certificate_chain +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_CLIENT_SEND_CERTIFICATE_CHAIN +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-username +.PP User name (usually an email address) - -Set this if using -- User with username and password - - +.PP +Set this if using - User with username and password +.PP Properties: - -- Config: username -- Env Var: RCLONE_AZUREBLOB_USERNAME -- Type: string -- Required: false - -#### --azureblob-password - +.IP \[bu] 2 +Config: username +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_USERNAME +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-password +.PP The user\[aq]s password - -Set this if using -- User with username and password - - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - +.PP +Set this if using - User with username and password +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP Properties: - -- Config: password -- Env Var: RCLONE_AZUREBLOB_PASSWORD -- Type: string -- Required: false - -#### --azureblob-service-principal-file - +.IP \[bu] 2 +Config: password +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_PASSWORD +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-service-principal-file +.PP Path to file containing credentials for use with a service principal. - -Leave blank normally. Needed only if you want to use a service principal instead of interactive login. - - $ az ad sp create-for-rbac --name \[dq]\[dq] \[rs] - --role \[dq]Storage Blob Data Owner\[dq] \[rs] - --scopes \[dq]/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts//blobServices/default/containers/\[dq] \[rs] - > azure-principal.json - -See [\[dq]Create an Azure service principal\[dq]](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli) and [\[dq]Assign an Azure role for access to blob data\[dq]](https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli) pages for more details. - -It may be more convenient to put the credentials directly into the -rclone config file under the \[ga]client_id\[ga], \[ga]tenant\[ga] and \[ga]client_secret\[ga] -keys instead of setting \[ga]service_principal_file\[ga]. - - -Properties: - -- Config: service_principal_file -- Env Var: RCLONE_AZUREBLOB_SERVICE_PRINCIPAL_FILE -- Type: string -- Required: false - -#### --azureblob-use-msi - -Use a managed service identity to authenticate (only works in Azure). - -When true, use a [managed service identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/) -to authenticate to Azure Storage instead of a SAS token or account key. - -If the VM(SS) on which this program is running has a system-assigned identity, it will -be used by default. If the resource has no system-assigned but exactly one user-assigned identity, -the user-assigned identity will be used by default. If the resource has multiple user-assigned -identities, the identity to use must be explicitly specified using exactly one of the msi_object_id, -msi_client_id, or msi_mi_res_id parameters. - -Properties: - -- Config: use_msi -- Env Var: RCLONE_AZUREBLOB_USE_MSI -- Type: bool -- Default: false - -#### --azureblob-msi-object-id - -Object ID of the user-assigned MSI to use, if any. - -Leave blank if msi_client_id or msi_mi_res_id specified. - -Properties: - -- Config: msi_object_id -- Env Var: RCLONE_AZUREBLOB_MSI_OBJECT_ID -- Type: string -- Required: false - -#### --azureblob-msi-client-id - -Object ID of the user-assigned MSI to use, if any. - -Leave blank if msi_object_id or msi_mi_res_id specified. - -Properties: - -- Config: msi_client_id -- Env Var: RCLONE_AZUREBLOB_MSI_CLIENT_ID -- Type: string -- Required: false - -#### --azureblob-msi-mi-res-id - -Azure resource ID of the user-assigned MSI to use, if any. - -Leave blank if msi_client_id or msi_object_id specified. - -Properties: - -- Config: msi_mi_res_id -- Env Var: RCLONE_AZUREBLOB_MSI_MI_RES_ID -- Type: string -- Required: false - -#### --azureblob-use-emulator - -Uses local storage emulator if provided as \[aq]true\[aq]. - -Leave blank if using real azure storage endpoint. - -Properties: - -- Config: use_emulator -- Env Var: RCLONE_AZUREBLOB_USE_EMULATOR -- Type: bool -- Default: false - -#### --azureblob-endpoint - -Endpoint for the service. - +.PP Leave blank normally. - -Properties: - -- Config: endpoint -- Env Var: RCLONE_AZUREBLOB_ENDPOINT -- Type: string -- Required: false - -#### --azureblob-upload-cutoff - -Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). - -Properties: - -- Config: upload_cutoff -- Env Var: RCLONE_AZUREBLOB_UPLOAD_CUTOFF -- Type: string -- Required: false - -#### --azureblob-chunk-size - -Upload chunk size. - -Note that this is stored in memory and there may be up to -\[dq]--transfers\[dq] * \[dq]--azureblob-upload-concurrency\[dq] chunks stored at once -in memory. - -Properties: - -- Config: chunk_size -- Env Var: RCLONE_AZUREBLOB_CHUNK_SIZE -- Type: SizeSuffix -- Default: 4Mi - -#### --azureblob-upload-concurrency - -Concurrency for multipart uploads. - -This is the number of chunks of the same file that are uploaded -concurrently. - -If you are uploading small numbers of large files over high-speed -links and these uploads do not fully utilize your bandwidth, then -increasing this may help to speed up the transfers. - -In tests, upload speed increases almost linearly with upload -concurrency. For example to fill a gigabit pipe it may be necessary to -raise this to 64. Note that this will use more memory. - -Note that chunks are stored in memory and there may be up to -\[dq]--transfers\[dq] * \[dq]--azureblob-upload-concurrency\[dq] chunks stored at once -in memory. - -Properties: - -- Config: upload_concurrency -- Env Var: RCLONE_AZUREBLOB_UPLOAD_CONCURRENCY -- Type: int -- Default: 16 - -#### --azureblob-list-chunk - -Size of blob list. - -This sets the number of blobs requested in each listing chunk. Default -is the maximum, 5000. \[dq]List blobs\[dq] requests are permitted 2 minutes -per megabyte to complete. If an operation is taking longer than 2 -minutes per megabyte on average, it will time out ( -[source](https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations#exceptions-to-default-timeout-interval) -). This can be used to limit the number of blobs items to return, to -avoid the time out. - -Properties: - -- Config: list_chunk -- Env Var: RCLONE_AZUREBLOB_LIST_CHUNK -- Type: int -- Default: 5000 - -#### --azureblob-access-tier - -Access tier of blob: hot, cool, cold or archive. - -Archived blobs can be restored by setting access tier to hot, cool or -cold. Leave blank if you intend to use default access tier, which is -set at account level - -If there is no \[dq]access tier\[dq] specified, rclone doesn\[aq]t apply any tier. -rclone performs \[dq]Set Tier\[dq] operation on blobs while uploading, if objects -are not modified, specifying \[dq]access tier\[dq] to new one will have no effect. -If blobs are in \[dq]archive tier\[dq] at remote, trying to perform data transfer -operations from remote will not be allowed. User should first restore by -tiering blob to \[dq]Hot\[dq], \[dq]Cool\[dq] or \[dq]Cold\[dq]. - -Properties: - -- Config: access_tier -- Env Var: RCLONE_AZUREBLOB_ACCESS_TIER -- Type: string -- Required: false - -#### --azureblob-archive-tier-delete - -Delete archive tier blobs before overwriting. - -Archive tier blobs cannot be updated. So without this flag, if you -attempt to update an archive tier blob, then rclone will produce the -error: - - can\[aq]t update archive tier blob without --azureblob-archive-tier-delete - -With this flag set then before rclone attempts to overwrite an archive -tier blob, it will delete the existing blob before uploading its -replacement. This has the potential for data loss if the upload fails -(unlike updating a normal blob) and also may cost more since deleting -archive tier blobs early may be chargable. - - -Properties: - -- Config: archive_tier_delete -- Env Var: RCLONE_AZUREBLOB_ARCHIVE_TIER_DELETE -- Type: bool -- Default: false - -#### --azureblob-disable-checksum - -Don\[aq]t store MD5 checksum with object metadata. - -Normally rclone will calculate the MD5 checksum of the input before -uploading it so it can add it to metadata on the object. This is great -for data integrity checking but can cause long delays for large files -to start uploading. - -Properties: - -- Config: disable_checksum -- Env Var: RCLONE_AZUREBLOB_DISABLE_CHECKSUM -- Type: bool -- Default: false - -#### --azureblob-memory-pool-flush-time - -How often internal memory buffer pools will be flushed. (no longer used) - -Properties: - -- Config: memory_pool_flush_time -- Env Var: RCLONE_AZUREBLOB_MEMORY_POOL_FLUSH_TIME -- Type: Duration -- Default: 1m0s - -#### --azureblob-memory-pool-use-mmap - -Whether to use mmap buffers in internal memory pool. (no longer used) - -Properties: - -- Config: memory_pool_use_mmap -- Env Var: RCLONE_AZUREBLOB_MEMORY_POOL_USE_MMAP -- Type: bool -- Default: false - -#### --azureblob-encoding - -The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - -Properties: - -- Config: encoding -- Env Var: RCLONE_AZUREBLOB_ENCODING -- Type: Encoding -- Default: Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8 - -#### --azureblob-public-access - -Public access level of a container: blob or container. - -Properties: - -- Config: public_access -- Env Var: RCLONE_AZUREBLOB_PUBLIC_ACCESS -- Type: string -- Required: false -- Examples: - - \[dq]\[dq] - - The container and its blobs can be accessed only with an authorized request. - - It\[aq]s a default value. - - \[dq]blob\[dq] - - Blob data within this container can be read via anonymous request. - - \[dq]container\[dq] - - Allow full public read access for container and blob data. - -#### --azureblob-directory-markers - -Upload an empty object with a trailing slash when a new directory is created - -Empty folders are unsupported for bucket based remotes, this option -creates an empty object ending with \[dq]/\[dq], to persist the folder. - -This object also has the metadata \[dq]hdi_isfolder = true\[dq] to conform to -the Microsoft standard. - - -Properties: - -- Config: directory_markers -- Env Var: RCLONE_AZUREBLOB_DIRECTORY_MARKERS -- Type: bool -- Default: false - -#### --azureblob-no-check-container - -If set, don\[aq]t attempt to check the container exists or create it. - -This can be useful when trying to minimise the number of transactions -rclone does if you know the container exists already. - - -Properties: - -- Config: no_check_container -- Env Var: RCLONE_AZUREBLOB_NO_CHECK_CONTAINER -- Type: bool -- Default: false - -#### --azureblob-no-head-object - -If set, do not do HEAD before GET when getting objects. - -Properties: - -- Config: no_head_object -- Env Var: RCLONE_AZUREBLOB_NO_HEAD_OBJECT -- Type: bool -- Default: false - -#### --azureblob-delete-snapshots - -Set to specify how to deal with snapshots on blob deletion. - -Properties: - -- Config: delete_snapshots -- Env Var: RCLONE_AZUREBLOB_DELETE_SNAPSHOTS -- Type: string -- Required: false -- Choices: - - \[dq]\[dq] - - By default, the delete operation fails if a blob has snapshots - - \[dq]include\[dq] - - Specify \[aq]include\[aq] to remove the root blob and all its snapshots - - \[dq]only\[dq] - - Specify \[aq]only\[aq] to remove only the snapshots but keep the root blob. - -#### --azureblob-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_AZUREBLOB_DESCRIPTION -- Type: string -- Required: false - - - -### Custom upload headers - -You can set custom upload headers with the \[ga]--header-upload\[ga] flag. - -- Cache-Control -- Content-Disposition -- Content-Encoding -- Content-Language -- Content-Type - -Eg \[ga]--header-upload \[dq]Content-Type: text/potato\[dq]\[ga] - -## Limitations - -MD5 sums are only uploaded with chunked files if the source has an MD5 -sum. This will always be the case for a local to azure copy. - -\[ga]rclone about\[ga] is not supported by the Microsoft Azure Blob storage backend. Backends without -this capability cannot determine free space for an rclone mount or -use policy \[ga]mfs\[ga] (most free space) as a member of an rclone union -remote. - -See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/) - -## Azure Storage Emulator Support - -You can run rclone with the storage emulator (usually _azurite_). - -To do this, just set up a new remote with \[ga]rclone config\[ga] following -the instructions in the introduction and set \[ga]use_emulator\[ga] in the -advanced settings as \[ga]true\[ga]. You do not need to provide a default -account name nor an account key. But you can override them in the -\[ga]account\[ga] and \[ga]key\[ga] options. (Prior to v1.61 they were hard coded to -_azurite_\[aq]s \[ga]devstoreaccount1\[ga].) - -Also, if you want to access a storage emulator instance running on a -different machine, you can override the \[ga]endpoint\[ga] parameter in the -advanced settings, setting it to -\[ga]http(s)://:/devstoreaccount1\[ga] -(e.g. \[ga]http://10.254.2.5:10000/devstoreaccount1\[ga]). - -# Microsoft Azure Files Storage - -Paths are specified as \[ga]remote:\[ga] You may put subdirectories in too, -e.g. \[ga]remote:path/to/dir\[ga]. - -## Configuration - -Here is an example of making a Microsoft Azure Files Storage -configuration. For a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: +Needed only if you want to use a service principal instead of +interactive login. +.IP +.nf +\f[C] +$ az ad sp create-for-rbac --name \[dq]\[dq] \[rs] + --role \[dq]Storage Blob Data Owner\[dq] \[rs] + --scopes \[dq]/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts//blobServices/default/containers/\[dq] \[rs] + > azure-principal.json \f[R] .fi .PP -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 [snip] XX / -Microsoft Azure Files Storage \ \[dq]azurefiles\[dq] [snip] +See \[dq]Create an Azure service +principal\[dq] (https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli) +and \[dq]Assign an Azure role for access to blob +data\[dq] (https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli) +pages for more details. .PP +It may be more convenient to put the credentials directly into the +rclone config file under the \f[C]client_id\f[R], \f[C]tenant\f[R] and +\f[C]client_secret\f[R] keys instead of setting +\f[C]service_principal_file\f[R]. +.PP +Properties: +.IP \[bu] 2 +Config: service_principal_file +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_SERVICE_PRINCIPAL_FILE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-use-msi +.PP +Use a managed service identity to authenticate (only works in Azure). +.PP +When true, use a managed service +identity (https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/) +to authenticate to Azure Storage instead of a SAS token or account key. +.PP +If the VM(SS) on which this program is running has a system-assigned +identity, it will be used by default. +If the resource has no system-assigned but exactly one user-assigned +identity, the user-assigned identity will be used by default. +If the resource has multiple user-assigned identities, the identity to +use must be explicitly specified using exactly one of the msi_object_id, +msi_client_id, or msi_mi_res_id parameters. +.PP +Properties: +.IP \[bu] 2 +Config: use_msi +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_USE_MSI +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-msi-object-id +.PP +Object ID of the user-assigned MSI to use, if any. +.PP +Leave blank if msi_client_id or msi_mi_res_id specified. +.PP +Properties: +.IP \[bu] 2 +Config: msi_object_id +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_MSI_OBJECT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-msi-client-id +.PP +Object ID of the user-assigned MSI to use, if any. +.PP +Leave blank if msi_object_id or msi_mi_res_id specified. +.PP +Properties: +.IP \[bu] 2 +Config: msi_client_id +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_MSI_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-msi-mi-res-id +.PP +Azure resource ID of the user-assigned MSI to use, if any. +.PP +Leave blank if msi_client_id or msi_object_id specified. +.PP +Properties: +.IP \[bu] 2 +Config: msi_mi_res_id +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_MSI_MI_RES_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-use-emulator +.PP +Uses local storage emulator if provided as \[aq]true\[aq]. +.PP +Leave blank if using real azure storage endpoint. +.PP +Properties: +.IP \[bu] 2 +Config: use_emulator +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_USE_EMULATOR +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-endpoint +.PP +Endpoint for the service. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: endpoint +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_ENDPOINT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-upload-cutoff +.PP +Cutoff for switching to chunked upload (<= 256 MiB) (deprecated). +.PP +Properties: +.IP \[bu] 2 +Config: upload_cutoff +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_UPLOAD_CUTOFF +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-chunk-size +.PP +Upload chunk size. +.PP +Note that this is stored in memory and there may be up to +\[dq]--transfers\[dq] * \[dq]--azureblob-upload-concurrency\[dq] chunks +stored at once in memory. +.PP +Properties: +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 4Mi +.SS --azureblob-upload-concurrency +.PP +Concurrency for multipart uploads. +.PP +This is the number of chunks of the same file that are uploaded +concurrently. +.PP +If you are uploading small numbers of large files over high-speed links +and these uploads do not fully utilize your bandwidth, then increasing +this may help to speed up the transfers. +.PP +In tests, upload speed increases almost linearly with upload +concurrency. +For example to fill a gigabit pipe it may be necessary to raise this to +64. +Note that this will use more memory. +.PP +Note that chunks are stored in memory and there may be up to +\[dq]--transfers\[dq] * \[dq]--azureblob-upload-concurrency\[dq] chunks +stored at once in memory. +.PP +Properties: +.IP \[bu] 2 +Config: upload_concurrency +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_UPLOAD_CONCURRENCY +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 16 +.SS --azureblob-list-chunk +.PP +Size of blob list. +.PP +This sets the number of blobs requested in each listing chunk. +Default is the maximum, 5000. +\[dq]List blobs\[dq] requests are permitted 2 minutes per megabyte to +complete. +If an operation is taking longer than 2 minutes per megabyte on average, +it will time out ( +source (https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations#exceptions-to-default-timeout-interval) +). +This can be used to limit the number of blobs items to return, to avoid +the time out. +.PP +Properties: +.IP \[bu] 2 +Config: list_chunk +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_LIST_CHUNK +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 5000 +.SS --azureblob-access-tier +.PP +Access tier of blob: hot, cool, cold or archive. +.PP +Archived blobs can be restored by setting access tier to hot, cool or +cold. +Leave blank if you intend to use default access tier, which is set at +account level +.PP +If there is no \[dq]access tier\[dq] specified, rclone doesn\[aq]t apply +any tier. +rclone performs \[dq]Set Tier\[dq] operation on blobs while uploading, +if objects are not modified, specifying \[dq]access tier\[dq] to new one +will have no effect. +If blobs are in \[dq]archive tier\[dq] at remote, trying to perform data +transfer operations from remote will not be allowed. +User should first restore by tiering blob to \[dq]Hot\[dq], +\[dq]Cool\[dq] or \[dq]Cold\[dq]. +.PP +Properties: +.IP \[bu] 2 +Config: access_tier +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_ACCESS_TIER +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azureblob-archive-tier-delete +.PP +Delete archive tier blobs before overwriting. +.PP +Archive tier blobs cannot be updated. +So without this flag, if you attempt to update an archive tier blob, +then rclone will produce the error: +.IP +.nf +\f[C] +can\[aq]t update archive tier blob without --azureblob-archive-tier-delete +\f[R] +.fi +.PP +With this flag set then before rclone attempts to overwrite an archive +tier blob, it will delete the existing blob before uploading its +replacement. +This has the potential for data loss if the upload fails (unlike +updating a normal blob) and also may cost more since deleting archive +tier blobs early may be chargable. +.PP +Properties: +.IP \[bu] 2 +Config: archive_tier_delete +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_ARCHIVE_TIER_DELETE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-disable-checksum +.PP +Don\[aq]t store MD5 checksum with object metadata. +.PP +Normally rclone will calculate the MD5 checksum of the input before +uploading it so it can add it to metadata on the object. +This is great for data integrity checking but can cause long delays for +large files to start uploading. +.PP +Properties: +.IP \[bu] 2 +Config: disable_checksum +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_DISABLE_CHECKSUM +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-memory-pool-flush-time +.PP +How often internal memory buffer pools will be flushed. +(no longer used) +.PP +Properties: +.IP \[bu] 2 +Config: memory_pool_flush_time +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_MEMORY_POOL_FLUSH_TIME +.IP \[bu] 2 +Type: Duration +.IP \[bu] 2 +Default: 1m0s +.SS --azureblob-memory-pool-use-mmap +.PP +Whether to use mmap buffers in internal memory pool. +(no longer used) +.PP +Properties: +.IP \[bu] 2 +Config: memory_pool_use_mmap +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_MEMORY_POOL_USE_MMAP +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-encoding +.PP +The encoding for the backend. +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP +Properties: +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8 +.SS --azureblob-public-access +.PP +Public access level of a container: blob or container. +.PP +Properties: +.IP \[bu] 2 +Config: public_access +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_PUBLIC_ACCESS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]\[dq] +.RS 2 +.IP \[bu] 2 +The container and its blobs can be accessed only with an authorized +request. +.IP \[bu] 2 +It\[aq]s a default value. +.RE +.IP \[bu] 2 +\[dq]blob\[dq] +.RS 2 +.IP \[bu] 2 +Blob data within this container can be read via anonymous request. +.RE +.IP \[bu] 2 +\[dq]container\[dq] +.RS 2 +.IP \[bu] 2 +Allow full public read access for container and blob data. +.RE +.RE +.SS --azureblob-directory-markers +.PP +Upload an empty object with a trailing slash when a new directory is +created +.PP +Empty folders are unsupported for bucket based remotes, this option +creates an empty object ending with \[dq]/\[dq], to persist the folder. +.PP +This object also has the metadata \[dq]hdi_isfolder = true\[dq] to +conform to the Microsoft standard. +.PP +Properties: +.IP \[bu] 2 +Config: directory_markers +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_DIRECTORY_MARKERS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-no-check-container +.PP +If set, don\[aq]t attempt to check the container exists or create it. +.PP +This can be useful when trying to minimise the number of transactions +rclone does if you know the container exists already. +.PP +Properties: +.IP \[bu] 2 +Config: no_check_container +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_NO_CHECK_CONTAINER +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-no-head-object +.PP +If set, do not do HEAD before GET when getting objects. +.PP +Properties: +.IP \[bu] 2 +Config: no_head_object +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_NO_HEAD_OBJECT +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azureblob-delete-snapshots +.PP +Set to specify how to deal with snapshots on blob deletion. +.PP +Properties: +.IP \[bu] 2 +Config: delete_snapshots +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_DELETE_SNAPSHOTS +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.IP \[bu] 2 +Choices: +.RS 2 +.IP \[bu] 2 +\[dq]\[dq] +.RS 2 +.IP \[bu] 2 +By default, the delete operation fails if a blob has snapshots +.RE +.IP \[bu] 2 +\[dq]include\[dq] +.RS 2 +.IP \[bu] 2 +Specify \[aq]include\[aq] to remove the root blob and all its snapshots +.RE +.IP \[bu] 2 +\[dq]only\[dq] +.RS 2 +.IP \[bu] 2 +Specify \[aq]only\[aq] to remove only the snapshots but keep the root +blob. +.RE +.RE +.SS --azureblob-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_AZUREBLOB_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Custom upload headers +.PP +You can set custom upload headers with the \f[C]--header-upload\f[R] +flag. +.IP \[bu] 2 +Cache-Control +.IP \[bu] 2 +Content-Disposition +.IP \[bu] 2 +Content-Encoding +.IP \[bu] 2 +Content-Language +.IP \[bu] 2 +Content-Type +.PP +Eg \f[C]--header-upload \[dq]Content-Type: text/potato\[dq]\f[R] +.SS Limitations +.PP +MD5 sums are only uploaded with chunked files if the source has an MD5 +sum. +This will always be the case for a local to azure copy. +.PP +\f[C]rclone about\f[R] is not supported by the Microsoft Azure Blob +storage backend. +Backends without this capability cannot determine free space for an +rclone mount or use policy \f[C]mfs\f[R] (most free space) as a member +of an rclone union remote. +.PP +See List of backends that do not support rclone +about (https://rclone.org/overview/#optional-features) and rclone +about (https://rclone.org/commands/rclone_about/) +.SS Azure Storage Emulator Support +.PP +You can run rclone with the storage emulator (usually +\f[I]azurite\f[R]). +.PP +To do this, just set up a new remote with \f[C]rclone config\f[R] +following the instructions in the introduction and set +\f[C]use_emulator\f[R] in the advanced settings as \f[C]true\f[R]. +You do not need to provide a default account name nor an account key. +But you can override them in the \f[C]account\f[R] and \f[C]key\f[R] +options. +(Prior to v1.61 they were hard coded to \f[I]azurite\f[R]\[aq]s +\f[C]devstoreaccount1\f[R].) +.PP +Also, if you want to access a storage emulator instance running on a +different machine, you can override the \f[C]endpoint\f[R] parameter in +the advanced settings, setting it to +\f[C]http(s)://:/devstoreaccount1\f[R] (e.g. +\f[C]http://10.254.2.5:10000/devstoreaccount1\f[R]). +.SH Microsoft Azure Files Storage +.PP +Paths are specified as \f[C]remote:\f[R] You may put subdirectories in +too, e.g. +\f[C]remote:path/to/dir\f[R]. +.SS Configuration +.PP +Here is an example of making a Microsoft Azure Files Storage +configuration. +For a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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 +[snip] +XX / Microsoft Azure Files Storage + \[rs] \[dq]azurefiles\[dq] +[snip] + Option account. Azure Storage Account Name. Set this to the Azure Storage Account Name in use. -Leave blank to use SAS URL or connection string, otherwise it needs to -be set. +Leave blank to use SAS URL or connection string, otherwise it needs to be set. If this is blank and if env_auth is set it will be read from the -environment variable \f[C]AZURE_STORAGE_ACCOUNT_NAME\f[R] if possible. -Enter a value. -Press Enter to leave empty. +environment variable \[ga]AZURE_STORAGE_ACCOUNT_NAME\[ga] if possible. +Enter a value. Press Enter to leave empty. account> account_name -.PP + Option share_name. Azure Files Share Name. This is required and is the name of the share to access. -Enter a value. -Press Enter to leave empty. +Enter a value. Press Enter to leave empty. share_name> share_name -.PP + Option env_auth. Read credentials from runtime (environment variables, CLI or MSI). -See the authentication docs for full info. -Enter a boolean value (true or false). -Press Enter for the default (false). -env_auth> -.PP +See the [authentication docs](/azurefiles#authentication) for full info. +Enter a boolean value (true or false). Press Enter for the default (false). +env_auth> + Option key. Storage Account Shared Key. Leave blank to use SAS URL or connection string. -Enter a value. -Press Enter to leave empty. +Enter a value. Press Enter to leave empty. key> base64encodedkey== -.PP + Option sas_url. SAS URL. Leave blank if using account/key or connection string. -Enter a value. -Press Enter to leave empty. -sas_url> -.PP +Enter a value. Press Enter to leave empty. +sas_url> + Option connection_string. Azure Files Connection String. -Enter a value. -Press Enter to leave empty. -connection_string> [snip] -.PP +Enter a value. Press Enter to leave empty. +connection_string> +[snip] + Configuration complete. -Options: - type: azurefiles - account: account_name - share_name: -share_name - key: base64encodedkey== Keep this \[dq]remote\[dq] remote? -y) Yes this is OK (default) e) Edit this remote d) Delete this remote -y/e/d> -.IP -.nf -\f[C] -Once configured you can use rclone. - -See all files in the top level: - - rclone lsf remote: - -Make a new directory in the root: - - rclone mkdir remote:dir - -Recursively List the contents: - - rclone ls remote: - -Sync \[ga]/home/local/directory\[ga] to the remote directory, deleting any -excess files in the directory. - - rclone sync --interactive /home/local/directory remote:dir - -### Modified time - -The modified time is stored as Azure standard \[ga]LastModified\[ga] time on -files - -### Performance - -When uploading large files, increasing the value of -\[ga]--azurefiles-upload-concurrency\[ga] will increase performance at the cost -of using more memory. The default of 16 is set quite conservatively to -use less memory. It maybe be necessary raise it to 64 or higher to -fully utilize a 1 GBit/s link with a single file transfer. - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| \[dq] | 0x22 | \[uFF02] | -| * | 0x2A | \[uFF0A] | -| : | 0x3A | \[uFF1A] | -| < | 0x3C | \[uFF1C] | -| > | 0x3E | \[uFF1E] | -| ? | 0x3F | \[uFF1F] | -| \[rs] | 0x5C | \[uFF3C] | -| \[rs]| | 0x7C | \[uFF5C] | - -File names can also not end with the following characters. -These only get replaced if they are the last character in the name: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| . | 0x2E | \[uFF0E] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -### Hashes - -MD5 hashes are stored with files. Not all files will have MD5 hashes -as these have to be uploaded with the file. - -### Authentication {#authentication} - -There are a number of ways of supplying credentials for Azure Files -Storage. Rclone tries them in the order of the sections below. - -#### Env Auth - -If the \[ga]env_auth\[ga] config parameter is \[ga]true\[ga] then rclone will pull -credentials from the environment or runtime. - -It tries these authentication methods in this order: - -1. Environment Variables -2. Managed Service Identity Credentials -3. Azure CLI credentials (as used by the az tool) - -These are described in the following sections - -##### Env Auth: 1. Environment Variables - -If \[ga]env_auth\[ga] is set and environment variables are present rclone -authenticates a service principal with a secret or certificate, or a -user with a password, depending on which environment variable are set. -It reads configuration from these variables, in the following order: - -1. Service principal with client secret - - \[ga]AZURE_TENANT_ID\[ga]: ID of the service principal\[aq]s tenant. Also called its \[dq]directory\[dq] ID. - - \[ga]AZURE_CLIENT_ID\[ga]: the service principal\[aq]s client ID - - \[ga]AZURE_CLIENT_SECRET\[ga]: one of the service principal\[aq]s client secrets -2. Service principal with certificate - - \[ga]AZURE_TENANT_ID\[ga]: ID of the service principal\[aq]s tenant. Also called its \[dq]directory\[dq] ID. - - \[ga]AZURE_CLIENT_ID\[ga]: the service principal\[aq]s client ID - - \[ga]AZURE_CLIENT_CERTIFICATE_PATH\[ga]: path to a PEM or PKCS12 certificate file including the private key. - - \[ga]AZURE_CLIENT_CERTIFICATE_PASSWORD\[ga]: (optional) password for the certificate file. - - \[ga]AZURE_CLIENT_SEND_CERTIFICATE_CHAIN\[ga]: (optional) Specifies whether an authentication request will include an x5c header to support subject name / issuer based authentication. When set to \[dq]true\[dq] or \[dq]1\[dq], authentication requests include the x5c header. -3. User with username and password - - \[ga]AZURE_TENANT_ID\[ga]: (optional) tenant to authenticate in. Defaults to \[dq]organizations\[dq]. - - \[ga]AZURE_CLIENT_ID\[ga]: client ID of the application the user will authenticate to - - \[ga]AZURE_USERNAME\[ga]: a username (usually an email address) - - \[ga]AZURE_PASSWORD\[ga]: the user\[aq]s password -4. Workload Identity - - \[ga]AZURE_TENANT_ID\[ga]: Tenant to authenticate in. - - \[ga]AZURE_CLIENT_ID\[ga]: Client ID of the application the user will authenticate to. - - \[ga]AZURE_FEDERATED_TOKEN_FILE\[ga]: Path to projected service account token file. - - \[ga]AZURE_AUTHORITY_HOST\[ga]: Authority of an Azure Active Directory endpoint (default: login.microsoftonline.com). - - -##### Env Auth: 2. Managed Service Identity Credentials - -When using Managed Service Identity if the VM(SS) on which this -program is running has a system-assigned identity, it will be used by -default. If the resource has no system-assigned but exactly one -user-assigned identity, the user-assigned identity will be used by -default. - -If the resource has multiple user-assigned identities you will need to -unset \[ga]env_auth\[ga] and set \[ga]use_msi\[ga] instead. See the [\[ga]use_msi\[ga] -section](#use_msi). - -##### Env Auth: 3. Azure CLI credentials (as used by the az tool) - -Credentials created with the \[ga]az\[ga] tool can be picked up using \[ga]env_auth\[ga]. - -For example if you were to login with a service principal like this: - - az login --service-principal -u XXX -p XXX --tenant XXX - -Then you could access rclone resources like this: - - rclone lsf :azurefiles,env_auth,account=ACCOUNT: - -Or - - rclone lsf --azurefiles-env-auth --azurefiles-account=ACCOUNT :azurefiles: - -#### Account and Shared Key - -This is the most straight forward and least flexible way. Just fill -in the \[ga]account\[ga] and \[ga]key\[ga] lines and leave the rest blank. - -#### SAS URL - -To use it leave \[ga]account\[ga], \[ga]key\[ga] and \[ga]connection_string\[ga] blank and fill in \[ga]sas_url\[ga]. - -#### Connection String - -To use it leave \[ga]account\[ga], \[ga]key\[ga] and \[dq]sas_url\[dq] blank and fill in \[ga]connection_string\[ga]. - -#### Service principal with client secret - -If these variables are set, rclone will authenticate with a service principal with a client secret. - -- \[ga]tenant\[ga]: ID of the service principal\[aq]s tenant. Also called its \[dq]directory\[dq] ID. -- \[ga]client_id\[ga]: the service principal\[aq]s client ID -- \[ga]client_secret\[ga]: one of the service principal\[aq]s client secrets - -The credentials can also be placed in a file using the -\[ga]service_principal_file\[ga] configuration option. - -#### Service principal with certificate - -If these variables are set, rclone will authenticate with a service principal with certificate. - -- \[ga]tenant\[ga]: ID of the service principal\[aq]s tenant. Also called its \[dq]directory\[dq] ID. -- \[ga]client_id\[ga]: the service principal\[aq]s client ID -- \[ga]client_certificate_path\[ga]: path to a PEM or PKCS12 certificate file including the private key. -- \[ga]client_certificate_password\[ga]: (optional) password for the certificate file. -- \[ga]client_send_certificate_chain\[ga]: (optional) Specifies whether an authentication request will include an x5c header to support subject name / issuer based authentication. When set to \[dq]true\[dq] or \[dq]1\[dq], authentication requests include the x5c header. - -**NB** \[ga]client_certificate_password\[ga] must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - -#### User with username and password - -If these variables are set, rclone will authenticate with username and password. - -- \[ga]tenant\[ga]: (optional) tenant to authenticate in. Defaults to \[dq]organizations\[dq]. -- \[ga]client_id\[ga]: client ID of the application the user will authenticate to -- \[ga]username\[ga]: a username (usually an email address) -- \[ga]password\[ga]: the user\[aq]s password - -Microsoft doesn\[aq]t recommend this kind of authentication, because it\[aq]s -less secure than other authentication flows. This method is not -interactive, so it isn\[aq]t compatible with any form of multi-factor -authentication, and the application must already have user or admin -consent. This credential can only authenticate work and school -accounts; it can\[aq]t authenticate Microsoft accounts. - -**NB** \[ga]password\[ga] must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - -#### Managed Service Identity Credentials {#use_msi} - -If \[ga]use_msi\[ga] is set then managed service identity credentials are -used. This authentication only works when running in an Azure service. -\[ga]env_auth\[ga] needs to be unset to use this. - -However if you have multiple user identities to choose from these must -be explicitly specified using exactly one of the \[ga]msi_object_id\[ga], -\[ga]msi_client_id\[ga], or \[ga]msi_mi_res_id\[ga] parameters. - -If none of \[ga]msi_object_id\[ga], \[ga]msi_client_id\[ga], or \[ga]msi_mi_res_id\[ga] is -set, this is is equivalent to using \[ga]env_auth\[ga]. - - -### Standard options - -Here are the Standard options specific to azurefiles (Microsoft Azure Files). - -#### --azurefiles-account - -Azure Storage Account Name. - -Set this to the Azure Storage Account Name in use. - -Leave blank to use SAS URL or connection string, otherwise it needs to be set. - -If this is blank and if env_auth is set it will be read from the -environment variable \[ga]AZURE_STORAGE_ACCOUNT_NAME\[ga] if possible. - - -Properties: - -- Config: account -- Env Var: RCLONE_AZUREFILES_ACCOUNT -- Type: string -- Required: false - -#### --azurefiles-share-name - -Azure Files Share Name. - -This is required and is the name of the share to access. - - -Properties: - -- Config: share_name -- Env Var: RCLONE_AZUREFILES_SHARE_NAME -- Type: string -- Required: false - -#### --azurefiles-env-auth - -Read credentials from runtime (environment variables, CLI or MSI). - -See the [authentication docs](/azurefiles#authentication) for full info. - -Properties: - -- Config: env_auth -- Env Var: RCLONE_AZUREFILES_ENV_AUTH -- Type: bool -- Default: false - -#### --azurefiles-key - -Storage Account Shared Key. - -Leave blank to use SAS URL or connection string. - -Properties: - -- Config: key -- Env Var: RCLONE_AZUREFILES_KEY -- Type: string -- Required: false - -#### --azurefiles-sas-url - -SAS URL. - -Leave blank if using account/key or connection string. - -Properties: - -- Config: sas_url -- Env Var: RCLONE_AZUREFILES_SAS_URL -- Type: string -- Required: false - -#### --azurefiles-connection-string - -Azure Files Connection String. - -Properties: - -- Config: connection_string -- Env Var: RCLONE_AZUREFILES_CONNECTION_STRING -- Type: string -- Required: false - -#### --azurefiles-tenant - -ID of the service principal\[aq]s tenant. Also called its directory ID. - -Set this if using -- Service principal with client secret -- Service principal with certificate -- User with username and password - - -Properties: - -- Config: tenant -- Env Var: RCLONE_AZUREFILES_TENANT -- Type: string -- Required: false - -#### --azurefiles-client-id - -The ID of the client in use. - -Set this if using -- Service principal with client secret -- Service principal with certificate -- User with username and password - - -Properties: - -- Config: client_id -- Env Var: RCLONE_AZUREFILES_CLIENT_ID -- Type: string -- Required: false - -#### --azurefiles-client-secret - -One of the service principal\[aq]s client secrets - -Set this if using -- Service principal with client secret - - -Properties: - -- Config: client_secret -- Env Var: RCLONE_AZUREFILES_CLIENT_SECRET -- Type: string -- Required: false - -#### --azurefiles-client-certificate-path - -Path to a PEM or PKCS12 certificate file including the private key. - -Set this if using -- Service principal with certificate - - -Properties: - -- Config: client_certificate_path -- Env Var: RCLONE_AZUREFILES_CLIENT_CERTIFICATE_PATH -- Type: string -- Required: false - -#### --azurefiles-client-certificate-password - -Password for the certificate file (optional). - -Optionally set this if using -- Service principal with certificate - -And the certificate has a password. - - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - -Properties: - -- Config: client_certificate_password -- Env Var: RCLONE_AZUREFILES_CLIENT_CERTIFICATE_PASSWORD -- Type: string -- Required: false - -### Advanced options - -Here are the Advanced options specific to azurefiles (Microsoft Azure Files). - -#### --azurefiles-client-send-certificate-chain - -Send the certificate chain when using certificate auth. - -Specifies whether an authentication request will include an x5c header -to support subject name / issuer based authentication. When set to -true, authentication requests include the x5c header. - -Optionally set this if using -- Service principal with certificate - - -Properties: - -- Config: client_send_certificate_chain -- Env Var: RCLONE_AZUREFILES_CLIENT_SEND_CERTIFICATE_CHAIN -- Type: bool -- Default: false - -#### --azurefiles-username - -User name (usually an email address) - -Set this if using -- User with username and password - - -Properties: - -- Config: username -- Env Var: RCLONE_AZUREFILES_USERNAME -- Type: string -- Required: false - -#### --azurefiles-password - -The user\[aq]s password - -Set this if using -- User with username and password - - -**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/). - -Properties: - -- Config: password -- Env Var: RCLONE_AZUREFILES_PASSWORD -- Type: string -- Required: false - -#### --azurefiles-service-principal-file - -Path to file containing credentials for use with a service principal. - -Leave blank normally. Needed only if you want to use a service principal instead of interactive login. - - $ az ad sp create-for-rbac --name \[dq]\[dq] \[rs] - --role \[dq]Storage Files Data Owner\[dq] \[rs] - --scopes \[dq]/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts//blobServices/default/containers/\[dq] \[rs] - > azure-principal.json - -See [\[dq]Create an Azure service principal\[dq]](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli) and [\[dq]Assign an Azure role for access to files data\[dq]](https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli) pages for more details. - -**NB** this section needs updating for Azure Files - pull requests appreciated! - -It may be more convenient to put the credentials directly into the -rclone config file under the \[ga]client_id\[ga], \[ga]tenant\[ga] and \[ga]client_secret\[ga] -keys instead of setting \[ga]service_principal_file\[ga]. - - -Properties: - -- Config: service_principal_file -- Env Var: RCLONE_AZUREFILES_SERVICE_PRINCIPAL_FILE -- Type: string -- Required: false - -#### --azurefiles-use-msi - -Use a managed service identity to authenticate (only works in Azure). - -When true, use a [managed service identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/) -to authenticate to Azure Storage instead of a SAS token or account key. - -If the VM(SS) on which this program is running has a system-assigned identity, it will -be used by default. If the resource has no system-assigned but exactly one user-assigned identity, -the user-assigned identity will be used by default. If the resource has multiple user-assigned -identities, the identity to use must be explicitly specified using exactly one of the msi_object_id, -msi_client_id, or msi_mi_res_id parameters. - -Properties: - -- Config: use_msi -- Env Var: RCLONE_AZUREFILES_USE_MSI -- Type: bool -- Default: false - -#### --azurefiles-msi-object-id - -Object ID of the user-assigned MSI to use, if any. - -Leave blank if msi_client_id or msi_mi_res_id specified. - -Properties: - -- Config: msi_object_id -- Env Var: RCLONE_AZUREFILES_MSI_OBJECT_ID -- Type: string -- Required: false - -#### --azurefiles-msi-client-id - -Object ID of the user-assigned MSI to use, if any. - -Leave blank if msi_object_id or msi_mi_res_id specified. - -Properties: - -- Config: msi_client_id -- Env Var: RCLONE_AZUREFILES_MSI_CLIENT_ID -- Type: string -- Required: false - -#### --azurefiles-msi-mi-res-id - -Azure resource ID of the user-assigned MSI to use, if any. - -Leave blank if msi_client_id or msi_object_id specified. - -Properties: - -- Config: msi_mi_res_id -- Env Var: RCLONE_AZUREFILES_MSI_MI_RES_ID -- Type: string -- Required: false - -#### --azurefiles-endpoint - -Endpoint for the service. - -Leave blank normally. - -Properties: - -- Config: endpoint -- Env Var: RCLONE_AZUREFILES_ENDPOINT -- Type: string -- Required: false - -#### --azurefiles-chunk-size - -Upload chunk size. - -Note that this is stored in memory and there may be up to -\[dq]--transfers\[dq] * \[dq]--azurefile-upload-concurrency\[dq] chunks stored at once -in memory. - -Properties: - -- Config: chunk_size -- Env Var: RCLONE_AZUREFILES_CHUNK_SIZE -- Type: SizeSuffix -- Default: 4Mi - -#### --azurefiles-upload-concurrency - -Concurrency for multipart uploads. - -This is the number of chunks of the same file that are uploaded -concurrently. - -If you are uploading small numbers of large files over high-speed -links and these uploads do not fully utilize your bandwidth, then -increasing this may help to speed up the transfers. - -Note that chunks are stored in memory and there may be up to -\[dq]--transfers\[dq] * \[dq]--azurefile-upload-concurrency\[dq] chunks stored at once -in memory. - -Properties: - -- Config: upload_concurrency -- Env Var: RCLONE_AZUREFILES_UPLOAD_CONCURRENCY -- Type: int -- Default: 16 - -#### --azurefiles-max-stream-size - -Max size for streamed files. - -Azure files needs to know in advance how big the file will be. When -rclone doesn\[aq]t know it uses this value instead. - -This will be used when rclone is streaming data, the most common uses are: - -- Uploading files with \[ga]--vfs-cache-mode off\[ga] with \[ga]rclone mount\[ga] -- Using \[ga]rclone rcat\[ga] -- Copying files with unknown length - -You will need this much free space in the share as the file will be this size temporarily. - - -Properties: - -- Config: max_stream_size -- Env Var: RCLONE_AZUREFILES_MAX_STREAM_SIZE -- Type: SizeSuffix -- Default: 10Gi - -#### --azurefiles-encoding - -The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - -Properties: - -- Config: encoding -- Env Var: RCLONE_AZUREFILES_ENCODING -- Type: Encoding -- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8,Dot - -#### --azurefiles-description - -Description of the remote - -Properties: - -- Config: description -- Env Var: RCLONE_AZUREFILES_DESCRIPTION -- Type: string -- Required: false - - - -### Custom upload headers - -You can set custom upload headers with the \[ga]--header-upload\[ga] flag. - -- Cache-Control -- Content-Disposition -- Content-Encoding -- Content-Language -- Content-Type - -Eg \[ga]--header-upload \[dq]Content-Type: text/potato\[dq]\[ga] - -## Limitations - -MD5 sums are only uploaded with chunked files if the source has an MD5 -sum. This will always be the case for a local to azure copy. - -# Microsoft OneDrive - -Paths are specified as \[ga]remote:path\[ga] - -Paths may be as deep as required, e.g. \[ga]remote:directory/subdirectory\[ga]. - -## Configuration - -The initial setup for OneDrive involves getting a token from -Microsoft which you need to do in your browser. \[ga]rclone config\[ga] walks -you through it. - -Here is an example of how to make a remote called \[ga]remote\[ga]. First run: - - rclone config - -This will guide you through an interactive setup process: +Options: +- type: azurefiles +- account: account_name +- share_name: share_name +- key: base64encodedkey== +Keep this \[dq]remote\[dq] remote? +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> \f[R] .fi -.IP "e)" 3 -Edit existing remote -.IP "f)" 3 -New remote -.IP "g)" 3 -Delete remote -.IP "h)" 3 -Rename remote -.IP "i)" 3 -Copy remote -.IP "j)" 3 -Set configuration password -.IP "k)" 3 -Quit config e/n/d/r/c/s/q> n name> remote Type of storage to configure. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -Choose a number from below, or type in your own value [snip] XX / -Microsoft OneDrive \ \[dq]onedrive\[dq] [snip] Storage> onedrive -Microsoft App Client Id Leave blank normally. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -client_id> Microsoft App Client Secret Leave blank normally. -Enter a string value. -Press Enter for the default (\[dq]\[dq]). -client_secret> Edit advanced config? -(y/n) -.IP "l)" 3 -Yes -.IP "m)" 3 -No y/n> n Remote config Use web browser to automatically authenticate -rclone with remote? -.IP \[bu] 2 -Say Y if the machine running rclone has a web browser you can use -.IP \[bu] 2 -Say N if running rclone on a (remote) machine without web browser access -If not sure try Y. -If Y failed, try N. -.IP "y)" 3 -Yes -.IP "z)" 3 -No y/n> y If your browser doesn\[aq]t open automatically go to the -following link: http://127.0.0.1:53682/auth Log in and authorize rclone -for access Waiting for code... -Got code Choose a number from below, or type in an existing value 1 / -OneDrive Personal or Business \ \[dq]onedrive\[dq] 2 / Sharepoint site -\ \[dq]sharepoint\[dq] 3 / Type in driveID \ \[dq]driveid\[dq] 4 / Type -in SiteID \ \[dq]siteid\[dq] 5 / Search a Sharepoint site -\ \[dq]search\[dq] Your choice> 1 Found 1 drives, please select the one -you want to use: 0: OneDrive (business) -id=b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk Chose -drive to use:> 0 Found drive \[aq]root\[aq] of type \[aq]business\[aq], -URL: https://org-my.sharepoint.com/personal/you/Documents Is that okay? -.IP "a)" 3 -Yes -.IP "b)" 3 -No y/n> y -------------------- [remote] type = onedrive token = -{\[dq]access_token\[dq]:\[dq]youraccesstoken\[dq],\[dq]token_type\[dq]:\[dq]Bearer\[dq],\[dq]refresh_token\[dq]:\[dq]yourrefreshtoken\[dq],\[dq]expiry\[dq]:\[dq]2018-08-26T22:39:52.486512262+08:00\[dq]} -drive_id = b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk -drive_type = business -------------------- -.IP "c)" 3 -Yes this is OK -.IP "d)" 3 -Edit this remote -.IP "e)" 3 -Delete this remote y/e/d> y +.PP +Once configured you can use rclone. +.PP +See all files in the top level: .IP .nf \f[C] -See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a -machine with no Internet browser available. - -Note that rclone runs a webserver on your local machine to collect the -token as returned from Microsoft. This only runs from the moment it -opens your browser to the moment you get back the verification -code. This is on \[ga]http://127.0.0.1:53682/\[ga] and this it may require -you to unblock it temporarily if you are running a host firewall. - -Once configured you can then use \[ga]rclone\[ga] like this, - -List directories in top level of your OneDrive - - rclone lsd remote: - -List all the files in your OneDrive - - rclone ls remote: - -To copy a local directory to an OneDrive directory called backup - - rclone copy /home/source remote:backup - -### Getting your own Client ID and Key - -rclone uses a default Client ID when talking to OneDrive, unless a custom \[ga]client_id\[ga] is specified in the config. -The default Client ID and Key are shared by all rclone users when performing requests. - -You may choose to create and use your own Client ID, in case the default one does not work well for you. -For example, you might see throttling. - -#### Creating Client ID for OneDrive Personal - -To create your own Client ID, please follow these steps: - -1. Open https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade and then click \[ga]New registration\[ga]. -2. Enter a name for your app, choose account type \[ga]Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)\[ga], select \[ga]Web\[ga] in \[ga]Redirect URI\[ga], then type (do not copy and paste) \[ga]http://localhost:53682/\[ga] and click Register. Copy and keep the \[ga]Application (client) ID\[ga] under the app name for later use. -3. Under \[ga]manage\[ga] select \[ga]Certificates & secrets\[ga], click \[ga]New client secret\[ga]. Enter a description (can be anything) and set \[ga]Expires\[ga] to 24 months. Copy and keep that secret _Value_ for later use (you _won\[aq]t_ be able to see this value afterwards). -4. Under \[ga]manage\[ga] select \[ga]API permissions\[ga], click \[ga]Add a permission\[ga] and select \[ga]Microsoft Graph\[ga] then select \[ga]delegated permissions\[ga]. -5. Search and select the following permissions: \[ga]Files.Read\[ga], \[ga]Files.ReadWrite\[ga], \[ga]Files.Read.All\[ga], \[ga]Files.ReadWrite.All\[ga], \[ga]offline_access\[ga], \[ga]User.Read\[ga] and \[ga]Sites.Read.All\[ga] (if custom access scopes are configured, select the permissions accordingly). Once selected click \[ga]Add permissions\[ga] at the bottom. - -Now the application is complete. Run \[ga]rclone config\[ga] to create or edit a OneDrive remote. -Supply the app ID and password as Client ID and Secret, respectively. rclone will walk you through the remaining steps. - -The access_scopes option allows you to configure the permissions requested by rclone. -See [Microsoft Docs](https://docs.microsoft.com/en-us/graph/permissions-reference#files-permissions) for more information about the different scopes. - -The \[ga]Sites.Read.All\[ga] permission is required if you need to [search SharePoint sites when configuring the remote](https://github.com/rclone/rclone/pull/5883). However, if that permission is not assigned, you need to exclude \[ga]Sites.Read.All\[ga] from your access scopes or set \[ga]disable_site_permission\[ga] option to true in the advanced options. - -#### Creating Client ID for OneDrive Business - -The steps for OneDrive Personal may or may not work for OneDrive Business, depending on the security settings of the organization. -A common error is that the publisher of the App is not verified. - -You may try to [verify you account](https://docs.microsoft.com/en-us/azure/active-directory/develop/publisher-verification-overview), or try to limit the App to your organization only, as shown below. - -1. Make sure to create the App with your business account. -2. Follow the steps above to create an App. However, we need a different account type here: \[ga]Accounts in this organizational directory only (*** - Single tenant)\[ga]. Note that you can also change the account type after creating the App. -3. Find the [tenant ID](https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-to-find-tenant) of your organization. -4. In the rclone config, set \[ga]auth_url\[ga] to \[ga]https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/authorize\[ga]. -5. In the rclone config, set \[ga]token_url\[ga] to \[ga]https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/token\[ga]. - -Note: If you have a special region, you may need a different host in step 4 and 5. Here are [some hints](https://github.com/rclone/rclone/blob/bc23bf11db1c78c6ebbf8ea538fbebf7058b4176/backend/onedrive/onedrive.go#L86). - - -### Modification times and hashes - -OneDrive allows modification times to be set on objects accurate to 1 -second. These will be used to detect whether objects need syncing or -not. - -OneDrive Personal, OneDrive for Business and Sharepoint Server support -[QuickXorHash](https://docs.microsoft.com/en-us/onedrive/developer/code-snippets/quickxorhash). - -Before rclone 1.62 the default hash for Onedrive Personal was \[ga]SHA1\[ga]. -For rclone 1.62 and above the default for all Onedrive backends is -\[ga]QuickXorHash\[ga]. - -Starting from July 2023 \[ga]SHA1\[ga] support is being phased out in Onedrive -Personal in favour of \[ga]QuickXorHash\[ga]. If necessary the -\[ga]--onedrive-hash-type\[ga] flag (or \[ga]hash_type\[ga] config option) can be used -to select \[ga]SHA1\[ga] during the transition period if this is important -your workflow. - -For all types of OneDrive you can use the \[ga]--checksum\[ga] flag. - -### --fast-list - -This remote supports \[ga]--fast-list\[ga] which allows you to use fewer -transactions in exchange for more memory. See the [rclone -docs](https://rclone.org/docs/#fast-list) for more details. - -This must be enabled with the \[ga]--onedrive-delta\[ga] flag (or \[ga]delta = -true\[ga] in the config file) as it can cause performance degradation. - -It does this by using the delta listing facilities of OneDrive which -returns all the files in the remote very efficiently. This is much -more efficient than listing directories recursively and is Microsoft\[aq]s -recommended way of reading all the file information from a drive. - -This can be useful with \[ga]rclone mount\[ga] and [rclone rc vfs/refresh -recursive=true](https://rclone.org/rc/#vfs-refresh)) to very quickly fill the mount with -information about all the files. - -The API used for the recursive listing (\[ga]ListR\[ga]) only supports listing -from the root of the drive. This will become increasingly inefficient -the further away you get from the root as rclone will have to discard -files outside of the directory you are using. - -Some commands (like \[ga]rclone lsf -R\[ga]) will use \[ga]ListR\[ga] by default - you -can turn this off with \[ga]--disable ListR\[ga] if you need to. - -### Restricted filename characters - -In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters) -the following characters are also replaced: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| \[dq] | 0x22 | \[uFF02] | -| * | 0x2A | \[uFF0A] | -| : | 0x3A | \[uFF1A] | -| < | 0x3C | \[uFF1C] | -| > | 0x3E | \[uFF1E] | -| ? | 0x3F | \[uFF1F] | -| \[rs] | 0x5C | \[uFF3C] | -| \[rs]| | 0x7C | \[uFF5C] | - +rclone lsf remote: +\f[R] +.fi +.PP +Make a new directory in the root: +.IP +.nf +\f[C] +rclone mkdir remote:dir +\f[R] +.fi +.PP +Recursively List the contents: +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP +Sync \f[C]/home/local/directory\f[R] to the remote directory, deleting +any excess files in the directory. +.IP +.nf +\f[C] +rclone sync --interactive /home/local/directory remote:dir +\f[R] +.fi +.SS Modified time +.PP +The modified time is stored as Azure standard \f[C]LastModified\f[R] +time on files +.SS Performance +.PP +When uploading large files, increasing the value of +\f[C]--azurefiles-upload-concurrency\f[R] will increase performance at +the cost of using more memory. +The default of 16 is set quite conservatively to use less memory. +It maybe be necessary raise it to 64 or higher to fully utilize a 1 +GBit/s link with a single file transfer. +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\[dq] +T}@T{ +0x22 +T}@T{ +\[uFF02] +T} +T{ +* +T}@T{ +0x2A +T}@T{ +\[uFF0A] +T} +T{ +: +T}@T{ +0x3A +T}@T{ +\[uFF1A] +T} +T{ +< +T}@T{ +0x3C +T}@T{ +\[uFF1C] +T} +T{ +> +T}@T{ +0x3E +T}@T{ +\[uFF1E] +T} +T{ +? +T}@T{ +0x3F +T}@T{ +\[uFF1F] +T} +T{ +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] +T} +T{ +| +T}@T{ +0x7C +T}@T{ +\[uFF5C] +T} +.TE +.PP File names can also not end with the following characters. These only get replaced if they are the last character in the name: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| SP | 0x20 | \[u2420] | -| . | 0x2E | \[uFF0E] | - +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\&. +T}@T{ +0x2E +T}@T{ +\[uFF0E] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Hashes +.PP +MD5 hashes are stored with files. +Not all files will have MD5 hashes as these have to be uploaded with the +file. +.SS Authentication +.PP +There are a number of ways of supplying credentials for Azure Files +Storage. +Rclone tries them in the order of the sections below. +.SS Env Auth +.PP +If the \f[C]env_auth\f[R] config parameter is \f[C]true\f[R] then rclone +will pull credentials from the environment or runtime. +.PP +It tries these authentication methods in this order: +.IP "1." 3 +Environment Variables +.IP "2." 3 +Managed Service Identity Credentials +.IP "3." 3 +Azure CLI credentials (as used by the az tool) +.PP +These are described in the following sections +.SS Env Auth: 1. Environment Variables +.PP +If \f[C]env_auth\f[R] is set and environment variables are present +rclone authenticates a service principal with a secret or certificate, +or a user with a password, depending on which environment variable are +set. +It reads configuration from these variables, in the following order: +.IP "1." 3 +Service principal with client secret +.RS 4 +.IP \[bu] 2 +\f[C]AZURE_TENANT_ID\f[R]: ID of the service principal\[aq]s tenant. +Also called its \[dq]directory\[dq] ID. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_ID\f[R]: the service principal\[aq]s client ID +.IP \[bu] 2 +\f[C]AZURE_CLIENT_SECRET\f[R]: one of the service principal\[aq]s client +secrets +.RE +.IP "2." 3 +Service principal with certificate +.RS 4 +.IP \[bu] 2 +\f[C]AZURE_TENANT_ID\f[R]: ID of the service principal\[aq]s tenant. +Also called its \[dq]directory\[dq] ID. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_ID\f[R]: the service principal\[aq]s client ID +.IP \[bu] 2 +\f[C]AZURE_CLIENT_CERTIFICATE_PATH\f[R]: path to a PEM or PKCS12 +certificate file including the private key. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_CERTIFICATE_PASSWORD\f[R]: (optional) password for the +certificate file. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_SEND_CERTIFICATE_CHAIN\f[R]: (optional) Specifies +whether an authentication request will include an x5c header to support +subject name / issuer based authentication. +When set to \[dq]true\[dq] or \[dq]1\[dq], authentication requests +include the x5c header. +.RE +.IP "3." 3 +User with username and password +.RS 4 +.IP \[bu] 2 +\f[C]AZURE_TENANT_ID\f[R]: (optional) tenant to authenticate in. +Defaults to \[dq]organizations\[dq]. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_ID\f[R]: client ID of the application the user will +authenticate to +.IP \[bu] 2 +\f[C]AZURE_USERNAME\f[R]: a username (usually an email address) +.IP \[bu] 2 +\f[C]AZURE_PASSWORD\f[R]: the user\[aq]s password +.RE +.IP "4." 3 +Workload Identity +.RS 4 +.IP \[bu] 2 +\f[C]AZURE_TENANT_ID\f[R]: Tenant to authenticate in. +.IP \[bu] 2 +\f[C]AZURE_CLIENT_ID\f[R]: Client ID of the application the user will +authenticate to. +.IP \[bu] 2 +\f[C]AZURE_FEDERATED_TOKEN_FILE\f[R]: Path to projected service account +token file. +.IP \[bu] 2 +\f[C]AZURE_AUTHORITY_HOST\f[R]: Authority of an Azure Active Directory +endpoint (default: login.microsoftonline.com). +.RE +.SS Env Auth: 2. Managed Service Identity Credentials +.PP +When using Managed Service Identity if the VM(SS) on which this program +is running has a system-assigned identity, it will be used by default. +If the resource has no system-assigned but exactly one user-assigned +identity, the user-assigned identity will be used by default. +.PP +If the resource has multiple user-assigned identities you will need to +unset \f[C]env_auth\f[R] and set \f[C]use_msi\f[R] instead. +See the \f[C]use_msi\f[R] section. +.SS Env Auth: 3. Azure CLI credentials (as used by the az tool) +.PP +Credentials created with the \f[C]az\f[R] tool can be picked up using +\f[C]env_auth\f[R]. +.PP +For example if you were to login with a service principal like this: +.IP +.nf +\f[C] +az login --service-principal -u XXX -p XXX --tenant XXX +\f[R] +.fi +.PP +Then you could access rclone resources like this: +.IP +.nf +\f[C] +rclone lsf :azurefiles,env_auth,account=ACCOUNT: +\f[R] +.fi +.PP +Or +.IP +.nf +\f[C] +rclone lsf --azurefiles-env-auth --azurefiles-account=ACCOUNT :azurefiles: +\f[R] +.fi +.SS Account and Shared Key +.PP +This is the most straight forward and least flexible way. +Just fill in the \f[C]account\f[R] and \f[C]key\f[R] lines and leave the +rest blank. +.SS SAS URL +.PP +To use it leave \f[C]account\f[R], \f[C]key\f[R] and +\f[C]connection_string\f[R] blank and fill in \f[C]sas_url\f[R]. +.SS Connection String +.PP +To use it leave \f[C]account\f[R], \f[C]key\f[R] and \[dq]sas_url\[dq] +blank and fill in \f[C]connection_string\f[R]. +.SS Service principal with client secret +.PP +If these variables are set, rclone will authenticate with a service +principal with a client secret. +.IP \[bu] 2 +\f[C]tenant\f[R]: ID of the service principal\[aq]s tenant. +Also called its \[dq]directory\[dq] ID. +.IP \[bu] 2 +\f[C]client_id\f[R]: the service principal\[aq]s client ID +.IP \[bu] 2 +\f[C]client_secret\f[R]: one of the service principal\[aq]s client +secrets +.PP +The credentials can also be placed in a file using the +\f[C]service_principal_file\f[R] configuration option. +.SS Service principal with certificate +.PP +If these variables are set, rclone will authenticate with a service +principal with certificate. +.IP \[bu] 2 +\f[C]tenant\f[R]: ID of the service principal\[aq]s tenant. +Also called its \[dq]directory\[dq] ID. +.IP \[bu] 2 +\f[C]client_id\f[R]: the service principal\[aq]s client ID +.IP \[bu] 2 +\f[C]client_certificate_path\f[R]: path to a PEM or PKCS12 certificate +file including the private key. +.IP \[bu] 2 +\f[C]client_certificate_password\f[R]: (optional) password for the +certificate file. +.IP \[bu] 2 +\f[C]client_send_certificate_chain\f[R]: (optional) Specifies whether an +authentication request will include an x5c header to support subject +name / issuer based authentication. +When set to \[dq]true\[dq] or \[dq]1\[dq], authentication requests +include the x5c header. +.PP +\f[B]NB\f[R] \f[C]client_certificate_password\f[R] must be obscured - +see rclone obscure (https://rclone.org/commands/rclone_obscure/). +.SS User with username and password +.PP +If these variables are set, rclone will authenticate with username and +password. +.IP \[bu] 2 +\f[C]tenant\f[R]: (optional) tenant to authenticate in. +Defaults to \[dq]organizations\[dq]. +.IP \[bu] 2 +\f[C]client_id\f[R]: client ID of the application the user will +authenticate to +.IP \[bu] 2 +\f[C]username\f[R]: a username (usually an email address) +.IP \[bu] 2 +\f[C]password\f[R]: the user\[aq]s password +.PP +Microsoft doesn\[aq]t recommend this kind of authentication, because +it\[aq]s less secure than other authentication flows. +This method is not interactive, so it isn\[aq]t compatible with any form +of multi-factor authentication, and the application must already have +user or admin consent. +This credential can only authenticate work and school accounts; it +can\[aq]t authenticate Microsoft accounts. +.PP +\f[B]NB\f[R] \f[C]password\f[R] must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.SS Managed Service Identity Credentials +.PP +If \f[C]use_msi\f[R] is set then managed service identity credentials +are used. +This authentication only works when running in an Azure service. +\f[C]env_auth\f[R] needs to be unset to use this. +.PP +However if you have multiple user identities to choose from these must +be explicitly specified using exactly one of the +\f[C]msi_object_id\f[R], \f[C]msi_client_id\f[R], or +\f[C]msi_mi_res_id\f[R] parameters. +.PP +If none of \f[C]msi_object_id\f[R], \f[C]msi_client_id\f[R], or +\f[C]msi_mi_res_id\f[R] is set, this is is equivalent to using +\f[C]env_auth\f[R]. +.SS Standard options +.PP +Here are the Standard options specific to azurefiles (Microsoft Azure +Files). +.SS --azurefiles-account +.PP +Azure Storage Account Name. +.PP +Set this to the Azure Storage Account Name in use. +.PP +Leave blank to use SAS URL or connection string, otherwise it needs to +be set. +.PP +If this is blank and if env_auth is set it will be read from the +environment variable \f[C]AZURE_STORAGE_ACCOUNT_NAME\f[R] if possible. +.PP +Properties: +.IP \[bu] 2 +Config: account +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_ACCOUNT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-share-name +.PP +Azure Files Share Name. +.PP +This is required and is the name of the share to access. +.PP +Properties: +.IP \[bu] 2 +Config: share_name +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_SHARE_NAME +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-env-auth +.PP +Read credentials from runtime (environment variables, CLI or MSI). +.PP +See the authentication docs for full info. +.PP +Properties: +.IP \[bu] 2 +Config: env_auth +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_ENV_AUTH +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azurefiles-key +.PP +Storage Account Shared Key. +.PP +Leave blank to use SAS URL or connection string. +.PP +Properties: +.IP \[bu] 2 +Config: key +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_KEY +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-sas-url +.PP +SAS URL. +.PP +Leave blank if using account/key or connection string. +.PP +Properties: +.IP \[bu] 2 +Config: sas_url +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_SAS_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-connection-string +.PP +Azure Files Connection String. +.PP +Properties: +.IP \[bu] 2 +Config: connection_string +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_CONNECTION_STRING +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-tenant +.PP +ID of the service principal\[aq]s tenant. +Also called its directory ID. +.PP +Set this if using - Service principal with client secret - Service +principal with certificate - User with username and password +.PP +Properties: +.IP \[bu] 2 +Config: tenant +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_TENANT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-client-id +.PP +The ID of the client in use. +.PP +Set this if using - Service principal with client secret - Service +principal with certificate - User with username and password +.PP +Properties: +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-client-secret +.PP +One of the service principal\[aq]s client secrets +.PP +Set this if using - Service principal with client secret +.PP +Properties: +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-client-certificate-path +.PP +Path to a PEM or PKCS12 certificate file including the private key. +.PP +Set this if using - Service principal with certificate +.PP +Properties: +.IP \[bu] 2 +Config: client_certificate_path +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_CLIENT_CERTIFICATE_PATH +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-client-certificate-password +.PP +Password for the certificate file (optional). +.PP +Optionally set this if using - Service principal with certificate +.PP +And the certificate has a password. +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP +Properties: +.IP \[bu] 2 +Config: client_certificate_password +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_CLIENT_CERTIFICATE_PASSWORD +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Advanced options +.PP +Here are the Advanced options specific to azurefiles (Microsoft Azure +Files). +.SS --azurefiles-client-send-certificate-chain +.PP +Send the certificate chain when using certificate auth. +.PP +Specifies whether an authentication request will include an x5c header +to support subject name / issuer based authentication. +When set to true, authentication requests include the x5c header. +.PP +Optionally set this if using - Service principal with certificate +.PP +Properties: +.IP \[bu] 2 +Config: client_send_certificate_chain +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_CLIENT_SEND_CERTIFICATE_CHAIN +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azurefiles-username +.PP +User name (usually an email address) +.PP +Set this if using - User with username and password +.PP +Properties: +.IP \[bu] 2 +Config: username +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_USERNAME +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-password +.PP +The user\[aq]s password +.PP +Set this if using - User with username and password +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP +Properties: +.IP \[bu] 2 +Config: password +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_PASSWORD +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-service-principal-file +.PP +Path to file containing credentials for use with a service principal. +.PP +Leave blank normally. +Needed only if you want to use a service principal instead of +interactive login. +.IP +.nf +\f[C] +$ az ad sp create-for-rbac --name \[dq]\[dq] \[rs] + --role \[dq]Storage Files Data Owner\[dq] \[rs] + --scopes \[dq]/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts//blobServices/default/containers/\[dq] \[rs] + > azure-principal.json +\f[R] +.fi +.PP +See \[dq]Create an Azure service +principal\[dq] (https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli) +and \[dq]Assign an Azure role for access to files +data\[dq] (https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli) +pages for more details. +.PP +\f[B]NB\f[R] this section needs updating for Azure Files - pull requests +appreciated! +.PP +It may be more convenient to put the credentials directly into the +rclone config file under the \f[C]client_id\f[R], \f[C]tenant\f[R] and +\f[C]client_secret\f[R] keys instead of setting +\f[C]service_principal_file\f[R]. +.PP +Properties: +.IP \[bu] 2 +Config: service_principal_file +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_SERVICE_PRINCIPAL_FILE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-use-msi +.PP +Use a managed service identity to authenticate (only works in Azure). +.PP +When true, use a managed service +identity (https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/) +to authenticate to Azure Storage instead of a SAS token or account key. +.PP +If the VM(SS) on which this program is running has a system-assigned +identity, it will be used by default. +If the resource has no system-assigned but exactly one user-assigned +identity, the user-assigned identity will be used by default. +If the resource has multiple user-assigned identities, the identity to +use must be explicitly specified using exactly one of the msi_object_id, +msi_client_id, or msi_mi_res_id parameters. +.PP +Properties: +.IP \[bu] 2 +Config: use_msi +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_USE_MSI +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --azurefiles-msi-object-id +.PP +Object ID of the user-assigned MSI to use, if any. +.PP +Leave blank if msi_client_id or msi_mi_res_id specified. +.PP +Properties: +.IP \[bu] 2 +Config: msi_object_id +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_MSI_OBJECT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-msi-client-id +.PP +Object ID of the user-assigned MSI to use, if any. +.PP +Leave blank if msi_object_id or msi_mi_res_id specified. +.PP +Properties: +.IP \[bu] 2 +Config: msi_client_id +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_MSI_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-msi-mi-res-id +.PP +Azure resource ID of the user-assigned MSI to use, if any. +.PP +Leave blank if msi_client_id or msi_object_id specified. +.PP +Properties: +.IP \[bu] 2 +Config: msi_mi_res_id +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_MSI_MI_RES_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-endpoint +.PP +Endpoint for the service. +.PP +Leave blank normally. +.PP +Properties: +.IP \[bu] 2 +Config: endpoint +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_ENDPOINT +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --azurefiles-chunk-size +.PP +Upload chunk size. +.PP +Note that this is stored in memory and there may be up to +\[dq]--transfers\[dq] * \[dq]--azurefile-upload-concurrency\[dq] chunks +stored at once in memory. +.PP +Properties: +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 4Mi +.SS --azurefiles-upload-concurrency +.PP +Concurrency for multipart uploads. +.PP +This is the number of chunks of the same file that are uploaded +concurrently. +.PP +If you are uploading small numbers of large files over high-speed links +and these uploads do not fully utilize your bandwidth, then increasing +this may help to speed up the transfers. +.PP +Note that chunks are stored in memory and there may be up to +\[dq]--transfers\[dq] * \[dq]--azurefile-upload-concurrency\[dq] chunks +stored at once in memory. +.PP +Properties: +.IP \[bu] 2 +Config: upload_concurrency +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_UPLOAD_CONCURRENCY +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 16 +.SS --azurefiles-max-stream-size +.PP +Max size for streamed files. +.PP +Azure files needs to know in advance how big the file will be. +When rclone doesn\[aq]t know it uses this value instead. +.PP +This will be used when rclone is streaming data, the most common uses +are: +.IP \[bu] 2 +Uploading files with \f[C]--vfs-cache-mode off\f[R] with +\f[C]rclone mount\f[R] +.IP \[bu] 2 +Using \f[C]rclone rcat\f[R] +.IP \[bu] 2 +Copying files with unknown length +.PP +You will need this much free space in the share as the file will be this +size temporarily. +.PP +Properties: +.IP \[bu] 2 +Config: max_stream_size +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_MAX_STREAM_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 10Gi +.SS --azurefiles-encoding +.PP +The encoding for the backend. +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP +Properties: +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: +Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8,Dot +.SS --azurefiles-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_AZUREFILES_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Custom upload headers +.PP +You can set custom upload headers with the \f[C]--header-upload\f[R] +flag. +.IP \[bu] 2 +Cache-Control +.IP \[bu] 2 +Content-Disposition +.IP \[bu] 2 +Content-Encoding +.IP \[bu] 2 +Content-Language +.IP \[bu] 2 +Content-Type +.PP +Eg \f[C]--header-upload \[dq]Content-Type: text/potato\[dq]\f[R] +.SS Limitations +.PP +MD5 sums are only uploaded with chunked files if the source has an MD5 +sum. +This will always be the case for a local to azure copy. +.SH Microsoft OneDrive +.PP +Paths are specified as \f[C]remote:path\f[R] +.PP +Paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R]. +.SS Configuration +.PP +The initial setup for OneDrive involves getting a token from Microsoft +which you need to do in your browser. +\f[C]rclone config\f[R] walks you through it. +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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> n +name> remote +Type of storage to configure. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +Choose a number from below, or type in your own value +[snip] +XX / Microsoft OneDrive + \[rs] \[dq]onedrive\[dq] +[snip] +Storage> onedrive +Microsoft App Client Id +Leave blank normally. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +client_id> +Microsoft App Client Secret +Leave blank normally. +Enter a string value. Press Enter for the default (\[dq]\[dq]). +client_secret> +Edit advanced config? (y/n) +y) Yes +n) No +y/n> n +Remote config +Use web browser to automatically authenticate rclone with remote? + * Say Y if the machine running rclone has a web browser you can use + * Say N if running rclone on a (remote) machine without web browser access +If not sure try Y. If Y failed, try N. +y) Yes +n) No +y/n> y +If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth +Log in and authorize rclone for access +Waiting for code... +Got code +Choose a number from below, or type in an existing value + 1 / OneDrive Personal or Business + \[rs] \[dq]onedrive\[dq] + 2 / Sharepoint site + \[rs] \[dq]sharepoint\[dq] + 3 / Type in driveID + \[rs] \[dq]driveid\[dq] + 4 / Type in SiteID + \[rs] \[dq]siteid\[dq] + 5 / Search a Sharepoint site + \[rs] \[dq]search\[dq] +Your choice> 1 +Found 1 drives, please select the one you want to use: +0: OneDrive (business) id=b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk +Chose drive to use:> 0 +Found drive \[aq]root\[aq] of type \[aq]business\[aq], URL: https://org-my.sharepoint.com/personal/you/Documents +Is that okay? +y) Yes +n) No +y/n> y +-------------------- +[remote] +type = onedrive +token = {\[dq]access_token\[dq]:\[dq]youraccesstoken\[dq],\[dq]token_type\[dq]:\[dq]Bearer\[dq],\[dq]refresh_token\[dq]:\[dq]yourrefreshtoken\[dq],\[dq]expiry\[dq]:\[dq]2018-08-26T22:39:52.486512262+08:00\[dq]} +drive_id = b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk +drive_type = business +-------------------- +y) Yes this is OK +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +See the remote setup docs (https://rclone.org/remote_setup/) for how to +set it up on a machine with no Internet browser available. +.PP +Note that rclone runs a webserver on your local machine to collect the +token as returned from Microsoft. +This only runs from the moment it opens your browser to the moment you +get back the verification code. +This is on \f[C]http://127.0.0.1:53682/\f[R] and this it may require you +to unblock it temporarily if you are running a host firewall. +.PP +Once configured you can then use \f[C]rclone\f[R] like this, +.PP +List directories in top level of your OneDrive +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +List all the files in your OneDrive +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP +To copy a local directory to an OneDrive directory called backup +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.SS Getting your own Client ID and Key +.PP +rclone uses a default Client ID when talking to OneDrive, unless a +custom \f[C]client_id\f[R] is specified in the config. +The default Client ID and Key are shared by all rclone users when +performing requests. +.PP +You may choose to create and use your own Client ID, in case the default +one does not work well for you. +For example, you might see throttling. +.SS Creating Client ID for OneDrive Personal +.PP +To create your own Client ID, please follow these steps: +.IP "1." 3 +Open +https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade +and then click \f[C]New registration\f[R]. +.IP "2." 3 +Enter a name for your app, choose account type +\f[C]Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)\f[R], +select \f[C]Web\f[R] in \f[C]Redirect URI\f[R], then type (do not copy +and paste) \f[C]http://localhost:53682/\f[R] and click Register. +Copy and keep the \f[C]Application (client) ID\f[R] under the app name +for later use. +.IP "3." 3 +Under \f[C]manage\f[R] select \f[C]Certificates & secrets\f[R], click +\f[C]New client secret\f[R]. +Enter a description (can be anything) and set \f[C]Expires\f[R] to 24 +months. +Copy and keep that secret \f[I]Value\f[R] for later use (you +\f[I]won\[aq]t\f[R] be able to see this value afterwards). +.IP "4." 3 +Under \f[C]manage\f[R] select \f[C]API permissions\f[R], click +\f[C]Add a permission\f[R] and select \f[C]Microsoft Graph\f[R] then +select \f[C]delegated permissions\f[R]. +.IP "5." 3 +Search and select the following permissions: \f[C]Files.Read\f[R], +\f[C]Files.ReadWrite\f[R], \f[C]Files.Read.All\f[R], +\f[C]Files.ReadWrite.All\f[R], \f[C]offline_access\f[R], +\f[C]User.Read\f[R] and \f[C]Sites.Read.All\f[R] (if custom access +scopes are configured, select the permissions accordingly). +Once selected click \f[C]Add permissions\f[R] at the bottom. +.PP +Now the application is complete. +Run \f[C]rclone config\f[R] to create or edit a OneDrive remote. +Supply the app ID and password as Client ID and Secret, respectively. +rclone will walk you through the remaining steps. +.PP +The access_scopes option allows you to configure the permissions +requested by rclone. +See Microsoft +Docs (https://docs.microsoft.com/en-us/graph/permissions-reference#files-permissions) +for more information about the different scopes. +.PP +The \f[C]Sites.Read.All\f[R] permission is required if you need to +search SharePoint sites when configuring the +remote (https://github.com/rclone/rclone/pull/5883). +However, if that permission is not assigned, you need to exclude +\f[C]Sites.Read.All\f[R] from your access scopes or set +\f[C]disable_site_permission\f[R] option to true in the advanced +options. +.SS Creating Client ID for OneDrive Business +.PP +The steps for OneDrive Personal may or may not work for OneDrive +Business, depending on the security settings of the organization. +A common error is that the publisher of the App is not verified. +.PP +You may try to verify you +account (https://docs.microsoft.com/en-us/azure/active-directory/develop/publisher-verification-overview), +or try to limit the App to your organization only, as shown below. +.IP "1." 3 +Make sure to create the App with your business account. +.IP "2." 3 +Follow the steps above to create an App. +However, we need a different account type here: +\f[C]Accounts in this organizational directory only (*** - Single tenant)\f[R]. +Note that you can also change the account type after creating the App. +.IP "3." 3 +Find the tenant +ID (https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-to-find-tenant) +of your organization. +.IP "4." 3 +In the rclone config, set \f[C]auth_url\f[R] to +\f[C]https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/authorize\f[R]. +.IP "5." 3 +In the rclone config, set \f[C]token_url\f[R] to +\f[C]https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/token\f[R]. +.PP +Note: If you have a special region, you may need a different host in +step 4 and 5. +Here are some +hints (https://github.com/rclone/rclone/blob/bc23bf11db1c78c6ebbf8ea538fbebf7058b4176/backend/onedrive/onedrive.go#L86). +.SS Modification times and hashes +.PP +OneDrive allows modification times to be set on objects accurate to 1 +second. +These will be used to detect whether objects need syncing or not. +.PP +OneDrive Personal, OneDrive for Business and Sharepoint Server support +QuickXorHash (https://docs.microsoft.com/en-us/onedrive/developer/code-snippets/quickxorhash). +.PP +Before rclone 1.62 the default hash for Onedrive Personal was +\f[C]SHA1\f[R]. +For rclone 1.62 and above the default for all Onedrive backends is +\f[C]QuickXorHash\f[R]. +.PP +Starting from July 2023 \f[C]SHA1\f[R] support is being phased out in +Onedrive Personal in favour of \f[C]QuickXorHash\f[R]. +If necessary the \f[C]--onedrive-hash-type\f[R] flag (or +\f[C]hash_type\f[R] config option) can be used to select \f[C]SHA1\f[R] +during the transition period if this is important your workflow. +.PP +For all types of OneDrive you can use the \f[C]--checksum\f[R] flag. +.SS --fast-list +.PP +This remote supports \f[C]--fast-list\f[R] which allows you to use fewer +transactions in exchange for more memory. +See the rclone docs (https://rclone.org/docs/#fast-list) for more +details. +.PP +This must be enabled with the \f[C]--onedrive-delta\f[R] flag (or +\f[C]delta = true\f[R] in the config file) as it can cause performance +degradation. +.PP +It does this by using the delta listing facilities of OneDrive which +returns all the files in the remote very efficiently. +This is much more efficient than listing directories recursively and is +Microsoft\[aq]s recommended way of reading all the file information from +a drive. +.PP +This can be useful with \f[C]rclone mount\f[R] and rclone rc vfs/refresh +recursive=true (https://rclone.org/rc/#vfs-refresh)) to very quickly +fill the mount with information about all the files. +.PP +The API used for the recursive listing (\f[C]ListR\f[R]) only supports +listing from the root of the drive. +This will become increasingly inefficient the further away you get from +the root as rclone will have to discard files outside of the directory +you are using. +.PP +Some commands (like \f[C]rclone lsf -R\f[R]) will use \f[C]ListR\f[R] by +default - you can turn this off with \f[C]--disable ListR\f[R] if you +need to. +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\[dq] +T}@T{ +0x22 +T}@T{ +\[uFF02] +T} +T{ +* +T}@T{ +0x2A +T}@T{ +\[uFF0A] +T} +T{ +: +T}@T{ +0x3A +T}@T{ +\[uFF1A] +T} +T{ +< +T}@T{ +0x3C +T}@T{ +\[uFF1C] +T} +T{ +> +T}@T{ +0x3E +T}@T{ +\[uFF1E] +T} +T{ +? +T}@T{ +0x3F +T}@T{ +\[uFF1F] +T} +T{ +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] +T} +T{ +| +T}@T{ +0x7C +T}@T{ +\[uFF5C] +T} +.TE +.PP +File names can also not end with the following characters. +These only get replaced if they are the last character in the name: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +SP +T}@T{ +0x20 +T}@T{ +\[u2420] +T} +T{ +\&. +T}@T{ +0x2E +T}@T{ +\[uFF0E] +T} +.TE +.PP File names can also not begin with the following characters. These only get replaced if they are the first character in the name: - -| Character | Value | Replacement | -| --------- |:-----:|:-----------:| -| SP | 0x20 | \[u2420] | -| \[ti] | 0x7E | \[uFF5E] | - -Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8), -as they can\[aq]t be used in JSON strings. - -### Deleting files - -Any files you delete with rclone will end up in the trash. Microsoft -doesn\[aq]t provide an API to permanently delete files, nor to empty the -trash, so you will have to do that with one of Microsoft\[aq]s apps or via -the OneDrive website. - - -### Standard options - +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +SP +T}@T{ +0x20 +T}@T{ +\[u2420] +T} +T{ +\[ti] +T}@T{ +0x7E +T}@T{ +\[uFF5E] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Deleting files +.PP +Any files you delete with rclone will end up in the trash. +Microsoft doesn\[aq]t provide an API to permanently delete files, nor to +empty the trash, so you will have to do that with one of Microsoft\[aq]s +apps or via the OneDrive website. +.SS Standard options +.PP Here are the Standard options specific to onedrive (Microsoft OneDrive). - -#### --onedrive-client-id - +.SS --onedrive-client-id +.PP OAuth Client Id. - +.PP Leave blank normally. - +.PP Properties: - -- Config: client_id -- Env Var: RCLONE_ONEDRIVE_CLIENT_ID -- Type: string -- Required: false - -#### --onedrive-client-secret - +.IP \[bu] 2 +Config: client_id +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_CLIENT_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --onedrive-client-secret +.PP OAuth Client Secret. - +.PP Leave blank normally. - +.PP Properties: - -- Config: client_secret -- Env Var: RCLONE_ONEDRIVE_CLIENT_SECRET -- Type: string -- Required: false - -#### --onedrive-region - +.IP \[bu] 2 +Config: client_secret +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_CLIENT_SECRET +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --onedrive-region +.PP Choose national cloud region for OneDrive. - +.PP Properties: - -- Config: region -- Env Var: RCLONE_ONEDRIVE_REGION -- Type: string -- Default: \[dq]global\[dq] -- Examples: - - \[dq]global\[dq] - - Microsoft Cloud Global - - \[dq]us\[dq] - - Microsoft Cloud for US Government - - \[dq]de\[dq] - - Microsoft Cloud Germany - - \[dq]cn\[dq] - - Azure and Office 365 operated by Vnet Group in China - -### Advanced options - +.IP \[bu] 2 +Config: region +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_REGION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]global\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]global\[dq] +.RS 2 +.IP \[bu] 2 +Microsoft Cloud Global +.RE +.IP \[bu] 2 +\[dq]us\[dq] +.RS 2 +.IP \[bu] 2 +Microsoft Cloud for US Government +.RE +.IP \[bu] 2 +\[dq]de\[dq] +.RS 2 +.IP \[bu] 2 +Microsoft Cloud Germany +.RE +.IP \[bu] 2 +\[dq]cn\[dq] +.RS 2 +.IP \[bu] 2 +Azure and Office 365 operated by Vnet Group in China +.RE +.RE +.SS Advanced options +.PP Here are the Advanced options specific to onedrive (Microsoft OneDrive). - -#### --onedrive-token - +.SS --onedrive-token +.PP OAuth Access Token as a JSON blob. - +.PP Properties: - -- Config: token -- Env Var: RCLONE_ONEDRIVE_TOKEN -- Type: string -- Required: false - -#### --onedrive-auth-url - +.IP \[bu] 2 +Config: token +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --onedrive-auth-url +.PP Auth server URL. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: auth_url -- Env Var: RCLONE_ONEDRIVE_AUTH_URL -- Type: string -- Required: false - -#### --onedrive-token-url - +.IP \[bu] 2 +Config: auth_url +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_AUTH_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --onedrive-token-url +.PP Token server url. - +.PP Leave blank to use the provider defaults. - +.PP Properties: - -- Config: token_url -- Env Var: RCLONE_ONEDRIVE_TOKEN_URL -- Type: string -- Required: false - -#### --onedrive-chunk-size - -Chunk size to upload files with - must be multiple of 320k (327,680 bytes). - -Above this size files will be chunked - must be multiple of 320k (327,680 bytes) and -should not exceed 250M (262,144,000 bytes) else you may encounter \[rs]\[dq]Microsoft.SharePoint.Client.InvalidClientQueryException: The request message is too big.\[rs]\[dq] -Note that the chunks will be buffered into memory. - +.IP \[bu] 2 +Config: token_url +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_TOKEN_URL +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --onedrive-chunk-size +.PP +Chunk size to upload files with - must be multiple of 320k (327,680 +bytes). +.PP +Above this size files will be chunked - must be multiple of 320k +(327,680 bytes) and should not exceed 250M (262,144,000 bytes) else you +may encounter +\[dq]Microsoft.SharePoint.Client.InvalidClientQueryException: The +request message is too big.\[dq] Note that the chunks will be buffered +into memory. +.PP Properties: - -- Config: chunk_size -- Env Var: RCLONE_ONEDRIVE_CHUNK_SIZE -- Type: SizeSuffix -- Default: 10Mi - -#### --onedrive-drive-id - +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 10Mi +.SS --onedrive-drive-id +.PP The ID of the drive to use. - +.PP Properties: - -- Config: drive_id -- Env Var: RCLONE_ONEDRIVE_DRIVE_ID -- Type: string -- Required: false - -#### --onedrive-drive-type - +.IP \[bu] 2 +Config: drive_id +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_DRIVE_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --onedrive-drive-type +.PP The type of the drive (personal | business | documentLibrary). - +.PP Properties: - -- Config: drive_type -- Env Var: RCLONE_ONEDRIVE_DRIVE_TYPE -- Type: string -- Required: false - -#### --onedrive-root-folder-id - +.IP \[bu] 2 +Config: drive_type +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_DRIVE_TYPE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --onedrive-root-folder-id +.PP ID of the root folder. - +.PP This isn\[aq]t normally needed, but in special circumstances you might -know the folder ID that you wish to access but not be able to get -there through a path traversal. - - +know the folder ID that you wish to access but not be able to get there +through a path traversal. +.PP Properties: - -- Config: root_folder_id -- Env Var: RCLONE_ONEDRIVE_ROOT_FOLDER_ID -- Type: string -- Required: false - -#### --onedrive-access-scopes - +.IP \[bu] 2 +Config: root_folder_id +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_ROOT_FOLDER_ID +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --onedrive-access-scopes +.PP Set scopes to be requested by rclone. - -Choose or manually enter a custom space separated list with all scopes, that rclone should request. - - +.PP +Choose or manually enter a custom space separated list with all scopes, +that rclone should request. +.PP Properties: - -- Config: access_scopes -- Env Var: RCLONE_ONEDRIVE_ACCESS_SCOPES -- Type: SpaceSepList -- Default: Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access -- Examples: - - \[dq]Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access\[dq] - - Read and write access to all resources - - \[dq]Files.Read Files.Read.All Sites.Read.All offline_access\[dq] - - Read only access to all resources - - \[dq]Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All offline_access\[dq] - - Read and write access to all resources, without the ability to browse SharePoint sites. - - Same as if disable_site_permission was set to true - -#### --onedrive-disable-site-permission - +.IP \[bu] 2 +Config: access_scopes +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_ACCESS_SCOPES +.IP \[bu] 2 +Type: SpaceSepList +.IP \[bu] 2 +Default: Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All +Sites.Read.All offline_access +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All +Sites.Read.All offline_access\[dq] +.RS 2 +.IP \[bu] 2 +Read and write access to all resources +.RE +.IP \[bu] 2 +\[dq]Files.Read Files.Read.All Sites.Read.All offline_access\[dq] +.RS 2 +.IP \[bu] 2 +Read only access to all resources +.RE +.IP \[bu] 2 +\[dq]Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All +offline_access\[dq] +.RS 2 +.IP \[bu] 2 +Read and write access to all resources, without the ability to browse +SharePoint sites. +.IP \[bu] 2 +Same as if disable_site_permission was set to true +.RE +.RE +.SS --onedrive-disable-site-permission +.PP Disable the request for Sites.Read.All permission. - -If set to true, you will no longer be able to search for a SharePoint site when -configuring drive ID, because rclone will not request Sites.Read.All permission. -Set it to true if your organization didn\[aq]t assign Sites.Read.All permission to the -application, and your organization disallows users to consent app permission -request on their own. - +.PP +If set to true, you will no longer be able to search for a SharePoint +site when configuring drive ID, because rclone will not request +Sites.Read.All permission. +Set it to true if your organization didn\[aq]t assign Sites.Read.All +permission to the application, and your organization disallows users to +consent app permission request on their own. +.PP Properties: - -- Config: disable_site_permission -- Env Var: RCLONE_ONEDRIVE_DISABLE_SITE_PERMISSION -- Type: bool -- Default: false - -#### --onedrive-expose-onenote-files - +.IP \[bu] 2 +Config: disable_site_permission +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_DISABLE_SITE_PERMISSION +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --onedrive-expose-onenote-files +.PP Set to make OneNote files show up in directory listings. - +.PP By default, rclone will hide OneNote files in directory listings because -operations like \[dq]Open\[dq] and \[dq]Update\[dq] won\[aq]t work on them. But this -behaviour may also prevent you from deleting them. If you want to -delete OneNote files or otherwise want them to show up in directory -listing, set this option. - +operations like \[dq]Open\[dq] and \[dq]Update\[dq] won\[aq]t work on +them. +But this behaviour may also prevent you from deleting them. +If you want to delete OneNote files or otherwise want them to show up in +directory listing, set this option. +.PP Properties: - -- Config: expose_onenote_files -- Env Var: RCLONE_ONEDRIVE_EXPOSE_ONENOTE_FILES -- Type: bool -- Default: false - -#### --onedrive-server-side-across-configs - +.IP \[bu] 2 +Config: expose_onenote_files +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_EXPOSE_ONENOTE_FILES +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --onedrive-server-side-across-configs +.PP Deprecated: use --server-side-across-configs instead. - -Allow server-side operations (e.g. copy) to work across different onedrive configs. - -This will only work if you are copying between two OneDrive *Personal* drives AND -the files to copy are already shared between them. In other cases, rclone will -fall back to normal copy (which will be slightly slower). - +.PP +Allow server-side operations (e.g. +copy) to work across different onedrive configs. +.PP +This will work if you are copying between two OneDrive +\f[I]Personal\f[R] drives AND the files to copy are already shared +between them. +Additionally, it should also function for a user who has access +permissions both between Onedrive for \f[I]business\f[R] and +\f[I]SharePoint\f[R] under the \f[I]same tenant\f[R], and between +\f[I]SharePoint\f[R] and another \f[I]SharePoint\f[R] under the +\f[I]same tenant\f[R]. +In other cases, rclone will fall back to normal copy (which will be +slightly slower). +.PP Properties: - -- Config: server_side_across_configs -- Env Var: RCLONE_ONEDRIVE_SERVER_SIDE_ACROSS_CONFIGS -- Type: bool -- Default: false - -#### --onedrive-list-chunk - +.IP \[bu] 2 +Config: server_side_across_configs +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_SERVER_SIDE_ACROSS_CONFIGS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --onedrive-list-chunk +.PP Size of listing chunk. - +.PP Properties: - -- Config: list_chunk -- Env Var: RCLONE_ONEDRIVE_LIST_CHUNK -- Type: int -- Default: 1000 - -#### --onedrive-no-versions - +.IP \[bu] 2 +Config: list_chunk +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_LIST_CHUNK +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 1000 +.SS --onedrive-no-versions +.PP Remove all versions on modifying operations. - +.PP Onedrive for business creates versions when rclone uploads new files overwriting an existing one and when it sets the modification time. - +.PP These versions take up space out of the quota. - -This flag checks for versions after file upload and setting -modification time and removes all but the last version. - -**NB** Onedrive personal can\[aq]t currently delete versions so don\[aq]t use -this flag there. - - +.PP +This flag checks for versions after file upload and setting modification +time and removes all but the last version. +.PP +\f[B]NB\f[R] Onedrive personal can\[aq]t currently delete versions so +don\[aq]t use this flag there. +.PP Properties: - -- Config: no_versions -- Env Var: RCLONE_ONEDRIVE_NO_VERSIONS -- Type: bool -- Default: false - -#### --onedrive-link-scope - +.IP \[bu] 2 +Config: no_versions +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_NO_VERSIONS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --onedrive-hard-delete +.PP +Permanently delete files on removal. +.PP +Normally files will get sent to the recycle bin on deletion. +Setting this flag causes them to be permanently deleted. +Use with care. +.PP +OneDrive personal accounts do not support the permanentDelete API, it +only applies to OneDrive for Business and SharePoint document libraries. +.PP +Properties: +.IP \[bu] 2 +Config: hard_delete +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_HARD_DELETE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --onedrive-link-scope +.PP Set the scope of the links created by the link command. - +.PP Properties: - -- Config: link_scope -- Env Var: RCLONE_ONEDRIVE_LINK_SCOPE -- Type: string -- Default: \[dq]anonymous\[dq] -- Examples: - - \[dq]anonymous\[dq] - - Anyone with the link has access, without needing to sign in. - - This may include people outside of your organization. - - Anonymous link support may be disabled by an administrator. - - \[dq]organization\[dq] - - Anyone signed into your organization (tenant) can use the link to get access. - - Only available in OneDrive for Business and SharePoint. - -#### --onedrive-link-type - +.IP \[bu] 2 +Config: link_scope +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_LINK_SCOPE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]anonymous\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]anonymous\[dq] +.RS 2 +.IP \[bu] 2 +Anyone with the link has access, without needing to sign in. +.IP \[bu] 2 +This may include people outside of your organization. +.IP \[bu] 2 +Anonymous link support may be disabled by an administrator. +.RE +.IP \[bu] 2 +\[dq]organization\[dq] +.RS 2 +.IP \[bu] 2 +Anyone signed into your organization (tenant) can use the link to get +access. +.IP \[bu] 2 +Only available in OneDrive for Business and SharePoint. +.RE +.RE +.SS --onedrive-link-type +.PP Set the type of the links created by the link command. - +.PP Properties: - -- Config: link_type -- Env Var: RCLONE_ONEDRIVE_LINK_TYPE -- Type: string -- Default: \[dq]view\[dq] -- Examples: - - \[dq]view\[dq] - - Creates a read-only link to the item. - - \[dq]edit\[dq] - - Creates a read-write link to the item. - - \[dq]embed\[dq] - - Creates an embeddable link to the item. - -#### --onedrive-link-password - +.IP \[bu] 2 +Config: link_type +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_LINK_TYPE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]view\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]view\[dq] +.RS 2 +.IP \[bu] 2 +Creates a read-only link to the item. +.RE +.IP \[bu] 2 +\[dq]edit\[dq] +.RS 2 +.IP \[bu] 2 +Creates a read-write link to the item. +.RE +.IP \[bu] 2 +\[dq]embed\[dq] +.RS 2 +.IP \[bu] 2 +Creates an embeddable link to the item. +.RE +.RE +.SS --onedrive-link-password +.PP Set the password for links created by the link command. - -At the time of writing this only works with OneDrive personal paid accounts. - - +.PP +At the time of writing this only works with OneDrive personal paid +accounts. +.PP Properties: - -- Config: link_password -- Env Var: RCLONE_ONEDRIVE_LINK_PASSWORD -- Type: string -- Required: false - -#### --onedrive-hash-type - +.IP \[bu] 2 +Config: link_password +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_LINK_PASSWORD +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --onedrive-hash-type +.PP Specify the hash in use for the backend. - -This specifies the hash type in use. If set to \[dq]auto\[dq] it will use the -default hash which is QuickXorHash. - +.PP +This specifies the hash type in use. +If set to \[dq]auto\[dq] it will use the default hash which is +QuickXorHash. +.PP Before rclone 1.62 an SHA1 hash was used by default for Onedrive -Personal. For 1.62 and later the default is to use a QuickXorHash for -all onedrive types. If an SHA1 hash is desired then set this option -accordingly. - -From July 2023 QuickXorHash will be the only available hash for -both OneDrive for Business and OneDriver Personal. - +Personal. +For 1.62 and later the default is to use a QuickXorHash for all onedrive +types. +If an SHA1 hash is desired then set this option accordingly. +.PP +From July 2023 QuickXorHash will be the only available hash for both +OneDrive for Business and OneDrive Personal. +.PP This can be set to \[dq]none\[dq] to not use any hashes. - -If the hash requested does not exist on the object, it will be -returned as an empty string which is treated as a missing hash by -rclone. - - +.PP +If the hash requested does not exist on the object, it will be returned +as an empty string which is treated as a missing hash by rclone. +.PP Properties: - -- Config: hash_type -- Env Var: RCLONE_ONEDRIVE_HASH_TYPE -- Type: string -- Default: \[dq]auto\[dq] -- Examples: - - \[dq]auto\[dq] - - Rclone chooses the best hash - - \[dq]quickxor\[dq] - - QuickXor - - \[dq]sha1\[dq] - - SHA1 - - \[dq]sha256\[dq] - - SHA256 - - \[dq]crc32\[dq] - - CRC32 - - \[dq]none\[dq] - - None - don\[aq]t use any hashes - -#### --onedrive-av-override - +.IP \[bu] 2 +Config: hash_type +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_HASH_TYPE +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Default: \[dq]auto\[dq] +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]auto\[dq] +.RS 2 +.IP \[bu] 2 +Rclone chooses the best hash +.RE +.IP \[bu] 2 +\[dq]quickxor\[dq] +.RS 2 +.IP \[bu] 2 +QuickXor +.RE +.IP \[bu] 2 +\[dq]sha1\[dq] +.RS 2 +.IP \[bu] 2 +SHA1 +.RE +.IP \[bu] 2 +\[dq]sha256\[dq] +.RS 2 +.IP \[bu] 2 +SHA256 +.RE +.IP \[bu] 2 +\[dq]crc32\[dq] +.RS 2 +.IP \[bu] 2 +CRC32 +.RE +.IP \[bu] 2 +\[dq]none\[dq] +.RS 2 +.IP \[bu] 2 +None - don\[aq]t use any hashes +.RE +.RE +.SS --onedrive-av-override +.PP Allows download of files the server thinks has a virus. - +.PP The onedrive/sharepoint server may check files uploaded with an Anti -Virus checker. If it detects any potential viruses or malware it will -block download of the file. - +Virus checker. +If it detects any potential viruses or malware it will block download of +the file. +.PP In this case you will see a message like this - - server reports this file is infected with a virus - use --onedrive-av-override to download anyway: Infected (name of virus): 403 Forbidden: - -If you are 100% sure you want to download this file anyway then use -the --onedrive-av-override flag, or av_override = true in the config -file. - - +.IP +.nf +\f[C] +server reports this file is infected with a virus - use --onedrive-av-override to download anyway: Infected (name of virus): 403 Forbidden: +\f[R] +.fi +.PP +If you are 100% sure you want to download this file anyway then use the +--onedrive-av-override flag, or av_override = true in the config file. +.PP Properties: - -- Config: av_override -- Env Var: RCLONE_ONEDRIVE_AV_OVERRIDE -- Type: bool -- Default: false - -#### --onedrive-delta - +.IP \[bu] 2 +Config: av_override +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_AV_OVERRIDE +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --onedrive-delta +.PP If set rclone will use delta listing to implement recursive listings. - -If this flag is set the onedrive backend will advertise \[ga]ListR\[ga] +.PP +If this flag is set the onedrive backend will advertise \f[C]ListR\f[R] support for recursive listings. - +.PP Setting this flag speeds up these things greatly: - - rclone lsf -R onedrive: - rclone size onedrive: - rclone rc vfs/refresh recursive=true - -**However** the delta listing API **only** works at the root of the -drive. If you use it not at the root then it recurses from the root -and discards all the data that is not under the directory you asked -for. So it will be correct but may not be very efficient. - +.IP +.nf +\f[C] +rclone lsf -R onedrive: +rclone size onedrive: +rclone rc vfs/refresh recursive=true +\f[R] +.fi +.PP +\f[B]However\f[R] the delta listing API \f[B]only\f[R] works at the root +of the drive. +If you use it not at the root then it recurses from the root and +discards all the data that is not under the directory you asked for. +So it will be correct but may not be very efficient. +.PP This is why this flag is not set as the default. - +.PP As a rule of thumb if nearly all of your data is under rclone\[aq]s root -directory (the \[ga]root/directory\[ga] in \[ga]onedrive:root/directory\[ga]) then -using this flag will be be a big performance win. If your data is -mostly not under the root then using this flag will be a big -performance loss. - -It is recommended if you are mounting your onedrive at the root -(or near the root when using crypt) and using rclone \[ga]rc vfs/refresh\[ga]. - - +directory (the \f[C]root/directory\f[R] in +\f[C]onedrive:root/directory\f[R]) then using this flag will be be a big +performance win. +If your data is mostly not under the root then using this flag will be a +big performance loss. +.PP +It is recommended if you are mounting your onedrive at the root (or near +the root when using crypt) and using rclone \f[C]rc vfs/refresh\f[R]. +.PP Properties: - -- Config: delta -- Env Var: RCLONE_ONEDRIVE_DELTA -- Type: bool -- Default: false - -#### --onedrive-metadata-permissions - +.IP \[bu] 2 +Config: delta +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_DELTA +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false +.SS --onedrive-metadata-permissions +.PP Control whether permissions should be read or written in metadata. - +.PP Reading permissions metadata from files can be done quickly, but it isn\[aq]t always desirable to set the permissions from the metadata. - - +.PP Properties: - -- Config: metadata_permissions -- Env Var: RCLONE_ONEDRIVE_METADATA_PERMISSIONS -- Type: Bits -- Default: off -- Examples: - - \[dq]off\[dq] - - Do not read or write the value - - \[dq]read\[dq] - - Read the value only - - \[dq]write\[dq] - - Write the value only - - \[dq]read,write\[dq] - - Read and Write the value. - -#### --onedrive-encoding - +.IP \[bu] 2 +Config: metadata_permissions +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_METADATA_PERMISSIONS +.IP \[bu] 2 +Type: Bits +.IP \[bu] 2 +Default: off +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]off\[dq] +.RS 2 +.IP \[bu] 2 +Do not read or write the value +.RE +.IP \[bu] 2 +\[dq]read\[dq] +.RS 2 +.IP \[bu] 2 +Read the value only +.RE +.IP \[bu] 2 +\[dq]write\[dq] +.RS 2 +.IP \[bu] 2 +Write the value only +.RE +.IP \[bu] 2 +\[dq]read,write\[dq] +.RS 2 +.IP \[bu] 2 +Read and Write the value. +.RE +.IP \[bu] 2 +\[dq]failok\[dq] +.RS 2 +.IP \[bu] 2 +If writing fails log errors only, don\[aq]t fail the transfer +.RE +.RE +.SS --onedrive-encoding +.PP The encoding for the backend. - -See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info. - +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP Properties: - -- Config: encoding -- Env Var: RCLONE_ONEDRIVE_ENCODING -- Type: Encoding -- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot - -#### --onedrive-description - -Description of the remote - +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: +Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot +.SS --onedrive-description +.PP +Description of the remote. +.PP Properties: - -- Config: description -- Env Var: RCLONE_ONEDRIVE_DESCRIPTION -- Type: string -- Required: false - -### Metadata - -OneDrive supports System Metadata (not User Metadata, as of this writing) for -both files and directories. Much of the metadata is read-only, and there are some -differences between OneDrive Personal and Business (see table below for -details). - -Permissions are also supported, if \[ga]--onedrive-metadata-permissions\[ga] is set. The -accepted values for \[ga]--onedrive-metadata-permissions\[ga] are \[ga]read\[ga], \[ga]write\[ga], -\[ga]read,write\[ga], and \[ga]off\[ga] (the default). \[ga]write\[ga] supports adding new permissions, -updating the \[dq]role\[dq] of existing permissions, and removing permissions. Updating -and removing require the Permission ID to be known, so it is recommended to use -\[ga]read,write\[ga] instead of \[ga]write\[ga] if you wish to update/remove permissions. - +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_ONEDRIVE_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Metadata +.PP +OneDrive supports System Metadata (not User Metadata, as of this +writing) for both files and directories. +Much of the metadata is read-only, and there are some differences +between OneDrive Personal and Business (see table below for details). +.PP +Permissions are also supported, if +\f[C]--onedrive-metadata-permissions\f[R] is set. +The accepted values for \f[C]--onedrive-metadata-permissions\f[R] are +\[dq]\f[C]read\f[R]\[dq], \[dq]\f[C]write\f[R]\[dq], +\[dq]\f[C]read,write\f[R]\[dq], and \[dq]\f[C]off\f[R]\[dq] (the +default). +\[dq]\f[C]write\f[R]\[dq] supports adding new permissions, updating the +\[dq]role\[dq] of existing permissions, and removing permissions. +Updating and removing require the Permission ID to be known, so it is +recommended to use \[dq]\f[C]read,write\f[R]\[dq] instead of +\[dq]\f[C]write\f[R]\[dq] if you wish to update/remove permissions. +.PP Permissions are read/written in JSON format using the same schema as the -[OneDrive API](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/permission?view=odsp-graph-online), +OneDrive +API (https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/permission?view=odsp-graph-online), which differs slightly between OneDrive Personal and Business. - +.PP Example for OneDrive Personal: -\[ga]\[ga]\[ga]json +.IP +.nf +\f[C] [ { \[dq]id\[dq]: \[dq]1234567890ABC!123\[dq], @@ -51662,32 +57438,16 @@ permission for a user. Creating a Public Link is also supported, if \f[C]Link.Scope\f[R] is set to \f[C]\[dq]anonymous\[dq]\f[R]. .PP -Example request to add a \[dq]read\[dq] permission: +Example request to add a \[dq]read\[dq] permission with +\f[C]--metadata-mapper\f[R]: .IP .nf \f[C] -[ - { - \[dq]id\[dq]: \[dq]\[dq], - \[dq]grantedTo\[dq]: { - \[dq]user\[dq]: {}, - \[dq]application\[dq]: {}, - \[dq]device\[dq]: {} - }, - \[dq]grantedToIdentities\[dq]: [ - { - \[dq]user\[dq]: { - \[dq]id\[dq]: \[dq]ryan\[at]contoso.com\[dq] - }, - \[dq]application\[dq]: {}, - \[dq]device\[dq]: {} - } - ], - \[dq]roles\[dq]: [ - \[dq]read\[dq] - ] +{ + \[dq]Metadata\[dq]: { + \[dq]permissions\[dq]: \[dq][{\[rs]\[dq]grantedToIdentities\[rs]\[dq]:[{\[rs]\[dq]user\[rs]\[dq]:{\[rs]\[dq]id\[rs]\[dq]:\[rs]\[dq]ryan\[at]contoso.com\[rs]\[dq]}}],\[rs]\[dq]roles\[rs]\[dq]:[\[rs]\[dq]read\[rs]\[dq]]}]\[dq] } -] +} \f[R] .fi .PP @@ -51699,7 +57459,8 @@ new \f[C]roles\f[R] to be assigned. \f[C]roles\f[R] is the only property that can be changed. .PP To remove permissions, pass in a blob containing only the permissions -you wish to keep (which can be empty, to remove all.) +you wish to keep (which can be empty, to remove all.) Note that the +\f[C]owner\f[R] role will be ignored, as it cannot be removed. .PP Note that both reading and writing permissions requires extra API calls, so if you don\[aq]t need to read or write permissions it is recommended @@ -52557,7 +58318,7 @@ Type: SizeSuffix Default: 10Mi .SS --opendrive-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -53535,7 +59296,7 @@ AES256 .RE .SS --oos-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -54107,7 +59868,7 @@ Type: Encoding Default: Slash,Ctl,InvalidUtf8 .SS --qingstor-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -54431,7 +60192,7 @@ Type: bool Default: false .SS --quatrix-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -54682,7 +60443,7 @@ Type: Encoding Default: Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot .SS --sia-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -55387,10 +61148,15 @@ Type: bool Default: false .SS --swift-chunk-size .PP -Above this size files will be chunked into a _segments container. +Above this size files will be chunked. .PP -Above this size files will be chunked into a _segments container. -The default for this is 5 GiB which is its maximum value. +Above this size files will be chunked into a a \f[C]_segments\f[R] +container or a \f[C].file-segments\f[R] directory. +(See the \f[C]use_segments_container\f[R] option for more info). +Default for this is 5 GiB which is its maximum value, which means only +files above this size will be chunked. +.PP +Rclone uploads chunked files as dynamic large objects (DLO). .PP Properties: .IP \[bu] 2 @@ -55406,14 +61172,16 @@ Default: 5Gi Don\[aq]t chunk files during streaming upload. .PP When doing streaming uploads (e.g. -using rcat or mount) setting this flag will cause the swift backend to -not upload chunked files. +using \f[C]rcat\f[R] or \f[C]mount\f[R] with +\f[C]--vfs-cache-mode off\f[R]) setting this flag will cause the swift +backend to not upload chunked files. .PP -This will limit the maximum upload size to 5 GiB. -However non chunked files are easier to deal with and have an MD5SUM. +This will limit the maximum streamed upload size to 5 GiB. +This is useful because non chunked files are easier to deal with and +have an MD5SUM. .PP -Rclone will still chunk files bigger than chunk_size when doing normal -copy operations. +Rclone will still chunk files bigger than \f[C]chunk_size\f[R] when +doing normal copy operations. .PP Properties: .IP \[bu] 2 @@ -55429,9 +61197,10 @@ Default: false Disable support for static and dynamic large objects .PP Swift cannot transparently store files bigger than 5 GiB. -There are two schemes for doing that, static or dynamic large objects, -and the API does not allow rclone to determine whether a file is a -static or dynamic large object without doing a HEAD on the object. +There are two schemes for chunking large files, static large objects +(SLO) or dynamic large objects (DLO), and the API does not allow rclone +to determine whether a file is a static or dynamic large object without +doing a HEAD on the object. Since these need to be treated differently, this means rclone has to issue HEAD requests for objects for example when reading checksums. .PP @@ -55445,7 +61214,7 @@ Setting this option implies \f[C]no_chunk\f[R] and also that no files will be uploaded in chunks, so files bigger than 5 GiB will just fail on upload. .PP -If you set this option and there \f[I]are\f[R] static or dynamic large +If you set this option and there \f[B]are\f[R] static or dynamic large objects, then this will give incorrect hashes for them. Downloads will succeed, but other operations such as Remove and Copy will fail. @@ -55459,6 +61228,43 @@ Env Var: RCLONE_SWIFT_NO_LARGE_OBJECTS Type: bool .IP \[bu] 2 Default: false +.SS --swift-use-segments-container +.PP +Choose destination for large object segments +.PP +Swift cannot transparently store files bigger than 5 GiB and rclone will +chunk files larger than \f[C]chunk_size\f[R] (default 5 GiB) in order to +upload them. +.PP +If this value is \f[C]true\f[R] the chunks will be stored in an +additional container named the same as the destination container but +with \f[C]_segments\f[R] appended. +This means that there won\[aq]t be any duplicated data in the original +container but having another container may not be acceptable. +.PP +If this value is \f[C]false\f[R] the chunks will be stored in a +\f[C].file-segments\f[R] directory in the root of the container. +This directory will be omitted when listing the container. +Some providers (eg Blomp) require this mode as creating additional +containers isn\[aq]t allowed. +If it is desired to see the \f[C].file-segments\f[R] directory in the +root then this flag must be set to \f[C]true\f[R]. +.PP +If this value is \f[C]unset\f[R] (the default), then rclone will choose +the value to use. +It will be \f[C]false\f[R] unless rclone detects any \f[C]auth_url\f[R]s +that it knows need it to be \f[C]true\f[R]. +In this case you\[aq]ll see a message in the DEBUG log. +.PP +Properties: +.IP \[bu] 2 +Config: use_segments_container +.IP \[bu] 2 +Env Var: RCLONE_SWIFT_USE_SEGMENTS_CONTAINER +.IP \[bu] 2 +Type: Tristate +.IP \[bu] 2 +Default: unset .SS --swift-encoding .PP The encoding for the backend. @@ -55477,7 +61283,7 @@ Type: Encoding Default: Slash,InvalidUtf8 .SS --swift-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -55885,7 +61691,7 @@ Type: string Required: false .SS --pcloud-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -56146,6 +61952,58 @@ Env Var: RCLONE_PIKPAK_HASH_MEMORY_LIMIT Type: SizeSuffix .IP \[bu] 2 Default: 10Mi +.SS --pikpak-chunk-size +.PP +Chunk size for multipart uploads. +.PP +Large files will be uploaded in chunks of this size. +.PP +Note that this is stored in memory and there may be up to +\[dq]--transfers\[dq] * \[dq]--pikpak-upload-concurrency\[dq] chunks +stored at once in memory. +.PP +If you are transferring large files over high-speed links and you have +enough memory, then increasing this will speed up the transfers. +.PP +Rclone will automatically increase the chunk size when uploading a large +file of known size to stay below the 10,000 chunks limit. +.PP +Increasing the chunk size decreases the accuracy of the progress +statistics displayed with \[dq]-P\[dq] flag. +.PP +Properties: +.IP \[bu] 2 +Config: chunk_size +.IP \[bu] 2 +Env Var: RCLONE_PIKPAK_CHUNK_SIZE +.IP \[bu] 2 +Type: SizeSuffix +.IP \[bu] 2 +Default: 5Mi +.SS --pikpak-upload-concurrency +.PP +Concurrency for multipart uploads. +.PP +This is the number of chunks of the same file that are uploaded +concurrently for multipart uploads. +.PP +Note that chunks are stored in memory and there may be up to +\[dq]--transfers\[dq] * \[dq]--pikpak-upload-concurrency\[dq] chunks +stored at once in memory. +.PP +If you are uploading small numbers of large files over high-speed links +and these uploads do not fully utilize your bandwidth, then increasing +this may help to speed up the transfers. +.PP +Properties: +.IP \[bu] 2 +Config: upload_concurrency +.IP \[bu] 2 +Env Var: RCLONE_PIKPAK_UPLOAD_CONCURRENCY +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 5 .SS --pikpak-encoding .PP The encoding for the backend. @@ -56165,7 +62023,7 @@ Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot .SS --pikpak-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -56520,7 +62378,7 @@ Type: Encoding Default: Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot .SS --premiumizeme-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -56591,7 +62449,7 @@ Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / Proton Drive - \[rs] \[dq]Proton Drive\[dq] + \[rs] \[dq]protondrive\[dq] [snip] Storage> protondrive User name @@ -56917,7 +62775,7 @@ Type: bool Default: true .SS --protondrive-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -57199,7 +63057,7 @@ Type: Encoding Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot .SS --putio-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -57269,7 +63127,7 @@ Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / Proton Drive - \[rs] \[dq]Proton Drive\[dq] + \[rs] \[dq]protondrive\[dq] [snip] Storage> protondrive User name @@ -57595,7 +63453,7 @@ Type: bool Default: true .SS --protondrive-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -58131,7 +63989,7 @@ Type: Encoding Default: Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8 .SS --seafile-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -58510,6 +64368,8 @@ this will override any existing. Value \f[C]none\f[R] can be set to avoid any attempts at executing shell commands, e.g. if this is not allowed on the server. +If you have \f[C]shell_type = none\f[R] in the configuration then the +ssh must not be set. .PP When the server is rclone serve sftp (https://rclone.org/commands/rclone_serve_sftp/), the rclone SFTP @@ -59285,6 +65145,32 @@ Env Var: RCLONE_SFTP_CONCURRENCY Type: int .IP \[bu] 2 Default: 64 +.SS --sftp-connections +.PP +Maximum number of SFTP simultaneous connections, 0 for unlimited. +.PP +Note that setting this is very likely to cause deadlocks so it should be +used with care. +.PP +If you are doing a sync or copy then make sure concurrency is one more +than the sum of \f[C]--transfers\f[R] and \f[C]--checkers\f[R]. +.PP +If you use \f[C]--check-first\f[R] then it just needs to be one more +than the maximum of \f[C]--checkers\f[R] and \f[C]--transfers\f[R]. +.PP +So for \f[C]concurrency 3\f[R] you\[aq]d use +\f[C]--checkers 2 --transfers 2 --check-first\f[R] or +\f[C]--checkers 1 --transfers 1\f[R]. +.PP +Properties: +.IP \[bu] 2 +Config: connections +.IP \[bu] 2 +Env Var: RCLONE_SFTP_CONNECTIONS +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 0 .SS --sftp-set-env .PP Environment variables to pass to sftp and commands @@ -59483,7 +65369,7 @@ Type: bool Default: false .SS --sftp-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -59821,7 +65707,7 @@ Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot .SS --smb-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -59834,9 +65720,15 @@ Type: string Required: false .SH Storj .PP -Storj (https://storj.io) is an encrypted, secure, and cost-effective -object storage service that enables you to store, back up, and archive -large amounts of data in a decentralized manner. +Storj (https://storj.io) is redefining the cloud to support the future +of data\[em]sustainably and economically. +Storj leverages the vast global supply of underutilized resources to +deliver better security, durability, and performance services. +Experience up to 90% lower costs and carbon reduction with Storj. +.PP +Storj is an encrypted, secure, and cost-effective object storage service +that enables you to store, back up, and archive large amounts of data in +a decentralized manner. .SS Backend options .PP Storj can be used both with this native backend and with the s3 backend @@ -60232,7 +66124,7 @@ Here are the Advanced options specific to storj (Storj Decentralized Cloud Storage). .SS --storj-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -60768,7 +66660,7 @@ Type: Encoding Default: Slash,Ctl,InvalidUtf8,Dot .SS --sugarsync-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -60794,6 +66686,326 @@ about (https://rclone.org/commands/rclone_about/) The Tardigrade backend has been renamed to be the Storj backend (https://rclone.org/storj/). Old configuration files will continue to work. +.SH Uloz.to +.PP +Paths are specified as \f[C]remote:path\f[R] +.PP +Paths may be as deep as required, e.g. +\f[C]remote:directory/subdirectory\f[R]. +.PP +The initial setup for Uloz.to involves filling in the user credentials. +\f[C]rclone config\f[R] walks you through it. +.SS Configuration +.PP +Here is an example of how to make a remote called \f[C]remote\f[R]. +First run: +.IP +.nf +\f[C] + rclone config +\f[R] +.fi +.PP +This will guide you through an interactive setup process: +.IP +.nf +\f[C] +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 +[snip] +XX / Uloz.to + \[rs] \[dq]ulozto\[dq] +[snip] +Storage> ulozto + +Option app_token. +The application token identifying the app. An app API key can be either found in the API doc +https://uloz.to/upload-resumable-api-beta or obtained from customer service. +Enter a value. Press Enter to leave empty. +app_token> token_value + +Option username. +The username of the principal to operate as. +Enter a value. Press Enter to leave empty. +username> user + +Option password. +The password for the user. +Choose an alternative below. Press Enter for the default (n). +y) Yes, type in my own password +g) Generate random password +n) No, leave this optional password blank (default) +y/g/n> y +Enter the password: +password: +Confirm the password: +password: + +Edit advanced config? +y) Yes +n) No (default) +y/n> n + +Keep this \[dq]remote\[dq] remote? +y) Yes this is OK (default) +e) Edit this remote +d) Delete this remote +y/e/d> y +\f[R] +.fi +.PP +Once configured you can then use \f[C]rclone\f[R] like this, +.PP +List folders in root level folder: +.IP +.nf +\f[C] +rclone lsd remote: +\f[R] +.fi +.PP +List all the files in your root folder: +.IP +.nf +\f[C] +rclone ls remote: +\f[R] +.fi +.PP +To copy a local folder to a Uloz.to folder called backup: +.IP +.nf +\f[C] +rclone copy /home/source remote:backup +\f[R] +.fi +.SS User credentials +.PP +The only reliable method is to authenticate the user using username and +password. +Uloz.to offers an API key as well, but it\[aq]s reserved for the use of +Uloz.to\[aq]s in-house application and using it in different +circumstances is unreliable. +.SS Modification times and hashes +.PP +Uloz.to doesn\[aq]t allow the user to set a custom modification time, or +retrieve the hashes after upload. +As a result, the integration uses a free form field the API provides to +encode client-provided timestamps and hashes. +Timestamps are stored with microsecond precision. +.PP +A server calculated MD5 hash of the file is verified upon upload. +Afterwards, the backend only serves the client-side calculated hashes. +Hashes can also be retrieved upon creating a file download link, but +it\[aq]s impractical for \f[C]list\f[R]-like use cases. +.SS Restricted filename characters +.PP +In addition to the default restricted characters +set (https://rclone.org/overview/#restricted-characters) the following +characters are also replaced: +.PP +.TS +tab(@); +l c c. +T{ +Character +T}@T{ +Value +T}@T{ +Replacement +T} +_ +T{ +\[rs] +T}@T{ +0x5C +T}@T{ +\[uFF3C] +T} +.TE +.PP +Invalid UTF-8 bytes will also be +replaced (https://rclone.org/overview/#invalid-utf8), as they can\[aq]t +be used in JSON strings. +.SS Transfers +.PP +All files are currently uploaded using a single HTTP request, so for +uploading large files a stable connection is necessary. +Rclone will upload up to \f[C]--transfers\f[R] chunks at the same time +(shared among all uploads). +.SS Deleting files +.PP +By default, files are moved to the recycle bin whereas folders are +deleted immediately. +Trashed files are permanently deleted after 30 days in the recycle bin. +.PP +Emptying the trash is currently not implemented in rclone. +.SS Root folder ID +.PP +You can set the \f[C]root_folder_slug\f[R] for rclone. +This is the folder (identified by its \f[C]Folder slug\f[R]) that rclone +considers to be the root of your Uloz.to drive. +.PP +Normally you will leave this blank and rclone will determine the correct +root to use itself. +However you can set this to restrict rclone to a specific folder +hierarchy. +.PP +In order to do this you will have to find the \f[C]Folder slug\f[R] of +the folder you wish to use as root. +This will be the last segment of the URL when you open the relevant +folder in the Uloz.to web interface. +.PP +For example, for exploring a folder with URL +\f[C]https://uloz.to/fm/my-files/foobar\f[R], \f[C]foobar\f[R] should be +used as the root slug. +.PP +\f[C]root_folder_slug\f[R] can be used alongside a specific path in the +remote path. +For example, if your remote\[aq]s \f[C]root_folder_slug\f[R] corresponds +to \f[C]/foo/bar\f[R], \f[C]remote:baz/qux\f[R] will refer to +\f[C]ABSOLUTE_ULOZTO_ROOT/foo/bar/baz/qux\f[R]. +.SS Standard options +.PP +Here are the Standard options specific to ulozto (Uloz.to). +.SS --ulozto-app-token +.PP +The application token identifying the app. +An app API key can be either found in the API doc +https://uloz.to/upload-resumable-api-beta or obtained from customer +service. +.PP +Properties: +.IP \[bu] 2 +Config: app_token +.IP \[bu] 2 +Env Var: RCLONE_ULOZTO_APP_TOKEN +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --ulozto-username +.PP +The username of the principal to operate as. +.PP +Properties: +.IP \[bu] 2 +Config: username +.IP \[bu] 2 +Env Var: RCLONE_ULOZTO_USERNAME +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --ulozto-password +.PP +The password for the user. +.PP +\f[B]NB\f[R] Input to this must be obscured - see rclone +obscure (https://rclone.org/commands/rclone_obscure/). +.PP +Properties: +.IP \[bu] 2 +Config: password +.IP \[bu] 2 +Env Var: RCLONE_ULOZTO_PASSWORD +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Advanced options +.PP +Here are the Advanced options specific to ulozto (Uloz.to). +.SS --ulozto-root-folder-slug +.PP +If set, rclone will use this folder as the root folder for all +operations. +For example, if the slug identifies \[aq]foo/bar/\[aq], +\[aq]ulozto:baz\[aq] is equivalent to \[aq]ulozto:foo/bar/baz\[aq] +without any root slug set. +.PP +Properties: +.IP \[bu] 2 +Config: root_folder_slug +.IP \[bu] 2 +Env Var: RCLONE_ULOZTO_ROOT_FOLDER_SLUG +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS --ulozto-list-page-size +.PP +The size of a single page for list commands. +1-500 +.PP +Properties: +.IP \[bu] 2 +Config: list_page_size +.IP \[bu] 2 +Env Var: RCLONE_ULOZTO_LIST_PAGE_SIZE +.IP \[bu] 2 +Type: int +.IP \[bu] 2 +Default: 500 +.SS --ulozto-encoding +.PP +The encoding for the backend. +.PP +See the encoding section in the +overview (https://rclone.org/overview/#encoding) for more info. +.PP +Properties: +.IP \[bu] 2 +Config: encoding +.IP \[bu] 2 +Env Var: RCLONE_ULOZTO_ENCODING +.IP \[bu] 2 +Type: Encoding +.IP \[bu] 2 +Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot +.SS --ulozto-description +.PP +Description of the remote. +.PP +Properties: +.IP \[bu] 2 +Config: description +.IP \[bu] 2 +Env Var: RCLONE_ULOZTO_DESCRIPTION +.IP \[bu] 2 +Type: string +.IP \[bu] 2 +Required: false +.SS Limitations +.PP +Uloz.to file names can\[aq]t have the \f[C]\[rs]\f[R] character in. +rclone maps this to and from an identical looking unicode equivalent +\f[C]\[uFF3C]\f[R] (U+FF3C Fullwidth Reverse Solidus). +.PP +Uloz.to only supports filenames up to 255 characters in length. +.PP +Uloz.to rate limits access to the API, but exact details are +undisclosed. +Practical testing reveals that hitting the rate limit during normal use +is very rare, although not impossible with higher number of concurrently +uploaded files. +.PP +\f[C]rclone about\f[R] is not supported by the Uloz.to backend. +Although there\[aq]s an endpoint to retrieve the information for the UI, +it\[aq]s not exposed in the API. +Backends without this capability cannot determine free space for an +rclone mount or use policy \f[C]mfs\f[R] (most free space) as a member +of an rclone union remote. +.PP +See List of backends that do not support rclone +about (https://rclone.org/overview/#optional-features) and rclone +about (https://rclone.org/commands/rclone_about/) .SH Uptobox .PP This is a Backend for Uptobox file storage service. @@ -60987,7 +67199,7 @@ Default: Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot .SS --uptobox-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -61509,7 +67721,7 @@ Type: SizeSuffix Default: 1Gi .SS --union-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -61883,9 +68095,22 @@ Env Var: RCLONE_WEBDAV_OWNCLOUD_EXCLUDE_SHARES Type: bool .IP \[bu] 2 Default: false +.SS --webdav-owncloud-exclude-mounts +.PP +Exclude ownCloud mounted storages +.PP +Properties: +.IP \[bu] 2 +Config: owncloud_exclude_mounts +.IP \[bu] 2 +Env Var: RCLONE_WEBDAV_OWNCLOUD_EXCLUDE_MOUNTS +.IP \[bu] 2 +Type: bool +.IP \[bu] 2 +Default: false .SS --webdav-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -62359,7 +68584,7 @@ Type: Encoding Default: Slash,Del,Ctl,InvalidUtf8,Dot .SS --yandex-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -62691,7 +68916,7 @@ Type: Encoding Default: Del,Ctl,InvalidUtf8 .SS --zoho-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -63289,7 +69514,7 @@ Copying the entire directory with \[aq]-l\[aq] .IP .nf \f[C] -$ rclone copyto -l /tmp/a/file1 remote:/tmp/a/ +$ rclone copy -l /tmp/a/ remote:/tmp/a/ \f[R] .fi .PP @@ -63319,7 +69544,7 @@ Copying them back with \[aq]-l\[aq] .IP .nf \f[C] -$ rclone copyto -l remote:/tmp/a/ /tmp/b/ +$ rclone copy -l remote:/tmp/a/ /tmp/b/ $ tree /tmp/b /tmp/b @@ -63341,6 +69566,19 @@ $ tree /tmp/b \f[R] .fi .PP +If you want to copy a single file with \f[C]-l\f[R] then you must use +the \f[C].rclonelink\f[R] suffix. +.IP +.nf +\f[C] +$ rclone copy -l remote:/tmp/a/file1.rclonelink /tmp/c + +$ tree /tmp/c +/tmp/c +\[u2514]\[u2500]\[u2500] file1 -> ./file4 +\f[R] +.fi +.PP Note that this flag is incompatible with \f[C]-copy-links\f[R] / \f[C]-L\f[R]. .SS Restricting filesystems with --one-file-system @@ -63667,6 +69905,69 @@ Env Var: RCLONE_LOCAL_NO_SET_MODTIME Type: bool .IP \[bu] 2 Default: false +.SS --local-time-type +.PP +Set what kind of time is returned. +.PP +Normally rclone does all operations on the mtime or Modification time. +.PP +If you set this flag then rclone will return the Modified time as +whatever you set here. +So if you use \[dq]rclone lsl --local-time-type ctime\[dq] then you will +see ctimes in the listing. +.PP +If the OS doesn\[aq]t support returning the time_type specified then +rclone will silently replace it with the modification time which all +OSes support. +.IP \[bu] 2 +mtime is supported by all OSes +.IP \[bu] 2 +atime is supported on all OSes except: plan9, js +.IP \[bu] 2 +btime is only supported on: Windows, macOS, freebsd, netbsd +.IP \[bu] 2 +ctime is supported on all Oses except: Windows, plan9, js +.PP +Note that setting the time will still set the modified time so this is +only useful for reading. +.PP +Properties: +.IP \[bu] 2 +Config: time_type +.IP \[bu] 2 +Env Var: RCLONE_LOCAL_TIME_TYPE +.IP \[bu] 2 +Type: mtime|atime|btime|ctime +.IP \[bu] 2 +Default: mtime +.IP \[bu] 2 +Examples: +.RS 2 +.IP \[bu] 2 +\[dq]mtime\[dq] +.RS 2 +.IP \[bu] 2 +The last modification time. +.RE +.IP \[bu] 2 +\[dq]atime\[dq] +.RS 2 +.IP \[bu] 2 +The last access time. +.RE +.IP \[bu] 2 +\[dq]btime\[dq] +.RS 2 +.IP \[bu] 2 +The creation time. +.RE +.IP \[bu] 2 +\[dq]ctime\[dq] +.RS 2 +.IP \[bu] 2 +The last status change time. +.RE +.RE .SS --local-encoding .PP The encoding for the backend. @@ -63685,7 +69986,7 @@ Type: Encoding Default: Slash,Dot .SS --local-description .PP -Description of the remote +Description of the remote. .PP Properties: .IP \[bu] 2 @@ -63845,6 +70146,446 @@ Options: .IP \[bu] 2 \[dq]error\[dq]: return an error based on option value .SH Changelog +.SS v1.67.0 - 2024-06-14 +.PP +See commits (https://github.com/rclone/rclone/compare/v1.66.0...v1.67.0) +.IP \[bu] 2 +New backends +.RS 2 +.IP \[bu] 2 +uloz.to (https://rclone.org/ulozto/) (iotmaestro) +.IP \[bu] 2 +New S3 providers +.RS 2 +.IP \[bu] 2 +Magalu Object Storage (https://rclone.org/s3/#magalu) (Bruno Fernandes) +.RE +.RE +.IP \[bu] 2 +New commands +.RS 2 +.IP \[bu] 2 +gitannex (https://rclone.org/commands/rclone_gitannex/): Enables +git-annex to store and retrieve content from an rclone remote (Dan +McArdle) +.RE +.IP \[bu] 2 +New Features +.RS 2 +.IP \[bu] 2 +accounting: Add deleted files total size to status summary line (Kyle +Reynolds) +.IP \[bu] 2 +build +.RS 2 +.IP \[bu] 2 +Fix \f[C]CVE-2023-45288\f[R] by upgrading \f[C]golang.org/x/net\f[R] +(Nick Craig-Wood) +.IP \[bu] 2 +Fix \f[C]CVE-2024-35255\f[R] by upgrading +\f[C]github.com/Azure/azure-sdk-for-go/sdk/azidentity\f[R] to 1.6.0 +(dependabot) +.IP \[bu] 2 +Convert source files with CRLF to LF (albertony) +.IP \[bu] 2 +Update all dependencies (Nick Craig-Wood) +.RE +.IP \[bu] 2 +doc updates (albertony, Alex Garel, Dave Nicolson, Dominik Joe +Pant\[u016F]\[u010D]ek, Eric Wolf, Erisa A, Evan Harris, Evan McBeth, +Gachoud Philippe, hidewrong, jakzoe, jumbi77, kapitainsky, Kyle +Reynolds, Lewis Hook, Nick Craig-Wood, overallteach, pawsey-kbuckley, +Pieter van Oostrum, psychopatt, racerole, static-moonlight, Warrentheo, +yudrywet, yumeiyin ) +.IP \[bu] 2 +ncdu: Do not quit on Esc to aid usability (Katia Esposito) +.IP \[bu] 2 +rcserver: Set \f[C]ModTime\f[R] for dirs and files served by +\f[C]--rc-serve\f[R] (Nikita Shoshin) +.RE +.IP \[bu] 2 +Bug Fixes +.RS 2 +.IP \[bu] 2 +bisync: Add integration tests against all backends and fix many many +problems (nielash) +.IP \[bu] 2 +config: Fix default value for \f[C]description\f[R] (Nick Craig-Wood) +.IP \[bu] 2 +copy: Fix \f[C]nil\f[R] pointer dereference when corrupted on transfer +with \f[C]nil\f[R] dst (nielash) +.IP \[bu] 2 +fs +.RS 2 +.IP \[bu] 2 +Improve JSON Unmarshalling for \f[C]Duration\f[R] types (Kyle Reynolds) +.IP \[bu] 2 +Close the CPU profile on exit (guangwu) +.IP \[bu] 2 +Replace \f[C]/bin/bash\f[R] with \f[C]/usr/bin/env bash\f[R] (Florian +Klink) +.RE +.IP \[bu] 2 +oauthutil: Clear client secret if client ID is set (Michael Terry) +.IP \[bu] 2 +operations +.RS 2 +.IP \[bu] 2 +Rework \f[C]rcat\f[R] so that it doesn\[aq]t call the +\f[C]--metadata-mapper\f[R] twice (Nick Craig-Wood) +.IP \[bu] 2 +Ensure \f[C]SrcFsType\f[R] is set correctly when using +\f[C]--metadata-mapper\f[R] (Nick Craig-Wood) +.IP \[bu] 2 +Fix \[dq]optional feature not implemented\[dq] error with a crypted sftp +bug (Nick Craig-Wood) +.IP \[bu] 2 +Fix very long file names when using copy with \f[C]--partial\f[R] (Nick +Craig-Wood) +.IP \[bu] 2 +Fix retries downloading too much data with certain backends (Nick +Craig-Wood) +.IP \[bu] 2 +Fix move when dst is nil and fdst is case-insensitive (nielash) +.IP \[bu] 2 +Fix lsjson \f[C]--encrypted\f[R] when using \f[C]--crypt-XXX\f[R] +parameters (Nick Craig-Wood) +.IP \[bu] 2 +Fix missing metadata for multipart transfers to local disk (Nick +Craig-Wood) +.IP \[bu] 2 +Fix incorrect modtime on some multipart transfers (Nick Craig-Wood) +.IP \[bu] 2 +Fix hashing problem in integration tests (Nick Craig-Wood) +.RE +.IP \[bu] 2 +rc +.RS 2 +.IP \[bu] 2 +Fix stats groups being ignored in \f[C]operations/check\f[R] (Nick +Craig-Wood) +.IP \[bu] 2 +Fix incorrect \f[C]Content-Type\f[R] in HTTP API (Kyle Reynolds) +.RE +.IP \[bu] 2 +serve s3 +.RS 2 +.IP \[bu] 2 +Fix \f[C]Last-Modified\f[R] header format (Butanediol) +.IP \[bu] 2 +Fix in-memory metadata storing wrong modtime (nielash) +.IP \[bu] 2 +Fix XML of error message (Nick Craig-Wood) +.RE +.IP \[bu] 2 +serve webdav: Fix webdav with \f[C]--baseurl\f[R] under Windows (Nick +Craig-Wood) +.IP \[bu] 2 +serve dlna: Make \f[C]BrowseMetadata\f[R] more compliant (albertony) +.IP \[bu] 2 +serve http: Added \f[C]Content-Length\f[R] header when HTML directory is +served (Sunny) +.IP \[bu] 2 +sync +.RS 2 +.IP \[bu] 2 +Don\[aq]t sync directories if they haven\[aq]t been modified (Nick +Craig-Wood) +.IP \[bu] 2 +Don\[aq]t test reading metadata if we can\[aq]t write it (Nick +Craig-Wood) +.IP \[bu] 2 +Fix case normalisation (problem on on s3) (Nick Craig-Wood) +.IP \[bu] 2 +Fix management of empty directories to make it more accurate (Nick +Craig-Wood) +.IP \[bu] 2 +Fix creation of empty directories when +\f[C]--create-empty-src-dirs=false\f[R] (Nick Craig-Wood) +.IP \[bu] 2 +Fix directory modification times not being set (Nick Craig-Wood) +.IP \[bu] 2 +Fix \[dq]failed to update directory timestamp or metadata: directory not +found\[dq] (Nick Craig-Wood) +.IP \[bu] 2 +Fix expecting SFTP to have MkdirMetadata method: optional feature not +implemented (Nick Craig-Wood) +.RE +.IP \[bu] 2 +test info: Improve cleanup of temp files (Kyle Reynolds) +.IP \[bu] 2 +touch: Fix using \f[C]-R\f[R] on certain backends (Nick Craig-Wood) +.RE +.IP \[bu] 2 +Mount +.RS 2 +.IP \[bu] 2 +Add \f[C]--direct-io\f[R] flag to force uncached access (Nick +Craig-Wood) +.RE +.IP \[bu] 2 +VFS +.RS 2 +.IP \[bu] 2 +Fix download loop when file size shrunk (Nick Craig-Wood) +.IP \[bu] 2 +Fix renaming a directory (nielash) +.RE +.IP \[bu] 2 +Local +.RS 2 +.IP \[bu] 2 +Add \f[C]--local-time-type\f[R] to use +\f[C]mtime\f[R]/\f[C]atime\f[R]/\f[C]btime\f[R]/\f[C]ctime\f[R] as the +time (Nick Craig-Wood) +.IP \[bu] 2 +Allow \f[C]SeBackupPrivilege\f[R] and/or \f[C]SeRestorePrivilege\f[R] to +work on Windows (Charles Hamilton) +.RE +.IP \[bu] 2 +Azure Blob +.RS 2 +.IP \[bu] 2 +Fix encoding issue with dir path comparison (nielash) +.RE +.IP \[bu] 2 +B2 +.RS 2 +.IP \[bu] 2 +Add new cleanup (https://rclone.org/b2/#cleanup) and cleanup-hidden +backend commands. +(Pat Patterson) +.IP \[bu] 2 +Update B2 URLs to new home (Nick Craig-Wood) +.RE +.IP \[bu] 2 +Chunker +.RS 2 +.IP \[bu] 2 +Fix startup when root points to composite multi-chunk file without +metadata (nielash) +.IP \[bu] 2 +Fix case-insensitive comparison on local without metadata (nielash) +.IP \[bu] 2 +Fix \[dq]finalizer already set\[dq] error (nielash) +.RE +.IP \[bu] 2 +Drive +.RS 2 +.IP \[bu] 2 +Add backend query (https://rclone.org/drive/#query) command for general +purpose querying of files (John-Paul Smith) +.IP \[bu] 2 +Stop sending notification emails when setting permissions (Nick +Craig-Wood) +.IP \[bu] 2 +Fix server side copy with metadata from my drive to shared drive (Nick +Craig-Wood) +.IP \[bu] 2 +Set all metadata permissions and return error summary instead of +stopping on the first error (Nick Craig-Wood) +.IP \[bu] 2 +Make errors setting permissions into no retry errors (Nick Craig-Wood) +.IP \[bu] 2 +Fix description being overwritten on server side moves (Nick Craig-Wood) +.IP \[bu] 2 +Allow setting metadata to fail if \f[C]failok\f[R] flag is set (Nick +Craig-Wood) +.IP \[bu] 2 +Fix panic when using \f[C]--metadata-mapper\f[R] on large google doc +files (Nick Craig-Wood) +.RE +.IP \[bu] 2 +Dropbox +.RS 2 +.IP \[bu] 2 +Add \f[C]--dropbox-root-namespace\f[R] to override the root namespace +(Bill Fraser) +.RE +.IP \[bu] 2 +Google Cloud Storage +.RS 2 +.IP \[bu] 2 +Fix encoding issue with dir path comparison (nielash) +.RE +.IP \[bu] 2 +Hdfs +.RS 2 +.IP \[bu] 2 +Fix f.String() not including subpath (nielash) +.RE +.IP \[bu] 2 +Http +.RS 2 +.IP \[bu] 2 +Add \f[C]--http-no-escape\f[R] to not escape URL metacharacters in path +names (Kyle Reynolds) +.RE +.IP \[bu] 2 +Jottacloud +.RS 2 +.IP \[bu] 2 +Set metadata on server side copy and move (albertony) +.RE +.IP \[bu] 2 +Linkbox +.RS 2 +.IP \[bu] 2 +Fix working with names longer than 8-25 Unicode chars. +(Vitaly) +.IP \[bu] 2 +Fix list paging and optimized synchronization. +(gvitali) +.RE +.IP \[bu] 2 +Mailru +.RS 2 +.IP \[bu] 2 +Attempt to fix throttling by increasing min sleep to 100ms (Nick +Craig-Wood) +.RE +.IP \[bu] 2 +Memory +.RS 2 +.IP \[bu] 2 +Fix dst mutating src after server-side copy (nielash) +.IP \[bu] 2 +Fix deadlock in operations.Purge (nielash) +.IP \[bu] 2 +Fix incorrect list entries when rooted at subdirectory (nielash) +.RE +.IP \[bu] 2 +Onedrive +.RS 2 +.IP \[bu] 2 +Add \f[C]--onedrive-hard-delete\f[R] to permanently delete files (Nick +Craig-Wood) +.IP \[bu] 2 +Make server-side copy work in more scenarios (YukiUnHappy) +.IP \[bu] 2 +Fix \[dq]unauthenticated: Unauthenticated\[dq] errors when downloading +(Nick Craig-Wood) +.IP \[bu] 2 +Fix \f[C]--metadata-mapper\f[R] being called twice if writing +permissions (nielash) +.IP \[bu] 2 +Set all metadata permissions and return error summary instead of +stopping on the first error (nielash) +.IP \[bu] 2 +Make errors setting permissions into no retry errors (Nick Craig-Wood) +.IP \[bu] 2 +Skip writing permissions with \[aq]owner\[aq] role (nielash) +.IP \[bu] 2 +Fix references to deprecated permissions properties (nielash) +.IP \[bu] 2 +Add support for group permissions (nielash) +.IP \[bu] 2 +Allow setting permissions to fail if \f[C]failok\f[R] flag is set (Nick +Craig-Wood) +.RE +.IP \[bu] 2 +Pikpak +.RS 2 +.IP \[bu] 2 +Make getFile() usage more efficient to avoid the download limit +(wiserain) +.IP \[bu] 2 +Improve upload reliability and resolve potential file conflicts +(wiserain) +.IP \[bu] 2 +Implement configurable chunk size for multipart upload (wiserain) +.RE +.IP \[bu] 2 +Protondrive +.RS 2 +.IP \[bu] 2 +Don\[aq]t auth with an empty access token (Micha\[/l] Dzienisiewicz) +.RE +.IP \[bu] 2 +Qingstor +.RS 2 +.IP \[bu] 2 +Disable integration tests as test account suspended (Nick Craig-Wood) +.RE +.IP \[bu] 2 +Quatrix +.RS 2 +.IP \[bu] 2 +Fix f.String() not including subpath (nielash) +.RE +.IP \[bu] 2 +S3 +.RS 2 +.IP \[bu] 2 +Add new AWS region \f[C]il-central-1\f[R] Tel Aviv (yoelvini) +.IP \[bu] 2 +Update Scaleway\[aq]s configuration options (Alexandre Lavigne) +.IP \[bu] 2 +Ceph: fix quirks when creating buckets to fix trying to create an +existing bucket (Thomas Schneider) +.IP \[bu] 2 +Fix encoding issue with dir path comparison (nielash) +.IP \[bu] 2 +Fix 405 error on HEAD for delete marker with versionId (nielash) +.IP \[bu] 2 +Validate \f[C]--s3-copy-cutoff\f[R] size before copy (hoyho) +.RE +.IP \[bu] 2 +SFTP +.RS 2 +.IP \[bu] 2 +Add \f[C]--sftp-connections\f[R] to limit the maximum number of +connections (Tomasz Melcer) +.RE +.IP \[bu] 2 +Storj +.RS 2 +.IP \[bu] 2 +Update \f[C]storj.io/uplink\f[R] to latest release (JT Olio) +.IP \[bu] 2 +Update bio on request (Nick Craig-Wood) +.RE +.IP \[bu] 2 +Swift +.RS 2 +.IP \[bu] 2 +Implement \f[C]--swift-use-segments-container\f[R] to allow >5G files on +Blomp (Nick Craig-Wood) +.RE +.IP \[bu] 2 +Union +.RS 2 +.IP \[bu] 2 +Fix deleting dirs when all remotes can\[aq]t have empty dirs (Nick +Craig-Wood) +.RE +.IP \[bu] 2 +WebDAV +.RS 2 +.IP \[bu] 2 +Fix setting modification times erasing checksums on owncloud and +nextcloud (nielash) +.IP \[bu] 2 +owncloud: Add \f[C]--webdav-owncloud-exclude-mounts\f[R] which allows +excluding mounted folders when listing remote resources (Thomas +M\[:u]ller) +.RE +.IP \[bu] 2 +Zoho +.RS 2 +.IP \[bu] 2 +Fix throttling problem when uploading files (Nick Craig-Wood) +.IP \[bu] 2 +Use cursor listing for improved performance (Nick Craig-Wood) +.IP \[bu] 2 +Retry reading info after upload if size wasn\[aq]t returned (Nick +Craig-Wood) +.IP \[bu] 2 +Remove simple file names complication which is no longer needed (Nick +Craig-Wood) +.IP \[bu] 2 +Sleep for 60 seconds if rate limit error received (Nick Craig-Wood) +.RE .SS v1.66.0 - 2024-03-10 .PP See commits (https://github.com/rclone/rclone/compare/v1.65.0...v1.66.0) @@ -77571,7 +84312,7 @@ You can\[aq]t take an existing object, and change some bytes in the middle of it. .PP It would be possible to make a sync system which stored binary diffs -instead of whole objects like rclone does, but that would break the 1:1 +like rsync does, instead of whole objects, but that would break the 1:1 mapping of files on your hard disk to objects in the remote cloud storage system. .PP @@ -78583,7 +85324,7 @@ Kamil Trzci\[u0144]ski .IP \[bu] 2 Zac Rubin .IP \[bu] 2 -Vincent Feltz +Vincent Feltz .IP \[bu] 2 Heiko Bornholdt .IP \[bu] 2 @@ -79467,6 +86208,84 @@ Joe Cai Anders Swanson .IP \[bu] 2 huajin tong <137764712+thirdkeyword@users.noreply.github.com> +.IP \[bu] 2 +John-Paul Smith +.IP \[bu] 2 +racerole <148756161+racerole@users.noreply.github.com> +.IP \[bu] 2 +Gachoud Philippe +.IP \[bu] 2 +YukiUnHappy +.IP \[bu] 2 +Kyle Reynolds +.IP \[bu] 2 +Lewis Hook +.IP \[bu] 2 +hoyho +.IP \[bu] 2 +Vitaly <9034218+gvitali@users.noreply.github.com> +.IP \[bu] 2 +iotmaestro +.IP \[bu] 2 +psychopatt <66741203+psychopatt@users.noreply.github.com> +.IP \[bu] 2 +Alex Garel +.IP \[bu] 2 +Warrentheo +.IP \[bu] 2 +Alexandre Lavigne +.IP \[bu] 2 +yoelvini <134453420+yoelvini@users.noreply.github.com> +.IP \[bu] 2 +Erisa A +.IP \[bu] 2 +Pieter van Oostrum +.IP \[bu] 2 +jakzoe <155812065+jakzoe@users.noreply.github.com> +.IP \[bu] 2 +guangwu +.IP \[bu] 2 +static-moonlight <107991124+static-moonlight@users.noreply.github.com> +.IP \[bu] 2 +yudrywet +.IP \[bu] 2 +Butanediol +.IP \[bu] 2 +Dave Nicolson +.IP \[bu] 2 +Katia Esposito +.IP \[bu] 2 +pawsey-kbuckley <36438302+pawsey-kbuckley@users.noreply.github.com> +.IP \[bu] 2 +hidewrong <167099254+hidewrong@users.noreply.github.com> +.IP \[bu] 2 +Michael Terry +.IP \[bu] 2 +Sunny <25066078+LoSunny@users.noreply.github.com> +.IP \[bu] 2 +overallteach +.IP \[bu] 2 +JT Olio +.IP \[bu] 2 +Evan McBeth <64177332+AtomicRobotMan0101@users.noreply.github.com> +.IP \[bu] 2 +Dominik Joe Pant\[u016F]\[u010D]ek +.IP \[bu] 2 +yumeiyin <155420652+yumeiyin@users.noreply.github.com> +.IP \[bu] 2 +Bruno Fernandes <54373093+folkzb@users.noreply.github.com> +.IP \[bu] 2 +Thomas Schneider +.IP \[bu] 2 +Charles Hamilton <52973156+chamilton-ccn@users.noreply.github.com> +.IP \[bu] 2 +Tomasz Melcer +.IP \[bu] 2 +Micha\[/l] Dzienisiewicz +.IP \[bu] 2 +Florian Klink +.IP \[bu] 2 +Bill Fraser .SH Contact the rclone project .SS Forum .PP