diff --git a/.gitattributes b/.gitattributes
index 35157cfda..8aa2a2385 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,7 @@
+# Go writes go.mod and go.sum with lf even on windows
+go.mod text eol=lf
+go.sum text eol=lf
+
# Ignore generated files in GitHub language statistics and diffs
/MANUAL.* linguist-generated=true
/rclone.1 linguist-generated=true
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index be34b2a7f..3fc6a9d10 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,12 +27,12 @@ jobs:
strategy:
fail-fast: false
matrix:
- job_name: ['linux', 'linux_386', 'mac_amd64', 'mac_arm64', 'windows', 'other_os', 'go1.20', 'go1.21']
+ job_name: ['linux', 'linux_386', 'mac_amd64', 'mac_arm64', 'windows', 'other_os', 'go1.21', 'go1.22']
include:
- job_name: linux
os: ubuntu-latest
- go: '>=1.22.0-rc.1'
+ go: '>=1.23.0-rc.1'
gotags: cmount
build_flags: '-include "^linux/"'
check: true
@@ -43,14 +43,14 @@ jobs:
- job_name: linux_386
os: ubuntu-latest
- go: '>=1.22.0-rc.1'
+ go: '>=1.23.0-rc.1'
goarch: 386
gotags: cmount
quicktest: true
- job_name: mac_amd64
- os: macos-11
- go: '>=1.22.0-rc.1'
+ os: macos-latest
+ go: '>=1.23.0-rc.1'
gotags: 'cmount'
build_flags: '-include "^darwin/amd64" -cgo'
quicktest: true
@@ -58,15 +58,15 @@ jobs:
deploy: true
- job_name: mac_arm64
- os: macos-11
- go: '>=1.22.0-rc.1'
+ os: macos-latest
+ go: '>=1.23.0-rc.1'
gotags: 'cmount'
build_flags: '-include "^darwin/arm64" -cgo -macos-arch arm64 -cgo-cflags=-I/usr/local/include -cgo-ldflags=-L/usr/local/lib'
deploy: true
- job_name: windows
os: windows-latest
- go: '>=1.22.0-rc.1'
+ go: '>=1.23.0-rc.1'
gotags: cmount
cgo: '0'
build_flags: '-include "^windows/"'
@@ -76,23 +76,23 @@ jobs:
- job_name: other_os
os: ubuntu-latest
- go: '>=1.22.0-rc.1'
+ go: '>=1.23.0-rc.1'
build_flags: '-exclude "^(windows/|darwin/|linux/)"'
compile_all: true
deploy: true
- - job_name: go1.20
- os: ubuntu-latest
- go: '1.20'
- quicktest: true
- racequicktest: true
-
- job_name: go1.21
os: ubuntu-latest
go: '1.21'
quicktest: true
racequicktest: true
+ - job_name: go1.22
+ os: ubuntu-latest
+ go: '1.22'
+ quicktest: true
+ racequicktest: true
+
name: ${{ matrix.job_name }}
runs-on: ${{ matrix.os }}
@@ -124,7 +124,7 @@ jobs:
sudo modprobe fuse
sudo chmod 666 /dev/fuse
sudo chown root:$USER /etc/fuse.conf
- sudo apt-get install fuse3 libfuse-dev rpm pkg-config
+ sudo apt-get install fuse3 libfuse-dev rpm pkg-config git-annex git-annex-remote-rclone nfs-common
if: matrix.os == 'ubuntu-latest'
- name: Install Libraries on macOS
@@ -137,7 +137,8 @@ jobs:
brew untap --force homebrew/cask
brew update
brew install --cask macfuse
- if: matrix.os == 'macos-11'
+ brew install git-annex git-annex-remote-rclone
+ if: matrix.os == 'macos-latest'
- name: Install Libraries on Windows
shell: powershell
@@ -167,14 +168,6 @@ jobs:
printf "\n\nSystem environment:\n\n"
env
- - name: Go module cache
- uses: actions/cache@v4
- with:
- path: ~/go/pkg/mod
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
-
- name: Build rclone
shell: bash
run: |
@@ -230,21 +223,71 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Get runner parameters
+ id: get-runner-parameters
+ shell: bash
+ run: |
+ echo "year-week=$(/bin/date -u "+%Y%V")" >> $GITHUB_OUTPUT
+ echo "runner-os-version=$ImageOS" >> $GITHUB_OUTPUT
+
- name: Checkout
uses: actions/checkout@v4
- - name: Code quality test
- uses: golangci/golangci-lint-action@v4
- with:
- # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
- version: latest
-
- # Run govulncheck on the latest go version, the one we build binaries with
- name: Install Go
+ id: setup-go
uses: actions/setup-go@v5
with:
- go-version: '>=1.22.0-rc.1'
+ go-version: '>=1.23.0-rc.1'
check-latest: true
+ cache: false
+
+ - name: Cache
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/go/pkg/mod
+ ~/.cache/go-build
+ ~/.cache/golangci-lint
+ key: golangci-lint-${{ steps.get-runner-parameters.outputs.runner-os-version }}-go${{ steps.setup-go.outputs.go-version }}-${{ steps.get-runner-parameters.outputs.year-week }}-${{ hashFiles('go.sum') }}
+ restore-keys: golangci-lint-${{ steps.get-runner-parameters.outputs.runner-os-version }}-go${{ steps.setup-go.outputs.go-version }}-${{ steps.get-runner-parameters.outputs.year-week }}-
+
+ - name: Code quality test (Linux)
+ uses: golangci/golangci-lint-action@v6
+ with:
+ version: latest
+ skip-cache: true
+
+ - name: Code quality test (Windows)
+ uses: golangci/golangci-lint-action@v6
+ env:
+ GOOS: "windows"
+ with:
+ version: latest
+ skip-cache: true
+
+ - name: Code quality test (macOS)
+ uses: golangci/golangci-lint-action@v6
+ env:
+ GOOS: "darwin"
+ with:
+ version: latest
+ skip-cache: true
+
+ - name: Code quality test (FreeBSD)
+ uses: golangci/golangci-lint-action@v6
+ env:
+ GOOS: "freebsd"
+ with:
+ version: latest
+ skip-cache: true
+
+ - name: Code quality test (OpenBSD)
+ uses: golangci/golangci-lint-action@v6
+ env:
+ GOOS: "openbsd"
+ with:
+ version: latest
+ skip-cache: true
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
@@ -268,15 +311,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
- go-version: '>=1.22.0-rc.1'
-
- - name: Go module cache
- uses: actions/cache@v4
- with:
- path: ~/go/pkg/mod
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
+ go-version: '>=1.23.0-rc.1'
- name: Set global environment variables
shell: bash
diff --git a/.github/workflows/build_publish_beta_docker_image.yml b/.github/workflows/build_publish_beta_docker_image.yml
index 4c4f935c4..fa838c6ff 100644
--- a/.github/workflows/build_publish_beta_docker_image.yml
+++ b/.github/workflows/build_publish_beta_docker_image.yml
@@ -56,7 +56,7 @@ jobs:
run: |
df -h .
- name: Build and publish image
- uses: docker/build-push-action@v5
+ uses: docker/build-push-action@v6
with:
file: Dockerfile
context: .
diff --git a/.github/workflows/notify.yml b/.github/workflows/notify.yml
new file mode 100644
index 000000000..5c5bfb49d
--- /dev/null
+++ b/.github/workflows/notify.yml
@@ -0,0 +1,15 @@
+name: Notify users based on issue labels
+
+on:
+ issues:
+ types: [labeled]
+
+jobs:
+ notify:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: jenschelkopf/issue-label-notification-action@1.3
+ with:
+ token: ${{ secrets.NOTIFY_ACTION_TOKEN }}
+ recipients: |
+ Support Contract=@rclone/support
diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml
index 6a2264b93..378e45a45 100644
--- a/.github/workflows/winget.yml
+++ b/.github/workflows/winget.yml
@@ -1,14 +1,14 @@
-name: Publish to Winget
-on:
- release:
- types: [released]
-
-jobs:
- publish:
- runs-on: ubuntu-latest
- steps:
- - uses: vedantmgoyal2009/winget-releaser@v2
- with:
- identifier: Rclone.Rclone
- installers-regex: '-windows-\w+\.zip$'
- token: ${{ secrets.WINGET_TOKEN }}
+name: Publish to Winget
+on:
+ release:
+ types: [released]
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: vedantmgoyal2009/winget-releaser@v2
+ with:
+ identifier: Rclone.Rclone
+ installers-regex: '-windows-\w+\.zip$'
+ token: ${{ secrets.WINGET_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 9627f353d..70efa8580 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,10 +3,13 @@ _junk/
rclone
rclone.exe
build
-docs/public
+/docs/public/
+/docs/.hugo_build.lock
+/docs/static/img/logos/
rclone.iml
.idea
.history
+.vscode
*.test
*.iml
fuzz-build.zip
@@ -15,6 +18,5 @@ fuzz-build.zip
Thumbs.db
__pycache__
.DS_Store
-/docs/static/img/logos/
resource_windows_*.syso
.devcontainer
diff --git a/.golangci.yml b/.golangci.yml
index 0d61df700..f4092493a 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -13,6 +13,7 @@ linters:
- stylecheck
- unused
- misspell
+ - gocritic
#- prealloc
#- maligned
disable-all: true
@@ -98,3 +99,11 @@ linters-settings:
# Only enable the checks performed by the staticcheck stand-alone tool,
# as documented here: https://staticcheck.io/docs/configuration/options/#checks
checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-ST1023"]
+ gocritic:
+ disabled-checks:
+ - appendAssign
+ - captLocal
+ - commentFormatting
+ - exitAfterDefer
+ - ifElseChain
+ - singleCaseSwitch
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6e2e885ee..d31258e78 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -209,7 +209,7 @@ altogether with an HTML report and test retries then from the
project root:
go install github.com/rclone/rclone/fstest/test_all
- test_all -backend drive
+ test_all -backends drive
### Full integration testing
@@ -508,7 +508,7 @@ You'll need to modify the following files
- `backend/s3/s3.go`
- Add the provider to `providerOption` at the top of the file
- Add endpoints and other config for your provider gated on the provider in `fs.RegInfo`.
- - Exclude your provider from genric config questions (eg `region` and `endpoint).
+ - Exclude your provider from generic config questions (eg `region` and `endpoint).
- Add the provider to the `setQuirks` function - see the documentation there.
- `docs/content/s3.md`
- Add the provider at the top of the page.
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
index 3ab1c2248..f2cc4d2e7 100644
--- a/MAINTAINERS.md
+++ b/MAINTAINERS.md
@@ -21,6 +21,8 @@ Current active maintainers of rclone are:
| Chun-Hung Tseng | @henrybear327 | Proton Drive Backend |
| Hideo Aoyama | @boukendesho | snap packaging |
| nielash | @nielash | bisync |
+| Dan McArdle | @dmcardle | gitannex |
+| Sam Harrison | @childish-sambino | filescom |
**This is a work in progress Draft**
diff --git a/MANUAL.html b/MANUAL.html
index d16296fa0..6ab9d478d 100644
--- a/MANUAL.html
+++ b/MANUAL.html
@@ -81,7 +81,7 @@
Rclone syncs your files to cloud storage

@@ -127,6 +127,7 @@
Copy new or changed files to cloud storage
Sync (one way) to make a directory identical
+Bisync (two way) to keep two directories in sync bidirectionally
Move files to cloud storage deleting the local after verification
Check hashes and for missing/extra files
Mount your cloud storage as a network disk
@@ -139,7 +140,6 @@
1Fichier
Akamai Netstorage
Alibaba Cloud (Aliyun) Object Storage System (OSS)
-Amazon Drive
Amazon S3
Backblaze B2
Box
@@ -162,6 +162,7 @@
Hetzner Storage Box
HiDrive
HTTP
+ImageKit
Internet Archive
Jottacloud
IBM COS S3
@@ -172,6 +173,7 @@
Liara Object Storage
Linkbox
Linode Object Storage
+Magalu
Mail.ru Cloud
Memset Memstore
Mega
@@ -211,6 +213,7 @@
Synology
SugarSync
Tencent Cloud Object Storage (COS)
+Uloz.to
Uptobox
Wasabi
WebDAV
@@ -275,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.

-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.
@@ -495,7 +498,6 @@ go build
1Fichier
Akamai Netstorage
Alias
-Amazon Drive
Amazon S3
Backblaze B2
Box
@@ -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.
@@ -610,6 +617,8 @@ destpath/sourcepath/two.txt
See the --no-traverse option for controlling whether rclone lists the destination directory or not. Supplying this option when copying a small number of files into a large destination can speed transfers up greatly.
For example, if you have many files in /path/to/src but only a few of them change every day, you can copy all the files which have changed recently very efficiently like this:
rclone copy --max-age 24h --no-traverse /path/to/src remote:
+Rclone will sync the modification times of files and directories if the backend supports it. If metadata syncing is required then use the --metadata
flag.
+Note that the modification time and metadata for the root directory will not be synced. See https://github.com/rclone/rclone/issues/7652 for more info.
Note: Use the -P
/--progress
flag to view real-time transfer statistics.
Note: Use the --dry-run
or the --interactive
/-i
flag to test without copying anything.
rclone copy source:path dest:path [flags]
@@ -627,7 +636,7 @@ destpath/sourcepath/two.txt
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -641,6 +650,7 @@ destpath/sourcepath/two.txt
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -697,12 +707,50 @@ destpath/sourcepath/two.txt
It is always the contents of the directory that is synced, not the directory itself. So when source:path is a directory, it's the contents of source:path that are copied, not the directory name and contents. See extended explanation in the copy command if unsure.
If dest:path doesn't exist, it is created and the source:path contents go there.
It is not possible to sync overlapping remotes. However, you may exclude the destination from the sync with a filter rule or by putting an exclude-if-present file inside the destination directory and sync to a destination that is inside the source directory.
+Rclone will sync the modification times of files and directories if the backend supports it. If metadata syncing is required then use the --metadata
flag.
+Note that the modification time and metadata for the root directory will not be synced. See https://github.com/rclone/rclone/issues/7652 for more info.
Note: Use the -P
/--progress
flag to view real-time transfer statistics
Note: Use the rclone dedupe
command to deal with "Duplicate object/directory found in source/destination - ignoring" errors. See this forum post for more info.
+Logger Flags
+The --differ
, --missing-on-dst
, --missing-on-src
, --match
and --error
flags write paths, one per line, to the file name (or stdout if it is -
) supplied. What they write is described in the help below. For example --differ
will write all paths which are present on both the source and destination but different.
+The --combined
flag will write a file (or stdout) which contains all file paths with a symbol and then a space and then the path to tell you what happened to it. These are reminiscent of diff files.
+
+= path
means path was found in source and destination and was identical
+- `- path` means path was missing on the source, so only in the destination
+- `+ path` means path was missing on the destination, so only in the source
+- `* path` means path was present in source and destination but different.
+! path
means there was an error reading or hashing the source or dest.
+
+The --dest-after
flag writes a list file using the same format flags as lsf
(including customizable options for hash, modtime, etc.) Conceptually it is similar to rsync's --itemize-changes
, but not identical -- it should output an accurate list of what will be on the destination after the sync.
+Note that these logger flags have a few limitations, and certain scenarios are not currently supported:
+
+--max-duration
/ CutoffModeHard
+--compare-dest
/ --copy-dest
+- server-side moves of an entire dir at once
+- High-level retries, because there would be duplicates (use
--retries 1
to disable)
+- Possibly some unusual error scenarios
+
+Note also that each file is logged during the sync, as opposed to after, so it is most useful as a predictor of what SHOULD happen to each file (which may or may not match what actually DID.)
rclone sync source:path dest:path [flags]
Options
- --create-empty-src-dirs Create empty source dirs on destination after sync
- -h, --help help for sync
+ --absolute Put a leading / in front of path names
+ --combined string Make a combined report of changes to this file
+ --create-empty-src-dirs Create empty source dirs on destination after sync
+ --csv Output in CSV format
+ --dest-after string Report all files that exist on the dest post-sync
+ --differ string Report all non-matching files to this file
+ -d, --dir-slash Append a slash to directory names (default true)
+ --dirs-only Only list directories
+ --error string Report all files with errors (hashing or reading) to this file
+ --files-only Only list files (default true)
+ -F, --format string Output format - see lsf help for details (default "p")
+ --hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "md5")
+ -h, --help help for sync
+ --match string Report all matching files to this file
+ --missing-on-dst string Report all files missing from the destination to this file
+ --missing-on-src string Report all files missing from the source to this file
+ -s, --separator string Separator for the items in the format (default ";")
+ -t, --timeformat string Specify a custom time format, or 'max' for max precision supported by remote (default: 2006-01-02 15:04:05)
Copy Options
Flags for anything which can Copy a file.
--check-first Do all the checks before starting transfers
@@ -714,7 +762,7 @@ destpath/sourcepath/two.txt
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -728,6 +776,7 @@ destpath/sourcepath/two.txt
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -742,6 +791,7 @@ destpath/sourcepath/two.txt
--delete-after When synchronizing, delete files on destination after transferring (default)
--delete-before When synchronizing, delete files on destination before transferring
--delete-during When synchronizing, delete files during transfer
+ --fix-case Force rename of case insensitive dest to match source
--ignore-errors Delete even if there are I/O errors
--max-delete int When synchronizing, limit the number of deletes (default -1)
--max-delete-size SizeSuffix When synchronizing, limit the total size of deletes (default off)
@@ -796,6 +846,8 @@ destpath/sourcepath/two.txt
Otherwise for each file in source:path
selected by the filters (if any) this will move it into dest:path
. If possible a server-side move will be used, otherwise it will copy it (server-side if possible) into dest:path
then delete the original (if no errors on copy) in source:path
.
If you want to delete empty source directories after move, use the --delete-empty-src-dirs
flag.
See the --no-traverse option for controlling whether rclone lists the destination directory or not. Supplying this option when moving a small number of files into a large destination can speed transfers up greatly.
+Rclone will sync the modification times of files and directories if the backend supports it. If metadata syncing is required then use the --metadata
flag.
+Note that the modification time and metadata for the root directory will not be synced. See https://github.com/rclone/rclone/issues/7652 for more info.
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 move source:path dest:path [flags]
@@ -814,7 +866,7 @@ destpath/sourcepath/two.txt
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -828,6 +880,7 @@ destpath/sourcepath/two.txt
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -1601,23 +1654,35 @@ rclone backend help <backendname>
Synopsis
Perform bidirectional synchronization between two paths.
Bisync provides a bidirectional cloud sync solution in rclone. It retains the Path1 and Path2 filesystem listings from the prior run. On each successive run it will: - list files on Path1 and Path2, and check for changes on each side. Changes include New
, Newer
, Older
, and Deleted
files. - Propagate changes on Path1 to Path2, and vice-versa.
+Bisync is in beta and is considered an advanced command, so use with care. Make sure you have read and understood the entire manual (especially the Limitations section) before using, or data loss can result. Questions can be asked in the Rclone Forum.
See full bisync description for details.
rclone bisync remote1:path1 remote2:path2 [flags]
Options
- --check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
- --check-filename string Filename for --check-access (default: RCLONE_TEST)
- --check-sync string Controls comparison of final listings: true|false|only (default: true) (default "true")
- --create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
- --filters-file string Read filtering patterns from a file
- --force Bypass --max-delete safety check and run the sync. Consider using with --verbose
- -h, --help help for bisync
- --ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
- --localtime Use local time in listings (default: UTC)
- --no-cleanup Retain working files (useful for troubleshooting and testing).
- --remove-empty-dirs Remove ALL empty directories at the final cleanup step.
- --resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync. Use at your own risk!
- -1, --resync Performs the resync run. Path1 files may overwrite Path2 versions. Consider using --verbose or --dry-run first.
- --workdir string Use custom working dir - useful for testing. (default: $HOME/.cache/rclone/bisync)
+ --backup-dir1 string --backup-dir for Path1. Must be a non-overlapping path on the same remote.
+ --backup-dir2 string --backup-dir for Path2. Must be a non-overlapping path on the same remote.
+ --check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
+ --check-filename string Filename for --check-access (default: RCLONE_TEST)
+ --check-sync string Controls comparison of final listings: true|false|only (default: true) (default "true")
+ --compare string Comma-separated list of bisync-specific compare options ex. 'size,modtime,checksum' (default: 'size,modtime')
+ --conflict-loser ConflictLoserAction Action to take on the loser of a sync conflict (when there is a winner) or on both files (when there is no winner): , num, pathname, delete (default: num)
+ --conflict-resolve string Automatically resolve conflicts by preferring the version that is: none, path1, path2, newer, older, larger, smaller (default: none) (default "none")
+ --conflict-suffix string Suffix to use when renaming a --conflict-loser. Can be either one string or two comma-separated strings to assign different suffixes to Path1/Path2. (default: 'conflict')
+ --create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
+ --download-hash Compute hash by downloading when otherwise unavailable. (warning: may be slow and use lots of data!)
+ --filters-file string Read filtering patterns from a file
+ --force Bypass --max-delete safety check and run the sync. Consider using with --verbose
+ -h, --help help for bisync
+ --ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
+ --max-lock Duration Consider lock files older than this to be expired (default: 0 (never expire)) (minimum: 2m) (default 0s)
+ --no-cleanup Retain working files (useful for troubleshooting and testing).
+ --no-slow-hash Ignore listing checksums only on backends where they are slow
+ --recover Automatically recover from interruptions without requiring --resync.
+ --remove-empty-dirs Remove ALL empty directories at the final cleanup step.
+ --resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync. Use at your own risk!
+ -1, --resync Performs the resync run. Equivalent to --resync-mode path1. Consider using --verbose or --dry-run first.
+ --resync-mode string During resync, prefer the version that is: path1, path2, newer, older, larger, smaller (default: path1 if --resync, otherwise none for no resync.) (default "none")
+ --slow-hash-sync-only Ignore slow checksums for listings and deltas, but still consider them during sync calls.
+ --workdir string Use custom working dir - useful for testing. (default: {WORKDIR})
Copy Options
Flags for anything which can Copy a file.
--check-first Do all the checks before starting transfers
@@ -1629,7 +1694,7 @@ rclone backend help <backendname>
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -1643,6 +1708,7 @@ rclone backend help <backendname>
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -1826,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
@@ -2218,7 +2289,7 @@ if src is directory
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -2232,6 +2303,7 @@ if src is directory
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -2279,12 +2351,22 @@ if src is directory
rclone - Show help for rclone commands, flags and backends.
rclone copyurl
-Copy url content to dest.
+Copy the contents of the URL supplied content to dest:path.
Synopsis
Download a URL's content and copy it to the destination without saving it in temporary storage.
-Setting --auto-filename
will attempt to automatically determine the filename from the URL (after any redirections) and used in the destination path. With --auto-filename-header
in addition, if a specific filename is set in HTTP headers, it will be used instead of the name from the URL. With --print-filename
in addition, the resulting file name will be printed.
+Setting --auto-filename
will attempt to automatically determine the filename from the URL (after any redirections) and used in the destination path.
+With --auto-filename-header
in addition, if a specific filename is set in HTTP headers, it will be used instead of the name from the URL. With --print-filename
in addition, the resulting file name will be printed.
Setting --no-clobber
will prevent overwriting file on the destination if there is one with the same name.
Setting --stdout
or making the output file name -
will cause the output to be written to standard output.
+Troublshooting
+If you can't get rclone copyurl
to work then here are some things you can try:
+
+--disable-http2
rclone will use HTTP2 if available - try disabling it
+--bind 0.0.0.0
rclone will use IPv6 if available - try disabling it
+--bind ::0
to disable IPv4
+--user agent curl
- some sites have whitelists for curl's user-agent - try that
+- Make sure the site works with
curl
directly
+
rclone copyurl https://example.com dest:path [flags]
Options
-a, --auto-filename Get the file name from the URL and use it for destination file path
@@ -2487,9 +2569,51 @@ rclone cryptdecode --reverse encryptedremote: filename1 filename2
- 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
+
+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
+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
+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.
-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.
@@ -2506,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
@@ -2541,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/
@@ -2557,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 too.
-rclone listremotes [flags]
-Options
- -h, --help help for listremotes
- --long Show the type 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
@@ -2639,6 +2763,14 @@ test.sh,449
For example, to find all the files modified within one day and copy those only (without traversing the whole directory structure):
rclone lsf --absolute --files-only --max-age 1d /path/to/local > new_files
rclone copy --files-from-raw new_files /path/to/local remote:path
+The default time format is '2006-01-02 15:04:05'
. Other formats can be specified with the --time-format
flag. Examples:
+rclone lsf remote:path --format pt --time-format 'Jan 2, 2006 at 3:04pm (MST)'
+rclone lsf remote:path --format pt --time-format '2006-01-02 15:04:05.000000000'
+rclone lsf remote:path --format pt --time-format '2006-01-02T15:04:05.999999999Z07:00'
+rclone lsf remote:path --format pt --time-format RFC3339
+rclone lsf remote:path --format pt --time-format DateOnly
+rclone lsf remote:path --format pt --time-format max
+--time-format max
will automatically truncate '2006-01-02 15:04:05.000000000
' to the maximum precision supported by the remote.
Any of the filtering options can be applied to this command.
There are several related list commands
@@ -2653,17 +2785,18 @@ rclone copy --files-from-raw new_files /path/to/local remote:path
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
- --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)
- --dirs-only Only list directories
- --files-only Only list files
- -F, --format string Output format - see help for details (default "p")
- --hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "md5")
- -h, --help help for lsf
- -R, --recursive Recurse into the listing
- -s, --separator string Separator for the items in the format (default ";")
+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)
+ --dirs-only Only list directories
+ --files-only Only list files
+ -F, --format string Output format - see help for details (default "p")
+ --hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "md5")
+ -h, --help help for lsf
+ -R, --recursive Recurse into the listing
+ -s, --separator string Separator for the items in the format (default ";")
+ -t, --time-format string Specify a custom time format, or 'max' for max precision supported by remote (default: 2006-01-02 15:04:05)
Filter Options
Flags for filtering directory listings.
--delete-excluded Delete files on dest excluded from sync
@@ -2693,13 +2826,13 @@ rclone copy --files-from-raw new_files /path/to/local remote:path
--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
{
@@ -2721,10 +2854,10 @@ rclone copy --files-from-raw new_files /path/to/local remote:path
"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.
@@ -2747,7 +2880,7 @@ rclone copy --files-from-raw new_files /path/to/local remote:path
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
@@ -2789,14 +2922,14 @@ rclone copy --files-from-raw new_files /path/to/local remote:path
--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 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).
@@ -2857,8 +2990,11 @@ rclone mount remote:path/to/files * --volname \\cloud\remote
Note that mapping to a directory path, instead of a drive letter, does not suffer from the same limitations.
Mounting on macOS
Mounting on macOS can be done either via built-in NFS server, macFUSE (also known as osxfuse) or FUSE-T. macFUSE is a traditional FUSE driver utilizing a macOS kernel extension (kext). FUSE-T is an alternative FUSE system which "mounts" via an NFSv4 local server.
-NFS mount
+Unicode Normalization
+It is highly recommended to keep the default of --no-unicode-normalization=false
for all mount
and serve
commands on macOS. For details, see vfs-case-sensitivity.
+NFS mount
This method spins up an NFS server using serve nfs command and mounts it to the specified mountpoint. If you run this in background mode using |--daemon|, you will need to send SIGTERM signal to the rclone process using |kill| command to stop the mount.
+Note that --nfs-cache-handle-limit
controls the maximum number of cached file handles stored by the nfsmount
caching handler. This should not be set too low or you may experience errors when trying to access files. The default is 1000000, but consider lowering this limit if the server's system resource usage causes problems.
macFUSE Notes
If installing macFUSE using dmg packages from the website, rclone will locate the macFUSE libraries without any further intervention. If however, macFUSE is installed using the macports package manager, the following addition steps are required.
sudo mkdir /usr/local/lib
@@ -2872,9 +3008,6 @@ sudo ln -s /opt/local/lib/libfuse.2.dylib
File access and modification times cannot be set separately as it seems to be an issue with the NFS client which always modifies both. Can be reproduced with 'touch -m' and 'touch -a' commands
This means that viewing files with various tools, notably macOS Finder, will cause rlcone to update the modification time of the file. This may make rclone upload a full new copy of the file.
-Unicode Normalization
-Rclone includes flags for unicode normalization with macFUSE that should be updated for FUSE-T. See this forum post and FUSE-T issue #16. The following flag should be added to the rclone mount
command.
--o modules=iconv,from_code=UTF-8,to_code=UTF-8
Read Only mounts
When mounting with --read-only
, attempts to write to files will fail silently as opposed to with a clear warning as in macFUSE.
Limitations
@@ -2930,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.
@@ -3042,6 +3176,8 @@ WantedBy=multi-user.target
The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
VFS Disk Options
This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
@@ -3049,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)
@@ -3063,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)
@@ -3080,6 +3217,7 @@ WantedBy=multi-user.target
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -3092,7 +3230,7 @@ WantedBy=multi-user.target
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -3123,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 - Show help for rclone commands, flags and backends.
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
@@ -3145,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.
@@ -3158,7 +3296,7 @@ if src is directory
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -3172,6 +3310,7 @@ if src is directory
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -3214,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 - Show help for rclone commands, flags and backends.
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:
@@ -3242,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)
@@ -3258,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.
@@ -3289,13 +3429,355 @@ 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.
+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).
+On Linux/macOS/FreeBSD start the mount like this, where /path/to/local/mount
is an empty existing directory:
+rclone nfsmount remote:path/to/files /path/to/local/mount
+On Windows you can start a mount in different ways. See below for details. If foreground mount is used interactively from a console window, rclone will serve the mount and occupy the console so another window should be used to work with the mount until rclone is interrupted e.g. by pressing Ctrl-C.
+The following examples will mount to an automatically assigned drive, to specific drive letter X:
, to path C:\path\parent\mount
(where parent directory or drive must exist, and mount must not exist, and is not supported when mounting as a network drive), and the last example will mount as network share \\cloud\remote
and map it to an automatically assigned drive:
+rclone nfsmount remote:path/to/files *
+rclone nfsmount remote:path/to/files X:
+rclone nfsmount remote:path/to/files C:\path\parent\mount
+rclone nfsmount remote:path/to/files \\cloud\remote
+When the program ends while in foreground mode, either via Ctrl+C or receiving a SIGINT or SIGTERM signal, the mount should be automatically stopped.
+When running in background mode the user will have to stop the mount manually:
+# Linux
+fusermount -u /path/to/local/mount
+# OS X
+umount /path/to/local/mount
+The umount operation can fail, for example when the mountpoint is busy. When that happens, it is the user's responsibility to stop the mount manually.
+The size of the mounted file system will be set according to information retrieved from the remote, the same as returned by the rclone about command. Remotes with unlimited storage may report the used size only, then an additional 1 PiB of free space is assumed. If the remote does not support the about feature at all, then 1 PiB is set as both the total and the free size.
+Installing on Windows
+To run rclone nfsmount on Windows, you will need to download and install WinFsp.
+WinFsp is an open-source Windows File System Proxy which makes it easy to write user space file systems for Windows. It provides a FUSE emulation layer which rclone uses combination with cgofuse. Both of these packages are by Bill Zissimopoulos who was very helpful during the implementation of rclone nfsmount for Windows.
+Mounting modes on windows
+Unlike other operating systems, Microsoft Windows provides a different filesystem type for network and fixed drives. It optimises access on the assumption fixed disk drives are fast and reliable, while network drives have relatively high latency and less reliability. Some settings can also be differentiated between the two types, for example that Windows Explorer should just display icons and not create preview thumbnails for image and video files on network drives.
+In most cases, rclone will mount the remote as a normal, fixed disk drive by default. However, you can also choose to mount it as a remote network drive, often described as a network share. If you mount an rclone remote using the default, fixed drive mode and experience unexpected program errors, freezes or other issues, consider mounting as a network drive instead.
+When mounting as a fixed disk drive you can either mount to an unused drive letter, or to a path representing a nonexistent subdirectory of an existing parent directory or drive. Using the special value *
will tell rclone to automatically assign the next available drive letter, starting with Z: and moving backward. Examples:
+rclone nfsmount remote:path/to/files *
+rclone nfsmount remote:path/to/files X:
+rclone nfsmount remote:path/to/files C:\path\parent\mount
+rclone nfsmount remote:path/to/files X:
+Option --volname
can be used to set a custom volume name for the mounted file system. The default is to use the remote name and path.
+To mount as network drive, you can add option --network-mode
to your nfsmount command. Mounting to a directory path is not supported in this mode, it is a limitation Windows imposes on junctions, so the remote must always be mounted to a drive letter.
+rclone nfsmount remote:path/to/files X: --network-mode
+A volume name specified with --volname
will be used to create the network share path. A complete UNC path, such as \\cloud\remote
, optionally with path \\cloud\remote\madeup\path
, will be used as is. Any other string will be used as the share part, after a default prefix \\server\
. If no volume name is specified then \\server\share
will be used. You must make sure the volume name is unique when you are mounting more than one drive, or else the mount command will fail. The share name will treated as the volume label for the mapped drive, shown in Windows Explorer etc, while the complete \\server\share
will be reported as the remote UNC path by net use
etc, just like a normal network drive mapping.
+If you specify a full network share UNC path with --volname
, this will implicitly set the --network-mode
option, so the following two examples have same result:
+rclone nfsmount remote:path/to/files X: --network-mode
+rclone nfsmount remote:path/to/files X: --volname \\server\share
+You may also specify the network share UNC path as the mountpoint itself. Then rclone will automatically assign a drive letter, same as with *
and use that as mountpoint, and instead use the UNC path specified as the volume name, as if it were specified with the --volname
option. This will also implicitly set the --network-mode
option. This means the following two examples have same result:
+rclone nfsmount remote:path/to/files \\cloud\remote
+rclone nfsmount remote:path/to/files * --volname \\cloud\remote
+There is yet another way to enable network mode, and to set the share path, and that is to pass the "native" libfuse/WinFsp option directly: --fuse-flag --VolumePrefix=\server\share
. Note that the path must be with just a single backslash prefix in this case.
+Note: In previous versions of rclone this was the only supported method.
+Read more about drive mapping
+See also Limitations section below.
+Windows filesystem permissions
+The FUSE emulation layer on Windows must convert between the POSIX-based permission model used in FUSE, and the permission model used in Windows, based on access-control lists (ACL).
+The mounted filesystem will normally get three entries in its access-control list (ACL), representing permissions for the POSIX permission scopes: Owner, group and others. By default, the owner and group will be taken from the current user, and the built-in group "Everyone" will be used to represent others. The user/group can be customized with FUSE options "UserName" and "GroupName", e.g. -o UserName=user123 -o GroupName="Authenticated Users"
. The permissions on each entry will be set according to options --dir-perms
and --file-perms
, which takes a value in traditional Unix numeric notation.
+The default permissions corresponds to --file-perms 0666 --dir-perms 0777
, i.e. read and write permissions to everyone. This means you will not be able to start any programs from the mount. To be able to do that you must add execute permissions, e.g. --file-perms 0777 --dir-perms 0777
to add it to everyone. If the program needs to write files, chances are you will have to enable VFS File Caching as well (see also limitations). Note that the default write permission have some restrictions for accounts other than the owner, specifically it lacks the "write extended attributes", as explained next.
+The mapping of permissions is not always trivial, and the result you see in Windows Explorer may not be exactly like you expected. For example, when setting a value that includes write access for the group or others scope, this will be mapped to individual permissions "write attributes", "write data" and "append data", but not "write extended attributes". Windows will then show this as basic permission "Special" instead of "Write", because "Write" also covers the "write extended attributes" permission. When setting digit 0 for group or others, to indicate no permissions, they will still get individual permissions "read attributes", "read extended attributes" and "read permissions". This is done for compatibility reasons, e.g. to allow users without additional permissions to be able to read basic metadata about files like in Unix.
+WinFsp 2021 (version 1.9) introduced a new FUSE option "FileSecurity", that allows the complete specification of file security descriptors using SDDL. With this you get detailed control of the resulting permissions, compared to use of the POSIX permissions described above, and no additional permissions will be added automatically for compatibility with Unix. Some example use cases will following.
+If you set POSIX permissions for only allowing access to the owner, using --file-perms 0600 --dir-perms 0700
, the user group and the built-in "Everyone" group will still be given some special permissions, as described above. Some programs may then (incorrectly) interpret this as the file being accessible by everyone, for example an SSH client may warn about "unprotected private key file". You can work around this by specifying -o FileSecurity="D:P(A;;FA;;;OW)"
, which sets file all access (FA) to the owner (OW), and nothing else.
+When setting write permissions then, except for the owner, this does not include the "write extended attributes" permission, as mentioned above. This may prevent applications from writing to files, giving permission denied error instead. To set working write permissions for the built-in "Everyone" group, similar to what it gets by default but with the addition of the "write extended attributes", you can specify -o FileSecurity="D:P(A;;FRFW;;;WD)"
, which sets file read (FR) and file write (FW) to everyone (WD). If file execute (FX) is also needed, then change to -o FileSecurity="D:P(A;;FRFWFX;;;WD)"
, or set file all access (FA) to get full access permissions, including delete, with -o FileSecurity="D:P(A;;FA;;;WD)"
.
+Windows caveats
+Drives created as Administrator are not visible to other accounts, not even an account that was elevated to Administrator with the User Account Control (UAC) feature. A result of this is that if you mount to a drive letter from a Command Prompt run as Administrator, and then try to access the same drive from Windows Explorer (which does not run as Administrator), you will not be able to see the mounted drive.
+If you don't need to access the drive from applications running with administrative privileges, the easiest way around this is to always create the mount from a non-elevated command prompt.
+To make mapped drives available to the user account that created them regardless if elevated or not, there is a special Windows setting called linked connections that can be enabled.
+It is also possible to make a drive mount available to everyone on the system, by running the process creating it as the built-in SYSTEM account. There are several ways to do this: One is to use the command-line utility PsExec, from Microsoft's Sysinternals suite, which has option -s
to start processes as the SYSTEM account. Another alternative is to run the mount command from a Windows Scheduled Task, or a Windows Service, configured to run as the SYSTEM account. A third alternative is to use the WinFsp.Launcher infrastructure). Read more in the install documentation. Note that when running rclone as another user, it will not use the configuration file from your profile unless you tell it to with the --config
option. Note also that it is now the SYSTEM account that will have the owner permissions, and other accounts will have permissions according to the group or others scopes. As mentioned above, these will then not get the "write extended attributes" permission, and this may prevent writing to files. You can work around this with the FileSecurity option, see example above.
+Note that mapping to a directory path, instead of a drive letter, does not suffer from the same limitations.
+Mounting on macOS
+Mounting on macOS can be done either via built-in NFS server, macFUSE (also known as osxfuse) or FUSE-T. macFUSE is a traditional FUSE driver utilizing a macOS kernel extension (kext). FUSE-T is an alternative FUSE system which "mounts" via an NFSv4 local server.
+Unicode Normalization
+It is highly recommended to keep the default of --no-unicode-normalization=false
for all mount
and serve
commands on macOS. For details, see vfs-case-sensitivity.
+NFS mount
+This method spins up an NFS server using serve nfs command and mounts it to the specified mountpoint. If you run this in background mode using |--daemon|, you will need to send SIGTERM signal to the rclone process using |kill| command to stop the mount.
+Note that --nfs-cache-handle-limit
controls the maximum number of cached file handles stored by the nfsmount
caching handler. This should not be set too low or you may experience errors when trying to access files. The default is 1000000, but consider lowering this limit if the server's system resource usage causes problems.
+macFUSE Notes
+If installing macFUSE using dmg packages from the website, rclone will locate the macFUSE libraries without any further intervention. If however, macFUSE is installed using the macports package manager, the following addition steps are required.
+sudo mkdir /usr/local/lib
+cd /usr/local/lib
+sudo ln -s /opt/local/lib/libfuse.2.dylib
+FUSE-T Limitations, Caveats, and Notes
+There are some limitations, caveats, and notes about how it works. These are current as of FUSE-T version 1.0.14.
+ModTime update on read
+As per the FUSE-T wiki:
+
+File access and modification times cannot be set separately as it seems to be an issue with the NFS client which always modifies both. Can be reproduced with 'touch -m' and 'touch -a' commands
+
+This means that viewing files with various tools, notably macOS Finder, will cause rlcone to update the modification time of the file. This may make rclone upload a full new copy of the file.
+Read Only mounts
+When mounting with --read-only
, attempts to write to files will fail silently as opposed to with a clear warning as in macFUSE.
+Limitations
+Without the use of --vfs-cache-mode
this can only write files sequentially, it can only seek when reading. This means that many applications won't work with their files on an rclone mount without --vfs-cache-mode writes
or --vfs-cache-mode full
. See the VFS File Caching section for more info. When using NFS mount on macOS, if you don't specify |--vfs-cache-mode| the mount point will be read-only.
+The bucket-based remotes (e.g. Swift, S3, Google Compute Storage, B2) do not support the concept of empty directories, so empty directories will have a tendency to disappear once they fall out of the directory cache.
+When rclone mount
is invoked on Unix with --daemon
flag, the main rclone program will wait for the background mount to become ready or until the timeout specified by the --daemon-wait
flag. On Linux it can check mount status using ProcFS so the flag in fact sets maximum time to wait, while the real wait can be less. On macOS / BSD the time to wait is constant and the check is performed only at the end. We advise you to set wait time on macOS reasonably.
+Only supported on Linux, FreeBSD, OS X and Windows at the moment.
+rclone nfsmount vs rclone sync/copy
+File systems expect things to be 100% reliable, whereas cloud storage systems are a long way from 100% reliable. The rclone sync/copy commands cope with this with lots of retries. However rclone nfsmount can't use retries in the same way without making local copies of the uploads. Look at the VFS File Caching for solutions to make nfsmount more reliable.
+Attribute caching
+You can use the flag --attr-timeout
to set the time the kernel caches the attributes (size, modification time, etc.) for directory entries.
+The default is 1s
which caches files just long enough to avoid too many callbacks to rclone from the kernel.
+In theory 0s should be the correct value for filesystems which can change outside the control of the kernel. However this causes quite a few problems such as rclone using too much memory, rclone not serving files to samba and excessive time listing directories.
+The kernel can cache the info about a file for the time given by --attr-timeout
. You may see corruption if the remote file changes length during this window. It will show up as either a truncated file or a file with garbage on the end. With --attr-timeout 1s
this is very unlikely but not impossible. The higher you set --attr-timeout
the more likely it is. The default setting of "1s" is the lowest setting which mitigates the problems above.
+If you set it higher (10s
or 1m
say) then the kernel will call back to rclone less often making it more efficient, however there is more chance of the corruption issue above.
+If files don't change on the remote outside of the control of rclone then there is no chance of corruption.
+This is the same as setting the attr_timeout option in mount.fuse.
+Filters
+Note that all the rclone filters can be used to select a subset of the files to be visible in the mount.
+systemd
+When running rclone nfsmount as a systemd service, it is possible to use Type=notify. In this case the service will enter the started state after the mountpoint has been successfully set up. Units having the rclone nfsmount service specified as a requirement will see all files and folders immediately in this mode.
+Note that systemd runs mount units without any environment variables including PATH
or HOME
. This means that tilde (~
) expansion will not work and you should provide --config
and --cache-dir
explicitly as absolute paths via rclone arguments. Since mounting requires the fusermount
program, rclone will use the fallback PATH of /bin:/usr/bin
in this scenario. Please ensure that fusermount
is present on this PATH.
+Rclone as Unix mount helper
+The core Unix program /bin/mount
normally takes the -t FSTYPE
argument then runs the /sbin/mount.FSTYPE
helper program passing it mount options as -o key=val,...
or --opt=...
. Automount (classic or systemd) behaves in a similar way.
+rclone by default expects GNU-style flags --key val
. To run it as a mount helper you should symlink rclone binary to /sbin/mount.rclone
and optionally /usr/bin/rclonefs
, e.g. ln -s /usr/bin/rclone /sbin/mount.rclone
. rclone will detect it and translate command-line arguments appropriately.
+Now you can run classic mounts like this:
+mount sftp1:subdir /mnt/data -t rclone -o vfs_cache_mode=writes,sftp_key_file=/path/to/pem
+or create systemd mount units:
+# /etc/systemd/system/mnt-data.mount
+[Unit]
+Description=Mount for /mnt/data
+[Mount]
+Type=rclone
+What=sftp1:subdir
+Where=/mnt/data
+Options=rw,_netdev,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone
+optionally accompanied by systemd automount unit
+# /etc/systemd/system/mnt-data.automount
+[Unit]
+Description=AutoMount for /mnt/data
+[Automount]
+Where=/mnt/data
+TimeoutIdleSec=600
+[Install]
+WantedBy=multi-user.target
+or add in /etc/fstab
a line like
+sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0
+or use classic Automountd. Remember to provide explicit config=...,cache-dir=...
as a workaround for mount units being run without HOME
.
+Rclone in the mount helper mode will split -o
argument(s) by comma, replace _
by -
and prepend --
to get the command-line flags. Options containing commas or spaces can be wrapped in single or double quotes. Any inner quotes inside outer quotes of the same type should be doubled.
+Mount option syntax includes a few extra options treated specially:
+
+env.NAME=VALUE
will set an environment variable for the mount process. This helps with Automountd and Systemd.mount which don't allow setting custom environment for mount helpers. Typically you will use env.HTTPS_PROXY=proxy.host:3128
or env.HOME=/root
+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
+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.
+VFS Directory Cache
+Using the --dir-cache-time
flag, you can control how long a directory should be considered up to date and not refreshed from the backend. Changes made through the VFS will appear immediately or invalidate the cache.
+--dir-cache-time duration Time to cache directory entries for (default 5m0s)
+--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)
+However, changes made directly on the cloud storage by the web interface or a different copy of rclone will only be picked up once the directory cache expires if the backend configured does not support polling for changes. If the backend supports polling, changes will be picked up within the polling interval.
+You can send a SIGHUP
signal to rclone for it to flush all directory caches, regardless of how old they are. Assuming only one rclone instance is running, you can reset the cache like this:
+kill -SIGHUP $(pidof rclone)
+If you configure rclone with a remote control then you can use rclone rc to flush the whole directory cache:
+rclone rc vfs/forget
+Or individual files or directories:
+rclone rc vfs/forget file=path/to/file dir=path/to/dir
+VFS File Buffering
+The --buffer-size
flag determines the amount of memory, that will be used to buffer data in advance.
+Each open file will try to keep the specified amount of data in memory at all times. The buffered data is bound to one open file and won't be shared.
+This flag is a upper limit for the used memory per open file. The buffer will only use memory for data that is downloaded but not not yet read. If the buffer is empty, only a small amount of memory will be used.
+The maximum memory used by rclone for buffering can be up to --buffer-size * open files
.
+VFS File Caching
+These flags control the VFS file caching options. File caching is necessary to make the VFS layer appear compatible with a normal file system. It can be disabled at the cost of some compatibility.
+For example you'll need to enable VFS caching if you want to read and write simultaneously to a file. See below for more details.
+Note that the VFS cache is separate from the cache backend and you may find that you need one or the other or both.
+--cache-dir string Directory rclone will use for caching.
+--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
+--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
+--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
+If run with -vv
rclone will print the location of the file cache. The files are stored in the user cache file area which is OS dependent but can be controlled with --cache-dir
or setting the appropriate environment variable.
+The cache has 4 different modes selected by --vfs-cache-mode
. The higher the cache mode the more compatible rclone becomes at the cost of using disk space.
+Note that files are written back to the remote only when they are closed and if they haven't been accessed for --vfs-write-back
seconds. If rclone is quit or dies with files that haven't been uploaded, these will be uploaded next time rclone is run with the same flags.
+If using --vfs-cache-max-size
or --vfs-cache-min-free-size
note that the cache may exceed these quotas for two reasons. Firstly because it is only checked every --vfs-cache-poll-interval
. Secondly because open files cannot be evicted from the cache. When --vfs-cache-max-size
or --vfs-cache-min-free-size
is exceeded, rclone will attempt to evict the least accessed files from the cache first. rclone will start with files that haven't been accessed for the longest. This cache flushing strategy is efficient and more relevant files are likely to remain cached.
+The --vfs-cache-max-age
will evict files from the cache after the set time since last access has passed. The default value of 1 hour will start evicting files from cache that haven't been accessed for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0 and will wait for 1 more hour before evicting. Specify the time with standard notation, s, m, h, d, w .
+You should not run two copies of rclone using the same VFS cache with the same or overlapping remotes if using --vfs-cache-mode > off
. This can potentially cause data corruption if you do. You can work around this by giving each rclone its own cache hierarchy with --cache-dir
. You don't need to worry about this if the remotes in use don't overlap.
+--vfs-cache-mode off
+In this mode (the default) the cache will read directly from the remote and write directly to the remote without caching anything on disk.
+This will mean some operations are not possible
+
+- Files can't be opened for both read AND write
+- Files opened for write can't be seeked
+- Existing files opened for write must have O_TRUNC set
+- Files open for read with O_TRUNC will be opened write only
+- Files open for write only will behave as if O_TRUNC was supplied
+- Open modes O_APPEND, O_TRUNC are ignored
+- If an upload fails it can't be retried
+
+--vfs-cache-mode minimal
+This is very similar to "off" except that files opened for read AND write will be buffered to disk. This means that files opened for write will be a lot more compatible, but uses the minimal disk space.
+These operations are not possible
+
+- Files opened for write only can't be seeked
+- Existing files opened for write must have O_TRUNC set
+- Files opened for write only will ignore O_APPEND, O_TRUNC
+- If an upload fails it can't be retried
+
+--vfs-cache-mode writes
+In this mode files opened for read only are still read directly from the remote, write only and read/write files are buffered to disk first.
+This mode should support all normal file system operations.
+If an upload fails it will be retried at exponentially increasing intervals up to 1 minute.
+--vfs-cache-mode full
+In this mode all reads and writes are buffered to and from disk. When data is read from the remote this is buffered to disk as well.
+In this mode the files in the cache will be sparse files and rclone will keep track of which bits of the files it has downloaded.
+So if an application only reads the starts of each file, then rclone will only buffer the start of the file. These files will appear to be their full size in the cache, but they will be sparse files with only the data that has been downloaded present in them.
+This mode should support all normal file system operations and is otherwise identical to --vfs-cache-mode
writes.
+When reading a file rclone will read --buffer-size
plus --vfs-read-ahead
bytes ahead. The --buffer-size
is buffered in memory whereas the --vfs-read-ahead
is buffered on disk.
+When using this mode it is recommended that --buffer-size
is not set too large and --vfs-read-ahead
is set large if required.
+IMPORTANT not all file systems support sparse files. In particular FAT/exFAT do not. Rclone will perform very badly if the cache directory is on a filesystem which doesn't support sparse files and it will log an ERROR message if one is detected.
+Fingerprinting
+Various parts of the VFS use fingerprinting to see if a local file copy has changed relative to a remote file. Fingerprints are made from:
+
+- size
+- modification time
+- hash
+
+where available on an object.
+On some backends some of these attributes are slow to read (they take an extra API call per object, or extra work per object).
+For example hash
is slow with the local
and sftp
backends as they have to read the entire file and hash it, and modtime
is slow with the s3
, swift
, ftp
and qinqstor
backends because they need to do an extra API call to fetch it.
+If you use the --vfs-fast-fingerprint
flag then rclone will not include the slow operations in the fingerprint. This makes the fingerprinting less accurate but much faster and will improve the opening time of cached files.
+If you are running a vfs cache over local
, s3
or swift
backends then using this flag is recommended.
+Note that if you change the value of this flag, the fingerprints of the files in the cache may be invalidated and the files will need to be downloaded again.
+VFS Chunked Reading
+When rclone reads files from a remote it reads them in chunks. This means that rather than requesting the whole file rclone reads the chunk specified. This can reduce the used download quota for some remotes by requesting only chunks from the remote that are actually read, at the cost of an increased number of requests.
+These flags control the chunking:
+--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
+--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
+Rclone will start reading a chunk of size --vfs-read-chunk-size
, and then double the size for each read. When --vfs-read-chunk-size-limit
is specified, and greater than --vfs-read-chunk-size
, the chunk size for each open file will get doubled only until the specified value is reached. If the value is "off", which is the default, the limit is disabled and the chunk size will grow indefinitely.
+With --vfs-read-chunk-size 100M
and --vfs-read-chunk-size-limit 0
the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When --vfs-read-chunk-size-limit 500M
is specified, the result would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on.
+Setting --vfs-read-chunk-size
to 0
or "off" disables chunked reading.
+
+These flags may be used to enable/disable features of the VFS for performance or other reasons. See also the chunked reading feature.
+In particular S3 and Swift benefit hugely from the --no-modtime
flag (or use --use-server-modtime
for a slightly different effect) as each read of the modification time takes a transaction.
+--no-checksum Don't compare checksums on up/download.
+--no-modtime Don't read/write the modification time (can speed things up).
+--no-seek Don't allow seeking in files.
+--read-only Only allow read-only access.
+Sometimes rclone is delivered reads or writes out of order. Rather than seeking rclone will wait a short time for the in sequence read or write to come in. These flags only come into effect when not using an on disk cache file.
+--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
+--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
+When using VFS write caching (--vfs-cache-mode
with value writes or full), the global flag --transfers
can be set to adjust the number of parallel uploads of modified files from the cache (the related global flag --checkers
has no effect on the VFS).
+--transfers int Number of file transfers to run in parallel (default 4)
+VFS Case Sensitivity
+Linux file systems are case-sensitive: two files can differ only by case, and the exact case must be used when opening a file.
+File systems in modern Windows are case-insensitive but case-preserving: although existing files can be opened using any case, the exact case used to create the file is preserved and available for programs to query. It is not allowed for two files in the same directory to differ only by case.
+Usually file systems on macOS are case-insensitive. It is possible to make macOS file systems case-sensitive but that is not the default.
+The --vfs-case-insensitive
VFS flag controls how rclone handles these two cases. If its value is "false", rclone passes file names to the remote as-is. If the flag is "true" (or appears without a value on the command line), rclone may perform a "fixup" as explained below.
+The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
+Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
+If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
+VFS Disk Options
+This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
+--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
+Alternate report of used bytes
+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
+ --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)
+ --allow-root Allow access to root user (not supported on Windows)
+ --async-read Use asynchronous reads (not supported on Windows) (default true)
+ --attr-timeout Duration Time for which file/directory attributes are cached (default 1s)
+ --daemon Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
+ --daemon-timeout Duration Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
+ --daemon-wait Duration Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
+ --debug-fuse Debug the FUSE internals - needs -v
+ --default-permissions Makes kernel enforce access control based on the file mode (not supported on Windows)
+ --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)
+ -h, --help help for nfsmount
+ --max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
+ --mount-case-insensitive Tristate Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
+ --network-mode Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
+ --nfs-cache-handle-limit int max file handles cached simultaneously (min 5) (default 1000000)
+ --no-checksum Don't compare checksums on up/download
+ --no-modtime Don't read/write the modification time (can speed things up)
+ --no-seek Don't allow seeking in files
+ --noappledouble Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
+ --noapplexattr Ignore all "com.apple.*" extended attributes (supported on OSX only)
+ -o, --option stringArray Option for libfuse/WinFsp (repeat if required)
+ --poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
+ --read-only Only allow read-only access
+ --sudo Use sudo to run the mount command as root.
+ --uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
+ --umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
+ --vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
+ --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+ --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+ --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+ --vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
+ --vfs-case-insensitive If a file name not found, find a case insensitive match
+ --vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
+ --vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
+ --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
+ --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
+ --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
+ --vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
+ --vfs-used-is-size rclone size Use the rclone size algorithm for Used size
+ --vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
+ --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
+ --volname string Set the volume name (supported on Windows and OSX only)
+ --write-back-cache Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)
+Filter Options
+Flags for filtering directory listings.
+ --delete-excluded Delete files on dest excluded from sync
+ --exclude stringArray Exclude files matching pattern
+ --exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
+ --exclude-if-present stringArray Exclude directories if filename is present
+ --files-from stringArray Read list of source-file names from file (use - to read from stdin)
+ --files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
+ -f, --filter stringArray Add a file filtering rule
+ --filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
+ --ignore-case Ignore case in filters (case insensitive)
+ --include stringArray Include files matching pattern
+ --include-from stringArray Read file include patterns from file (use - to read from stdin)
+ --max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
+ --max-depth int If set limits the recursion depth to this (default -1)
+ --max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
+ --metadata-exclude stringArray Exclude metadatas matching pattern
+ --metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
+ --metadata-filter stringArray Add a metadata filtering rule
+ --metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
+ --metadata-include stringArray Include metadatas matching pattern
+ --metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
+ --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
- rclone - Show help for rclone commands, flags and backends.
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.
@@ -3303,16 +3785,16 @@ if src is directory
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 - Show help for rclone commands, flags and backends.
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
.
@@ -3331,7 +3813,7 @@ if src is directory
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
@@ -3342,13 +3824,13 @@ if src is directory
--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 - Show help for rclone commands, flags and backends.
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
@@ -3358,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
@@ -3367,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 - Show help for rclone commands, flags and backends.
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.
@@ -3389,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:
@@ -3514,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.
@@ -3537,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
@@ -3547,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 - Show help for rclone commands, flags and backends.
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
@@ -3569,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 - Show help for rclone commands, flags and backends.
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.
@@ -3585,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
@@ -3594,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 - Show help for rclone commands, flags and backends.
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 - Show help for rclone commands, flags and backends.
- rclone serve dlna - Serve remote:path over DLNA
@@ -3623,203 +4106,14 @@ htpasswd -B htpasswd anotherUser
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
-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.
-VFS Directory Cache
-Using the --dir-cache-time
flag, you can control how long a directory should be considered up to date and not refreshed from the backend. Changes made through the VFS will appear immediately or invalidate the cache.
---dir-cache-time duration Time to cache directory entries for (default 5m0s)
---poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)
-However, changes made directly on the cloud storage by the web interface or a different copy of rclone will only be picked up once the directory cache expires if the backend configured does not support polling for changes. If the backend supports polling, changes will be picked up within the polling interval.
-You can send a SIGHUP
signal to rclone for it to flush all directory caches, regardless of how old they are. Assuming only one rclone instance is running, you can reset the cache like this:
-kill -SIGHUP $(pidof rclone)
-If you configure rclone with a remote control then you can use rclone rc to flush the whole directory cache:
-rclone rc vfs/forget
-Or individual files or directories:
-rclone rc vfs/forget file=path/to/file dir=path/to/dir
-VFS File Buffering
-The --buffer-size
flag determines the amount of memory, that will be used to buffer data in advance.
-Each open file will try to keep the specified amount of data in memory at all times. The buffered data is bound to one open file and won't be shared.
-This flag is a upper limit for the used memory per open file. The buffer will only use memory for data that is downloaded but not not yet read. If the buffer is empty, only a small amount of memory will be used.
-The maximum memory used by rclone for buffering can be up to --buffer-size * open files
.
-VFS File Caching
-These flags control the VFS file caching options. File caching is necessary to make the VFS layer appear compatible with a normal file system. It can be disabled at the cost of some compatibility.
-For example you'll need to enable VFS caching if you want to read and write simultaneously to a file. See below for more details.
-Note that the VFS cache is separate from the cache backend and you may find that you need one or the other or both.
---cache-dir string Directory rclone will use for caching.
---vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
---vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
---vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
---vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
---vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
---vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
-If run with -vv
rclone will print the location of the file cache. The files are stored in the user cache file area which is OS dependent but can be controlled with --cache-dir
or setting the appropriate environment variable.
-The cache has 4 different modes selected by --vfs-cache-mode
. The higher the cache mode the more compatible rclone becomes at the cost of using disk space.
-Note that files are written back to the remote only when they are closed and if they haven't been accessed for --vfs-write-back
seconds. If rclone is quit or dies with files that haven't been uploaded, these will be uploaded next time rclone is run with the same flags.
-If using --vfs-cache-max-size
or --vfs-cache-min-free-size
note that the cache may exceed these quotas for two reasons. Firstly because it is only checked every --vfs-cache-poll-interval
. Secondly because open files cannot be evicted from the cache. When --vfs-cache-max-size
or --vfs-cache-min-free-size
is exceeded, rclone will attempt to evict the least accessed files from the cache first. rclone will start with files that haven't been accessed for the longest. This cache flushing strategy is efficient and more relevant files are likely to remain cached.
-The --vfs-cache-max-age
will evict files from the cache after the set time since last access has passed. The default value of 1 hour will start evicting files from cache that haven't been accessed for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0 and will wait for 1 more hour before evicting. Specify the time with standard notation, s, m, h, d, w .
-You should not run two copies of rclone using the same VFS cache with the same or overlapping remotes if using --vfs-cache-mode > off
. This can potentially cause data corruption if you do. You can work around this by giving each rclone its own cache hierarchy with --cache-dir
. You don't need to worry about this if the remotes in use don't overlap.
---vfs-cache-mode off
-In this mode (the default) the cache will read directly from the remote and write directly to the remote without caching anything on disk.
-This will mean some operations are not possible
-
-- Files can't be opened for both read AND write
-- Files opened for write can't be seeked
-- Existing files opened for write must have O_TRUNC set
-- Files open for read with O_TRUNC will be opened write only
-- Files open for write only will behave as if O_TRUNC was supplied
-- Open modes O_APPEND, O_TRUNC are ignored
-- If an upload fails it can't be retried
-
---vfs-cache-mode minimal
-This is very similar to "off" except that files opened for read AND write will be buffered to disk. This means that files opened for write will be a lot more compatible, but uses the minimal disk space.
-These operations are not possible
-
-- Files opened for write only can't be seeked
-- Existing files opened for write must have O_TRUNC set
-- Files opened for write only will ignore O_APPEND, O_TRUNC
-- If an upload fails it can't be retried
-
---vfs-cache-mode writes
-In this mode files opened for read only are still read directly from the remote, write only and read/write files are buffered to disk first.
-This mode should support all normal file system operations.
-If an upload fails it will be retried at exponentially increasing intervals up to 1 minute.
---vfs-cache-mode full
-In this mode all reads and writes are buffered to and from disk. When data is read from the remote this is buffered to disk as well.
-In this mode the files in the cache will be sparse files and rclone will keep track of which bits of the files it has downloaded.
-So if an application only reads the starts of each file, then rclone will only buffer the start of the file. These files will appear to be their full size in the cache, but they will be sparse files with only the data that has been downloaded present in them.
-This mode should support all normal file system operations and is otherwise identical to --vfs-cache-mode
writes.
-When reading a file rclone will read --buffer-size
plus --vfs-read-ahead
bytes ahead. The --buffer-size
is buffered in memory whereas the --vfs-read-ahead
is buffered on disk.
-When using this mode it is recommended that --buffer-size
is not set too large and --vfs-read-ahead
is set large if required.
-IMPORTANT not all file systems support sparse files. In particular FAT/exFAT do not. Rclone will perform very badly if the cache directory is on a filesystem which doesn't support sparse files and it will log an ERROR message if one is detected.
-Fingerprinting
-Various parts of the VFS use fingerprinting to see if a local file copy has changed relative to a remote file. Fingerprints are made from:
-
-- size
-- modification time
-- hash
-
-where available on an object.
-On some backends some of these attributes are slow to read (they take an extra API call per object, or extra work per object).
-For example hash
is slow with the local
and sftp
backends as they have to read the entire file and hash it, and modtime
is slow with the s3
, swift
, ftp
and qinqstor
backends because they need to do an extra API call to fetch it.
-If you use the --vfs-fast-fingerprint
flag then rclone will not include the slow operations in the fingerprint. This makes the fingerprinting less accurate but much faster and will improve the opening time of cached files.
-If you are running a vfs cache over local
, s3
or swift
backends then using this flag is recommended.
-Note that if you change the value of this flag, the fingerprints of the files in the cache may be invalidated and the files will need to be downloaded again.
-VFS Chunked Reading
-When rclone reads files from a remote it reads them in chunks. This means that rather than requesting the whole file rclone reads the chunk specified. This can reduce the used download quota for some remotes by requesting only chunks from the remote that are actually read, at the cost of an increased number of requests.
-These flags control the chunking:
---vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
---vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
-Rclone will start reading a chunk of size --vfs-read-chunk-size
, and then double the size for each read. When --vfs-read-chunk-size-limit
is specified, and greater than --vfs-read-chunk-size
, the chunk size for each open file will get doubled only until the specified value is reached. If the value is "off", which is the default, the limit is disabled and the chunk size will grow indefinitely.
-With --vfs-read-chunk-size 100M
and --vfs-read-chunk-size-limit 0
the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When --vfs-read-chunk-size-limit 500M
is specified, the result would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on.
-Setting --vfs-read-chunk-size
to 0
or "off" disables chunked reading.
-
-These flags may be used to enable/disable features of the VFS for performance or other reasons. See also the chunked reading feature.
-In particular S3 and Swift benefit hugely from the --no-modtime
flag (or use --use-server-modtime
for a slightly different effect) as each read of the modification time takes a transaction.
---no-checksum Don't compare checksums on up/download.
---no-modtime Don't read/write the modification time (can speed things up).
---no-seek Don't allow seeking in files.
---read-only Only allow read-only access.
-Sometimes rclone is delivered reads or writes out of order. Rather than seeking rclone will wait a short time for the in sequence read or write to come in. These flags only come into effect when not using an on disk cache file.
---vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
---vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
-When using VFS write caching (--vfs-cache-mode
with value writes or full), the global flag --transfers
can be set to adjust the number of parallel uploads of modified files from the cache (the related global flag --checkers
has no effect on the VFS).
---transfers int Number of file transfers to run in parallel (default 4)
-VFS Case Sensitivity
-Linux file systems are case-sensitive: two files can differ only by case, and the exact case must be used when opening a file.
-File systems in modern Windows are case-insensitive but case-preserving: although existing files can be opened using any case, the exact case used to create the file is preserved and available for programs to query. It is not allowed for two files in the same directory to differ only by case.
-Usually file systems on macOS are case-insensitive. It is possible to make macOS file systems case-sensitive but that is not the default.
-The --vfs-case-insensitive
VFS flag controls how rclone handles these two cases. If its value is "false", rclone passes file names to the remote as-is. If the flag is "true" (or appears without a value on the command line), rclone may perform a "fixup" as explained below.
-The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
-Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
-If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
-VFS Disk Options
-This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
---vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
-Alternate report of used bytes
-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
- --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)
- --dir-perms FileMode Directory permissions (default 0777)
- --file-perms FileMode File permissions (default 0666)
- --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
- -h, --help help for dlna
- --interface stringArray The interface to use for SSDP (repeat as necessary)
- --log-trace Enable trace logging of SOAP traffic
- --name string Name of DLNA server
- --no-checksum Don't compare checksums on up/download
- --no-modtime Don't read/write the modification time (can speed things up)
- --no-seek Don't allow seeking in files
- --poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
- --read-only Only allow read-only access
- --uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
- --umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
- --vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
- --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
- --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
- --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
- --vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
- --vfs-case-insensitive If a file name not found, find a case insensitive match
- --vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
- --vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
- --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
- --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
- --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
- --vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
- --vfs-used-is-size rclone size Use the rclone size algorithm for Used size
- --vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
- --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
-Filter Options
-Flags for filtering directory listings.
- --delete-excluded Delete files on dest excluded from sync
- --exclude stringArray Exclude files matching pattern
- --exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
- --exclude-if-present stringArray Exclude directories if filename is present
- --files-from stringArray Read list of source-file names from file (use - to read from stdin)
- --files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
- -f, --filter stringArray Add a file filtering rule
- --filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
- --ignore-case Ignore case in filters (case insensitive)
- --include stringArray Include files matching pattern
- --include-from stringArray Read file include patterns from file (use - to read from stdin)
- --max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
- --max-depth int If set limits the recursion depth to this (default -1)
- --max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
- --metadata-exclude stringArray Exclude metadatas matching pattern
- --metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
- --metadata-filter stringArray Add a metadata filtering rule
- --metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
- --metadata-include stringArray Include metadatas matching pattern
- --metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
- --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
-
-rclone serve docker
-Serve any remote on docker's volume plugin API.
-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
+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.
@@ -3930,49 +4224,34 @@ htpasswd -B htpasswd anotherUser
The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
VFS Disk Options
This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
Alternate report of used bytes
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
- --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)
- --async-read Use asynchronous reads (not supported on Windows) (default true)
- --attr-timeout Duration Time for which file/directory attributes are cached (default 1s)
- --base-dir string Base directory for volumes (default "/var/lib/docker-volumes/rclone")
- --daemon Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
- --daemon-timeout Duration Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
- --daemon-wait Duration Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
- --debug-fuse Debug the FUSE internals - needs -v
- --default-permissions Makes kernel enforce access control based on the file mode (not supported on Windows)
- --devname string Set the device name - default is remote:path
+rclone serve dlna remote:path [flags]
+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)
--dir-perms FileMode Directory permissions (default 0777)
--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)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
- -h, --help help for docker
- --max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
- --mount-case-insensitive Tristate Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
- --network-mode Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
+ -h, --help help for dlna
+ --interface stringArray The interface to use for SSDP (repeat as necessary)
+ --log-trace Enable trace logging of SOAP traffic
+ --name string Name of DLNA server
--no-checksum Don't compare checksums on up/download
--no-modtime Don't read/write the modification time (can speed things up)
--no-seek Don't allow seeking in files
- --no-spec Do not write spec file
- --noappledouble Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
- --noapplexattr Ignore all "com.apple.*" extended attributes (supported on OSX only)
- -o, --option stringArray Option for libfuse/WinFsp (repeat if required)
--poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
--read-only Only allow read-only access
- --socket-addr string Address <host:port> or absolute path (default: /run/docker/plugins/rclone.sock)
- --socket-gid int GID for unix socket (default: current process GID) (default 1000)
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -3985,12 +4264,10 @@ htpasswd -B htpasswd anotherUser
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
- --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
- --volname string Set the volume name (supported on Windows and OSX only)
- --write-back-cache Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)
+ --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
Filter Options
Flags for filtering directory listings.
--delete-excluded Delete files on dest excluded from sync
@@ -4016,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 ftp
-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.
-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
+rclone serve docker
+Serve any remote on docker's volume plugin API.
+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
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.
@@ -4140,16 +4418,233 @@ htpasswd -B htpasswd anotherUser
The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
VFS Disk Options
This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
Alternate report of used bytes
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
+ --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)
+ --async-read Use asynchronous reads (not supported on Windows) (default true)
+ --attr-timeout Duration Time for which file/directory attributes are cached (default 1s)
+ --base-dir string Base directory for volumes (default "/var/lib/docker-volumes/rclone")
+ --daemon Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
+ --daemon-timeout Duration Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
+ --daemon-wait Duration Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
+ --debug-fuse Debug the FUSE internals - needs -v
+ --default-permissions Makes kernel enforce access control based on the file mode (not supported on Windows)
+ --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)
+ --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
+ -h, --help help for docker
+ --max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
+ --mount-case-insensitive Tristate Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
+ --network-mode Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
+ --no-checksum Don't compare checksums on up/download
+ --no-modtime Don't read/write the modification time (can speed things up)
+ --no-seek Don't allow seeking in files
+ --no-spec Do not write spec file
+ --noappledouble Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
+ --noapplexattr Ignore all "com.apple.*" extended attributes (supported on OSX only)
+ -o, --option stringArray Option for libfuse/WinFsp (repeat if required)
+ --poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
+ --read-only Only allow read-only access
+ --socket-addr string Address <host:port> or absolute path (default: /run/docker/plugins/rclone.sock)
+ --socket-gid int GID for unix socket (default: current process GID) (default 1000)
+ --uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
+ --umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
+ --vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
+ --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+ --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+ --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+ --vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
+ --vfs-case-insensitive If a file name not found, find a case insensitive match
+ --vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
+ --vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
+ --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
+ --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
+ --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
+ --vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
+ --vfs-used-is-size rclone size Use the rclone size algorithm for Used size
+ --vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
+ --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
+ --volname string Set the volume name (supported on Windows and OSX only)
+ --write-back-cache Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)
+Filter Options
+Flags for filtering directory listings.
+ --delete-excluded Delete files on dest excluded from sync
+ --exclude stringArray Exclude files matching pattern
+ --exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
+ --exclude-if-present stringArray Exclude directories if filename is present
+ --files-from stringArray Read list of source-file names from file (use - to read from stdin)
+ --files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
+ -f, --filter stringArray Add a file filtering rule
+ --filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
+ --ignore-case Ignore case in filters (case insensitive)
+ --include stringArray Include files matching pattern
+ --include-from stringArray Read file include patterns from file (use - to read from stdin)
+ --max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
+ --max-depth int If set limits the recursion depth to this (default -1)
+ --max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
+ --metadata-exclude stringArray Exclude metadatas matching pattern
+ --metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
+ --metadata-filter stringArray Add a metadata filtering rule
+ --metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
+ --metadata-include stringArray Include metadatas matching pattern
+ --metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
+ --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
+
+rclone serve ftp
+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.
+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
+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.
+VFS Directory Cache
+Using the --dir-cache-time
flag, you can control how long a directory should be considered up to date and not refreshed from the backend. Changes made through the VFS will appear immediately or invalidate the cache.
+--dir-cache-time duration Time to cache directory entries for (default 5m0s)
+--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)
+However, changes made directly on the cloud storage by the web interface or a different copy of rclone will only be picked up once the directory cache expires if the backend configured does not support polling for changes. If the backend supports polling, changes will be picked up within the polling interval.
+You can send a SIGHUP
signal to rclone for it to flush all directory caches, regardless of how old they are. Assuming only one rclone instance is running, you can reset the cache like this:
+kill -SIGHUP $(pidof rclone)
+If you configure rclone with a remote control then you can use rclone rc to flush the whole directory cache:
+rclone rc vfs/forget
+Or individual files or directories:
+rclone rc vfs/forget file=path/to/file dir=path/to/dir
+VFS File Buffering
+The --buffer-size
flag determines the amount of memory, that will be used to buffer data in advance.
+Each open file will try to keep the specified amount of data in memory at all times. The buffered data is bound to one open file and won't be shared.
+This flag is a upper limit for the used memory per open file. The buffer will only use memory for data that is downloaded but not not yet read. If the buffer is empty, only a small amount of memory will be used.
+The maximum memory used by rclone for buffering can be up to --buffer-size * open files
.
+VFS File Caching
+These flags control the VFS file caching options. File caching is necessary to make the VFS layer appear compatible with a normal file system. It can be disabled at the cost of some compatibility.
+For example you'll need to enable VFS caching if you want to read and write simultaneously to a file. See below for more details.
+Note that the VFS cache is separate from the cache backend and you may find that you need one or the other or both.
+--cache-dir string Directory rclone will use for caching.
+--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
+--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
+--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
+If run with -vv
rclone will print the location of the file cache. The files are stored in the user cache file area which is OS dependent but can be controlled with --cache-dir
or setting the appropriate environment variable.
+The cache has 4 different modes selected by --vfs-cache-mode
. The higher the cache mode the more compatible rclone becomes at the cost of using disk space.
+Note that files are written back to the remote only when they are closed and if they haven't been accessed for --vfs-write-back
seconds. If rclone is quit or dies with files that haven't been uploaded, these will be uploaded next time rclone is run with the same flags.
+If using --vfs-cache-max-size
or --vfs-cache-min-free-size
note that the cache may exceed these quotas for two reasons. Firstly because it is only checked every --vfs-cache-poll-interval
. Secondly because open files cannot be evicted from the cache. When --vfs-cache-max-size
or --vfs-cache-min-free-size
is exceeded, rclone will attempt to evict the least accessed files from the cache first. rclone will start with files that haven't been accessed for the longest. This cache flushing strategy is efficient and more relevant files are likely to remain cached.
+The --vfs-cache-max-age
will evict files from the cache after the set time since last access has passed. The default value of 1 hour will start evicting files from cache that haven't been accessed for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0 and will wait for 1 more hour before evicting. Specify the time with standard notation, s, m, h, d, w .
+You should not run two copies of rclone using the same VFS cache with the same or overlapping remotes if using --vfs-cache-mode > off
. This can potentially cause data corruption if you do. You can work around this by giving each rclone its own cache hierarchy with --cache-dir
. You don't need to worry about this if the remotes in use don't overlap.
+--vfs-cache-mode off
+In this mode (the default) the cache will read directly from the remote and write directly to the remote without caching anything on disk.
+This will mean some operations are not possible
+
+- Files can't be opened for both read AND write
+- Files opened for write can't be seeked
+- Existing files opened for write must have O_TRUNC set
+- Files open for read with O_TRUNC will be opened write only
+- Files open for write only will behave as if O_TRUNC was supplied
+- Open modes O_APPEND, O_TRUNC are ignored
+- If an upload fails it can't be retried
+
+--vfs-cache-mode minimal
+This is very similar to "off" except that files opened for read AND write will be buffered to disk. This means that files opened for write will be a lot more compatible, but uses the minimal disk space.
+These operations are not possible
+
+- Files opened for write only can't be seeked
+- Existing files opened for write must have O_TRUNC set
+- Files opened for write only will ignore O_APPEND, O_TRUNC
+- If an upload fails it can't be retried
+
+--vfs-cache-mode writes
+In this mode files opened for read only are still read directly from the remote, write only and read/write files are buffered to disk first.
+This mode should support all normal file system operations.
+If an upload fails it will be retried at exponentially increasing intervals up to 1 minute.
+--vfs-cache-mode full
+In this mode all reads and writes are buffered to and from disk. When data is read from the remote this is buffered to disk as well.
+In this mode the files in the cache will be sparse files and rclone will keep track of which bits of the files it has downloaded.
+So if an application only reads the starts of each file, then rclone will only buffer the start of the file. These files will appear to be their full size in the cache, but they will be sparse files with only the data that has been downloaded present in them.
+This mode should support all normal file system operations and is otherwise identical to --vfs-cache-mode
writes.
+When reading a file rclone will read --buffer-size
plus --vfs-read-ahead
bytes ahead. The --buffer-size
is buffered in memory whereas the --vfs-read-ahead
is buffered on disk.
+When using this mode it is recommended that --buffer-size
is not set too large and --vfs-read-ahead
is set large if required.
+IMPORTANT not all file systems support sparse files. In particular FAT/exFAT do not. Rclone will perform very badly if the cache directory is on a filesystem which doesn't support sparse files and it will log an ERROR message if one is detected.
+Fingerprinting
+Various parts of the VFS use fingerprinting to see if a local file copy has changed relative to a remote file. Fingerprints are made from:
+
+- size
+- modification time
+- hash
+
+where available on an object.
+On some backends some of these attributes are slow to read (they take an extra API call per object, or extra work per object).
+For example hash
is slow with the local
and sftp
backends as they have to read the entire file and hash it, and modtime
is slow with the s3
, swift
, ftp
and qinqstor
backends because they need to do an extra API call to fetch it.
+If you use the --vfs-fast-fingerprint
flag then rclone will not include the slow operations in the fingerprint. This makes the fingerprinting less accurate but much faster and will improve the opening time of cached files.
+If you are running a vfs cache over local
, s3
or swift
backends then using this flag is recommended.
+Note that if you change the value of this flag, the fingerprints of the files in the cache may be invalidated and the files will need to be downloaded again.
+VFS Chunked Reading
+When rclone reads files from a remote it reads them in chunks. This means that rather than requesting the whole file rclone reads the chunk specified. This can reduce the used download quota for some remotes by requesting only chunks from the remote that are actually read, at the cost of an increased number of requests.
+These flags control the chunking:
+--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
+--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
+Rclone will start reading a chunk of size --vfs-read-chunk-size
, and then double the size for each read. When --vfs-read-chunk-size-limit
is specified, and greater than --vfs-read-chunk-size
, the chunk size for each open file will get doubled only until the specified value is reached. If the value is "off", which is the default, the limit is disabled and the chunk size will grow indefinitely.
+With --vfs-read-chunk-size 100M
and --vfs-read-chunk-size-limit 0
the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When --vfs-read-chunk-size-limit 500M
is specified, the result would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on.
+Setting --vfs-read-chunk-size
to 0
or "off" disables chunked reading.
+
+These flags may be used to enable/disable features of the VFS for performance or other reasons. See also the chunked reading feature.
+In particular S3 and Swift benefit hugely from the --no-modtime
flag (or use --use-server-modtime
for a slightly different effect) as each read of the modification time takes a transaction.
+--no-checksum Don't compare checksums on up/download.
+--no-modtime Don't read/write the modification time (can speed things up).
+--no-seek Don't allow seeking in files.
+--read-only Only allow read-only access.
+Sometimes rclone is delivered reads or writes out of order. Rather than seeking rclone will wait a short time for the in sequence read or write to come in. These flags only come into effect when not using an on disk cache file.
+--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
+--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
+When using VFS write caching (--vfs-cache-mode
with value writes or full), the global flag --transfers
can be set to adjust the number of parallel uploads of modified files from the cache (the related global flag --checkers
has no effect on the VFS).
+--transfers int Number of file transfers to run in parallel (default 4)
+VFS Case Sensitivity
+Linux file systems are case-sensitive: two files can differ only by case, and the exact case must be used when opening a file.
+File systems in modern Windows are case-insensitive but case-preserving: although existing files can be opened using any case, the exact case used to create the file is preserved and available for programs to query. It is not allowed for two files in the same directory to differ only by case.
+Usually file systems on macOS are case-insensitive. It is possible to make macOS file systems case-sensitive but that is not the default.
+The --vfs-case-insensitive
VFS flag controls how rclone handles these two cases. If its value is "false", rclone passes file names to the remote as-is. If the flag is "true" (or appears without a value on the command line), rclone may perform a "fixup" as explained below.
+The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
+Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
+If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
+VFS Disk Options
+This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
+--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
+Alternate report of used bytes
+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.
Auth Proxy
If you supply the parameter --auth-proxy /path/to/program
then rclone will use that program to generate backends on the fly which then are used to authenticate incoming requests. This uses a simple JSON based protocol with input on STDIN and output on STDOUT.
PLEASE NOTE: --auth-proxy
and --authorized-keys
cannot be used together, if --auth-proxy
is set the authorized keys option will be ignored.
-There is an example program bin/test_proxy.py in the rclone source code.
+There is an example program bin/test_proxy.py in the rclone source code.
The program's job is to take a user
and pass
on the input and turn those into the config for a backend on STDOUT in JSON format. This config will have any default parameters for the backend added, but it won't use configuration from environment variables or command line options - it is the job of the proxy program to make a complete config.
This config generated must have this extra parameter - _root
- root to use for the backend
And it may have this parameter - _obscure
- comma separated strings for parameters to obscure
@@ -4177,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)
@@ -4198,6 +4693,7 @@ htpasswd -B htpasswd anotherUser
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication (default "anonymous")
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -4210,11 +4706,11 @@ htpasswd -B htpasswd anotherUser
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
-Filter Options
+Filter Options
Flags for filtering directory listings.
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
@@ -4239,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.
@@ -4261,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:
@@ -4384,244 +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
-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.
-VFS Directory Cache
-Using the --dir-cache-time
flag, you can control how long a directory should be considered up to date and not refreshed from the backend. Changes made through the VFS will appear immediately or invalidate the cache.
---dir-cache-time duration Time to cache directory entries for (default 5m0s)
---poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)
-However, changes made directly on the cloud storage by the web interface or a different copy of rclone will only be picked up once the directory cache expires if the backend configured does not support polling for changes. If the backend supports polling, changes will be picked up within the polling interval.
-You can send a SIGHUP
signal to rclone for it to flush all directory caches, regardless of how old they are. Assuming only one rclone instance is running, you can reset the cache like this:
-kill -SIGHUP $(pidof rclone)
-If you configure rclone with a remote control then you can use rclone rc to flush the whole directory cache:
-rclone rc vfs/forget
-Or individual files or directories:
-rclone rc vfs/forget file=path/to/file dir=path/to/dir
-VFS File Buffering
-The --buffer-size
flag determines the amount of memory, that will be used to buffer data in advance.
-Each open file will try to keep the specified amount of data in memory at all times. The buffered data is bound to one open file and won't be shared.
-This flag is a upper limit for the used memory per open file. The buffer will only use memory for data that is downloaded but not not yet read. If the buffer is empty, only a small amount of memory will be used.
-The maximum memory used by rclone for buffering can be up to --buffer-size * open files
.
-VFS File Caching
-These flags control the VFS file caching options. File caching is necessary to make the VFS layer appear compatible with a normal file system. It can be disabled at the cost of some compatibility.
-For example you'll need to enable VFS caching if you want to read and write simultaneously to a file. See below for more details.
-Note that the VFS cache is separate from the cache backend and you may find that you need one or the other or both.
---cache-dir string Directory rclone will use for caching.
---vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
---vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
---vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
---vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
---vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
---vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
-If run with -vv
rclone will print the location of the file cache. The files are stored in the user cache file area which is OS dependent but can be controlled with --cache-dir
or setting the appropriate environment variable.
-The cache has 4 different modes selected by --vfs-cache-mode
. The higher the cache mode the more compatible rclone becomes at the cost of using disk space.
-Note that files are written back to the remote only when they are closed and if they haven't been accessed for --vfs-write-back
seconds. If rclone is quit or dies with files that haven't been uploaded, these will be uploaded next time rclone is run with the same flags.
-If using --vfs-cache-max-size
or --vfs-cache-min-free-size
note that the cache may exceed these quotas for two reasons. Firstly because it is only checked every --vfs-cache-poll-interval
. Secondly because open files cannot be evicted from the cache. When --vfs-cache-max-size
or --vfs-cache-min-free-size
is exceeded, rclone will attempt to evict the least accessed files from the cache first. rclone will start with files that haven't been accessed for the longest. This cache flushing strategy is efficient and more relevant files are likely to remain cached.
-The --vfs-cache-max-age
will evict files from the cache after the set time since last access has passed. The default value of 1 hour will start evicting files from cache that haven't been accessed for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0 and will wait for 1 more hour before evicting. Specify the time with standard notation, s, m, h, d, w .
-You should not run two copies of rclone using the same VFS cache with the same or overlapping remotes if using --vfs-cache-mode > off
. This can potentially cause data corruption if you do. You can work around this by giving each rclone its own cache hierarchy with --cache-dir
. You don't need to worry about this if the remotes in use don't overlap.
---vfs-cache-mode off
-In this mode (the default) the cache will read directly from the remote and write directly to the remote without caching anything on disk.
-This will mean some operations are not possible
-
-- Files can't be opened for both read AND write
-- Files opened for write can't be seeked
-- Existing files opened for write must have O_TRUNC set
-- Files open for read with O_TRUNC will be opened write only
-- Files open for write only will behave as if O_TRUNC was supplied
-- Open modes O_APPEND, O_TRUNC are ignored
-- If an upload fails it can't be retried
-
---vfs-cache-mode minimal
-This is very similar to "off" except that files opened for read AND write will be buffered to disk. This means that files opened for write will be a lot more compatible, but uses the minimal disk space.
-These operations are not possible
-
-- Files opened for write only can't be seeked
-- Existing files opened for write must have O_TRUNC set
-- Files opened for write only will ignore O_APPEND, O_TRUNC
-- If an upload fails it can't be retried
-
---vfs-cache-mode writes
-In this mode files opened for read only are still read directly from the remote, write only and read/write files are buffered to disk first.
-This mode should support all normal file system operations.
-If an upload fails it will be retried at exponentially increasing intervals up to 1 minute.
---vfs-cache-mode full
-In this mode all reads and writes are buffered to and from disk. When data is read from the remote this is buffered to disk as well.
-In this mode the files in the cache will be sparse files and rclone will keep track of which bits of the files it has downloaded.
-So if an application only reads the starts of each file, then rclone will only buffer the start of the file. These files will appear to be their full size in the cache, but they will be sparse files with only the data that has been downloaded present in them.
-This mode should support all normal file system operations and is otherwise identical to --vfs-cache-mode
writes.
-When reading a file rclone will read --buffer-size
plus --vfs-read-ahead
bytes ahead. The --buffer-size
is buffered in memory whereas the --vfs-read-ahead
is buffered on disk.
-When using this mode it is recommended that --buffer-size
is not set too large and --vfs-read-ahead
is set large if required.
-IMPORTANT not all file systems support sparse files. In particular FAT/exFAT do not. Rclone will perform very badly if the cache directory is on a filesystem which doesn't support sparse files and it will log an ERROR message if one is detected.
-Fingerprinting
-Various parts of the VFS use fingerprinting to see if a local file copy has changed relative to a remote file. Fingerprints are made from:
-
-- size
-- modification time
-- hash
-
-where available on an object.
-On some backends some of these attributes are slow to read (they take an extra API call per object, or extra work per object).
-For example hash
is slow with the local
and sftp
backends as they have to read the entire file and hash it, and modtime
is slow with the s3
, swift
, ftp
and qinqstor
backends because they need to do an extra API call to fetch it.
-If you use the --vfs-fast-fingerprint
flag then rclone will not include the slow operations in the fingerprint. This makes the fingerprinting less accurate but much faster and will improve the opening time of cached files.
-If you are running a vfs cache over local
, s3
or swift
backends then using this flag is recommended.
-Note that if you change the value of this flag, the fingerprints of the files in the cache may be invalidated and the files will need to be downloaded again.
-VFS Chunked Reading
-When rclone reads files from a remote it reads them in chunks. This means that rather than requesting the whole file rclone reads the chunk specified. This can reduce the used download quota for some remotes by requesting only chunks from the remote that are actually read, at the cost of an increased number of requests.
-These flags control the chunking:
---vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
---vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
-Rclone will start reading a chunk of size --vfs-read-chunk-size
, and then double the size for each read. When --vfs-read-chunk-size-limit
is specified, and greater than --vfs-read-chunk-size
, the chunk size for each open file will get doubled only until the specified value is reached. If the value is "off", which is the default, the limit is disabled and the chunk size will grow indefinitely.
-With --vfs-read-chunk-size 100M
and --vfs-read-chunk-size-limit 0
the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When --vfs-read-chunk-size-limit 500M
is specified, the result would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on.
-Setting --vfs-read-chunk-size
to 0
or "off" disables chunked reading.
-
-These flags may be used to enable/disable features of the VFS for performance or other reasons. See also the chunked reading feature.
-In particular S3 and Swift benefit hugely from the --no-modtime
flag (or use --use-server-modtime
for a slightly different effect) as each read of the modification time takes a transaction.
---no-checksum Don't compare checksums on up/download.
---no-modtime Don't read/write the modification time (can speed things up).
---no-seek Don't allow seeking in files.
---read-only Only allow read-only access.
-Sometimes rclone is delivered reads or writes out of order. Rather than seeking rclone will wait a short time for the in sequence read or write to come in. These flags only come into effect when not using an on disk cache file.
---vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
---vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
-When using VFS write caching (--vfs-cache-mode
with value writes or full), the global flag --transfers
can be set to adjust the number of parallel uploads of modified files from the cache (the related global flag --checkers
has no effect on the VFS).
---transfers int Number of file transfers to run in parallel (default 4)
-VFS Case Sensitivity
-Linux file systems are case-sensitive: two files can differ only by case, and the exact case must be used when opening a file.
-File systems in modern Windows are case-insensitive but case-preserving: although existing files can be opened using any case, the exact case used to create the file is preserved and available for programs to query. It is not allowed for two files in the same directory to differ only by case.
-Usually file systems on macOS are case-insensitive. It is possible to make macOS file systems case-sensitive but that is not the default.
-The --vfs-case-insensitive
VFS flag controls how rclone handles these two cases. If its value is "false", rclone passes file names to the remote as-is. If the flag is "true" (or appears without a value on the command line), rclone may perform a "fixup" as explained below.
-The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
-Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
-If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
-VFS Disk Options
-This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
---vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
-Alternate report of used bytes
-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.
-Auth Proxy
-If you supply the parameter --auth-proxy /path/to/program
then rclone will use that program to generate backends on the fly which then are used to authenticate incoming requests. This uses a simple JSON based protocol with input on STDIN and output on STDOUT.
-PLEASE NOTE: --auth-proxy
and --authorized-keys
cannot be used together, if --auth-proxy
is set the authorized keys option will be ignored.
-There is an example program bin/test_proxy.py in the rclone source code.
-The program's job is to take a user
and pass
on the input and turn those into the config for a backend on STDOUT in JSON format. This config will have any default parameters for the backend added, but it won't use configuration from environment variables or command line options - it is the job of the proxy program to make a complete config.
-This config generated must have this extra parameter - _root
- root to use for the backend
-And it may have this parameter - _obscure
- comma separated strings for parameters to obscure
-If password authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
-{
- "user": "me",
- "pass": "mypassword"
-}
-If public-key authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
-{
- "user": "me",
- "public_key": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf"
-}
-And as an example return this on STDOUT
-{
- "type": "sftp",
- "_root": "",
- "_obscure": "pass",
- "user": "me",
- "pass": "mypassword",
- "host": "sftp.example.com"
-}
-This would mean that an SFTP backend would be created on the fly for the user
and pass
/public_key
returned in the output to the host given. Note that since _obscure
is set to pass
, rclone will obscure the pass
parameter before creating the backend (which is required for sftp backends).
-The program can manipulate the supplied user
in any way, for example to make proxy to many different sftp backends, you could make the user
be user@example.com
and then set the host
to example.com
in the output and the user to user
. For security you'd probably want to restrict the host
to a limited list.
-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
- --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
- --baseurl string Prefix for URLs - leave blank for root
- --cert string TLS PEM key (concatenation of certificate and CA certificate)
- --client-ca string Client certificate authority to verify clients with
- --dir-cache-time Duration Time to cache directory entries for (default 5m0s)
- --dir-perms FileMode Directory permissions (default 0777)
- --file-perms FileMode File permissions (default 0666)
- --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
- -h, --help help for http
- --htpasswd string A htpasswd file - if not provided no authentication is done
- --key string TLS PEM Private key
- --max-header-bytes int Maximum size of request header (default 4096)
- --min-tls-version string Minimum TLS version that is acceptable (default "tls1.0")
- --no-checksum Don't compare checksums on up/download
- --no-modtime Don't read/write the modification time (can speed things up)
- --no-seek Don't allow seeking in files
- --pass string Password for authentication
- --poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
- --read-only Only allow read-only access
- --realm string Realm for authentication
- --salt string Password hashing salt (default "dlPL2MqE")
- --server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
- --server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
- --template string User-specified template
- --uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
- --umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
- --user string User name for authentication
- --vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
- --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
- --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
- --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
- --vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
- --vfs-case-insensitive If a file name not found, find a case insensitive match
- --vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
- --vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
- --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
- --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
- --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
- --vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
- --vfs-used-is-size rclone size Use the rclone size algorithm for Used size
- --vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
- --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
-Filter Options
-Flags for filtering directory listings.
- --delete-excluded Delete files on dest excluded from sync
- --exclude stringArray Exclude files matching pattern
- --exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
- --exclude-if-present stringArray Exclude directories if filename is present
- --files-from stringArray Read list of source-file names from file (use - to read from stdin)
- --files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
- -f, --filter stringArray Add a file filtering rule
- --filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
- --ignore-case Ignore case in filters (case insensitive)
- --include stringArray Include files matching pattern
- --include-from stringArray Read file include patterns from file (use - to read from stdin)
- --max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
- --max-depth int If set limits the recursion depth to this (default -1)
- --max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
- --metadata-exclude stringArray Exclude metadatas matching pattern
- --metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
- --metadata-filter stringArray Add a metadata filtering rule
- --metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
- --metadata-include stringArray Include metadatas matching pattern
- --metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
- --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
-
-rclone serve nfs
-Serve the remote as an NFS mount
-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.
-Modifying files through NFS protocol requires VFS caching. Usually you will need to specify --vfs-cache-mode
in order to be able to write to the mountpoint (full is recommended). If you don't specify VFS cache mode, the mount will be read-only.
-To serve NFS over the network use following command:
-rclone serve nfs remote: --addr 0.0.0.0:$PORT --vfs-cache-mode=full
-We specify a specific port that we can use in the mount command:
-To mount the server under Linux/macOS, use the following command:
-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
+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.
@@ -4732,27 +4992,76 @@ htpasswd -B htpasswd anotherUser
The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
VFS Disk Options
This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
Alternate report of used bytes
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
- --addr string IPaddress:Port or :Port to bind server to
+Auth Proxy
+If you supply the parameter --auth-proxy /path/to/program
then rclone will use that program to generate backends on the fly which then are used to authenticate incoming requests. This uses a simple JSON based protocol with input on STDIN and output on STDOUT.
+PLEASE NOTE: --auth-proxy
and --authorized-keys
cannot be used together, if --auth-proxy
is set the authorized keys option will be ignored.
+There is an example program bin/test_proxy.py in the rclone source code.
+The program's job is to take a user
and pass
on the input and turn those into the config for a backend on STDOUT in JSON format. This config will have any default parameters for the backend added, but it won't use configuration from environment variables or command line options - it is the job of the proxy program to make a complete config.
+This config generated must have this extra parameter - _root
- root to use for the backend
+And it may have this parameter - _obscure
- comma separated strings for parameters to obscure
+If password authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
+{
+ "user": "me",
+ "pass": "mypassword"
+}
+If public-key authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
+{
+ "user": "me",
+ "public_key": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf"
+}
+And as an example return this on STDOUT
+{
+ "type": "sftp",
+ "_root": "",
+ "_obscure": "pass",
+ "user": "me",
+ "pass": "mypassword",
+ "host": "sftp.example.com"
+}
+This would mean that an SFTP backend would be created on the fly for the user
and pass
/public_key
returned in the output to the host given. Note that since _obscure
is set to pass
, rclone will obscure the pass
parameter before creating the backend (which is required for sftp backends).
+The program can manipulate the supplied user
in any way, for example to make proxy to many different sftp backends, you could make the user
be user@example.com
and then set the host
to example.com
in the output and the user to user
. For security you'd probably want to restrict the host
to a limited list.
+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
+ --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
+ --baseurl string Prefix for URLs - leave blank for root
+ --cert string TLS PEM key (concatenation of certificate and CA certificate)
+ --client-ca string Client certificate authority to verify clients with
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 0777)
--file-perms FileMode File permissions (default 0666)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
- -h, --help help for nfs
+ -h, --help help for http
+ --htpasswd string A htpasswd file - if not provided no authentication is done
+ --key string TLS PEM Private key
+ --max-header-bytes int Maximum size of request header (default 4096)
+ --min-tls-version string Minimum TLS version that is acceptable (default "tls1.0")
--no-checksum Don't compare checksums on up/download
--no-modtime Don't read/write the modification time (can speed things up)
--no-seek Don't allow seeking in files
+ --pass string Password for authentication
--poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
--read-only Only allow read-only access
+ --realm string Realm for authentication
+ --salt string Password hashing salt (default "dlPL2MqE")
+ --server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
+ --server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
+ --template string User-specified template
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -4765,7 +5074,7 @@ htpasswd -B htpasswd anotherUser
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -4794,174 +5103,25 @@ 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
-
-rclone serve restic
-Serve the remote for restic's REST API.
-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.
---bwlimit
will be respected for file transfers. Use --stats
to control the stats printing.
-Setting up rclone for use by restic
-First set up a remote for your chosen cloud provider.
-Once you have set up the remote, check it is working with, for example "rclone lsd remote:". You may have called the remote something other than "remote:" - just substitute whatever you called it in the following instructions.
-Now start the rclone restic server
-rclone serve restic -v remote:backup
-Where you can replace "backup" in the above by whatever path in the remote you wish to use.
-By default this will serve on "localhost:8080" you can change this with use of the --addr
flag.
-You might wish to start this server on boot.
-Adding --cache-objects=false
will cause rclone to stop caching objects returned from the List call. Caching is normally desirable as it speeds up downloading objects, saves transactions and uses very little memory.
-Setting up restic to use rclone
-Now you can follow the restic instructions on setting up restic.
-Note that you will need restic 0.8.2 or later to interoperate with rclone.
-For the example above you will want to use "http://localhost:8080/" as the URL for the REST server.
-For example:
-$ export RESTIC_REPOSITORY=rest:http://localhost:8080/
-$ export RESTIC_PASSWORD=yourpassword
-$ restic init
-created restic backend 8b1a4b56ae at rest:http://localhost:8080/
-
-Please note that knowledge of your password is required to access
-the repository. Losing your password means that your data is
-irrecoverably lost.
-$ restic backup /path/to/files/to/backup
-scan [/path/to/files/to/backup]
-scanned 189 directories, 312 files in 0:00
-[0:00] 100.00% 38.128 MiB / 38.128 MiB 501 / 501 items 0 errors ETA 0:00
-duration: 0:00
-snapshot 45c8fdd8 saved
-Multiple repositories
-Note that you can use the endpoint to host multiple repositories. Do this by adding a directory name or path after the URL. Note that these must end with /. Eg
-$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user1repo/
-# backup user1 stuff
-$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user2repo/
-# backup user2 stuff
-Private repositories
-The--private-repos
flag can be used to limit users to repositories starting with a path of /<username>/
.
-Server options
-Use --addr
to specify which IP address and port the server should listen on, eg --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.
-You can use a unix socket by setting the url to unix:///path/to/socket
or just by using an absolute path name. Note that unix sockets bypass the authentication - this is expected to be done with file system permissions.
---addr
may be repeated to listen on multiple IPs/ports/sockets.
---server-read-timeout
and --server-write-timeout
can be used to control the timeouts on the server. Note that this is the total time for a transfer.
---max-header-bytes
controls the maximum number of bytes the server will accept in the HTTP header.
---baseurl
controls the URL prefix that rclone serves from. By default rclone will serve from the root. If you used --baseurl "/rclone"
then rclone would serve from a URL starting with "/rclone/". This is useful if you wish to proxy rclone serve. Rclone automatically inserts leading and trailing "/" on --baseurl
, so --baseurl "rclone"
, --baseurl "/rclone"
and --baseurl "/rclone/"
are all treated identically.
-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").
-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.
-If no static users are configured by either of the above methods, and client certificates are required by the --client-ca
flag passed to the server, the client certificate common name will be considered as the username.
-Use --htpasswd /path/to/htpasswd
to provide an htpasswd file. This is in standard apache format and supports MD5, SHA1 and BCrypt for basic authentication. Bcrypt is recommended.
-To create an htpasswd file:
-touch htpasswd
-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.
-rclone serve restic remote:path [flags]
-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
- --baseurl string Prefix for URLs - leave blank for root
- --cache-objects Cache listed objects (default true)
- --cert string TLS PEM key (concatenation of certificate and CA certificate)
- --client-ca string Client certificate authority to verify clients with
- -h, --help help for restic
- --htpasswd string A htpasswd file - if not provided no authentication is done
- --key string TLS PEM Private key
- --max-header-bytes int Maximum size of request header (default 4096)
- --min-tls-version string Minimum TLS version that is acceptable (default "tls1.0")
- --pass string Password for authentication
- --private-repos Users can only access their private repo
- --realm string Realm for authentication
- --salt string Password hashing salt (default "dlPL2MqE")
- --server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
- --server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
- --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
-rclone serve s3
-Serve remote:path over s3.
+rclone serve nfs
+Serve the remote as an NFS mount
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).
---auth-key
can be repeated for multiple auth pairs. If --auth-key
is not provided then serve s3
will allow anonymous access.
-Please note that some clients may require HTTPS endpoints. See the SSL docs for more information.
-This command uses the VFS directory cache. All the functionality will work with --vfs-cache-mode off
. Using --vfs-cache-mode full
(or writes
) can be used to cache objects locally to improve performance.
-Use --force-path-style=false
if you want to use the bucket name as a part of the hostname (such as mybucket.local)
-Use --etag-hash
if you want to change the hash uses for the ETag
. Note that using anything other than MD5
(the default) is likely to cause problems for S3 clients which rely on the Etag being the MD5.
-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:
-[serves3]
-type = s3
-provider = Rclone
-endpoint = http://127.0.0.1:8080/
-access_key_id = ACCESS_KEY_ID
-secret_access_key = SECRET_ACCESS_KEY
-use_multipart_uploads = false
-Note that setting disable_multipart_uploads = true
is to work around a bug which will be fixed in due course.
-Bugs
-When uploading multipart files serve s3
holds all the parts in memory (see #7453). This is a limitaton of the library rclone uses for serving S3 and will hopefully be fixed at some point.
-Multipart server side copies do not work (see #7454). These take a very long time and eventually fail. The default threshold for multipart server side copies is 5G which is the maximum it can be, so files above this side will fail to be server side copied.
-For a current list of serve s3
bugs see the serve s3 bug category on GitHub.
-Limitations
-serve s3
will treat all directories in the root as buckets and ignore all files in the root. You can use CreateBucket
to create folders under the root, but you can't create empty folders under other folders not in the root.
-When using PutObject
or DeleteObject
, rclone will automatically create or clean up empty folders. If you don't want to clean up empty folders automatically, use --no-cleanup
.
-When using ListObjects
, rclone will use /
when the delimiter is empty. This reduces backend requests with no effect on most operations, but if the delimiter is something other than /
and empty, rclone will do a full recursive search of the backend, which can take some time.
-Versioning is not currently supported.
-Metadata will only be saved in memory other than the rclone mtime
metadata which will be set as the modification time of the file.
-Supported operations
-serve s3
currently supports the following operations.
-
-- Bucket
-
-ListBuckets
-CreateBucket
-DeleteBucket
-
-- Object
-
-HeadObject
-ListObjects
-GetObject
-PutObject
-DeleteObject
-DeleteObjects
-CreateMultipartUpload
-CompleteMultipartUpload
-AbortMultipartUpload
-CopyObject
-UploadPart
-
-
-Other operations will return error Unimplemented
.
-Server options
-Use --addr
to specify which IP address and port the server should listen on, eg --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.
-You can use a unix socket by setting the url to unix:///path/to/socket
or just by using an absolute path name. Note that unix sockets bypass the authentication - this is expected to be done with file system permissions.
---addr
may be repeated to listen on multiple IPs/ports/sockets.
---server-read-timeout
and --server-write-timeout
can be used to control the timeouts on the server. Note that this is the total time for a transfer.
---max-header-bytes
controls the maximum number of bytes the server will accept in the HTTP header.
---baseurl
controls the URL prefix that rclone serves from. By default rclone will serve from the root. If you used --baseurl "/rclone"
then rclone would serve from a URL starting with "/rclone/". This is useful if you wish to proxy rclone serve. Rclone automatically inserts leading and trailing "/" on --baseurl
, so --baseurl "rclone"
, --baseurl "/rclone"
and --baseurl "/rclone/"
are all treated identically.
-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
+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.
+Modifying files through NFS protocol requires VFS caching. Usually you will need to specify --vfs-cache-mode
in order to be able to write to the mountpoint (full is recommended). If you don't specify VFS cache mode, the mount will be read-only. Note also that --nfs-cache-handle-limit
controls the maximum number of cached file handles stored by the caching handler. This should not be set too low or you may experience errors when trying to access files. The default is 1000000
, but consider lowering this limit if the server's system resource usage causes problems.
+To serve NFS over the network use following command:
+rclone serve nfs remote: --addr 0.0.0.0:$PORT --vfs-cache-mode=full
+We specify a specific port that we can use in the mount command:
+To mount the server under Linux/macOS, use the following command:
+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
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.
@@ -5072,40 +5232,31 @@ use_multipart_uploads = false
The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
VFS Disk Options
This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
Alternate report of used bytes
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]
+rclone serve nfs remote:path [flags]
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
- --baseurl string Prefix for URLs - leave blank for root
- --cert string TLS PEM key (concatenation of certificate and CA certificate)
- --client-ca string Client certificate authority to verify clients with
+ --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)
- --etag-hash string Which hash to use for the ETag, or auto or blank for off (default "MD5")
--file-perms FileMode File permissions (default 0666)
- --force-path-style If true use path style access if false use virtual hosted style (default true) (default true)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
- -h, --help help for s3
- --key string TLS PEM Private key
- --max-header-bytes int Maximum size of request header (default 4096)
- --min-tls-version string Minimum TLS version that is acceptable (default "tls1.0")
+ -h, --help help for nfs
+ --nfs-cache-handle-limit int max file handles cached simultaneously (min 5) (default 1000000)
--no-checksum Don't compare checksums on up/download
- --no-cleanup Not to cleanup empty folder after object is deleted
--no-modtime Don't read/write the modification time (can speed things up)
--no-seek Don't allow seeking in files
--poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
--read-only Only allow read-only access
- --server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
- --server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -5118,7 +5269,7 @@ use_multipart_uploads = false
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -5151,24 +5302,177 @@ use_multipart_uploads = false
-rclone serve sftp
-Serve the remote over SFTP.
+rclone serve restic
+Serve the remote for restic's REST API.
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.
-Note that this server uses standard 32 KiB packet payload size, which means you must not configure the client to expect anything else, e.g. with the chunk_size option on an sftp remote.
-The server will log errors. Use -v
to see access logs.
+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.
--bwlimit
will be respected for file transfers. Use --stats
to control the stats printing.
-You must provide some means of authentication, either with --user
/--pass
, an authorized keys file (specify location with --authorized-keys
- the default is the same as ssh), an --auth-proxy
, or set the --no-auth
flag for no authentication when logging in.
-If you don't supply a host --key
then rclone will generate rsa, ecdsa and ed25519 variants, and cache them for later use in rclone's cache directory (see rclone help flags cache-dir
) in the "serve-sftp" directory.
-By default the server binds to localhost:2022 - if you want it to be reachable externally then supply --addr :2022
for example.
-Note that the default of --vfs-cache-mode off
is fine for the rclone sftp backend, but it may not be with other SFTP clients.
-If --stdio
is specified, rclone will serve SFTP over stdio, which can be used with sshd via ~/.ssh/authorized_keys, for example:
-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
+Setting up rclone for use by restic
+First set up a remote for your chosen cloud provider.
+Once you have set up the remote, check it is working with, for example "rclone lsd remote:". You may have called the remote something other than "remote:" - just substitute whatever you called it in the following instructions.
+Now start the rclone restic server
+rclone serve restic -v remote:backup
+Where you can replace "backup" in the above by whatever path in the remote you wish to use.
+By default this will serve on "localhost:8080" you can change this with use of the --addr
flag.
+You might wish to start this server on boot.
+Adding --cache-objects=false
will cause rclone to stop caching objects returned from the List call. Caching is normally desirable as it speeds up downloading objects, saves transactions and uses very little memory.
+Setting up restic to use rclone
+Now you can follow the restic instructions on setting up restic.
+Note that you will need restic 0.8.2 or later to interoperate with rclone.
+For the example above you will want to use "http://localhost:8080/" as the URL for the REST server.
+For example:
+$ export RESTIC_REPOSITORY=rest:http://localhost:8080/
+$ export RESTIC_PASSWORD=yourpassword
+$ restic init
+created restic backend 8b1a4b56ae at rest:http://localhost:8080/
+
+Please note that knowledge of your password is required to access
+the repository. Losing your password means that your data is
+irrecoverably lost.
+$ restic backup /path/to/files/to/backup
+scan [/path/to/files/to/backup]
+scanned 189 directories, 312 files in 0:00
+[0:00] 100.00% 38.128 MiB / 38.128 MiB 501 / 501 items 0 errors ETA 0:00
+duration: 0:00
+snapshot 45c8fdd8 saved
+Multiple repositories
+Note that you can use the endpoint to host multiple repositories. Do this by adding a directory name or path after the URL. Note that these must end with /. Eg
+$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user1repo/
+# backup user1 stuff
+$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user2repo/
+# backup user2 stuff
+Private repositories
+The--private-repos
flag can be used to limit users to repositories starting with a path of /<username>/
.
+Server options
+Use --addr
to specify which IP address and port the server should listen on, eg --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.
+You can use a unix socket by setting the url to unix:///path/to/socket
or just by using an absolute path name. Note that unix sockets bypass the authentication - this is expected to be done with file system permissions.
+--addr
may be repeated to listen on multiple IPs/ports/sockets.
+--server-read-timeout
and --server-write-timeout
can be used to control the timeouts on the server. Note that this is the total time for a transfer.
+--max-header-bytes
controls the maximum number of bytes the server will accept in the HTTP header.
+--baseurl
controls the URL prefix that rclone serves from. By default rclone will serve from the root. If you used --baseurl "/rclone"
then rclone would serve from a URL starting with "/rclone/". This is useful if you wish to proxy rclone serve. Rclone automatically inserts leading and trailing "/" on --baseurl
, so --baseurl "rclone"
, --baseurl "/rclone"
and --baseurl "/rclone/"
are all treated identically.
+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").
+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.
+If no static users are configured by either of the above methods, and client certificates are required by the --client-ca
flag passed to the server, the client certificate common name will be considered as the username.
+Use --htpasswd /path/to/htpasswd
to provide an htpasswd file. This is in standard apache format and supports MD5, SHA1 and BCrypt for basic authentication. Bcrypt is recommended.
+To create an htpasswd file:
+touch htpasswd
+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.
+rclone serve restic remote:path [flags]
+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
+ --baseurl string Prefix for URLs - leave blank for root
+ --cache-objects Cache listed objects (default true)
+ --cert string TLS PEM key (concatenation of certificate and CA certificate)
+ --client-ca string Client certificate authority to verify clients with
+ -h, --help help for restic
+ --htpasswd string A htpasswd file - if not provided no authentication is done
+ --key string TLS PEM Private key
+ --max-header-bytes int Maximum size of request header (default 4096)
+ --min-tls-version string Minimum TLS version that is acceptable (default "tls1.0")
+ --pass string Password for authentication
+ --private-repos Users can only access their private repo
+ --realm string Realm for authentication
+ --salt string Password hashing salt (default "dlPL2MqE")
+ --server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
+ --server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
+ --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
+
+rclone serve s3
+Serve remote:path over s3.
+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).
+--auth-key
can be repeated for multiple auth pairs. If --auth-key
is not provided then serve s3
will allow anonymous access.
+Please note that some clients may require HTTPS endpoints. See the SSL docs for more information.
+This command uses the VFS directory cache. All the functionality will work with --vfs-cache-mode off
. Using --vfs-cache-mode full
(or writes
) can be used to cache objects locally to improve performance.
+Use --force-path-style=false
if you want to use the bucket name as a part of the hostname (such as mybucket.local)
+Use --etag-hash
if you want to change the hash uses for the ETag
. Note that using anything other than MD5
(the default) is likely to cause problems for S3 clients which rely on the Etag being the MD5.
+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
+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
+endpoint = http://127.0.0.1:8080/
+access_key_id = ACCESS_KEY_ID
+secret_access_key = SECRET_ACCESS_KEY
+use_multipart_uploads = false
+Note that setting disable_multipart_uploads = true
is to work around a bug which will be fixed in due course.
+Bugs
+When uploading multipart files serve s3
holds all the parts in memory (see #7453). This is a limitaton of the library rclone uses for serving S3 and will hopefully be fixed at some point.
+Multipart server side copies do not work (see #7454). These take a very long time and eventually fail. The default threshold for multipart server side copies is 5G which is the maximum it can be, so files above this side will fail to be server side copied.
+For a current list of serve s3
bugs see the serve s3 bug category on GitHub.
+Limitations
+serve s3
will treat all directories in the root as buckets and ignore all files in the root. You can use CreateBucket
to create folders under the root, but you can't create empty folders under other folders not in the root.
+When using PutObject
or DeleteObject
, rclone will automatically create or clean up empty folders. If you don't want to clean up empty folders automatically, use --no-cleanup
.
+When using ListObjects
, rclone will use /
when the delimiter is empty. This reduces backend requests with no effect on most operations, but if the delimiter is something other than /
and empty, rclone will do a full recursive search of the backend, which can take some time.
+Versioning is not currently supported.
+Metadata will only be saved in memory other than the rclone mtime
metadata which will be set as the modification time of the file.
+Supported operations
+serve s3
currently supports the following operations.
+
+- Bucket
+
+ListBuckets
+CreateBucket
+DeleteBucket
+
+- Object
+
+HeadObject
+ListObjects
+GetObject
+PutObject
+DeleteObject
+DeleteObjects
+CreateMultipartUpload
+CompleteMultipartUpload
+AbortMultipartUpload
+CopyObject
+UploadPart
+
+
+Other operations will return error Unimplemented
.
+Server options
+Use --addr
to specify which IP address and port the server should listen on, eg --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.
+You can use a unix socket by setting the url to unix:///path/to/socket
or just by using an absolute path name. Note that unix sockets bypass the authentication - this is expected to be done with file system permissions.
+--addr
may be repeated to listen on multiple IPs/ports/sockets.
+--server-read-timeout
and --server-write-timeout
can be used to control the timeouts on the server. Note that this is the total time for a transfer.
+--max-header-bytes
controls the maximum number of bytes the server will accept in the HTTP header.
+--baseurl
controls the URL prefix that rclone serves from. By default rclone will serve from the root. If you used --baseurl "/rclone"
then rclone would serve from a URL starting with "/rclone/". This is useful if you wish to proxy rclone serve. Rclone automatically inserts leading and trailing "/" on --baseurl
, so --baseurl "rclone"
, --baseurl "/rclone"
and --baseurl "/rclone/"
are all treated identically.
+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
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.
@@ -5279,64 +5583,43 @@ use_multipart_uploads = false
The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
VFS Disk Options
This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
Alternate report of used bytes
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.
-Auth Proxy
-If you supply the parameter --auth-proxy /path/to/program
then rclone will use that program to generate backends on the fly which then are used to authenticate incoming requests. This uses a simple JSON based protocol with input on STDIN and output on STDOUT.
-PLEASE NOTE: --auth-proxy
and --authorized-keys
cannot be used together, if --auth-proxy
is set the authorized keys option will be ignored.
-There is an example program bin/test_proxy.py in the rclone source code.
-The program's job is to take a user
and pass
on the input and turn those into the config for a backend on STDOUT in JSON format. This config will have any default parameters for the backend added, but it won't use configuration from environment variables or command line options - it is the job of the proxy program to make a complete config.
-This config generated must have this extra parameter - _root
- root to use for the backend
-And it may have this parameter - _obscure
- comma separated strings for parameters to obscure
-If password authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
-{
- "user": "me",
- "pass": "mypassword"
-}
-If public-key authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
-{
- "user": "me",
- "public_key": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf"
-}
-And as an example return this on STDOUT
-{
- "type": "sftp",
- "_root": "",
- "_obscure": "pass",
- "user": "me",
- "pass": "mypassword",
- "host": "sftp.example.com"
-}
-This would mean that an SFTP backend would be created on the fly for the user
and pass
/public_key
returned in the output to the host given. Note that since _obscure
is set to pass
, rclone will obscure the pass
parameter before creating the backend (which is required for sftp backends).
-The program can manipulate the supplied user
in any way, for example to make proxy to many different sftp backends, you could make the user
be user@example.com
and then set the host
to example.com
in the output and the user to user
. For security you'd probably want to restrict the host
to a limited list.
-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
- --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")
+rclone serve s3 remote:path [flags]
+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
+ --baseurl string Prefix for URLs - leave blank for root
+ --cert string TLS PEM key (concatenation of certificate and CA certificate)
+ --client-ca string Client certificate authority to verify clients with
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 0777)
+ --etag-hash string Which hash to use for the ETag, or auto or blank for off (default "MD5")
--file-perms FileMode File permissions (default 0666)
+ --force-path-style If true use path style access if false use virtual hosted style (default true) (default true)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
- -h, --help help for sftp
- --key stringArray SSH private host key file (Can be multi-valued, leave blank to auto generate)
- --no-auth Allow connections with no authentication if set
+ -h, --help help for s3
+ --key string TLS PEM Private key
+ --max-header-bytes int Maximum size of request header (default 4096)
+ --min-tls-version string Minimum TLS version that is acceptable (default "tls1.0")
--no-checksum Don't compare checksums on up/download
+ --no-cleanup Not to cleanup empty folder after object is deleted
--no-modtime Don't read/write the modification time (can speed things up)
--no-seek Don't allow seeking in files
- --pass string Password for authentication
--poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
--read-only Only allow read-only access
- --stdio Run an sftp server on stdin/stdout
+ --server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
+ --server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
- --user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -5349,7 +5632,7 @@ use_multipart_uploads = false
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -5378,13 +5661,247 @@ 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
+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.
+Note that this server uses standard 32 KiB packet payload size, which means you must not configure the client to expect anything else, e.g. with the chunk_size option on an sftp remote.
+The server will log errors. Use -v
to see access logs.
+--bwlimit
will be respected for file transfers. Use --stats
to control the stats printing.
+You must provide some means of authentication, either with --user
/--pass
, an authorized keys file (specify location with --authorized-keys
- the default is the same as ssh), an --auth-proxy
, or set the --no-auth
flag for no authentication when logging in.
+If you don't supply a host --key
then rclone will generate rsa, ecdsa and ed25519 variants, and cache them for later use in rclone's cache directory (see rclone help flags cache-dir
) in the "serve-sftp" directory.
+By default the server binds to localhost:2022 - if you want it to be reachable externally then supply --addr :2022
for example.
+Note that the default of --vfs-cache-mode off
is fine for the rclone sftp backend, but it may not be with other SFTP clients.
+If --stdio
is specified, rclone will serve SFTP over stdio, which can be used with sshd via ~/.ssh/authorized_keys, for example:
+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
+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.
+VFS Directory Cache
+Using the --dir-cache-time
flag, you can control how long a directory should be considered up to date and not refreshed from the backend. Changes made through the VFS will appear immediately or invalidate the cache.
+--dir-cache-time duration Time to cache directory entries for (default 5m0s)
+--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)
+However, changes made directly on the cloud storage by the web interface or a different copy of rclone will only be picked up once the directory cache expires if the backend configured does not support polling for changes. If the backend supports polling, changes will be picked up within the polling interval.
+You can send a SIGHUP
signal to rclone for it to flush all directory caches, regardless of how old they are. Assuming only one rclone instance is running, you can reset the cache like this:
+kill -SIGHUP $(pidof rclone)
+If you configure rclone with a remote control then you can use rclone rc to flush the whole directory cache:
+rclone rc vfs/forget
+Or individual files or directories:
+rclone rc vfs/forget file=path/to/file dir=path/to/dir
+VFS File Buffering
+The --buffer-size
flag determines the amount of memory, that will be used to buffer data in advance.
+Each open file will try to keep the specified amount of data in memory at all times. The buffered data is bound to one open file and won't be shared.
+This flag is a upper limit for the used memory per open file. The buffer will only use memory for data that is downloaded but not not yet read. If the buffer is empty, only a small amount of memory will be used.
+The maximum memory used by rclone for buffering can be up to --buffer-size * open files
.
+VFS File Caching
+These flags control the VFS file caching options. File caching is necessary to make the VFS layer appear compatible with a normal file system. It can be disabled at the cost of some compatibility.
+For example you'll need to enable VFS caching if you want to read and write simultaneously to a file. See below for more details.
+Note that the VFS cache is separate from the cache backend and you may find that you need one or the other or both.
+--cache-dir string Directory rclone will use for caching.
+--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
+--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
+--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
+If run with -vv
rclone will print the location of the file cache. The files are stored in the user cache file area which is OS dependent but can be controlled with --cache-dir
or setting the appropriate environment variable.
+The cache has 4 different modes selected by --vfs-cache-mode
. The higher the cache mode the more compatible rclone becomes at the cost of using disk space.
+Note that files are written back to the remote only when they are closed and if they haven't been accessed for --vfs-write-back
seconds. If rclone is quit or dies with files that haven't been uploaded, these will be uploaded next time rclone is run with the same flags.
+If using --vfs-cache-max-size
or --vfs-cache-min-free-size
note that the cache may exceed these quotas for two reasons. Firstly because it is only checked every --vfs-cache-poll-interval
. Secondly because open files cannot be evicted from the cache. When --vfs-cache-max-size
or --vfs-cache-min-free-size
is exceeded, rclone will attempt to evict the least accessed files from the cache first. rclone will start with files that haven't been accessed for the longest. This cache flushing strategy is efficient and more relevant files are likely to remain cached.
+The --vfs-cache-max-age
will evict files from the cache after the set time since last access has passed. The default value of 1 hour will start evicting files from cache that haven't been accessed for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0 and will wait for 1 more hour before evicting. Specify the time with standard notation, s, m, h, d, w .
+You should not run two copies of rclone using the same VFS cache with the same or overlapping remotes if using --vfs-cache-mode > off
. This can potentially cause data corruption if you do. You can work around this by giving each rclone its own cache hierarchy with --cache-dir
. You don't need to worry about this if the remotes in use don't overlap.
+--vfs-cache-mode off
+In this mode (the default) the cache will read directly from the remote and write directly to the remote without caching anything on disk.
+This will mean some operations are not possible
+
+- Files can't be opened for both read AND write
+- Files opened for write can't be seeked
+- Existing files opened for write must have O_TRUNC set
+- Files open for read with O_TRUNC will be opened write only
+- Files open for write only will behave as if O_TRUNC was supplied
+- Open modes O_APPEND, O_TRUNC are ignored
+- If an upload fails it can't be retried
+
+--vfs-cache-mode minimal
+This is very similar to "off" except that files opened for read AND write will be buffered to disk. This means that files opened for write will be a lot more compatible, but uses the minimal disk space.
+These operations are not possible
+
+- Files opened for write only can't be seeked
+- Existing files opened for write must have O_TRUNC set
+- Files opened for write only will ignore O_APPEND, O_TRUNC
+- If an upload fails it can't be retried
+
+--vfs-cache-mode writes
+In this mode files opened for read only are still read directly from the remote, write only and read/write files are buffered to disk first.
+This mode should support all normal file system operations.
+If an upload fails it will be retried at exponentially increasing intervals up to 1 minute.
+--vfs-cache-mode full
+In this mode all reads and writes are buffered to and from disk. When data is read from the remote this is buffered to disk as well.
+In this mode the files in the cache will be sparse files and rclone will keep track of which bits of the files it has downloaded.
+So if an application only reads the starts of each file, then rclone will only buffer the start of the file. These files will appear to be their full size in the cache, but they will be sparse files with only the data that has been downloaded present in them.
+This mode should support all normal file system operations and is otherwise identical to --vfs-cache-mode
writes.
+When reading a file rclone will read --buffer-size
plus --vfs-read-ahead
bytes ahead. The --buffer-size
is buffered in memory whereas the --vfs-read-ahead
is buffered on disk.
+When using this mode it is recommended that --buffer-size
is not set too large and --vfs-read-ahead
is set large if required.
+IMPORTANT not all file systems support sparse files. In particular FAT/exFAT do not. Rclone will perform very badly if the cache directory is on a filesystem which doesn't support sparse files and it will log an ERROR message if one is detected.
+Fingerprinting
+Various parts of the VFS use fingerprinting to see if a local file copy has changed relative to a remote file. Fingerprints are made from:
+
+- size
+- modification time
+- hash
+
+where available on an object.
+On some backends some of these attributes are slow to read (they take an extra API call per object, or extra work per object).
+For example hash
is slow with the local
and sftp
backends as they have to read the entire file and hash it, and modtime
is slow with the s3
, swift
, ftp
and qinqstor
backends because they need to do an extra API call to fetch it.
+If you use the --vfs-fast-fingerprint
flag then rclone will not include the slow operations in the fingerprint. This makes the fingerprinting less accurate but much faster and will improve the opening time of cached files.
+If you are running a vfs cache over local
, s3
or swift
backends then using this flag is recommended.
+Note that if you change the value of this flag, the fingerprints of the files in the cache may be invalidated and the files will need to be downloaded again.
+VFS Chunked Reading
+When rclone reads files from a remote it reads them in chunks. This means that rather than requesting the whole file rclone reads the chunk specified. This can reduce the used download quota for some remotes by requesting only chunks from the remote that are actually read, at the cost of an increased number of requests.
+These flags control the chunking:
+--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
+--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
+Rclone will start reading a chunk of size --vfs-read-chunk-size
, and then double the size for each read. When --vfs-read-chunk-size-limit
is specified, and greater than --vfs-read-chunk-size
, the chunk size for each open file will get doubled only until the specified value is reached. If the value is "off", which is the default, the limit is disabled and the chunk size will grow indefinitely.
+With --vfs-read-chunk-size 100M
and --vfs-read-chunk-size-limit 0
the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When --vfs-read-chunk-size-limit 500M
is specified, the result would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on.
+Setting --vfs-read-chunk-size
to 0
or "off" disables chunked reading.
+
+These flags may be used to enable/disable features of the VFS for performance or other reasons. See also the chunked reading feature.
+In particular S3 and Swift benefit hugely from the --no-modtime
flag (or use --use-server-modtime
for a slightly different effect) as each read of the modification time takes a transaction.
+--no-checksum Don't compare checksums on up/download.
+--no-modtime Don't read/write the modification time (can speed things up).
+--no-seek Don't allow seeking in files.
+--read-only Only allow read-only access.
+Sometimes rclone is delivered reads or writes out of order. Rather than seeking rclone will wait a short time for the in sequence read or write to come in. These flags only come into effect when not using an on disk cache file.
+--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
+--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
+When using VFS write caching (--vfs-cache-mode
with value writes or full), the global flag --transfers
can be set to adjust the number of parallel uploads of modified files from the cache (the related global flag --checkers
has no effect on the VFS).
+--transfers int Number of file transfers to run in parallel (default 4)
+VFS Case Sensitivity
+Linux file systems are case-sensitive: two files can differ only by case, and the exact case must be used when opening a file.
+File systems in modern Windows are case-insensitive but case-preserving: although existing files can be opened using any case, the exact case used to create the file is preserved and available for programs to query. It is not allowed for two files in the same directory to differ only by case.
+Usually file systems on macOS are case-insensitive. It is possible to make macOS file systems case-sensitive but that is not the default.
+The --vfs-case-insensitive
VFS flag controls how rclone handles these two cases. If its value is "false", rclone passes file names to the remote as-is. If the flag is "true" (or appears without a value on the command line), rclone may perform a "fixup" as explained below.
+The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
+Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
+If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
+VFS Disk Options
+This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
+--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
+Alternate report of used bytes
+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.
+Auth Proxy
+If you supply the parameter --auth-proxy /path/to/program
then rclone will use that program to generate backends on the fly which then are used to authenticate incoming requests. This uses a simple JSON based protocol with input on STDIN and output on STDOUT.
+PLEASE NOTE: --auth-proxy
and --authorized-keys
cannot be used together, if --auth-proxy
is set the authorized keys option will be ignored.
+There is an example program bin/test_proxy.py in the rclone source code.
+The program's job is to take a user
and pass
on the input and turn those into the config for a backend on STDOUT in JSON format. This config will have any default parameters for the backend added, but it won't use configuration from environment variables or command line options - it is the job of the proxy program to make a complete config.
+This config generated must have this extra parameter - _root
- root to use for the backend
+And it may have this parameter - _obscure
- comma separated strings for parameters to obscure
+If password authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
+{
+ "user": "me",
+ "pass": "mypassword"
+}
+If public-key authentication was used by the client, input to the proxy process (on STDIN) would look similar to this:
+{
+ "user": "me",
+ "public_key": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf"
+}
+And as an example return this on STDOUT
+{
+ "type": "sftp",
+ "_root": "",
+ "_obscure": "pass",
+ "user": "me",
+ "pass": "mypassword",
+ "host": "sftp.example.com"
+}
+This would mean that an SFTP backend would be created on the fly for the user
and pass
/public_key
returned in the output to the host given. Note that since _obscure
is set to pass
, rclone will obscure the pass
parameter before creating the backend (which is required for sftp backends).
+The program can manipulate the supplied user
in any way, for example to make proxy to many different sftp backends, you could make the user
be user@example.com
and then set the host
to example.com
in the output and the user to user
. For security you'd probably want to restrict the host
to a limited list.
+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
+ --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")
+ --dir-cache-time Duration Time to cache directory entries for (default 5m0s)
+ --dir-perms FileMode Directory permissions (default 0777)
+ --file-perms FileMode File permissions (default 0666)
+ --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
+ -h, --help help for sftp
+ --key stringArray SSH private host key file (Can be multi-valued, leave blank to auto generate)
+ --no-auth Allow connections with no authentication if set
+ --no-checksum Don't compare checksums on up/download
+ --no-modtime Don't read/write the modification time (can speed things up)
+ --no-seek Don't allow seeking in files
+ --pass string Password for authentication
+ --poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
+ --read-only Only allow read-only access
+ --stdio Run an sftp server on stdin/stdout
+ --uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
+ --umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
+ --vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
+ --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+ --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+ --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+ --vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
+ --vfs-case-insensitive If a file name not found, find a case insensitive match
+ --vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
+ --vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
+ --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
+ --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
+ --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
+ --vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
+ --vfs-used-is-size rclone size Use the rclone size algorithm for Used size
+ --vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
+ --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
+Filter Options
+Flags for filtering directory listings.
+ --delete-excluded Delete files on dest excluded from sync
+ --exclude stringArray Exclude files matching pattern
+ --exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
+ --exclude-if-present stringArray Exclude directories if filename is present
+ --files-from stringArray Read list of source-file names from file (use - to read from stdin)
+ --files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
+ -f, --filter stringArray Add a file filtering rule
+ --filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
+ --ignore-case Ignore case in filters (case insensitive)
+ --include stringArray Include files matching pattern
+ --include-from stringArray Read file include patterns from file (use - to read from stdin)
+ --max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
+ --max-depth int If set limits the recursion depth to this (default -1)
+ --max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
+ --metadata-exclude stringArray Exclude metadatas matching pattern
+ --metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
+ --metadata-filter stringArray Add a metadata filtering rule
+ --metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
+ --metadata-include stringArray Include metadatas matching pattern
+ --metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
+ --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
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
@@ -5406,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:
@@ -5529,11 +6046,12 @@ 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.
-VFS Directory Cache
+VFS Directory Cache
Using the --dir-cache-time
flag, you can control how long a directory should be considered up to date and not refreshed from the backend. Changes made through the VFS will appear immediately or invalidate the cache.
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)
@@ -5544,12 +6062,12 @@ htpasswd -B htpasswd anotherUser
rclone rc vfs/forget
Or individual files or directories:
rclone rc vfs/forget file=path/to/file dir=path/to/dir
-VFS File Buffering
+VFS File Buffering
The --buffer-size
flag determines the amount of memory, that will be used to buffer data in advance.
Each open file will try to keep the specified amount of data in memory at all times. The buffered data is bound to one open file and won't be shared.
This flag is a upper limit for the used memory per open file. The buffer will only use memory for data that is downloaded but not not yet read. If the buffer is empty, only a small amount of memory will be used.
The maximum memory used by rclone for buffering can be up to --buffer-size * open files
.
-VFS File Caching
+VFS File Caching
These flags control the VFS file caching options. File caching is necessary to make the VFS layer appear compatible with a normal file system. It can be disabled at the cost of some compatibility.
For example you'll need to enable VFS caching if you want to read and write simultaneously to a file. See below for more details.
Note that the VFS cache is separate from the cache backend and you may find that you need one or the other or both.
@@ -5566,7 +6084,7 @@ htpasswd -B htpasswd anotherUser
If using --vfs-cache-max-size
or --vfs-cache-min-free-size
note that the cache may exceed these quotas for two reasons. Firstly because it is only checked every --vfs-cache-poll-interval
. Secondly because open files cannot be evicted from the cache. When --vfs-cache-max-size
or --vfs-cache-min-free-size
is exceeded, rclone will attempt to evict the least accessed files from the cache first. rclone will start with files that haven't been accessed for the longest. This cache flushing strategy is efficient and more relevant files are likely to remain cached.
The --vfs-cache-max-age
will evict files from the cache after the set time since last access has passed. The default value of 1 hour will start evicting files from cache that haven't been accessed for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0 and will wait for 1 more hour before evicting. Specify the time with standard notation, s, m, h, d, w .
You should not run two copies of rclone using the same VFS cache with the same or overlapping remotes if using --vfs-cache-mode > off
. This can potentially cause data corruption if you do. You can work around this by giving each rclone its own cache hierarchy with --cache-dir
. You don't need to worry about this if the remotes in use don't overlap.
---vfs-cache-mode off
+--vfs-cache-mode off
In this mode (the default) the cache will read directly from the remote and write directly to the remote without caching anything on disk.
This will mean some operations are not possible
@@ -5578,7 +6096,7 @@ htpasswd -B htpasswd anotherUser
- Open modes O_APPEND, O_TRUNC are ignored
- If an upload fails it can't be retried
---vfs-cache-mode minimal
+--vfs-cache-mode minimal
This is very similar to "off" except that files opened for read AND write will be buffered to disk. This means that files opened for write will be a lot more compatible, but uses the minimal disk space.
These operations are not possible
@@ -5587,11 +6105,11 @@ htpasswd -B htpasswd anotherUser
- Files opened for write only will ignore O_APPEND, O_TRUNC
- If an upload fails it can't be retried
---vfs-cache-mode writes
+--vfs-cache-mode writes
In this mode files opened for read only are still read directly from the remote, write only and read/write files are buffered to disk first.
This mode should support all normal file system operations.
If an upload fails it will be retried at exponentially increasing intervals up to 1 minute.
---vfs-cache-mode full
+--vfs-cache-mode full
In this mode all reads and writes are buffered to and from disk. When data is read from the remote this is buffered to disk as well.
In this mode the files in the cache will be sparse files and rclone will keep track of which bits of the files it has downloaded.
So if an application only reads the starts of each file, then rclone will only buffer the start of the file. These files will appear to be their full size in the cache, but they will be sparse files with only the data that has been downloaded present in them.
@@ -5599,7 +6117,7 @@ htpasswd -B htpasswd anotherUser
When reading a file rclone will read --buffer-size
plus --vfs-read-ahead
bytes ahead. The --buffer-size
is buffered in memory whereas the --vfs-read-ahead
is buffered on disk.
When using this mode it is recommended that --buffer-size
is not set too large and --vfs-read-ahead
is set large if required.
IMPORTANT not all file systems support sparse files. In particular FAT/exFAT do not. Rclone will perform very badly if the cache directory is on a filesystem which doesn't support sparse files and it will log an ERROR message if one is detected.
-Fingerprinting
+Fingerprinting
Various parts of the VFS use fingerprinting to see if a local file copy has changed relative to a remote file. Fingerprints are made from:
- size
@@ -5612,7 +6130,7 @@ htpasswd -B htpasswd anotherUser
If you use the --vfs-fast-fingerprint
flag then rclone will not include the slow operations in the fingerprint. This makes the fingerprinting less accurate but much faster and will improve the opening time of cached files.
If you are running a vfs cache over local
, s3
or swift
backends then using this flag is recommended.
Note that if you change the value of this flag, the fingerprints of the files in the cache may be invalidated and the files will need to be downloaded again.
-VFS Chunked Reading
+VFS Chunked Reading
When rclone reads files from a remote it reads them in chunks. This means that rather than requesting the whole file rclone reads the chunk specified. This can reduce the used download quota for some remotes by requesting only chunks from the remote that are actually read, at the cost of an increased number of requests.
These flags control the chunking:
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
@@ -5620,7 +6138,7 @@ htpasswd -B htpasswd anotherUser
Rclone will start reading a chunk of size --vfs-read-chunk-size
, and then double the size for each read. When --vfs-read-chunk-size-limit
is specified, and greater than --vfs-read-chunk-size
, the chunk size for each open file will get doubled only until the specified value is reached. If the value is "off", which is the default, the limit is disabled and the chunk size will grow indefinitely.
With --vfs-read-chunk-size 100M
and --vfs-read-chunk-size-limit 0
the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When --vfs-read-chunk-size-limit 500M
is specified, the result would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on.
Setting --vfs-read-chunk-size
to 0
or "off" disables chunked reading.
-
+
These flags may be used to enable/disable features of the VFS for performance or other reasons. See also the chunked reading feature.
In particular S3 and Swift benefit hugely from the --no-modtime
flag (or use --use-server-modtime
for a slightly different effect) as each read of the modification time takes a transaction.
--no-checksum Don't compare checksums on up/download.
@@ -5632,7 +6150,7 @@ htpasswd -B htpasswd anotherUser
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
When using VFS write caching (--vfs-cache-mode
with value writes or full), the global flag --transfers
can be set to adjust the number of parallel uploads of modified files from the cache (the related global flag --checkers
has no effect on the VFS).
--transfers int Number of file transfers to run in parallel (default 4)
-VFS Case Sensitivity
+VFS Case Sensitivity
Linux file systems are case-sensitive: two files can differ only by case, and the exact case must be used when opening a file.
File systems in modern Windows are case-insensitive but case-preserving: although existing files can be opened using any case, the exact case used to create the file is preserved and available for programs to query. It is not allowed for two files in the same directory to differ only by case.
Usually file systems on macOS are case-insensitive. It is possible to make macOS file systems case-sensitive but that is not the default.
@@ -5640,16 +6158,18 @@ htpasswd -B htpasswd anotherUser
The user may specify a file name to open/delete/rename/etc with a case different than what is stored on the remote. If an argument refers to an existing file with exactly the same name, then the case of the existing file on the disk will be used. However, if a file name with exactly the same name is not found but a name differing only by case exists, rclone will transparently fixup the name. This fixup happens only when an existing file is requested. Case sensitivity of file names created anew by rclone is controlled by the underlying remote.
Note that case sensitivity of the operating system running rclone (the target) may differ from case sensitivity of a file system presented by rclone (the source). The flag controls whether "fixup" is performed to satisfy the target.
If the flag is not provided on the command line, then its default value depends on the operating system where rclone runs: "true" on Windows and macOS, "false" otherwise. If the flag is provided without a value, then it is "true".
-VFS Disk Options
+The --no-unicode-normalization
flag controls whether a similar "fixup" is performed for filenames that differ but are canonically equivalent with respect to unicode. Unicode normalization can be particularly helpful for users of macOS, which prefers form NFD instead of the NFC used by most other platforms. It is therefore highly recommended to keep the default of false
on macOS, to avoid encoding compatibility issues.
+In the (probably unlikely) event that a directory has multiple duplicate filenames after applying case and unicode normalization, the --vfs-block-norm-dupes
flag allows hiding these duplicates. This comes with a performance tradeoff, as rclone will have to scan the entire directory for duplicates when listing a directory. For this reason, it is recommended to leave this disabled if not needed. However, macOS users may wish to consider using it, as otherwise, if a remote directory contains both NFC and NFD versions of the same filename, an odd situation will occur: both versions of the file will be visible in the mount, and both will appear to be editable, however, editing either version will actually result in only the NFD version getting edited under the hood. --vfs-block- norm-dupes
prevents this confusion by detecting this scenario, hiding the duplicates, and logging an error, similar to how this is handled in rclone sync
.
+VFS Disk Options
This flag allows you to manually set the statistics about the filing system. It can be useful when those statistics cannot be read correctly automatically.
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
-Alternate report of used bytes
+Alternate report of used bytes
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.
Auth Proxy
If you supply the parameter --auth-proxy /path/to/program
then rclone will use that program to generate backends on the fly which then are used to authenticate incoming requests. This uses a simple JSON based protocol with input on STDIN and output on STDOUT.
PLEASE NOTE: --auth-proxy
and --authorized-keys
cannot be used together, if --auth-proxy
is set the authorized keys option will be ignored.
-There is an example program bin/test_proxy.py in the rclone source code.
+There is an example program bin/test_proxy.py in the rclone source code.
The program's job is to take a user
and pass
on the input and turn those into the config for a backend on STDOUT in JSON format. This config will have any default parameters for the backend added, but it won't use configuration from environment variables or command line options - it is the job of the proxy program to make a complete config.
This config generated must have this extra parameter - _root
- root to use for the backend
And it may have this parameter - _obscure
- comma separated strings for parameters to obscure
@@ -5677,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
@@ -5709,6 +6229,7 @@ htpasswd -B htpasswd anotherUser
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -5721,11 +6242,11 @@ htpasswd -B htpasswd anotherUser
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
-Filter Options
+Filter Options
Flags for filtering directory listings.
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
@@ -5750,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
@@ -5766,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 - Show help for rclone commands, flags and backends.
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
rclone test changenotify remote: [flags]
-Options
+Options
-h, --help help for changenotify
--poll-interval Duration Time to wait between polling for changes (default 10s)
See the global flags page for global options not listed here.
-SEE ALSO
+SEE ALSO
rclone test histogram
Makes a histogram of file name characters.
-Synopsis
+Synopsis
This command outputs JSON which shows the histogram of characters used in filenames in the remote:path specified.
The data doesn't contain any identifying information but is useful for the rclone developers when developing filename compression.
rclone test histogram [remote:path] [flags]
-Options
+Options
-h, --help help for histogram
See the global flags page for global options not listed here.
-SEE ALSO
+SEE ALSO
rclone test info
Discovers file name or other limitations for paths.
-Synopsis
+Synopsis
rclone info discovers what filenames and upload methods are possible to write to the paths passed in and how long they can be. It can take some time. It will write test files into the remote:path passed in. It outputs a bit of go code for each one.
NB this can create undeletable files and other hazards - use with care
rclone test info [remote:path]+ [flags]
-Options
+Options
--all Run all tests
--check-base32768 Check can store all possible base32768 characters
--check-control Check control characters
@@ -5832,17 +6353,18 @@ htpasswd -B htpasswd anotherUser
--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
See the global flags page for global options not listed here.
-SEE ALSO
+SEE ALSO
rclone test makefile
Make files with random contents of the size given
rclone test makefile <size> [<file>]+ [flags]
-Options
+Options
--ascii Fill files with random ASCII printable bytes only
--chargen Fill files with a ASCII chargen pattern
-h, --help help for makefile
@@ -5851,14 +6373,14 @@ htpasswd -B htpasswd anotherUser
--sparse Make the files sparse (appear to be filled with ASCII 0x00)
--zero Fill files with ASCII 0x00
See the global flags page for global options not listed here.
-SEE ALSO
+SEE ALSO
rclone test makefiles
Make a random file hierarchy in a directory
rclone test makefiles <dir> [flags]
-Options
+Options
--ascii Fill files with random ASCII printable bytes only
--chargen Fill files with a ASCII chargen pattern
--files int Number of files to create (default 1000)
@@ -5874,23 +6396,23 @@ htpasswd -B htpasswd anotherUser
--sparse Make the files sparse (appear to be filled with ASCII 0x00)
--zero Fill files with ASCII 0x00
See the global flags page for global options not listed here.
-SEE ALSO
+SEE ALSO
rclone test memory
Load all the objects at remote:path into memory and report memory stats.
rclone test memory remote:path [flags]
-Options
+Options
-h, --help help for memory
See the global flags page for global options not listed here.
-SEE ALSO
+SEE ALSO
rclone touch
Create new file or change file modification time.
-Synopsis
+Synopsis
Set the modification time on file(s) as specified by remote:path to have the current time.
If remote:path does not exist then a zero sized file will be created, unless --no-create
or --recursive
is provided.
If --recursive
is used then recursively sets the modification time on all existing files that is found under the path. Filters are supported, and you can test with the --dry-run
or the --interactive
/-i
flag.
@@ -5902,7 +6424,7 @@ htpasswd -B htpasswd anotherUser
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)
@@ -5913,7 +6435,7 @@ htpasswd -B htpasswd anotherUser
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
-Filter Options
+Filter Options
Flags for filtering directory listings.
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
@@ -5942,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 - Show help for rclone commands, flags and backends.
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
@@ -5965,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)
@@ -5985,7 +6507,7 @@ htpasswd -B htpasswd anotherUser
-r, --sort-reverse Reverse the order of the sort
-U, --unsorted Leave files unsorted
--version Sort files alphanumerically by version
-Filter Options
+Filter Options
Flags for filtering directory listings.
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
@@ -6014,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
- rclone - Show help for rclone commands, flags and backends.
@@ -6129,13 +6651,15 @@ rclone copy :sftp,host=example.com:path/to/dir /tmp/dir
rclone sync --interactive remote:current-backup remote:previous-backup
rclone sync --interactive /path/to/files remote:current-backup
-Metadata is data about a file which isn't the contents of the file. Normally rclone only preserves the modification time and the content (MIME) type where possible.
-Rclone supports preserving all the available metadata on files (not directories) when using the --metadata
or -M
flag.
+Metadata is data about a file (or directory) which isn't the contents of the file (or directory). Normally rclone only preserves the modification time and the content (MIME) type where possible.
+Rclone supports preserving all the available metadata on files and directories when using the --metadata
or -M
flag.
Exactly what metadata is supported and what that support means depends on the backend. Backends that support metadata have a metadata section in their docs and are listed in the features table (Eg local, s3)
+Some backends don't support metadata, some only support metadata on files and some support metadata on both files and directories.
Rclone only supports a one-time sync of metadata. This means that metadata will be synced from the source object to the destination object only when the source object has changed and needs to be re-uploaded. If the metadata subsequently changes on the source object without changing the object itself then it won't be synced to the destination object. This is in line with the way rclone syncs Content-Type
without the --metadata
flag.
Using --metadata
when syncing from local to local will preserve file attributes such as file mode, owner, extended attributes (not Windows).
Note that arbitrary metadata may be added to objects using the --metadata-set key=value
flag when the object is first uploaded. This flag can be repeated as many times as necessary.
The --metadata-mapper flag can be used to pass the name of a program in which can transform metadata when it is being copied from source to destination.
+Rclone supports --metadata-set
and --metadata-mapper
when doing sever side Move
and server side Copy
, but not when doing server side DirMove
(renaming a directory) as this would involve recursing into the directory. Note that you can disable DirMove
with --disable DirMove
and rclone will revert back to using Move
for each individual object where --metadata-set
and --metadata-mapper
are supported.
Metadata is divided into two type. System metadata and User metadata.
Metadata which the backend uses itself is called system metadata. For example on the local backend the system metadata uid
will store the user ID of the file when used on a unix based platform.
@@ -6246,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
@@ -6441,6 +6965,9 @@ See the dedupe command for more information as to what these options mean.
By default, rclone will exit with return code 0 if there were no errors.
This option allows rclone to return exit code 9 if no files were transferred between the source and destination. This allows using rclone in scripts, and triggering follow-on actions if data was copied, or skipping if not.
NB: Enabling this option turns a usually non-fatal error into a potentially fatal one - please check and adjust your scripts accordingly!
+--fix-case
+Normally, a sync to a case insensitive dest (such as macOS / Windows) will not result in a matching filename if the source and dest filenames have casing differences but are otherwise identical. For example, syncing hello.txt
to HELLO.txt
will normally result in the dest filename remaining HELLO.txt
. If --fix-case
is set, then HELLO.txt
will be renamed to hello.txt
to match the source.
+NB: - directory names with incorrect casing will also be fixed - --fix-case
will be ignored if --immutable
is set - using --local-case-sensitive
instead is not advisable; it will cause HELLO.txt
to get deleted! - the old dest filename must not be excluded by filters. Be especially careful with --files-from
, which does not respect --ignore-case
! - on remotes that do not support server-side move, --fix-case
will require downloading the file and re-uploading it. To avoid this, do not use --fix-case
.
--fs-cache-expire-duration=TIME
When using rclone via the API rclone caches created remotes for 5 minutes by default in the "fs cache". This means that if you do repeated actions on the same remote then rclone won't have to build it again from scratch, which makes it more efficient.
This flag sets the time that the remotes are cached for. If you set it to 0
(or negative) then rclone won't cache the remotes at all.
@@ -6592,62 +7119,62 @@ y/n/s/!/q> n
SrcFsType
is the name of the source backend.
DstFs
is the config string for the remote that the object is being copied to
DstFsType
is the name of the destination backend.
-Remote
is the path of the file relative to the root.
-Size
, MimeType
, ModTime
are attributes of the file.
+Remote
is the path of the object relative to the root.
+Size
, MimeType
, ModTime
are attributes of the object.
IsDir
is true
if this is a directory (not yet implemented).
-ID
is the source ID
of the file if known.
+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")
-You can find this example (slightly expanded) in the rclone source code at bin/test_metadata_mapper.py.
+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.
@@ -6666,7 +7193,7 @@ y/n/s/!/q> n
In this case the value of this option is used (default 64Mi).
--multi-thread-cutoff=SIZE
When transferring files above SIZE to capable backends, rclone will use multiple threads to transfer the file (default 256M).
-Capable backends are marked in the overview as MultithreadUpload
. (They need to implement either the OpenWriterAt
or OpenChunkedWriter
internal interfaces). These include include, local
, s3
, azureblob
, b2
, oracleobjectstorage
and smb
at the time of writing.
+Capable backends are marked in the overview as MultithreadUpload
. (They need to implement either the OpenWriterAt
or OpenChunkWriter
internal interfaces). These include include, local
, s3
, azureblob
, b2
, oracleobjectstorage
and smb
at the time of writing.
On the local disk, rclone preallocates the file (using fallocate(FALLOC_FL_KEEP_SIZE)
on unix or NTSetInformationFile
on Windows both of which takes no time) then each thread writes directly into the file at the correct place. This means that rclone won't create fragmented or sparse files and there won't be any assembly time at the end of the transfer.
The number of threads used to transfer is controlled by --multi-thread-streams
.
Use -vv
if you wish to see info about the threads.
@@ -6703,6 +7230,8 @@ y/n/s/!/q> n
--no-update-modtime
When using this flag, rclone won't update modification times of remote files if they are incorrect as it would normally.
This can be used if the remote is being synced with another tool also (e.g. the Google Drive client).
+--no-update-dir-modtime
+When using this flag, rclone won't update modification times of remote directories if they are incorrect as it would normally.
--order-by string
The --order-by
flag controls the order in which files in the backlog are processed in rclone sync
, rclone copy
and rclone move
.
The order by string is constructed like this. The first part describes what aspect is being measured:
@@ -6726,7 +7255,7 @@ y/n/s/!/q> n
--order-by name
- send the files with alphabetically by path first
If the --order-by
flag is not supplied or it is supplied with an empty string then the default ordering will be used which is as scanned. With --checkers 1
this is mostly alphabetical, however with the default --checkers 8
it is somewhat random.
-Limitations
+Limitations
The --order-by
flag does not do a separate pass over the data. This means that it may transfer some files out of the order specified if
- there are no files in the backlog or the source has not been fully scanned yet
@@ -6752,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.
@@ -7052,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.
@@ -7138,12 +7668,12 @@ For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
- rclone authorize "amazon cloud drive"
+ rclone authorize "dropbox"
Then paste the result below:
result>
Then on your main desktop machine
-rclone authorize "amazon cloud drive"
+rclone authorize "dropbox"
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...
@@ -7459,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.
@@ -7525,7 +8055,7 @@ file2.avi
+ *.png
+ file2.avi
- *
-Files file1.jpg
, file3.png
and file2.avi
are listed whilst secret17.jpg
and files without the suffix .jpgor
.png` are excluded.
+Files file1.jpg
, file3.png
and file2.avi
are listed whilst secret17.jpg
and files without the suffix .jpg
or .png
are excluded.
E.g. for an alternative filter-file.txt
:
+ *.jpg
+ *.gif
@@ -7755,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.
@@ -8034,6 +8567,21 @@ rclone rc cache/expire remote=/ withData=true
See the config password command for more information on the above.
Authentication is required for this call.
+config/paths: Reads the config file path and other important paths.
+Returns a JSON object with the following keys:
+
+- config: path to config file
+- cache: path to root of cache directory
+- temp: path to root of temporary directory
+
+Eg
+{
+ "cache": "/home/USER/.cache/rclone",
+ "config": "/home/USER/.rclone.conf",
+ "temp": "/tmp"
+}
+See the config paths command for more information on the above.
+Authentication is required for this call.
config/providers: Shows how providers are configured in the config file.
Returns a JSON object: - providers - array of objects
See the config providers command for more information on the above.
@@ -8602,6 +9150,37 @@ rclone rc mount/mount fs=TestDrive: mountPoint=/mnt/tmp vfsOpt='{"Cache
}
This command does not have a command line equivalent so use this instead:
rclone rc --loopback operations/fsinfo fs=remote:
+operations/hashsum: Produces a hashsum file for all the objects in the path.
+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.
+This takes the following parameters:
+
+- fs - a remote name string e.g. "drive:" for the source, "/" for local filesystem
+
+- this can point to a file and just that file will be returned in the listing.
+
+- hashType - type of hash to be used
+- download - check by downloading rather than with hash (boolean)
+- base64 - output the hashes in base64 rather than hex (boolean)
+
+If you supply the download flag, it will download the data from the remote and create the hash on the fly. This can be useful for remotes that don't support the given hash or if you really want to check all the data.
+Note that if you wish to supply a checkfile to check hashes against the current files then you should use operations/check instead of operations/hashsum.
+Returns:
+
+- hashsum - array of strings of the hashes
+- hashType - type of hash used
+
+Example:
+$ rclone rc --loopback operations/hashsum fs=bin hashType=MD5 download=true base64=true
+{
+ "hashType": "md5",
+ "hashsum": [
+ "WTSVLpuiXyJO_kGzJerRLg== backend-versions.sh",
+ "v1b_OlWCJO9LtNq3EIKkNQ== bisect-go-rclone.sh",
+ "VHbmHzHh4taXzgag8BAIKQ== bisect-rclone.sh",
+ ]
+}
+See the hashsum command for more information on the above.
+Authentication is required for this call.
operations/list: List the given remote and path in JSON format
This takes the following parameters:
@@ -8855,7 +9434,9 @@ rclone rc options/set --json '{"main": {"LogLevel": 8}}&
- filtersFile - read filtering patterns from a file
- ignoreListingChecksum - Do not use checksums for listings
- resilient - Allow future runs to retry after certain less-serious errors, instead of requiring resync. Use at your own risk!
-- workdir - server directory for history files (default: /home/ncw/.cache/rclone/bisync)
+- workdir - server directory for history files (default:
~/.cache/rclone/bisync
)
+- backupdir1 - --backup-dir for Path1. Must be a non-overlapping path on the same remote.
+- backupdir2 - --backup-dir for Path2. Must be a non-overlapping path on the same remote.
- noCleanup - retain working files
See bisync command help and full bisync description for more information.
@@ -9100,15 +9681,6 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
-Amazon Drive |
-MD5 |
-- |
-Yes |
-No |
-R |
-- |
-
-
Amazon S3 (or S3 compatible) |
MD5 |
R/W |
@@ -9117,7 +9689,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R/W |
RWU |
-
+
Backblaze B2 |
SHA1 |
R/W |
@@ -9126,7 +9698,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R/W |
- |
-
+
Box |
SHA1 |
R/W |
@@ -9135,7 +9707,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Citrix ShareFile |
MD5 |
R/W |
@@ -9144,7 +9716,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Dropbox |
DBHASH ¹ |
R |
@@ -9153,7 +9725,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Enterprise File Fabric |
- |
R/W |
@@ -9162,7 +9734,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R/W |
- |
-
+
FTP |
- |
R/W ¹⁰ |
@@ -9171,7 +9743,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Google Cloud Storage |
MD5 |
R/W |
@@ -9180,16 +9752,16 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R/W |
- |
-
+
Google Drive |
MD5, SHA1, SHA256 |
-R/W |
+DR/W |
No |
Yes |
R/W |
-- |
+DRWU |
-
+
Google Photos |
- |
- |
@@ -9198,7 +9770,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R |
- |
-
+
HDFS |
- |
R/W |
@@ -9207,7 +9779,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
HiDrive |
HiDrive ¹² |
R/W |
@@ -9216,7 +9788,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
HTTP |
- |
R |
@@ -9225,7 +9797,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R |
- |
-
+
Internet Archive |
MD5, SHA1, CRC32 |
R/W ¹¹ |
@@ -9234,7 +9806,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
RWU |
-
+
Jottacloud |
MD5 |
R/W |
@@ -9243,7 +9815,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R |
RW |
-
+
Koofr |
MD5 |
- |
@@ -9252,7 +9824,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Linkbox |
- |
R |
@@ -9261,7 +9833,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Mail.ru Cloud |
Mailru ⁶ |
R/W |
@@ -9270,7 +9842,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Mega |
- |
- |
@@ -9279,7 +9851,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Memory |
MD5 |
R/W |
@@ -9288,7 +9860,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Microsoft Azure Blob Storage |
MD5 |
R/W |
@@ -9297,7 +9869,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R/W |
- |
-
+
Microsoft Azure Files Storage |
MD5 |
R/W |
@@ -9306,16 +9878,16 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R/W |
- |
-
+
Microsoft OneDrive |
QuickXorHash ⁵ |
-R/W |
+DR/W |
Yes |
No |
R |
-- |
+DRW |
-
+
OpenDrive |
MD5 |
R/W |
@@ -9324,7 +9896,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
OpenStack Swift |
MD5 |
R/W |
@@ -9333,7 +9905,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R/W |
- |
-
+
Oracle Object Storage |
MD5 |
R/W |
@@ -9342,7 +9914,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R/W |
- |
-
+
pCloud |
MD5, SHA1 ⁷ |
R |
@@ -9351,7 +9923,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
W |
- |
-
+
PikPak |
MD5 |
R |
@@ -9360,7 +9932,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R |
- |
-
+
premiumize.me |
- |
- |
@@ -9369,7 +9941,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R |
- |
-
+
put.io |
CRC-32 |
R/W |
@@ -9378,7 +9950,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R |
- |
-
+
Proton Drive |
SHA1 |
R/W |
@@ -9387,7 +9959,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R |
- |
-
+
QingStor |
MD5 |
- ⁹ |
@@ -9396,7 +9968,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
R/W |
- |
-
+
Quatrix by Maytech |
- |
R/W |
@@ -9405,7 +9977,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Seafile |
- |
- |
@@ -9414,16 +9986,16 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
SFTP |
MD5, SHA1 ² |
-R/W |
+DR/W |
Depends |
No |
- |
- |
-
+
Sia |
- |
- |
@@ -9432,7 +10004,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
SMB |
- |
R/W |
@@ -9441,7 +10013,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
SugarSync |
- |
- |
@@ -9450,7 +10022,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
-
+
Storj |
- |
R |
@@ -9459,6 +10031,15 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
- |
- |
+
+Uloz.to |
+MD5, SHA256 ¹³ |
+- |
+No |
+Yes |
+- |
+- |
+
Uptobox |
- |
@@ -9498,11 +10079,11 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
The local filesystem |
All |
-R/W |
+DR/W |
Depends |
No |
- |
-RWU |
+DRWU |
@@ -9518,14 +10099,50 @@ 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.
ModTime
-Almost all cloud storage systems store some sort of timestamp on objects, but several of them not something that is appropriate to use for syncing. E.g. some backends will only write a timestamp that represent the time of the upload. To be relevant for syncing it should be able to store the modification time of the source object. If this is not the case, rclone will only check the file size by default, though can be configured to check the file hash (with the --checksum
flag). Ideally it should also be possible to change the timestamp of an existing file without having to re-upload it.
+Almost all cloud storage systems store some sort of timestamp on objects, but several of them not something that is appropriate to use for syncing. E.g. some backends will only write a timestamp that represents the time of the upload. To be relevant for syncing it should be able to store the modification time of the source object. If this is not the case, rclone will only check the file size by default, though can be configured to check the file hash (with the --checksum
flag). Ideally it should also be possible to change the timestamp of an existing file without having to re-upload it.
+
+
+
+
+
+
+
+
+
+
+- |
+ModTimes not supported - times likely the upload time |
+
+
+R |
+ModTimes supported on files but can't be changed without re-upload |
+
+
+R/W |
+Read and Write ModTimes fully supported on files |
+
+
+DR |
+ModTimes supported on files and directories but can't be changed without re-upload |
+
+
+DR/W |
+Read and Write ModTimes fully supported on files and directories |
+
+
+
Storage systems with a -
in the ModTime column, means the modification read on objects is not the modification time of the file when uploaded. It is most likely the time the file was uploaded, or possibly something else (like the time the picture was taken in Google Photos).
Storage systems with a R
(for read-only) in the ModTime column, means the it keeps modification times on objects, and updates them when uploading objects, but it does not support changing only the modification time (SetModTime
operation) without re-uploading, possibly not even without deleting existing first. Some operations in rclone, such as copy
and sync
commands, will automatically check for SetModTime
support and re-upload if necessary to keep the modification times in sync. Other commands will not work without SetModTime
support, e.g. touch
command on an existing file will fail, and changes to modification time only on a files in a mount
will be silently ignored.
Storage systems with R/W
(for read/write) in the ModTime column, means they do also support modtime-only operations.
+Storage systems with D
in the ModTime column means that the following symbols apply to directories as well as files.
Case Insensitive
If a cloud storage systems is case sensitive then it is possible to have two files which differ only in case, e.g. file.txt
and FILE.txt
. If a cloud storage system is case insensitive then that isn't possible.
This can cause problems when syncing between a case insensitive system and a case sensitive system. The symptom of this is that no matter how many times you run the sync it never completes fully.
@@ -9947,6 +10564,10 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
Backends may or may support reading or writing metadata. They may support reading and writing system metadata (metadata intrinsic to that backend) and/or user metadata (general purpose metadata).
The levels of metadata support are
+
+
+
+
R |
-Read only System Metadata |
+Read only System Metadata on files only |
RW |
-Read and write System Metadata |
+Read and write System Metadata on files only |
RWU |
-Read and write System Metadata and read and write User Metadata |
+Read and write System Metadata and read and write User Metadata on files only |
+
+
+DR |
+Read only System Metadata on files and directories |
+
+
+DRW |
+Read and write System Metadata on files and directories |
+
+
+DRWU |
+Read and write System Metadata and read and write User Metadata on files and directories |
@@ -10032,20 +10665,6 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
Yes |
-Amazon Drive |
-Yes |
-No |
-Yes |
-Yes |
-No |
-No |
-No |
-No |
-No |
-No |
-Yes |
-
-
Amazon S3 (or S3 compatible) |
No |
Yes |
@@ -10059,7 +10678,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
No |
-
+
Backblaze B2 |
No |
Yes |
@@ -10073,7 +10692,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
No |
-
+
Box |
Yes |
Yes |
@@ -10087,7 +10706,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
Yes |
Yes |
-
+
Citrix ShareFile |
Yes |
Yes |
@@ -10101,7 +10720,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
Yes |
-
+
Dropbox |
Yes |
Yes |
@@ -10115,7 +10734,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
Yes |
Yes |
-
+
Enterprise File Fabric |
Yes |
Yes |
@@ -10129,7 +10748,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
Yes |
-
+
FTP |
No |
No |
@@ -10143,7 +10762,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
Yes |
-
+
Google Cloud Storage |
Yes |
Yes |
@@ -10157,7 +10776,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
No |
-
+
Google Drive |
Yes |
Yes |
@@ -10171,7 +10790,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
Yes |
Yes |
-
+
Google Photos |
No |
No |
@@ -10185,7 +10804,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
No |
-
+
HDFS |
Yes |
No |
@@ -10199,7 +10818,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
Yes |
Yes |
-
+
HiDrive |
Yes |
Yes |
@@ -10213,7 +10832,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
Yes |
-
+
HTTP |
No |
No |
@@ -10227,6 +10846,20 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
Yes |
+
+ImageKit |
+Yes |
+Yes |
+Yes |
+No |
+No |
+No |
+No |
+No |
+No |
+No |
+Yes |
+
Internet Archive |
No |
@@ -10578,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 |
@@ -10591,7 +11238,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
No |
No |
-
+
WebDAV |
Yes |
Yes |
@@ -10605,7 +11252,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
Yes |
Yes |
-
+
Yandex Disk |
Yes |
Yes |
@@ -10619,7 +11266,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
Yes |
Yes |
-
+
Zoho WorkDrive |
Yes |
Yes |
@@ -10633,9 +11280,9 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
Yes |
Yes |
-
+
The local filesystem |
-Yes |
+No |
No |
Yes |
Yes |
@@ -10696,7 +11343,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -10710,6 +11357,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -10724,6 +11372,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--delete-after When synchronizing, delete files on destination after transferring (default)
--delete-before When synchronizing, delete files on destination before transferring
--delete-during When synchronizing, delete files during transfer
+ --fix-case Force rename of case insensitive dest to match source
--ignore-errors Delete even if there are I/O errors
--max-delete int When synchronizing, limit the number of deletes (default -1)
--max-delete-size SizeSuffix When synchronizing, limit the total size of deletes (default off)
@@ -10761,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.65.0")
+ --user-agent string Set the user-agent to a specified string (default "rclone/v1.67.0")
Flags helpful for increasing performance.
--buffer-size SizeSuffix In memory buffer size when reading files for each --transfer (default 16Mi)
@@ -10880,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
@@ -10891,14 +11541,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--rc-web-gui-update Check and update to latest version of web gui
Backend
Backend only flags. These can be set in the config file also.
- --acd-auth-url string Auth server URL
- --acd-client-id string OAuth Client Id
- --acd-client-secret string OAuth Client Secret
- --acd-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8,Dot)
- --acd-templink-threshold SizeSuffix Files >= this size will be downloaded via their tempLink (default 9Gi)
- --acd-token string OAuth Access Token as a JSON blob
- --acd-token-url string Token server url
- --acd-upload-wait-per-gb Duration Additional time per GiB to wait after a failed complete upload to see if it appears (default 3m0s)
+ --alias-description string Description of the remote
--alias-remote string Remote or path to alias
--azureblob-access-tier string Access tier of blob: hot, cool, cold or archive
--azureblob-account string Azure Storage Account Name
@@ -10909,6 +11552,8 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--azureblob-client-id string The ID of the client in use
--azureblob-client-secret string One of the service principal's client secrets
--azureblob-client-send-certificate-chain Send the certificate chain when using certificate auth
+ --azureblob-delete-snapshots string Set to specify how to deal with snapshots on blob deletion
+ --azureblob-description string Description of the remote
--azureblob-directory-markers Upload an empty object with a trailing slash when a new directory is created
--azureblob-disable-checksum Don't store MD5 checksum with object metadata
--azureblob-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8)
@@ -10939,6 +11584,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--azurefiles-client-secret string One of the service principal's client secrets
--azurefiles-client-send-certificate-chain Send the certificate chain when using certificate auth
--azurefiles-connection-string string Azure Files Connection String
+ --azurefiles-description string Description of the remote
--azurefiles-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8,Dot)
--azurefiles-endpoint string Endpoint for the service
--azurefiles-env-auth Read credentials from runtime (environment variables, CLI or MSI)
@@ -10958,8 +11604,9 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--b2-account string Account ID or Application Key ID
--b2-chunk-size SizeSuffix Upload chunk size (default 96Mi)
--b2-copy-cutoff SizeSuffix Cutoff for switching to multipart copy (default 4Gi)
+ --b2-description string Description of the remote
--b2-disable-checksum Disable checksums for large (> upload cutoff) files
- --b2-download-auth-duration Duration Time before the authorization token will expire in s or suffix ms|s|m|h|d (default 1w)
+ --b2-download-auth-duration Duration Time before the public link authorization token will expire in s or suffix ms|s|m|h|d (default 1w)
--b2-download-url string Custom endpoint for downloads
--b2-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--b2-endpoint string Endpoint for the service
@@ -10978,6 +11625,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--box-client-id string OAuth Client Id
--box-client-secret string OAuth Client Secret
--box-commit-retries int Max number of times to try committing a multipart file (default 100)
+ --box-description string Description of the remote
--box-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot)
--box-impersonate string Impersonate this user ID when using a service account
--box-list-chunk int Size of listing chunk 1-1000 (default 1000)
@@ -10994,6 +11642,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--cache-db-path string Directory to store file structure metadata DB (default "$HOME/.cache/rclone/cache-backend")
--cache-db-purge Clear all the cached data for this remote on start
--cache-db-wait-time Duration How long to wait for the DB to be available - 0 is unlimited (default 1s)
+ --cache-description string Description of the remote
--cache-info-age Duration How long to cache file structure information (directory listings, file size, times, etc.) (default 6h0m0s)
--cache-plex-insecure string Skip all certificate verification when connecting to the Plex server
--cache-plex-password string The password of the Plex user (obscured)
@@ -11007,15 +11656,19 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--cache-workers int How many workers should run in parallel to download chunks (default 4)
--cache-writes Cache file data on writes through the FS
--chunker-chunk-size SizeSuffix Files larger than chunk size will be split in chunks (default 2Gi)
+ --chunker-description string Description of the remote
--chunker-fail-hard Choose how chunker should handle files with missing or invalid chunks
--chunker-hash-type string Choose how chunker handles hash sums (default "md5")
--chunker-remote string Remote to chunk/unchunk
+ --combine-description string Description of the remote
--combine-upstreams SpaceSepList Upstreams for combining
+ --compress-description string Description of the remote
--compress-level int GZIP compression level (-2 to 9) (default -1)
--compress-mode string Compression mode (default "gzip")
--compress-ram-cache-limit SizeSuffix Some remotes don't allow the upload of files with unknown size (default 20Mi)
--compress-remote string Remote to compress
-L, --copy-links Follow symlinks and copy the pointed to item
+ --crypt-description string Description of the remote
--crypt-directory-name-encryption Option to either encrypt directory names or leave them intact (default true)
--crypt-filename-encoding string How to encode the encrypted filename to text string (default "base32")
--crypt-filename-encryption string How to encrypt the filenames (default "standard")
@@ -11026,6 +11679,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--crypt-remote string Remote to encrypt/decrypt
--crypt-server-side-across-configs Deprecated: use --server-side-across-configs instead
--crypt-show-mapping For all files listed show how the names encrypt
+ --crypt-strict-names If set, this will raise an error when crypt comes across a filename that can't be decrypted
--crypt-suffix string If this is set it will override the default suffix of ".bin" (default ".bin")
--drive-acknowledge-abuse Set to allow files which return cannotDownloadAbusiveFile to be downloaded
--drive-allow-import-name-change Allow the filetype to change when uploading Google docs
@@ -11035,6 +11689,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--drive-client-id string Google Application Client Id
--drive-client-secret string OAuth Client Secret
--drive-copy-shortcut-content Server side copy contents of shortcuts instead of the shortcut
+ --drive-description string Description of the remote
--drive-disable-http2 Disable drive using http2 (default true)
--drive-encoding Encoding The encoding for the backend (default InvalidUtf8)
--drive-env-auth Get IAM credentials from runtime (environment variables or instance meta data if no env vars)
@@ -11083,19 +11738,23 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--dropbox-chunk-size SizeSuffix Upload chunk size (< 150Mi) (default 48Mi)
--dropbox-client-id string OAuth Client Id
--dropbox-client-secret string OAuth Client Secret
+ --dropbox-description string Description of the remote
--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
--dropbox-token-url string Token server url
--fichier-api-key string Your API Key, get it from https://1fichier.com/console/params.pl
--fichier-cdn Set if you wish to use CDN download links
+ --fichier-description string Description of the remote
--fichier-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot)
--fichier-file-password string If you want to download a shared file that is password protected, add this parameter (obscured)
--fichier-folder-password string If you want to list the files in a shared folder that is password protected, add this parameter (obscured)
--fichier-shared-folder string If you want to download a shared folder, add this parameter
+ --filefabric-description string Description of the remote
--filefabric-encoding Encoding The encoding for the backend (default Slash,Del,Ctl,InvalidUtf8,Dot)
--filefabric-permanent-token string Permanent Authentication Token
--filefabric-root-folder-id string ID of the root folder
@@ -11106,6 +11765,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--ftp-ask-password Allow asking for FTP password when needed
--ftp-close-timeout Duration Maximum time to wait for a response to close (default 1m0s)
--ftp-concurrency int Maximum number of FTP simultaneous connections, 0 for unlimited
+ --ftp-description string Description of the remote
--ftp-disable-epsv Disable using EPSV even if server advertises support
--ftp-disable-mlsd Disable using MLSD even if server advertises support
--ftp-disable-tls13 Disable TLS 1.3 (workaround for FTP servers with buggy TLS)
@@ -11131,6 +11791,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--gcs-client-id string OAuth Client Id
--gcs-client-secret string OAuth Client Secret
--gcs-decompress If set this will decompress gzip encoded objects
+ --gcs-description string Description of the remote
--gcs-directory-markers Upload an empty object with a trailing slash when a new directory is created
--gcs-encoding Encoding The encoding for the backend (default Slash,CrLf,InvalidUtf8,Dot)
--gcs-endpoint string Endpoint for the service
@@ -11151,6 +11812,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--gphotos-batch-timeout Duration Max time to allow an idle upload batch before uploading (default 0s)
--gphotos-client-id string OAuth Client Id
--gphotos-client-secret string OAuth Client Secret
+ --gphotos-description string Description of the remote
--gphotos-encoding Encoding The encoding for the backend (default Slash,CrLf,InvalidUtf8,Dot)
--gphotos-include-archived Also view and download archived media
--gphotos-read-only Set to make the Google Photos backend read only
@@ -11159,10 +11821,12 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--gphotos-token string OAuth Access Token as a JSON blob
--gphotos-token-url string Token server url
--hasher-auto-size SizeSuffix Auto-update checksum for files smaller than this size (disabled by default)
+ --hasher-description string Description of the remote
--hasher-hashes CommaSepList Comma separated list of supported checksum types (default md5,sha1)
--hasher-max-age Duration Maximum time to keep checksums in cache (0 = no cache, off = cache forever) (default off)
--hasher-remote string Remote to cache checksums for (e.g. myRemote:path)
--hdfs-data-transfer-protection string Kerberos data transfer protection: authentication|integrity|privacy
+ --hdfs-description string Description of the remote
--hdfs-encoding Encoding The encoding for the backend (default Slash,Colon,Del,Ctl,InvalidUtf8,Dot)
--hdfs-namenode CommaSepList Hadoop name nodes and ports
--hdfs-service-principal-name string Kerberos service principal name for the namenode
@@ -11171,6 +11835,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--hidrive-chunk-size SizeSuffix Chunksize for chunked uploads (default 48Mi)
--hidrive-client-id string OAuth Client Id
--hidrive-client-secret string OAuth Client Secret
+ --hidrive-description string Description of the remote
--hidrive-disable-fetching-member-count Do not fetch number of objects in directories unless it is absolutely necessary
--hidrive-encoding Encoding The encoding for the backend (default Slash,Dot)
--hidrive-endpoint string Endpoint for the service (default "https://api.hidrive.strato.com/2.1")
@@ -11181,10 +11846,13 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--hidrive-token-url string Token server url
--hidrive-upload-concurrency int Concurrency for chunked uploads (default 4)
--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
+ --imagekit-description string Description of the remote
--imagekit-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket)
--imagekit-endpoint string You can find your ImageKit.io URL endpoint in your [dashboard](https://imagekit.io/dashboard/developer/api-keys)
--imagekit-only-signed Restrict unsigned image URLs If you have configured Restrict unsigned image URLs in your dashboard settings, set this to true
@@ -11193,6 +11861,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--imagekit-upload-tags string Tags to add to the uploaded files, e.g. "tag1,tag2"
--imagekit-versions Include old versions in directory listings
--internetarchive-access-key-id string IAS3 Access Key
+ --internetarchive-description string Description of the remote
--internetarchive-disable-checksum Don't ask the server to test against MD5 checksum calculated by rclone (default true)
--internetarchive-encoding Encoding The encoding for the backend (default Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot)
--internetarchive-endpoint string IAS3 Endpoint (default "https://s3.us.archive.org")
@@ -11202,6 +11871,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--jottacloud-auth-url string Auth server URL
--jottacloud-client-id string OAuth Client Id
--jottacloud-client-secret string OAuth Client Secret
+ --jottacloud-description string Description of the remote
--jottacloud-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot)
--jottacloud-hard-delete Delete files permanently rather than putting them into the trash
--jottacloud-md5-memory-limit SizeSuffix Files bigger than this will be cached on disk to calculate the MD5 if required (default 10Mi)
@@ -11210,29 +11880,34 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--jottacloud-token-url string Token server url
--jottacloud-trashed-only Only show files that are in the trash
--jottacloud-upload-resume-limit SizeSuffix Files bigger than this can be resumed if the upload fail's (default 10Mi)
+ --koofr-description string Description of the remote
--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
+ --linkbox-description string Description of the remote
--linkbox-token string Token from https://www.linkbox.to/admin/account
-l, --links Translate symlinks to/from regular files with a '.rclonelink' extension
--local-case-insensitive Force the filesystem to report itself as case insensitive
--local-case-sensitive Force the filesystem to report itself as case sensitive
+ --local-description string Description of the remote
--local-encoding Encoding The encoding for the backend (default Slash,Dot)
--local-no-check-updated Don't check to see if the files change during upload
--local-no-preallocate Disable preallocation of disk space for transferred files
--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
--mailru-check-hash What should copy do if file checksum is mismatched or invalid (default true)
--mailru-client-id string OAuth Client Id
--mailru-client-secret string OAuth Client Secret
+ --mailru-description string Description of the remote
--mailru-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--mailru-pass string Password (obscured)
--mailru-speedup-enable Skip full upload if there is another file with same data hash (default true)
@@ -11243,12 +11918,15 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--mailru-token-url string Token server url
--mailru-user string User name (usually email)
--mega-debug Output more debug from Mega
+ --mega-description string Description of the remote
--mega-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8,Dot)
--mega-hard-delete Delete files permanently rather than putting them into the trash
--mega-pass string Password (obscured)
--mega-use-https Use HTTPS for transfers
--mega-user string User name
+ --memory-description string Description of the remote
--netstorage-account string Set the NetStorage account name
+ --netstorage-description string Description of the remote
--netstorage-host string Domain+path of NetStorage host to connect to
--netstorage-protocol string Select between HTTP or HTTPS protocol (default "https")
--netstorage-secret string Set the NetStorage account secret/G2O key for authentication (obscured)
@@ -11260,15 +11938,18 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--onedrive-client-id string OAuth Client Id
--onedrive-client-secret string OAuth Client Secret
--onedrive-delta If set rclone will use delta listing to implement recursive listings
+ --onedrive-description string Description of the remote
--onedrive-drive-id string The ID of the drive to use
--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")
--onedrive-link-type string Set the type of the links created by the link command (default "view")
--onedrive-list-chunk int Size of listing chunk (default 1000)
+ --onedrive-metadata-permissions Bits Control whether permissions should be read or written in metadata (default off)
--onedrive-no-versions Remove all versions on modifying operations
--onedrive-region string Choose national cloud region for OneDrive (default "global")
--onedrive-root-folder-id string ID of the root folder
@@ -11282,6 +11963,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--oos-config-profile string Profile name inside the oci config file (default "Default")
--oos-copy-cutoff SizeSuffix Cutoff for switching to multipart copy (default 4.656Gi)
--oos-copy-timeout Duration Timeout for copy (default 1m0s)
+ --oos-description string Description of the remote
--oos-disable-checksum Don't store MD5 checksum with object metadata
--oos-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8,Dot)
--oos-endpoint string Endpoint for Object storage API
@@ -11300,12 +11982,14 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--oos-upload-concurrency int Concurrency for multipart uploads (default 10)
--oos-upload-cutoff SizeSuffix Cutoff for switching to chunked upload (default 200Mi)
--opendrive-chunk-size SizeSuffix Files will be uploaded in chunks this size (default 10Mi)
+ --opendrive-description string Description of the remote
--opendrive-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot)
--opendrive-password string Password (obscured)
--opendrive-username string Username
--pcloud-auth-url string Auth server URL
--pcloud-client-id string OAuth Client Id
--pcloud-client-secret string OAuth Client Secret
+ --pcloud-description string Description of the remote
--pcloud-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--pcloud-hostname string Hostname to connect to (default "api.pcloud.com")
--pcloud-password string Your pcloud password (obscured)
@@ -11314,8 +11998,10 @@ 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
--pikpak-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot)
--pikpak-hash-memory-limit SizeSuffix Files bigger than this will be cached on disk to calculate hash if required (default 10Mi)
--pikpak-pass string Pikpak password (obscured)
@@ -11323,16 +12009,19 @@ 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
--premiumizeme-client-id string OAuth Client Id
--premiumizeme-client-secret string OAuth Client Secret
+ --premiumizeme-description string Description of the remote
--premiumizeme-encoding Encoding The encoding for the backend (default Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--premiumizeme-token string OAuth Access Token as a JSON blob
--premiumizeme-token-url string Token server url
--protondrive-2fa string The 2FA code
--protondrive-app-version string The app version string (default "macos-drive@1.0.0-alpha.1+rclone")
+ --protondrive-description string Description of the remote
--protondrive-enable-caching Caches the files and folders metadata to reduce API calls (default true)
--protondrive-encoding Encoding The encoding for the backend (default Slash,LeftSpace,RightSpace,InvalidUtf8,Dot)
--protondrive-mailbox-password string The mailbox password of your two-password proton account (obscured)
@@ -11343,12 +12032,14 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--putio-auth-url string Auth server URL
--putio-client-id string OAuth Client Id
--putio-client-secret string OAuth Client Secret
+ --putio-description string Description of the remote
--putio-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--putio-token string OAuth Access Token as a JSON blob
--putio-token-url string Token server url
--qingstor-access-key-id string QingStor Access Key ID
--qingstor-chunk-size SizeSuffix Chunk size to use for uploading (default 4Mi)
--qingstor-connection-retries int Number of connection retries (default 3)
+ --qingstor-description string Description of the remote
--qingstor-encoding Encoding The encoding for the backend (default Slash,Ctl,InvalidUtf8)
--qingstor-endpoint string Enter an endpoint URL to connection QingStor API
--qingstor-env-auth Get QingStor credentials from runtime
@@ -11357,18 +12048,21 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--qingstor-upload-cutoff SizeSuffix Cutoff for switching to chunked upload (default 200Mi)
--qingstor-zone string Zone to connect to
--quatrix-api-key string API key for accessing Quatrix account
+ --quatrix-description string Description of the remote
--quatrix-effective-upload-time string Wanted upload time for one chunk (default "4s")
--quatrix-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--quatrix-hard-delete Delete files permanently rather than putting them into the trash
--quatrix-host string Host name of Quatrix account
--quatrix-maximal-summary-chunk-size SizeSuffix The maximal summary for all chunks. It should not be less than 'transfers'*'minimal_chunk_size' (default 95.367Mi)
--quatrix-minimal-chunk-size SizeSuffix The minimal size for one chunk (default 9.537Mi)
+ --quatrix-skip-project-folders Skip project folders in operations
--s3-access-key-id string AWS Access Key ID
--s3-acl string Canned ACL used when creating buckets and storing or copying objects
--s3-bucket-acl string Canned ACL used when creating buckets
--s3-chunk-size SizeSuffix Chunk size to use for uploading (default 5Mi)
--s3-copy-cutoff SizeSuffix Cutoff for switching to multipart copy (default 4.656Gi)
--s3-decompress If set this will decompress gzip encoded objects
+ --s3-description string Description of the remote
--s3-directory-markers Upload an empty object with a trailing slash when a new directory is created
--s3-disable-checksum Don't store MD5 checksum with object metadata
--s3-disable-http2 Disable usage of http2 for S3 backends
@@ -11403,19 +12097,22 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--s3-sse-kms-key-id string If using KMS ID you must provide the ARN of Key
--s3-storage-class string The storage class to use when storing new objects in S3
--s3-sts-endpoint string Endpoint for STS
- --s3-upload-concurrency int Concurrency for multipart uploads (default 4)
+ --s3-upload-concurrency int Concurrency for multipart uploads and copies (default 4)
--s3-upload-cutoff SizeSuffix Cutoff for switching to chunked upload (default 200Mi)
--s3-use-accelerate-endpoint If true use the AWS S3 accelerated endpoint
--s3-use-accept-encoding-gzip Accept-Encoding: gzip Whether to send Accept-Encoding: gzip header (default unset)
--s3-use-already-exists Tristate Set if rclone should report BucketAlreadyExists errors on bucket creation (default unset)
+ --s3-use-dual-stack If true use AWS S3 dual-stack endpoint (IPv6 support)
--s3-use-multipart-etag Tristate Whether to use ETag in multipart uploads for verification (default unset)
--s3-use-multipart-uploads Tristate Set if rclone should use multipart uploads (default unset)
--s3-use-presigned-request Whether to use a presigned request or PutObject for single part uploads
--s3-v2-auth If true use v2 authentication
--s3-version-at Time Show file versions as they were at the specified time (default off)
+ --s3-version-deleted Show deleted file markers when using versions
--s3-versions Include old versions in directory listings
--seafile-2fa Two-factor authentication ('true' if the account has 2FA enabled)
--seafile-create-library Should rclone create a library if it doesn't exist
+ --seafile-description string Description of the remote
--seafile-encoding Encoding The encoding for the backend (default Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8)
--seafile-library string Name of the library
--seafile-library-key string Library password (for encrypted libraries only) (obscured)
@@ -11426,7 +12123,9 @@ 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
--sftp-disable-concurrent-writes If set don't use concurrent writes
--sftp-disable-hashcheck Disable the execution of SSH commands to determine if remote file hashing is available
@@ -11461,6 +12160,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--sharefile-chunk-size SizeSuffix Upload chunk size (default 64Mi)
--sharefile-client-id string OAuth Client Id
--sharefile-client-secret string OAuth Client Secret
+ --sharefile-description string Description of the remote
--sharefile-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot)
--sharefile-endpoint string Endpoint for API calls
--sharefile-root-folder-id string ID of the root folder
@@ -11469,10 +12169,12 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--sharefile-upload-cutoff SizeSuffix Cutoff for switching to multipart upload (default 128Mi)
--sia-api-password string Sia Daemon API Password (obscured)
--sia-api-url string Sia daemon API URL, like http://sia.daemon.host:9980 (default "http://127.0.0.1:9980")
+ --sia-description string Description of the remote
--sia-encoding Encoding The encoding for the backend (default Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot)
--sia-user-agent string Siad User Agent (default "Sia-Agent")
--skip-links Don't warn about skipped symlinks
--smb-case-insensitive Whether the server is configured to be case-insensitive (default true)
+ --smb-description string Description of the remote
--smb-domain string Domain name for NTLM authentication (default "WORKGROUP")
--smb-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot)
--smb-hide-special-share Hide special shares (e.g. print$) which users aren't supposed to access (default true)
@@ -11484,6 +12186,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--smb-user string SMB username (default "$USER")
--storj-access-grant string Access grant
--storj-api-key string API key
+ --storj-description string Description of the remote
--storj-passphrase string Encryption passphrase
--storj-provider string Choose an authentication method (default "existing")
--storj-satellite-address string Satellite address (default "us1.storj.io")
@@ -11492,6 +12195,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--sugarsync-authorization string Sugarsync authorization
--sugarsync-authorization-expiry string Sugarsync authorization expiry
--sugarsync-deleted-id string Sugarsync deleted folder id
+ --sugarsync-description string Description of the remote
--sugarsync-encoding Encoding The encoding for the backend (default Slash,Ctl,InvalidUtf8,Dot)
--sugarsync-hard-delete Permanently delete files if true
--sugarsync-private-access-key string Sugarsync Private Access Key
@@ -11504,7 +12208,8 @@ 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)
--swift-endpoint-type string Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE) (default "public")
@@ -11519,22 +12224,35 @@ 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")
+ --union-description string Description of the remote
--union-min-free-space SizeSuffix Minimum viable free space for lfs/eplfs policies (default 1Gi)
--union-search-policy string Policy to choose upstream on SEARCH category (default "ff")
--union-upstreams string List of space separated upstreams
--uptobox-access-token string Your access token
+ --uptobox-description string Description of the remote
--uptobox-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot)
--uptobox-private Set to make uploaded files private
--webdav-bearer-token string Bearer token instead of user/pass (e.g. a Macaroon)
--webdav-bearer-token-command string Command to run to get a bearer token
+ --webdav-description string Description of the remote
--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)
--webdav-url string URL of http host to connect to
@@ -11543,6 +12261,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--yandex-auth-url string Auth server URL
--yandex-client-id string OAuth Client Id
--yandex-client-secret string OAuth Client Secret
+ --yandex-description string Description of the remote
--yandex-encoding Encoding The encoding for the backend (default Slash,Del,Ctl,InvalidUtf8,Dot)
--yandex-hard-delete Delete files permanently rather than putting them into the trash
--yandex-token string OAuth Access Token as a JSON blob
@@ -11550,6 +12269,7 @@ Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
--zoho-auth-url string Auth server URL
--zoho-client-id string OAuth Client Id
--zoho-client-secret string OAuth Client Secret
+ --zoho-description string Description of the remote
--zoho-encoding Encoding The encoding for the backend (default Del,Ctl,InvalidUtf8)
--zoho-region string Zoho region to connect to
--zoho-token string OAuth Access Token as a JSON blob
@@ -11735,16 +12455,21 @@ docker volume create my_vol -d rclone -o opt1=new_val1 ...
docker volume list
docker volume inspect my_vol
If docker refuses to remove the volume, you should find containers or swarm services that use it and stop them first.
+Bisync
+bisync
is in beta and is considered an advanced command, so use with care. Make sure you have read and understood the entire manual (especially the Limitations section) before using, or data loss can result. Questions can be asked in the Rclone Forum.
Getting started
- Install rclone and setup your remotes.
-- Bisync will create its working directory at
~/.cache/rclone/bisync
on Linux or C:\Users\MyLogin\AppData\Local\rclone\bisync
on Windows. Make sure that this location is writable.
+- Bisync will create its working directory at
~/.cache/rclone/bisync
on Linux, /Users/yourusername/Library/Caches/rclone/bisync
on Mac, or C:\Users\MyLogin\AppData\Local\rclone\bisync
on Windows. Make sure that this location is writable.
- Run bisync with the
--resync
flag, specifying the paths to the local and remote sync directory roots.
-- For successive sync runs, leave off the
--resync
flag.
+- For successive sync runs, leave off the
--resync
flag. (Important!)
- Consider using a filters file for excluding unnecessary files and directories from the sync.
- Consider setting up the --check-access feature for safety.
-- On Linux, consider setting up a crontab entry. bisync can safely run in concurrent cron jobs thanks to lock files it maintains.
+- On Linux or Mac, consider setting up a crontab entry. bisync can safely run in concurrent cron jobs thanks to lock files it maintains.
+For example, your first command might look like this:
+rclone bisync remote1:path1 remote2:path2 --create-empty-src-dirs --compare size,modtime,checksum --slow-hash-sync-only --resilient -MvP --drive-skip-gdocs --fix-case --resync --dry-run
+If all looks good, run it again without --dry-run
. After that, remove --resync
as well.
Here is a typical run log (with timestamps removed for clarity):
rclone bisync /testdir/path1/ /testdir/path2/ --verbose
INFO : Synching Path1 "/testdir/path1/" with Path2 "/testdir/path2/"
@@ -11797,36 +12522,36 @@ Positional arguments:
Type 'rclone listremotes' for list of configured remotes.
Optional Flags:
- --check-access Ensure expected `RCLONE_TEST` files are found on
- both Path1 and Path2 filesystems, else abort.
- --check-filename FILENAME Filename for `--check-access` (default: `RCLONE_TEST`)
- --check-sync CHOICE Controls comparison of final listings:
- `true | false | only` (default: true)
- If set to `only`, bisync will only compare listings
- from the last run but skip actual sync.
- --filters-file PATH Read filtering patterns from a file
- --max-delete PERCENT Safety check on maximum percentage of deleted files allowed.
- If exceeded, the bisync run will abort. (default: 50%)
- --force Bypass `--max-delete` safety check and run the sync.
- Consider using with `--verbose`
- --create-empty-src-dirs Sync creation and deletion of empty directories.
- (Not compatible with --remove-empty-dirs)
- --remove-empty-dirs Remove empty directories at the final cleanup step.
- -1, --resync Performs the resync run.
- Warning: Path1 files may overwrite Path2 versions.
- Consider using `--verbose` or `--dry-run` first.
- --ignore-listing-checksum Do not use checksums for listings
- (add --ignore-checksum to additionally skip post-copy checksum checks)
- --resilient Allow future runs to retry after certain less-serious errors,
- instead of requiring --resync. Use at your own risk!
- --localtime Use local time in listings (default: UTC)
- --no-cleanup Retain working files (useful for troubleshooting and testing).
- --workdir PATH Use custom working directory (useful for testing).
- (default: `~/.cache/rclone/bisync`)
- -n, --dry-run Go through the motions - No files are copied/deleted.
- -v, --verbose Increases logging verbosity.
- May be specified more than once for more details.
- -h, --help help for bisync
+ --backup-dir1 string --backup-dir for Path1. Must be a non-overlapping path on the same remote.
+ --backup-dir2 string --backup-dir for Path2. Must be a non-overlapping path on the same remote.
+ --check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
+ --check-filename string Filename for --check-access (default: RCLONE_TEST)
+ --check-sync string Controls comparison of final listings: true|false|only (default: true) (default "true")
+ --compare string Comma-separated list of bisync-specific compare options ex. 'size,modtime,checksum' (default: 'size,modtime')
+ --conflict-loser ConflictLoserAction Action to take on the loser of a sync conflict (when there is a winner) or on both files (when there is no winner): , num, pathname, delete (default: num)
+ --conflict-resolve string Automatically resolve conflicts by preferring the version that is: none, path1, path2, newer, older, larger, smaller (default: none) (default "none")
+ --conflict-suffix string Suffix to use when renaming a --conflict-loser. Can be either one string or two comma-separated strings to assign different suffixes to Path1/Path2. (default: 'conflict')
+ --create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
+ --download-hash Compute hash by downloading when otherwise unavailable. (warning: may be slow and use lots of data!)
+ --filters-file string Read filtering patterns from a file
+ --force Bypass --max-delete safety check and run the sync. Consider using with --verbose
+ -h, --help help for bisync
+ --ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
+ --max-lock Duration Consider lock files older than this to be expired (default: 0 (never expire)) (minimum: 2m) (default 0s)
+ --no-cleanup Retain working files (useful for troubleshooting and testing).
+ --no-slow-hash Ignore listing checksums only on backends where they are slow
+ --recover Automatically recover from interruptions without requiring --resync.
+ --remove-empty-dirs Remove ALL empty directories at the final cleanup step.
+ --resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync. Use at your own risk!
+ -1, --resync Performs the resync run. Equivalent to --resync-mode path1. Consider using --verbose or --dry-run first.
+ --resync-mode string During resync, prefer the version that is: path1, path2, newer, older, larger, smaller (default: path1 if --resync, otherwise none for no resync.) (default "none")
+ --retries int Retry operations this many times if they fail (requires --resilient). (default 3)
+ --retries-sleep Duration Interval between retrying operations if they fail, e.g. 500ms, 60s, 5m (0 to disable) (default 0s)
+ --slow-hash-sync-only Ignore slow checksums for listings and deltas, but still consider them during sync calls.
+ --workdir string Use custom working dir - useful for testing. (default: {WORKDIR})
+ --max-delete PERCENT Safety check on maximum percentage of deleted files allowed. If exceeded, the bisync run will abort. (default: 50%)
+ -n, --dry-run Go through the motions - No files are copied/deleted.
+ -v, --verbose Increases logging verbosity. May be specified more than once for more details.
Arbitrary rclone flags may be specified on the bisync command line, for example rclone bisync ./testdir/path1/ gdrive:testdir/path2/ --drive-skip-gdocs -v -v --timeout 10s
Note that interactions of various rclone flags with bisync process flow has not been fully tested yet.
Paths
Path1 and Path2 arguments may be references to any mix of local directory paths (absolute or relative), UNC paths (//server/share/path
), Windows drive paths (with a drive letter and :
) or configured remotes with optional subdirectory paths. Cloud references are distinguished by having a :
in the argument (see Windows support below).
@@ -11834,50 +12559,153 @@ Optional Flags:
The listings in bisync working directory (default: ~/.cache/rclone/bisync
) are named based on the Path1 and Path2 arguments so that separate syncs to individual directories within the tree may be set up, e.g.: path_to_local_tree..dropbox_subdir.lst
.
Any empty directories after the sync on both the Path1 and Path2 filesystems are not deleted by default, unless --create-empty-src-dirs
is specified. If the --remove-empty-dirs
flag is specified, then both paths will have ALL empty directories purged as the last step in the process.
Command-line flags
---resync
-This will effectively make both Path1 and Path2 filesystems contain a matching superset of all files. Path2 files that do not exist in Path1 will be copied to Path1, and the process will then copy the Path1 tree to Path2.
-The --resync
sequence is roughly equivalent to:
-rclone copy Path2 Path1 --ignore-existing
-rclone copy Path1 Path2
-Or, if using --create-empty-src-dirs
:
-rclone copy Path2 Path1 --ignore-existing
-rclone copy Path1 Path2 --create-empty-src-dirs
-rclone copy Path2 Path1 --create-empty-src-dirs
+--resync
+This will effectively make both Path1 and Path2 filesystems contain a matching superset of all files. By default, Path2 files that do not exist in Path1 will be copied to Path1, and the process will then copy the Path1 tree to Path2.
+The --resync
sequence is roughly equivalent to the following (but see --resync-mode
for other options):
+rclone copy Path2 Path1 --ignore-existing [--create-empty-src-dirs]
+rclone copy Path1 Path2 [--create-empty-src-dirs]
The base directories on both Path1 and Path2 filesystems must exist or bisync will fail. This is required for safety - that bisync can verify that both paths are valid.
-When using --resync
, a newer version of a file on the Path2 filesystem will be overwritten by the Path1 filesystem version. (Note that this is NOT entirely symmetrical.) Carefully evaluate deltas using --dry-run.
+When using --resync
, a newer version of a file on the Path2 filesystem will (by default) be overwritten by the Path1 filesystem version. (Note that this is NOT entirely symmetrical, and more symmetrical options can be specified with the --resync-mode
flag.) Carefully evaluate deltas using --dry-run.
For a resync run, one of the paths may be empty (no files in the path tree). The resync run should result in files on both paths, else a normal non-resync run will fail.
For a non-resync run, either path being empty (no files in the tree) fails with Empty current PathN listing. Cannot sync to an empty directory: X.pathN.lst
This is a safety check that an unexpected empty path does not result in deleting everything in the other path.
---check-access
+Note that --resync
implies --resync-mode path1
unless a different --resync-mode
is explicitly specified. It is not necessary to use both the --resync
and --resync-mode
flags -- either one is sufficient without the other.
+Note: --resync
(including --resync-mode
) should only be used under three specific (rare) circumstances: 1. It is your first bisync run (between these two paths) 2. You've just made changes to your bisync settings (such as editing the contents of your --filters-file
) 3. There was an error on the prior run, and as a result, bisync now requires --resync
to recover
+The rest of the time, you should omit --resync
. The reason is because --resync
will only copy (not sync) each side to the other. Therefore, if you included --resync
for every bisync run, it would never be possible to delete a file -- the deleted file would always keep reappearing at the end of every run (because it's being copied from the other side where it still exists). Similarly, renaming a file would always result in a duplicate copy (both old and new name) on both sides.
+If you find that frequent interruptions from #3 are an issue, rather than automatically running --resync
, the recommended alternative is to use the --resilient
, --recover
, and --conflict-resolve
flags, (along with Graceful Shutdown mode, when needed) for a very robust "set-it-and-forget-it" bisync setup that can automatically bounce back from almost any interruption it might encounter. Consider adding something like the following:
+--resilient --recover --max-lock 2m --conflict-resolve newer
+--resync-mode CHOICE
+In the event that a file differs on both sides during a --resync
, --resync-mode
controls which version will overwrite the other. The supported options are similar to --conflict-resolve
. For all of the following options, the version that is kept is referred to as the "winner", and the version that is overwritten (deleted) is referred to as the "loser". The options are named after the "winner":
+
+path1
- (the default) - the version from Path1 is unconditionally considered the winner (regardless of modtime
and size
, if any). This can be useful if one side is more trusted or up-to-date than the other, at the time of the --resync
.
+path2
- same as path1
, except the path2 version is considered the winner.
+newer
- the newer file (by modtime
) is considered the winner, regardless of which side it came from. This may result in having a mix of some winners from Path1, and some winners from Path2. (The implementation is analogous to running rclone copy --update
in both directions.)
+older
- same as newer
, except the older file is considered the winner, and the newer file is considered the loser.
+larger
- the larger file (by size
) is considered the winner (regardless of modtime
, if any). This can be a useful option for remotes without modtime
support, or with the kinds of files (such as logs) that tend to grow but not shrink, over time.
+smaller
- the smaller file (by size
) is considered the winner (regardless of modtime
, if any).
+
+For all of the above options, note the following: - If either of the underlying remotes lacks support for the chosen method, it will be ignored and will fall back to the default of path1
. (For example, if --resync-mode newer
is set, but one of the paths uses a remote that doesn't support modtime
.) - If a winner can't be determined because the chosen method's attribute is missing or equal, it will be ignored, and bisync will instead try to determine whether the files differ by looking at the other --compare
methods in effect. (For example, if --resync-mode newer
is set, but the Path1 and Path2 modtimes are identical, bisync will compare the sizes.) If bisync concludes that they differ, preference is given to whichever is the "source" at that moment. (In practice, this gives a slight advantage to Path2, as the 2to1 copy comes before the 1to2 copy.) If the files do not differ, nothing is copied (as both sides are already correct). - These options apply only to files that exist on both sides (with the same name and relative path). Files that exist only on one side and not the other are always copied to the other, during --resync
(this is one of the main differences between resync and non-resync runs.). - --conflict-resolve
, --conflict-loser
, and --conflict-suffix
do not apply during --resync
, and unlike these flags, nothing is renamed during --resync
. When a file differs on both sides during --resync
, one version always overwrites the other (much like in rclone copy
.) (Consider using --backup-dir
to retain a backup of the losing version.) - Unlike for --conflict-resolve
, --resync-mode none
is not a valid option (or rather, it will be interpreted as "no resync", unless --resync
has also been specified, in which case it will be ignored.) - Winners and losers are decided at the individual file-level only (there is not currently an option to pick an entire winning directory atomically, although the path1
and path2
options typically produce a similar result.) - To maintain backward-compatibility, the --resync
flag implies --resync-mode path1
unless a different --resync-mode
is explicitly specified. Similarly, all --resync-mode
options (except none
) imply --resync
, so it is not necessary to use both the --resync
and --resync-mode
flags simultaneously -- either one is sufficient without the other.
+--check-access
Access check files are an additional safety measure against data loss. bisync will ensure it can find matching RCLONE_TEST
files in the same places in the Path1 and Path2 filesystems. RCLONE_TEST
files are not generated automatically. For --check-access
to succeed, you must first either: A) Place one or more RCLONE_TEST
files in both systems, or B) Set --check-filename
to a filename already in use in various locations throughout your sync'd fileset. Recommended methods for A) include: * rclone touch Path1/RCLONE_TEST
(create a new file) * rclone copyto Path1/RCLONE_TEST Path2/RCLONE_TEST
(copy an existing file) * rclone copy Path1/RCLONE_TEST Path2/RCLONE_TEST --include "RCLONE_TEST"
(copy multiple files at once, recursively) * create the files manually (outside of rclone) * run bisync
once without --check-access
to set matching files on both filesystems will also work, but is not preferred, due to potential for user error (you are temporarily disabling the safety feature).
Note that --check-access
is still enforced on --resync
, so bisync --resync --check-access
will not work as a method of initially setting the files (this is to ensure that bisync can't inadvertently circumvent its own safety switch.)
Time stamps and file contents for RCLONE_TEST
files are not important, just the names and locations. If you have symbolic links in your sync tree it is recommended to place RCLONE_TEST
files in the linked-to directory tree to protect against bisync assuming a bunch of deleted files if the linked-to tree should not be accessible. See also the --check-filename flag.
---check-filename
+--check-filename
Name of the file(s) used in access health validation. The default --check-filename
is RCLONE_TEST
. One or more files having this filename must exist, synchronized between your source and destination filesets, in order for --check-access
to succeed. See --check-access for additional details.
---max-delete
+--compare
+As of v1.66
, bisync fully supports comparing based on any combination of size, modtime, and checksum (lifting the prior restriction on backends without modtime support.)
+By default (without the --compare
flag), bisync inherits the same comparison options as sync
(that is: size
and modtime
by default, unless modified with flags such as --checksum
or --size-only
.)
+If the --compare
flag is set, it will override these defaults. This can be useful if you wish to compare based on combinations not currently supported in sync
, such as comparing all three of size
AND modtime
AND checksum
simultaneously (or just modtime
AND checksum
).
+--compare
takes a comma-separated list, with the currently supported values being size
, modtime
, and checksum
. For example, if you want to compare size and checksum, but not modtime, you would do:
+--compare size,checksum
+Or if you want to compare all three:
+--compare size,modtime,checksum
+--compare
overrides any conflicting flags. For example, if you set the conflicting flags --compare checksum --size-only
, --size-only
will be ignored, and bisync will compare checksum and not size. To avoid confusion, it is recommended to use either --compare
or the normal sync
flags, but not both.
+If --compare
includes checksum
and both remotes support checksums but have no hash types in common with each other, checksums will be considered only for comparisons within the same side (to determine what has changed since the prior sync), but not for comparisons against the opposite side. If one side supports checksums and the other does not, checksums will only be considered on the side that supports them.
+When comparing with checksum
and/or size
without modtime
, bisync cannot determine whether a file is newer
or older
-- only whether it is changed
or unchanged
. (If it is changed
on both sides, bisync still does the standard equality-check to avoid declaring a sync conflict unless it absolutely has to.)
+It is recommended to do a --resync
when changing --compare
settings, as otherwise your prior listing files may not contain the attributes you wish to compare (for example, they will not have stored checksums if you were not previously comparing checksums.)
+--ignore-listing-checksum
+When --checksum
or --compare checksum
is set, bisync will retrieve (or generate) checksums (for backends that support them) when creating the listings for both paths, and store the checksums in the listing files. --ignore-listing-checksum
will disable this behavior, which may speed things up considerably, especially on backends (such as local) where hashes must be computed on the fly instead of retrieved. Please note the following:
+
+- As of
v1.66
, --ignore-listing-checksum
is now automatically set when neither --checksum
nor --compare checksum
are in use (as the checksums would not be used for anything.)
+--ignore-listing-checksum
is NOT the same as --ignore-checksum
, and you may wish to use one or the other, or both. In a nutshell: --ignore-listing-checksum
controls whether checksums are considered when scanning for diffs, while --ignore-checksum
controls whether checksums are considered during the copy/sync operations that follow, if there ARE diffs.
+- Unless
--ignore-listing-checksum
is passed, bisync currently computes hashes for one path even when there's no common hash with the other path (for example, a crypt remote.) This can still be beneficial, as the hashes will still be used to detect changes within the same side (if --checksum
or --compare checksum
is set), even if they can't be used to compare against the opposite side.
+- If you wish to ignore listing checksums only on remotes where they are slow to compute, consider using
--no-slow-hash
(or --slow-hash-sync-only
) instead of --ignore-listing-checksum
.
+- If
--ignore-listing-checksum
is used simultaneously with --compare checksum
(or --checksum
), checksums will be ignored for bisync deltas, but still considered during the sync operations that follow (if deltas are detected based on modtime and/or size.)
+
+--no-slow-hash
+On some remotes (notably local
), checksums can dramatically slow down a bisync run, because hashes cannot be stored and need to be computed in real-time when they are requested. On other remotes (such as drive
), they add practically no time at all. The --no-slow-hash
flag will automatically skip checksums on remotes where they are slow, while still comparing them on others (assuming --compare
includes checksum
.) This can be useful when one of your bisync paths is slow but you still want to check checksums on the other, for a more robust sync.
+--slow-hash-sync-only
+Same as --no-slow-hash
, except slow hashes are still considered during sync calls. They are still NOT considered for determining deltas, nor or they included in listings. They are also skipped during --resync
. The main use case for this flag is when you have a large number of files, but relatively few of them change from run to run -- so you don't want to check your entire tree every time (it would take too long), but you still want to consider checksums for the smaller group of files for which a modtime
or size
change was detected. Keep in mind that this speed savings comes with a safety trade-off: if a file's content were to change without a change to its modtime
or size
, bisync would not detect it, and it would not be synced.
+--slow-hash-sync-only
is only useful if both remotes share a common hash type (if they don't, bisync will automatically fall back to --no-slow-hash
.) Both --no-slow-hash
and --slow-hash-sync-only
have no effect without --compare checksum
(or --checksum
).
+--download-hash
+If --download-hash
is set, bisync will use best efforts to obtain an MD5 checksum by downloading and computing on-the-fly, when checksums are not otherwise available (for example, a remote that doesn't support them.) Note that since rclone has to download the entire file, this may dramatically slow down your bisync runs, and is also likely to use a lot of data, so it is probably not practical for bisync paths with a large total file size. However, it can be a good option for syncing small-but-important files with maximum accuracy (for example, a source code repo on a crypt
remote.) An additional advantage over methods like cryptcheck
is that the original file is not required for comparison (for example, --download-hash
can be used to bisync two different crypt remotes with different passwords.)
+When --download-hash
is set, bisync still looks for more efficient checksums first, and falls back to downloading only when none are found. It takes priority over conflicting flags such as --no-slow-hash
. --download-hash
is not suitable for Google Docs and other files of unknown size, as their checksums would change from run to run (due to small variances in the internals of the generated export file.) Therefore, bisync automatically skips --download-hash
for files with a size less than 0.
+See also: Hasher
backend, cryptcheck
command, rclone check --download
option, md5sum
command
+--max-delete
As a safety check, if greater than the --max-delete
percent of files were deleted on either the Path1 or Path2 filesystem, then bisync will abort with a warning message, without making any changes. The default --max-delete
is 50%
. One way to trigger this limit is to rename a directory that contains more than half of your files. This will appear to bisync as a bunch of deleted files and a bunch of new files. This safety check is intended to block bisync from deleting all of the files on both filesystems due to a temporary network access issue, or if the user had inadvertently deleted the files on one side or the other. To force the sync, either set a different delete percentage limit, e.g. --max-delete 75
(allows up to 75% deletion), or use --force
to bypass the check.
Also see the all files changed check.
---filters-file
+--filters-file
By using rclone filter features you can exclude file types or directory sub-trees from the sync. See the bisync filters section and generic --filter-from documentation. An example filters file contains filters for non-allowed files for synching with Dropbox.
If you make changes to your filters file then bisync requires a run with --resync
. This is a safety feature, which prevents existing files on the Path1 and/or Path2 side from seeming to disappear from view (since they are excluded in the new listings), which would fool bisync into seeing them as deleted (as compared to the prior run listings), and then bisync would proceed to delete them for real.
To block this from happening, bisync calculates an MD5 hash of the filters file and stores the hash in a .md5
file in the same place as your filters file. On the next run with --filters-file
set, bisync re-calculates the MD5 hash of the current filters file and compares it to the hash stored in the .md5
file. If they don't match, the run aborts with a critical error and thus forces you to do a --resync
, likely avoiding a disaster.
---check-sync
+--conflict-resolve CHOICE
+In bisync, a "conflict" is a file that is new or changed on both sides (relative to the prior run) AND is not currently identical on both sides. --conflict-resolve
controls how bisync handles such a scenario. The currently supported options are:
+
+none
- (the default) - do not attempt to pick a winner, keep and rename both files according to --conflict-loser
and --conflict-suffix
settings. For example, with the default settings, file.txt
on Path1 is renamed file.txt.conflict1
and file.txt
on Path2 is renamed file.txt.conflict2
. Both are copied to the opposite path during the run, so both sides end up with a copy of both files. (As none
is the default, it is not necessary to specify --conflict-resolve none
-- you can just omit the flag.)
+newer
- the newer file (by modtime
) is considered the winner and is copied without renaming. The older file (the "loser") is handled according to --conflict-loser
and --conflict-suffix
settings (either renamed or deleted.) For example, if file.txt
on Path1 is newer than file.txt
on Path2, the result on both sides (with other default settings) will be file.txt
(winner from Path1) and file.txt.conflict1
(loser from Path2).
+older
- same as newer
, except the older file is considered the winner, and the newer file is considered the loser.
+larger
- the larger file (by size
) is considered the winner (regardless of modtime
, if any).
+smaller
- the smaller file (by size
) is considered the winner (regardless of modtime
, if any).
+path1
- the version from Path1 is unconditionally considered the winner (regardless of modtime
and size
, if any). This can be useful if one side is usually more trusted or up-to-date than the other.
+path2
- same as path1
, except the path2 version is considered the winner.
+
+For all of the above options, note the following: - If either of the underlying remotes lacks support for the chosen method, it will be ignored and fall back to none
. (For example, if --conflict-resolve newer
is set, but one of the paths uses a remote that doesn't support modtime
.) - If a winner can't be determined because the chosen method's attribute is missing or equal, it will be ignored and fall back to none
. (For example, if --conflict-resolve newer
is set, but the Path1 and Path2 modtimes are identical, even if the sizes may differ.) - If the file's content is currently identical on both sides, it is not considered a "conflict", even if new or changed on both sides since the prior sync. (For example, if you made a change on one side and then synced it to the other side by other means.) Therefore, none of the conflict resolution flags apply in this scenario. - The conflict resolution flags do not apply during a --resync
, as there is no "prior run" to speak of (but see --resync-mode
for similar options.)
+--conflict-loser CHOICE
+--conflict-loser
determines what happens to the "loser" of a sync conflict (when --conflict-resolve
determines a winner) or to both files (when there is no winner.) The currently supported options are:
+
+num
- (the default) - auto-number the conflicts by automatically appending the next available number to the --conflict-suffix
, in chronological order. For example, with the default settings, the first conflict for file.txt
will be renamed file.txt.conflict1
. If file.txt.conflict1
already exists, file.txt.conflict2
will be used instead (etc., up to a maximum of 9223372036854775807 conflicts.)
+pathname
- rename the conflicts according to which side they came from, which was the default behavior prior to v1.66
. For example, with --conflict-suffix path
, file.txt
from Path1 will be renamed file.txt.path1
, and file.txt
from Path2 will be renamed file.txt.path2
. If two non-identical suffixes are provided (ex. --conflict-suffix cloud,local
), the trailing digit is omitted. Importantly, note that with pathname
, there is no auto-numbering beyond 2
, so if file.txt.path2
somehow already exists, it will be overwritten. Using a dynamic date variable in your --conflict-suffix
(see below) is one possible way to avoid this. Note also that conflicts-of-conflicts are possible, if the original conflict is not manually resolved -- for example, if for some reason you edited file.txt.path1
on both sides, and those edits were different, the result would be file.txt.path1.path1
and file.txt.path1.path2
(in addition to file.txt.path2
.)
+delete
- keep the winner only and delete the loser, instead of renaming it. If a winner cannot be determined (see --conflict-resolve
for details on how this could happen), delete
is ignored and the default num
is used instead (i.e. both versions are kept and renamed, and neither is deleted.) delete
is inherently the most destructive option, so use it only with care.
+
+For all of the above options, note that if a winner cannot be determined (see --conflict-resolve
for details on how this could happen), or if --conflict-resolve
is not in use, both files will be renamed.
+--conflict-suffix STRING[,STRING]
+--conflict-suffix
controls the suffix that is appended when bisync renames a --conflict-loser
(default: conflict
). --conflict-suffix
will accept either one string or two comma-separated strings to assign different suffixes to Path1 vs. Path2. This may be helpful later in identifying the source of the conflict. (For example, --conflict-suffix dropboxconflict,laptopconflict
)
+With --conflict-loser num
, a number is always appended to the suffix. With --conflict-loser pathname
, a number is appended only when one suffix is specified (or when two identical suffixes are specified.) i.e. with --conflict-loser pathname
, all of the following would produce exactly the same result:
+--conflict-suffix path
+--conflict-suffix path,path
+--conflict-suffix path1,path2
+Suffixes may be as short as 1 character. By default, the suffix is appended after any other extensions (ex. file.jpg.conflict1
), however, this can be changed with the --suffix-keep-extension
flag (i.e. to instead result in file.conflict1.jpg
).
+--conflict-suffix
supports several dynamic date variables when enclosed in curly braces as globs. This can be helpful to track the date and/or time that each conflict was handled by bisync. For example:
+--conflict-suffix {DateOnly}-conflict
+// result: myfile.txt.2006-01-02-conflict1
+All of the formats described here and here are supported, but take care to ensure that your chosen format does not use any characters that are illegal on your remotes (for example, macOS does not allow colons in filenames, and slashes are also best avoided as they are often interpreted as directory separators.) To address this particular issue, an additional {MacFriendlyTime}
(or just {mac}
) option is supported, which results in 2006-01-02 0304PM
.
+Note that --conflict-suffix
is entirely separate from rclone's main --sufix
flag. This is intentional, as users may wish to use both flags simultaneously, if also using --backup-dir
.
+Finally, note that the default in bisync prior to v1.66
was to rename conflicts with ..path1
and ..path2
(with two periods, and path
instead of conflict
.) Bisync now defaults to a single dot instead of a double dot, but additional dots can be added by including them in the specified suffix string. For example, for behavior equivalent to the previous default, use:
+[--conflict-resolve none] --conflict-loser pathname --conflict-suffix .path
+--check-sync
Enabled by default, the check-sync function checks that all of the same files exist in both the Path1 and Path2 history listings. This check-sync integrity check is performed at the end of the sync run by default. Any untrapped failing copy/deletes between the two paths might result in differences between the two listings and in the untracked file content differences between the two paths. A resync run would correct the error.
Note that the default-enabled integrity check locally executes a load of both the final Path1 and Path2 listings, and thus adds to the run time of a sync. Using --check-sync=false
will disable it and may significantly reduce the sync run times for very large numbers of files.
The check may be run manually with --check-sync=only
. It runs only the integrity check and terminates without actually synching.
-See also: Concurrent modifications
---ignore-listing-checksum
-By default, bisync will retrieve (or generate) checksums (for backends that support them) when creating the listings for both paths, and store the checksums in the listing files. --ignore-listing-checksum
will disable this behavior, which may speed things up considerably, especially on backends (such as local) where hashes must be computed on the fly instead of retrieved. Please note the following:
-
-- While checksums are (by default) generated and stored in the listing files, they are NOT currently used for determining diffs (deltas). It is anticipated that full checksum support will be added in a future version.
---ignore-listing-checksum
is NOT the same as --ignore-checksum
, and you may wish to use one or the other, or both. In a nutshell: --ignore-listing-checksum
controls whether checksums are considered when scanning for diffs, while --ignore-checksum
controls whether checksums are considered during the copy/sync operations that follow, if there ARE diffs.
-- Unless
--ignore-listing-checksum
is passed, bisync currently computes hashes for one path even when there's no common hash with the other path (for example, a crypt remote.)
-- If both paths support checksums and have a common hash, AND
--ignore-listing-checksum
was not specified when creating the listings, --check-sync=only
can be used to compare Path1 vs. Path2 checksums (as of the time the previous listings were created.) However, --check-sync=only
will NOT include checksums if the previous listings were generated on a run using --ignore-listing-checksum
. For a more robust integrity check of the current state, consider using check
(or cryptcheck
, if at least one path is a crypt
remote.)
-
---resilient
+Note that currently, --check-sync
only checks listing snapshots and NOT the actual files on the remotes. Note also that the listing snapshots will not know about any changes that happened during or after the latest bisync run, as those will be discovered on the next run. Therefore, while listings should always match each other at the end of a bisync run, it is expected that they will not match the underlying remotes, nor will the remotes match each other, if there were changes during or after the run. This is normal, and any differences will be detected and synced on the next run.
+For a robust integrity check of the current state of the remotes (as opposed to just their listing snapshots), consider using check
(or cryptcheck
, if at least one path is a crypt
remote) instead of --check-sync
, keeping in mind that differences are expected if files changed during or after your last bisync run.
+For example, a possible sequence could look like this:
+
+- Normally scheduled bisync run:
+
+rclone bisync Path1 Path2 -MPc --check-access --max-delete 10 --filters-file /path/to/filters.txt -v --no-cleanup --ignore-listing-checksum --disable ListR --checkers=16 --drive-pacer-min-sleep=10ms --create-empty-src-dirs --resilient
+
+- Periodic independent integrity check (perhaps scheduled nightly or weekly):
+
+rclone check -MvPc Path1 Path2 --filter-from /path/to/filters.txt
+
+- If diffs are found, you have some choices to correct them. If one side is more up-to-date and you want to make the other side match it, you could run:
+
+rclone sync Path1 Path2 --filter-from /path/to/filters.txt --create-empty-src-dirs -MPc -v
+(or switch Path1 and Path2 to make Path2 the source-of-truth)
+Or, if neither side is totally up-to-date, you could run a --resync
to bring them back into agreement (but remember that this could cause deleted files to re-appear.)
+*Note also that rclone check
does not currently include empty directories, so if you want to know if any empty directories are out of sync, consider alternatively running the above rclone sync
command with --dry-run
added.
+See also: Concurrent modifications, --resilient
+--resilient
Caution: this is an experimental feature. Use at your own risk!
By default, most errors or interruptions will cause bisync to abort and require --resync
to recover. This is a safety feature, to prevent bisync from running again until a user checks things out. However, in some cases, bisync can go too far and enforce a lockout when one isn't actually necessary, like for certain less-serious errors that might resolve themselves on the next run. When --resilient
is specified, bisync tries its best to recover and self-correct, and only requires --resync
as a last resort when a human's involvement is absolutely necessary. The intended use case is for running bisync as a background process (such as via scheduled cron).
When using --resilient
mode, bisync will still report the error and abort, however it will not lock out future runs -- allowing the possibility of retrying at the next normally scheduled time, without requiring a --resync
first. Examples of such retryable errors include access test failures, missing listing files, and filter change detections. These safety features will still prevent the current run from proceeding -- the difference is that if conditions have improved by the time of the next run, that next run will be allowed to proceed. Certain more serious errors will still enforce a --resync
lockout, even in --resilient
mode, to prevent data loss.
-Behavior of --resilient
may change in a future version.
+Behavior of --resilient
may change in a future version. (See also: --recover
, --max-lock
, Graceful Shutdown)
+--recover
+If --recover
is set, in the event of a sudden interruption or other un-graceful shutdown, bisync will attempt to automatically recover on the next run, instead of requiring --resync
. Bisync is able to recover robustly by keeping one "backup" listing at all times, representing the state of both paths after the last known successful sync. Bisync can then compare the current state with this snapshot to determine which changes it needs to retry. Changes that were synced after this snapshot (during the run that was later interrupted) will appear to bisync as if they are "new or changed on both sides", but in most cases this is not a problem, as bisync will simply do its usual "equality check" and learn that no action needs to be taken on these files, since they are already identical on both sides.
+In the rare event that a file is synced successfully during a run that later aborts, and then that same file changes AGAIN before the next run, bisync will think it is a sync conflict, and handle it accordingly. (From bisync's perspective, the file has changed on both sides since the last trusted sync, and the files on either side are not currently identical.) Therefore, --recover
carries with it a slightly increased chance of having conflicts -- though in practice this is pretty rare, as the conditions required to cause it are quite specific. This risk can be reduced by using bisync's "Graceful Shutdown" mode (triggered by sending SIGINT
or Ctrl+C
), when you have the choice, instead of forcing a sudden termination.
+--recover
and --resilient
are similar, but distinct -- the main difference is that --resilient
is about retrying, while --recover
is about recovering. Most users will probably want both. --resilient
allows retrying when bisync has chosen to abort itself due to safety features such as failing --check-access
or detecting a filter change. --resilient
does not cover external interruptions such as a user shutting down their computer in the middle of a sync -- that is what --recover
is for.
+--max-lock
+Bisync uses lock files as a safety feature to prevent interference from other bisync runs while it is running. Bisync normally removes these lock files at the end of a run, but if bisync is abruptly interrupted, these files will be left behind. By default, they will lock out all future runs, until the user has a chance to manually check things out and remove the lock. As an alternative, --max-lock
can be used to make them automatically expire after a certain period of time, so that future runs are not locked out forever, and auto-recovery is possible. --max-lock
can be any duration 2m
or greater (or 0
to disable). If set, lock files older than this will be considered "expired", and future runs will be allowed to disregard them and proceed. (Note that the --max-lock
duration must be set by the process that left the lock file -- not the later one interpreting it.)
+If set, bisync will also "renew" these lock files every --max-lock minus one minute
throughout a run, for extra safety. (For example, with --max-lock 5m
, bisync would renew the lock file (for another 5 minutes) every 4 minutes until the run has completed.) In other words, it should not be possible for a lock file to pass its expiration time while the process that created it is still running -- and you can therefore be reasonably sure that any expired lock file you may find was left there by an interrupted run, not one that is still running and just taking awhile.
+If --max-lock
is 0
or not set, the default is that lock files will never expire, and will block future runs (of these same two bisync paths) indefinitely.
+For maximum resilience from disruptions, consider setting a relatively short duration like --max-lock 2m
along with --resilient
and --recover
, and a relatively frequent cron schedule. The result will be a very robust "set-it-and-forget-it" bisync run that can automatically bounce back from almost any interruption it might encounter, without requiring the user to get involved and run a --resync
. (See also: Graceful Shutdown mode)
+--backup-dir1 and --backup-dir2
+As of v1.66
, --backup-dir
is supported in bisync. Because --backup-dir
must be a non-overlapping path on the same remote, Bisync has introduced new --backup-dir1
and --backup-dir2
flags to support separate backup-dirs for Path1
and Path2
(bisyncing between different remotes with --backup-dir
would not otherwise be possible.) --backup-dir1
and --backup-dir2
can use different remotes from each other, but --backup-dir1
must use the same remote as Path1
, and --backup-dir2
must use the same remote as Path2
. Each backup directory must not overlap its respective bisync Path without being excluded by a filter rule.
+The standard --backup-dir
will also work, if both paths use the same remote (but note that deleted files from both paths would be mixed together in the same dir). If either --backup-dir1
and --backup-dir2
are set, they will override --backup-dir
.
+Example:
+rclone bisync /Users/someuser/some/local/path/Bisync gdrive:Bisync --backup-dir1 /Users/someuser/some/local/path/BackupDir --backup-dir2 gdrive:BackupDir --suffix -2023-08-26 --suffix-keep-extension --check-access --max-delete 10 --filters-file /Users/someuser/some/local/path/bisync_filters.txt --no-cleanup --ignore-listing-checksum --checkers=16 --drive-pacer-min-sleep=10ms --create-empty-src-dirs --resilient -MvP --drive-skip-gdocs --fix-case
+In this example, if the user deletes a file in /Users/someuser/some/local/path/Bisync
, bisync will propagate the delete to the other side by moving the corresponding file from gdrive:Bisync
to gdrive:BackupDir
. If the user deletes a file from gdrive:Bisync
, bisync moves it from /Users/someuser/some/local/path/Bisync
to /Users/someuser/some/local/path/BackupDir
.
+In the event of a rename due to a sync conflict, the rename is not considered a delete, unless a previous conflict with the same name already exists and would get overwritten.
+See also: --suffix
, --suffix-keep-extension
Operation
Runtime flow details
bisync retains the listings of the Path1
and Path2
filesystems from the prior run. On each successive run it will:
@@ -11888,7 +12716,7 @@ rclone copy Path2 Path1 --create-empty-src-dirs
Safety measures
- Lock file prevents multiple simultaneous runs when taking a while. This can be particularly useful if bisync is run by cron scheduler.
-- Handle change conflicts non-destructively by creating
..path1
and ..path2
file versions.
+- Handle change conflicts non-destructively by creating
.conflict1
, .conflict2
, etc. file versions, according to --conflict-resolve
, --conflict-loser
, and --conflict-suffix
settings.
- File system access health check using
RCLONE_TEST
files (see the --check-access
flag).
- Abort on excessive deletes - protects against a failed listing being interpreted as all the files were deleted. See the
--max-delete
and --force
flags.
- If something evil happens, bisync goes into a safe state to block damage by later runs. (See Error Handling)
@@ -11986,14 +12814,14 @@ rclone copy Path2 Path1 --create-empty-src-dirs
Path1 new AND Path2 new |
File is new on Path1 AND new on Path2 (and Path1 version is NOT identical to Path2) |
-Files renamed to _Path1 and _Path2 |
-rclone copy _Path2 file to Path1, rclone copy _Path1 file to Path2 |
+Conflicts handled according to --conflict-resolve & --conflict-loser settings |
+default: rclone copy renamed Path2.conflict2 file to Path1, rclone copy renamed Path1.conflict1 file to Path2 |
Path2 newer AND Path1 changed |
File is newer on Path2 AND also changed (newer/older/size) on Path1 (and Path1 version is NOT identical to Path2) |
-Files renamed to _Path1 and _Path2 |
-rclone copy _Path2 file to Path1, rclone copy _Path1 file to Path2 |
+Conflicts handled according to --conflict-resolve & --conflict-loser settings |
+default: rclone copy renamed Path2.conflict2 file to Path1, rclone copy renamed Path1.conflict1 file to Path2 |
Path2 newer AND Path1 deleted |
@@ -12015,59 +12843,45 @@ rclone copy Path2 Path1 --create-empty-src-dirs
-As of rclone v1.64
, bisync is now better at detecting false positive sync conflicts, which would previously have resulted in unnecessary renames and duplicates. Now, when bisync comes to a file that it wants to rename (because it is new/changed on both sides), it first checks whether the Path1 and Path2 versions are currently identical (using the same underlying function as check
.) If bisync concludes that the files are identical, it will skip them and move on. Otherwise, it will create renamed ..Path1
and ..Path2
duplicates, as before. This behavior also improves the experience of renaming directories, as a --resync
is no longer required, so long as the same change has been made on both sides.
+As of rclone v1.64
, bisync is now better at detecting false positive sync conflicts, which would previously have resulted in unnecessary renames and duplicates. Now, when bisync comes to a file that it wants to rename (because it is new/changed on both sides), it first checks whether the Path1 and Path2 versions are currently identical (using the same underlying function as check
.) If bisync concludes that the files are identical, it will skip them and move on. Otherwise, it will create renamed duplicates, as before. This behavior also improves the experience of renaming directories, as a --resync
is no longer required, so long as the same change has been made on both sides.
All files changed check
If all prior existing files on either of the filesystems have changed (e.g. timestamps have changed due to changing the system's timezone) then bisync will abort without making any changes. Any new files are not considered for this check. You could use --force
to force the sync (whichever side has the changed timestamp files wins). Alternately, a --resync
may be used (Path1 versions will be pushed to Path2). Consider the situation carefully and perhaps use --dry-run
before you commit to the changes.
Modification times
-Bisync relies on file timestamps to identify changed files and will refuse to operate if backend lacks the modification time support.
-If you or your application should change the content of a file without changing the modification time then bisync will not notice the change, and thus will not copy it to the other side.
-Note that on some cloud storage systems it is not possible to have file timestamps that match precisely between the local and other filesystems.
-Bisync's approach to this problem is by tracking the changes on each side separately over time with a local database of files in that side then applying the resulting changes on the other side.
+By default, bisync compares files by modification time and size. If you or your application should change the content of a file without changing the modification time and size, then bisync will not notice the change, and thus will not copy it to the other side. As an alternative, consider comparing by checksum (if your remotes support it). See --compare
for details.
Error handling
Certain bisync critical errors, such as file copy/move failing, will result in a bisync lockout of following runs. The lockout is asserted because the sync status and history of the Path1 and Path2 filesystems cannot be trusted, so it is safer to block any further changes until someone checks things out. The recovery is to do a --resync
again.
It is recommended to use --resync --dry-run --verbose
initially and carefully review what changes will be made before running the --resync
without --dry-run
.
Most of these events come up due to an error status from an internal call. On such a critical error the {...}.path1.lst
and {...}.path2.lst
listing files are renamed to extension .lst-err
, which blocks any future bisync runs (since the normal .lst
files are not found). Bisync keeps them under bisync
subdirectory of the rclone cache directory, typically at ${HOME}/.cache/rclone/bisync/
on Linux.
Some errors are considered temporary and re-running the bisync is not blocked. The critical return blocks further bisync runs.
-See also: --resilient
+See also: --resilient
, --recover
, --max-lock
, Graceful Shutdown
Lock file
-When bisync is running, a lock file is created in the bisync working directory, typically at ~/.cache/rclone/bisync/PATH1..PATH2.lck
on Linux. If bisync should crash or hang, the lock file will remain in place and block any further runs of bisync for the same paths. Delete the lock file as part of debugging the situation. The lock file effectively blocks follow-on (e.g., scheduled by cron) runs when the prior invocation is taking a long time. The lock file contains PID of the blocking process, which may help in debug.
+When bisync is running, a lock file is created in the bisync working directory, typically at ~/.cache/rclone/bisync/PATH1..PATH2.lck
on Linux. If bisync should crash or hang, the lock file will remain in place and block any further runs of bisync for the same paths. Delete the lock file as part of debugging the situation. The lock file effectively blocks follow-on (e.g., scheduled by cron) runs when the prior invocation is taking a long time. The lock file contains PID of the blocking process, which may help in debug. Lock files can be set to automatically expire after a certain amount of time, using the --max-lock
flag.
Note that while concurrent bisync runs are allowed, be very cautious that there is no overlap in the trees being synched between concurrent runs, lest there be replicated files, deleted files and general mayhem.
Return codes
rclone bisync
returns the following codes to calling program: - 0
on a successful run, - 1
for a non-critical failing run (a rerun may be successful), - 2
for a critically aborted run (requires a --resync
to recover).
-Limitations
+Graceful Shutdown
+Bisync has a "Graceful Shutdown" mode which is activated by sending SIGINT
or pressing Ctrl+C
during a run. Once triggered, bisync will use best efforts to exit cleanly before the timer runs out. If bisync is in the middle of transferring files, it will attempt to cleanly empty its queue by finishing what it has started but not taking more. If it cannot do so within 30 seconds, it will cancel the in-progress transfers at that point and then give itself a maximum of 60 seconds to wrap up, save its state for next time, and exit. With the -vP
flags you will see constant status updates and a final confirmation of whether or not the graceful shutdown was successful.
+At any point during the "Graceful Shutdown" sequence, a second SIGINT
or Ctrl+C
will trigger an immediate, un-graceful exit, which will leave things in a messier state. Usually a robust recovery will still be possible if using --recover
mode, otherwise you will need to do a --resync
.
+If you plan to use Graceful Shutdown mode, it is recommended to use --resilient
and --recover
, and it is important to NOT use --inplace
, otherwise you risk leaving partially-written files on one side, which may be confused for real files on the next run. Note also that in the event of an abrupt interruption, a lock file will be left behind to block concurrent runs. You will need to delete it before you can proceed with the next run (or wait for it to expire on its own, if using --max-lock
.)
+Limitations
Supported backends
-Bisync is considered BETA and has been tested with the following backends: - Local filesystem - Google Drive - Dropbox - OneDrive - S3 - SFTP - Yandex Disk
+Bisync is considered BETA and has been tested with the following backends: - Local filesystem - Google Drive - Dropbox - OneDrive - S3 - SFTP - Yandex Disk - Crypt
It has not been fully tested with other services yet. If it works, or sorta works, please let us know and we'll update the list. Run the test suite to check for proper operation as described below.
-First release of rclone bisync
requires that underlying backend supports the modification time feature and will refuse to run otherwise. This limitation will be lifted in a future rclone bisync
release.
+The first release of rclone bisync
required both underlying backends to support modification times, and refused to run otherwise. This limitation has been lifted as of v1.66
, as bisync now supports comparing checksum and/or size instead of (or in addition to) modtime. See --compare
for details.
Concurrent modifications
-When using Local, FTP or SFTP remotes rclone does not create temporary files at the destination when copying, and thus if the connection is lost the created file may be corrupt, which will likely propagate back to the original path on the next sync, resulting in data loss. This will be solved in a future release, there is no workaround at the moment.
-Files that change during a bisync run may result in data loss. This has been seen in a highly dynamic environment, where the filesystem is getting hammered by running processes during the sync. The currently recommended solution is to sync at quiet times or filter out unnecessary directories and files.
-As an alternative approach, consider using --check-sync=false
(and possibly --resilient
) to make bisync more forgiving of filesystems that change during the sync. Be advised that this may cause bisync to miss events that occur during a bisync run, so it is a good idea to supplement this with a periodic independent integrity check, and corrective sync if diffs are found. For example, a possible sequence could look like this:
-
-- Normally scheduled bisync run:
-
-rclone bisync Path1 Path2 -MPc --check-access --max-delete 10 --filters-file /path/to/filters.txt -v --check-sync=false --no-cleanup --ignore-listing-checksum --disable ListR --checkers=16 --drive-pacer-min-sleep=10ms --create-empty-src-dirs --resilient
-
-- Periodic independent integrity check (perhaps scheduled nightly or weekly):
-
-rclone check -MvPc Path1 Path2 --filter-from /path/to/filters.txt
-
-- If diffs are found, you have some choices to correct them. If one side is more up-to-date and you want to make the other side match it, you could run:
-
-rclone sync Path1 Path2 --filter-from /path/to/filters.txt --create-empty-src-dirs -MPc -v
-(or switch Path1 and Path2 to make Path2 the source-of-truth)
-Or, if neither side is totally up-to-date, you could run a --resync
to bring them back into agreement (but remember that this could cause deleted files to re-appear.)
-*Note also that rclone check
does not currently include empty directories, so if you want to know if any empty directories are out of sync, consider alternatively running the above rclone sync
command with --dry-run
added.
+When using Local, FTP or SFTP remotes with --inplace
, rclone does not create temporary files at the destination when copying, and thus if the connection is lost the created file may be corrupt, which will likely propagate back to the original path on the next sync, resulting in data loss. It is therefore recommended to omit --inplace
.
+Files that change during a bisync run may result in data loss. Prior to rclone v1.66
, this was commonly seen in highly dynamic environments, where the filesystem was getting hammered by running processes during the sync. As of rclone v1.66
, bisync was redesigned to use a "snapshot" model, greatly reducing the risks from changes during a sync. Changes that are not detected during the current sync will now be detected during the following sync, and will no longer cause the entire run to throw a critical error. There is additionally a mechanism to mark files as needing to be internally rechecked next time, for added safety. It should therefore no longer be necessary to sync only at quiet times -- however, note that an error can still occur if a file happens to change at the exact moment it's being read/written by bisync (same as would happen in rclone sync
.) (See also: --ignore-checksum
, --local-no-check-updated
)
Empty directories
By default, new/deleted empty directories on one path are not propagated to the other side. This is because bisync (and rclone) natively works on files, not directories. However, this can be changed with the --create-empty-src-dirs
flag, which works in much the same way as in sync
and copy
. When used, empty directories created or deleted on one side will also be created or deleted on the other side. The following should be noted: * --create-empty-src-dirs
is not compatible with --remove-empty-dirs
. Use only one or the other (or neither). * It is not recommended to switch back and forth between --create-empty-src-dirs
and the default (no --create-empty-src-dirs
) without running --resync
. This is because it may appear as though all directories (not just the empty ones) were created/deleted, when actually you've just toggled between making them visible/invisible to bisync. It looks scarier than it is, but it's still probably best to stick to one or the other, and use --resync
when you need to switch.
Renamed directories
-Renaming a folder on the Path1 side results in deleting all files on the Path2 side and then copying all files again from Path1 to Path2. Bisync sees this as all files in the old directory name as deleted and all files in the new directory name as new. Currently, the most effective and efficient method of renaming a directory is to rename it to the same name on both sides. (As of rclone v1.64
, a --resync
is no longer required after doing so, as bisync will automatically detect that Path1 and Path2 are in agreement.)
+By default, renaming a folder on the Path1 side results in deleting all files on the Path2 side and then copying all files again from Path1 to Path2. Bisync sees this as all files in the old directory name as deleted and all files in the new directory name as new.
+A recommended solution is to use --track-renames
, which is now supported in bisync as of rclone v1.66
. Note that --track-renames
is not available during --resync
, as --resync
does not delete anything (--track-renames
only supports sync
, not copy
.)
+Otherwise, the most effective and efficient method of renaming a directory is to rename it to the same name on both sides. (As of rclone v1.64
, a --resync
is no longer required after doing so, as bisync will automatically detect that Path1 and Path2 are in agreement.)
--fast-list
used by default
Unlike most other rclone commands, bisync uses --fast-list
by default, for backends that support it. In many cases this is desirable, however, there are some scenarios in which bisync could be faster without --fast-list
, and there is also a known issue concerning Google Drive users with many empty directories. For now, the recommended way to avoid using --fast-list
is to add --disable ListR
to all bisync commands. The default behavior may change in a future version.
-Overridden Configs
-When rclone detects an overridden config, it adds a suffix like {ABCDE}
on the fly to the internal name of the remote. Bisync follows suit by including this suffix in its listing filenames. However, this suffix does not necessarily persist from run to run, especially if different flags are provided. So if next time the suffix assigned is {FGHIJ}
, bisync will get confused, because it's looking for a listing file with {FGHIJ}
, when the file it wants has {ABCDE}
. As a result, it throws Bisync critical error: cannot find prior Path1 or Path2 listings, likely due to critical error on prior run
and refuses to run again until the user runs a --resync
(unless using --resilient
). The best workaround at the moment is to set any backend-specific flags in the config file instead of specifying them with command flags. (You can still override them as needed for other rclone commands.)
-Case sensitivity
-Synching with case-insensitive filesystems, such as Windows or Box
, can result in file name conflicts. This will be fixed in a future release. The near-term workaround is to make sure that files on both sides don't have spelling case differences (Smile.jpg
vs. smile.jpg
).
+Case (and unicode) sensitivity
+As of v1.66
, case and unicode form differences no longer cause critical errors, and normalization (when comparing between filesystems) is handled according to the same flags and defaults as rclone sync
. See the following options (all of which are supported by bisync) to control this behavior more granularly: - --fix-case
- --ignore-case-sync
- --no-unicode-normalization
- --local-unicode-normalization
and --local-case-sensitive
(caution: these are normally not what you want.)
+Note that in the (probably rare) event that --fix-case
is used AND a file is new/changed on both sides AND the checksums match AND the filename case does not match, the Path1 filename is considered the winner, for the purposes of --fix-case
(Path2 will be renamed to match it).
Windows support
Bisync has been tested on Windows 8.1, Windows 10 Pro 64-bit and on Windows GitHub runners.
Drive letters are allowed, including drive letters mapped to network drives (rclone bisync J:\localsync GDrive:
). If a drive letter is omitted, the shell current drive is the default. Drive letters are a single character follows by :
, so cloud names must be more than one character long.
@@ -12220,12 +13034,15 @@ rclone copy Path2 Path1 --create-empty-src-dirs
2021/05/12 00:49:40 ERROR : Bisync aborted. Must run --resync to recover.
Denied downloads of "infected" or "abusive" files
Google Drive has a filter for certain file types (.exe
, .apk
, et cetera) that by default cannot be copied from Google Drive to the local filesystem. If you are having problems, run with --verbose
to see specifically which files are generating complaints. If the error is This file has been identified as malware or spam and cannot be downloaded
, consider using the flag --drive-acknowledge-abuse.
-Google Doc files
-Google docs exist as virtual files on Google Drive and cannot be transferred to other filesystems natively. While it is possible to export a Google doc to a normal file (with .xlsx
extension, for example), it is not possible to import a normal file back into a Google document.
-Bisync's handling of Google Doc files is to flag them in the run log output for user's attention and ignore them for any file transfers, deletes, or syncs. They will show up with a length of -1
in the listings. This bisync run is otherwise successful:
-2021/05/11 08:23:15 INFO : Synching Path1 "/path/to/local/tree/base/" with Path2 "GDrive:"
-2021/05/11 08:23:15 INFO : ...path2.lst-new: Ignoring incorrect line: "- -1 - - 2018-07-29T08:49:30.136000000+0000 GoogleDoc.docx"
-2021/05/11 08:23:15 INFO : Bisync successful
+Google Docs (and other files of unknown size)
+As of v1.66
, Google Docs (including Google Sheets, Slides, etc.) are now supported in bisync, subject to the same options, defaults, and limitations as in rclone sync
. When bisyncing drive with non-drive backends, the drive -> non-drive direction is controlled by --drive-export-formats
(default "docx,xlsx,pptx,svg"
) and the non-drive -> drive direction is controlled by --drive-import-formats
(default none.)
+For example, with the default export/import formats, a Google Sheet on the drive side will be synced to an .xlsx
file on the non-drive side. In the reverse direction, .xlsx
files with filenames that match an existing Google Sheet will be synced to that Google Sheet, while .xlsx
files that do NOT match an existing Google Sheet will be copied to drive as normal .xlsx
files (without conversion to Sheets, although the Google Drive web browser UI may still give you the option to open it as one.)
+If --drive-import-formats
is set (it's not, by default), then all of the specified formats will be converted to Google Docs, if there is no existing Google Doc with a matching name. Caution: such conversion can be quite lossy, and in most cases it's probably not what you want!
+To bisync Google Docs as URL shortcut links (in a manner similar to "Drive for Desktop"), use: --drive-export-formats url
(or alternatives.)
+Note that these link files cannot be edited on the non-drive side -- you will get errors if you try to sync an edited link file back to drive. They CAN be deleted (it will result in deleting the corresponding Google Doc.) If you create a .url
file on the non-drive side that does not match an existing Google Doc, bisyncing it will just result in copying the literal .url
file over to drive (no Google Doc will be created.) So, as a general rule of thumb, think of them as read-only placeholders on the non-drive side, and make all your changes on the drive side.
+Likewise, even with other export-formats, it is best to only move/rename Google Docs on the drive side. This is because otherwise, bisync will interpret this as a file deleted and another created, and accordingly, it will delete the Google Doc and create a new file at the new path. (Whether or not that new file is a Google Doc depends on --drive-import-formats
.)
+Lastly, take note that all Google Docs on the drive side have a size of -1
and no checksum. Therefore, they cannot be reliably synced with the --checksum
or --size-only
flags. (To be exact: they will still get created/deleted, and bisync's delta engine will notice changes and queue them for syncing, but the underlying sync function will consider them identical and skip them.) To work around this, use the default (modtime and size) instead of --checksum
or --size-only
.
+To ignore Google Docs entirely, use --drive-skip-gdocs
.
Usage examples
Cron
Rclone does not yet have a built-in capability to monitor the local file system for changes and must be blindly run periodically. On Windows this can be done using a Task Scheduler, on Linux you can use Cron which is described below.
@@ -12440,6 +13257,29 @@ Options:
Bisync adopts the differential synchronization technique, which is based on keeping history of changes performed by both synchronizing sides. See the Dual Shadow Method section in Neil Fraser's article.
Also note a number of academic publications by Benjamin Pierce about Unison and synchronization in general.
Changelog
+v1.66
+
+- Copies and deletes are now handled in one operation instead of two
+--track-renames
and --backup-dir
are now supported
+- Partial uploads known issue on
local
/ftp
/sftp
has been resolved (unless using --inplace
)
+- Final listings are now generated from sync results, to avoid needing to re-list
+- Bisync is now much more resilient to changes that happen during a bisync run, and far less prone to critical errors / undetected changes
+- Bisync is now capable of rolling a file listing back in cases of uncertainty, essentially marking the file as needing to be rechecked next time.
+- A few basic terminal colors are now supported, controllable with
--color
(AUTO
|NEVER
|ALWAYS
)
+- Initial listing snapshots of Path1 and Path2 are now generated concurrently, using the same "march" infrastructure as
check
and sync
, for performance improvements and less risk of error.
+- Fixed handling of unicode normalization and case insensitivity, support for
--fix-case
, --ignore-case-sync
, --no-unicode-normalization
+--resync
is now much more efficient (especially for users of --create-empty-src-dirs
)
+- Google Docs (and other files of unknown size) are now supported (with the same options as in
sync
)
+- Equality checks before a sync conflict rename now fall back to
cryptcheck
(when possible) or --download
, instead of of --size-only
, when check
is not available.
+- Bisync no longer fails to find the correct listing file when configs are overridden with backend-specific flags.
+- Bisync now fully supports comparing based on any combination of size, modtime, and checksum, lifting the prior restriction on backends without modtime support.
+- Bisync now supports a "Graceful Shutdown" mode to cleanly cancel a run early without requiring
--resync
.
+- New
--recover
flag allows robust recovery in the event of interruptions, without requiring --resync
.
+- A new
--max-lock
setting allows lock files to automatically renew and expire, for better automatic recovery when a run is interrupted.
+- Bisync now supports auto-resolving sync conflicts and customizing rename behavior with new
--conflict-resolve
, --conflict-loser
, and --conflict-suffix
flags.
+- A new
--resync-mode
flag allows more control over which version of a file gets kept during a --resync
.
+- Bisync now supports
--retries
and --retries-sleep
(when --resilient
is set.)
+
v1.64
- Fixed an issue causing dry runs to inadvertently commit filter changes
@@ -12724,7 +13564,16 @@ y/e/d> y
- Type: Encoding
- Default: Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot
-Limitations
+--fichier-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_FICHIER_DESCRIPTION
+- Type: string
+- Required: false
+
+Limitations
rclone about
is not supported by the 1Fichier 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
Alias
@@ -12796,212 +13645,17 @@ e/n/d/r/c/s/q> q
Type: string
Required: true
-Amazon Drive
-Amazon Drive, formerly known as Amazon Cloud Drive, is a cloud storage service run by Amazon for consumers.
-Status
-Important: rclone supports Amazon Drive only if you have your own set of API keys. Unfortunately the Amazon Drive developer program is now closed to new entries so if you don't already have your own set of keys you will not be able to use rclone with Amazon Drive.
-For the history on why rclone no longer has a set of Amazon Drive API keys see the forum.
-If you happen to know anyone who works at Amazon then please ask them to re-instate rclone into the Amazon Drive developer program - thanks!
-Configuration
-The initial setup for Amazon Drive involves getting a token from Amazon which you need to do in your browser. rclone config
walks you through it.
-The configuration process for Amazon Drive may involve using an oauth proxy. This is used to keep the Amazon credentials out of the source code. The proxy runs in Google's very secure App Engine environment and doesn't store any credentials which pass through it.
-Since rclone doesn't currently have its own Amazon Drive credentials so you will either need to have your own client_id
and client_secret
with Amazon Drive, or use a third-party oauth proxy in which case you will need to enter client_id
, client_secret
, auth_url
and token_url
.
-Note also if you are not using Amazon's auth_url
and token_url
, (ie you filled in something for those) then if setting up on a remote machine you can only use the copying the config method of configuration - rclone authorize
will not work.
-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
-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 / Amazon Drive
- \ "amazon cloud drive"
-[snip]
-Storage> amazon cloud drive
-Amazon Application Client Id - required.
-client_id> your client ID goes here
-Amazon Application Client Secret - required.
-client_secret> your client secret goes here
-Auth server URL - leave blank to use Amazon's.
-auth_url> Optional auth URL
-Token server url - leave blank to use Amazon's.
-token_url> Optional token URL
-Remote config
-Make sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom 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 = your client ID goes here
-client_secret = your client secret goes here
-auth_url = Optional auth URL
-token_url = Optional token URL
-token = {"access_token":"xxxxxxxxxxxxxxxxxxxxxxx","token_type":"bearer","refresh_token":"xxxxxxxxxxxxxxxxxx","expiry":"2015-09-06T16:07:39.658438471+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 Amazon. 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 Amazon Drive
-rclone lsd remote:
-List all the files in your Amazon Drive
-rclone ls remote:
-To copy a local directory to an Amazon Drive directory called backup
-rclone copy /home/source remote:backup
-Modification times and hashes
-Amazon Drive doesn't allow modification times to be changed via the API so these won't be accurate or used for syncing.
-It does support the MD5 hash algorithm, so for a more accurate sync, you can use the --checksum
flag.
-Restricted filename characters
-
-
-
-
-
-
-NUL |
-0x00 |
-␀ |
-
-
-/ |
-0x2F |
-/ |
-
-
-
-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. Amazon don't provide an API to permanently delete files, nor to empty the trash, so you will have to do that with one of Amazon's apps or via the Amazon Drive website. As of November 17, 2016, files are automatically deleted by Amazon from the trash after 30 days.
-
-Let's say you usually use amazon.co.uk
. When you authenticate with rclone it will take you to an amazon.com
page to log in. Your amazon.co.uk
email and password should work here just fine.
-Standard options
-Here are the Standard options specific to amazon cloud drive (Amazon Drive).
---acd-client-id
-OAuth Client Id.
-Leave blank normally.
-Properties:
-
-- Config: client_id
-- Env Var: RCLONE_ACD_CLIENT_ID
-- Type: string
-- Required: false
-
---acd-client-secret
-OAuth Client Secret.
-Leave blank normally.
-Properties:
-
-- Config: client_secret
-- Env Var: RCLONE_ACD_CLIENT_SECRET
-- Type: string
-- Required: false
-
Advanced options
-Here are the Advanced options specific to amazon cloud drive (Amazon Drive).
---acd-token
-OAuth Access Token as a JSON blob.
+Here are the Advanced options specific to alias (Alias for an existing remote).
+--alias-description
+Description of the remote.
Properties:
-- Config: token
-- Env Var: RCLONE_ACD_TOKEN
+- Config: description
+- Env Var: RCLONE_ALIAS_DESCRIPTION
- Type: string
- Required: false
---acd-auth-url
-Auth server URL.
-Leave blank to use the provider defaults.
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_ACD_AUTH_URL
-- Type: string
-- Required: false
-
---acd-token-url
-Token server url.
-Leave blank to use the provider defaults.
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_ACD_TOKEN_URL
-- Type: string
-- Required: false
-
---acd-checkpoint
-Checkpoint for internal polling (debug).
-Properties:
-
-- Config: checkpoint
-- Env Var: RCLONE_ACD_CHECKPOINT
-- Type: string
-- Required: false
-
---acd-upload-wait-per-gb
-Additional time per GiB to wait after a failed complete upload to see if it appears.
-Sometimes Amazon Drive gives an error when a file has been fully uploaded but the file appears anyway after a little while. This happens sometimes for files over 1 GiB in size and nearly every time for files bigger than 10 GiB. This parameter controls the time rclone waits for the file to appear.
-The default value for this parameter is 3 minutes per GiB, so by default it will wait 3 minutes for every GiB uploaded to see if the file appears.
-You can disable this feature by setting it to 0. This may cause conflict errors as rclone retries the failed upload but the file will most likely appear correctly eventually.
-These values were determined empirically by observing lots of uploads of big files for a range of file sizes.
-Upload with the "-v" flag to see more info about what rclone is doing in this situation.
-Properties:
-
-- Config: upload_wait_per_gb
-- Env Var: RCLONE_ACD_UPLOAD_WAIT_PER_GB
-- Type: Duration
-- Default: 3m0s
-
---acd-templink-threshold
-Files >= this size will be downloaded via their tempLink.
-Files this size or more will be downloaded via their "tempLink". This is to work around a problem with Amazon Drive which blocks downloads of files bigger than about 10 GiB. The default for this is 9 GiB which shouldn't need to be changed.
-To download files above this threshold, rclone requests a "tempLink" which downloads the file through a temporary URL directly from the underlying S3 storage.
-Properties:
-
-- Config: templink_threshold
-- Env Var: RCLONE_ACD_TEMPLINK_THRESHOLD
-- Type: SizeSuffix
-- Default: 9Gi
-
---acd-encoding
-The encoding for the backend.
-See the encoding section in the overview for more info.
-Properties:
-
-- Config: encoding
-- Env Var: RCLONE_ACD_ENCODING
-- Type: Encoding
-- Default: Slash,InvalidUtf8,Dot
-
-Limitations
-Note that Amazon Drive is case insensitive so you can't have a file called "Hello.doc" and one called "hello.doc".
-Amazon Drive has rate limiting so you may notice errors in the sync (429 errors). rclone will automatically retry the sync up to 3 times by default (see --retries
flag) which should hopefully work around this problem.
-Amazon Drive has an internal limit of file sizes that can be uploaded to the service. This limit is not officially published, but all files larger than this will fail.
-At the time of writing (Jan 2016) is in the area of 50 GiB per file. This means that larger files are likely to fail.
-Unfortunately there is no way for rclone to see that this failure is because of file size, so it will retry the operation, as any other failure. To avoid this problem, use --max-size 50000M
option to limit the maximum size of uploaded files. Note that --max-size
does not split files into segments, it only ignores files over this size.
-rclone about
is not supported by the Amazon Drive 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
Amazon S3 Storage Providers
The S3 backend can be used with a number of different providers:
@@ -13021,6 +13675,7 @@ y/e/d> y
- Leviia Object Storage
- Liara Object Storage
- Linode Object Storage
+- Magalu Object Storage
- Minio
- Petabox
- Qiniu Cloud Object Storage (Kodo)
@@ -13045,7 +13700,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
-Configuration
+Configuration
Here is an example of making an s3 configuration for the AWS S3 provider. Most applies to the other providers as well, any differences are described below.
First run
rclone config
@@ -13059,7 +13714,7 @@ name> remote
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, Ceph, ChinaMobile, ArvanCloud, Dreamhost, IBM COS, Liara, Minio, and Tencent COS
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
[snip]
Storage> s3
@@ -13244,7 +13899,7 @@ y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d>
-Modification times and hashes
+Modification times and hashes
Modification times
The modified time is stored as metadata on the object as X-Amz-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 or is in Glacier or Glacier Deep Archive storage the object will be uploaded rather than copied.
@@ -13340,7 +13995,7 @@ $ rclone -q --s3-versions ls s3:cleanup-test
If there are real files present with the same names as versions, then behaviour of --s3-versions
can be unpredictable.
Cleanup
If you run rclone cleanup s3:bucket
then it will remove all pending multipart uploads older than 24 hours. You can use the --interactive
/i
or --dry-run
flag to see exactly what it will do. If you want more control over the expiry date then run rclone backend cleanup s3:bucket -o max-age=1h
to expire all uploads older than one hour. You can use rclone backend list-multipart-uploads s3:bucket
to see the pending multipart uploads.
-Restricted filename characters
+Restricted filename characters
S3 allows any valid UTF-8 string as a key.
Invalid UTF-8 bytes will be replaced, as they can't be used in XML.
The following characters are replaced since these are problematic when dealing with the REST API:
@@ -13434,6 +14089,7 @@ $ rclone -q --s3-versions ls s3:cleanup-test
GetObject
PutObject
PutObjectACL
+CreateBucket
(unless using s3-no-check-bucket)
When using the lsd
subcommand, the ListAllMyBuckets
permission is required.
Example policy:
@@ -13468,6 +14124,7 @@ $ rclone -q --s3-versions ls s3:cleanup-test
- This is a policy that can be used when creating bucket. It assumes that
USER_NAME
has been created.
- The Resource entry must include both resource ARNs, as one implies the bucket and the other implies the bucket's objects.
+- When using s3-no-check-bucket and the bucket already exsits, the
"arn:aws:s3:::BUCKET_NAME"
doesn't have to be included.
For reference, here's an Ansible script that will generate one or more buckets that will work with rclone sync
.
Key Management System (KMS)
@@ -13483,8 +14140,8 @@ $ rclone -q --s3-versions ls s3:cleanup-test
If you configure a default retention period on a bucket, requests to upload objects in such a bucket must include the Content-MD5 header.
As mentioned in the Modification times and hashes section, small files that are not uploaded as multipart, use a different tag, causing the upload to fail. A simple solution is to set the --s3-upload-cutoff 0
and force all the files to be uploaded as multipart.
-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).
+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, Magalu, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others).
--s3-provider
Choose your S3 provider.
Properties:
@@ -13563,6 +14220,10 @@ $ rclone -q --s3-versions ls s3:cleanup-test
+"Magalu"
+
"Minio"
- Minio Object Storage
@@ -13769,6 +14430,11 @@ $ rclone -q --s3-versions ls s3:cleanup-test
- 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.
@@ -13900,6 +14566,10 @@ $ rclone -q --s3-versions ls s3:cleanup-test
- South America (Sao Paulo) Region
+"il-central-1"
+
+- Israel (Tel Aviv) Region
+
"me-south-1"
- Middle East (Bahrain) Region
@@ -14101,7 +14771,7 @@ $ rclone -q --s3-versions ls s3:cleanup-test
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
Canned ACL used when creating buckets.
For more info visit https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
@@ -14315,8 +14985,8 @@ Windows: "%USERPROFILE%\.aws\credentials"
Required: false
--s3-upload-concurrency
-Concurrency for multipart uploads.
-This is the number of chunks of the same file that are uploaded concurrently.
+Concurrency for multipart uploads and copies.
+This is the number of chunks of the same file that are uploaded concurrently for multipart uploads and copies.
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:
@@ -14347,6 +15017,16 @@ Windows: "%USERPROFILE%\.aws\credentials"
- Type: bool
- Default: false
+--s3-use-dual-stack
+If true use AWS S3 dual-stack endpoint (IPv6 support).
+See AWS Docs on Dualstack Endpoints
+Properties:
+
+- Config: use_dual_stack
+- Env Var: RCLONE_S3_USE_DUAL_STACK
+- Type: bool
+- Default: false
+
--s3-use-accelerate-endpoint
If true use the AWS S3 accelerated endpoint.
See: AWS S3 Transfer acceleration
@@ -14546,6 +15226,18 @@ Windows: "%USERPROFILE%\.aws\credentials"
Type: Time
Default: off
+--s3-version-deleted
+Show deleted file markers when using versions.
+This shows deleted file markers in the listing when using versions. These will appear as 0 size files. The only operation which can be performed on them is deletion.
+Deleting a delete marker will reveal the previous version.
+Deleted files will always show with a timestamp.
+Properties:
+
+- Config: version_deleted
+- Env Var: RCLONE_S3_VERSION_DELETED
+- Type: bool
+- Default: false
+
--s3-decompress
If set this will decompress gzip encoded objects.
It is possible to upload objects to S3 with "Content-Encoding: gzip" set. Normally rclone will download these files as compressed objects.
@@ -14631,6 +15323,15 @@ Windows: "%USERPROFILE%\.aws\credentials"
Type: Tristate
Default: unset
+--s3-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_S3_DESCRIPTION
+- Type: string
+- Required: false
+
User metadata is stored as x-amz-meta- keys. S3 metadata keys are case insensitive and are always returned in lower case.
Here are the possible system metadata items for the s3 backend.
@@ -14924,7 +15625,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
@@ -14988,6 +15689,7 @@ region = auto
endpoint = https://ACCOUNT_ID.r2.cloudflarestorage.com
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 is an object storage system based on CEPH.
To use rclone with Dreamhost, configure as above but leave the region blank and set the endpoint. You should end up with something like this in your config:
@@ -15067,10 +15769,10 @@ Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
- 5 / 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, ...
\ (s3)
[snip]
-Storage> 5
+Storage> s3
Option provider.
Choose your S3 provider.
Choose a number from below, or type in your own value.
@@ -15185,18 +15887,11 @@ e/n/d/r/c/s/q> q
Select "s3" storage.
Choose a number from below, or type in your own value
- 1 / Alias for an existing remote
- \ "alias"
- 2 / Amazon Drive
- \ "amazon cloud drive"
- 3 / Amazon S3 Complaint Storage Providers (Dreamhost, Ceph, ChinaMobile, Liara, ArvanCloud, Minio, IBM COS)
- \ "s3"
- 4 / Backblaze B2
- \ "b2"
[snip]
- 23 / HTTP
- \ "http"
-Storage> 3
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
+ \ "s3"
+[snip]
+Storage> s3
- Select IBM COS as the S3 Storage Provider.
@@ -15339,7 +16034,7 @@ 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, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -15434,7 +16129,7 @@ name> ionos-fra
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, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -15616,15 +16311,8 @@ n/s/q> n
Select s3
storage.
Choose a number from below, or type in your own value
- 1 / 1Fichier
- \ (fichier)
- 2 / Akamai NetStorage
- \ (netstorage)
- 3 / Alias for an existing remote
- \ (alias)
- 4 / Amazon Drive
- \ (amazon cloud drive)
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Liara, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
+[snip]
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -15818,10 +16506,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 is the low-cost S3 Glacier alternative from Scaleway and it works the same way as on S3 by accepting the "GLACIER" storage_class
. So you can configure your remote with the storage_class = GLACIER
option to upload directly to C14. Don't forget that in this state you can't read files back after, you will need to restore them to "STANDARD" storage_class first before being able to read them (see "restore" section above)
Seagate Lyve Cloud
Seagate Lyve Cloud is an S3 compatible object storage platform from Seagate intended for enterprise use.
@@ -15837,7 +16526,7 @@ name> remote
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, Alibaba, Ceph, ChinaMobile, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Liara, Lyve Cloud, Minio, RackCorp, SeaweedFS, and Tencent COS
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -16064,7 +16753,7 @@ 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]
- 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, ChinaMobile, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Liara, Minio, and Tencent COS
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
[snip]
Storage> s3
@@ -16166,7 +16855,7 @@ Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
...
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, ChinaMobile, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Lyve Cloud, Minio, RackCorp, SeaweedFS, and Tencent COS
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
...
Storage> s3
@@ -16414,15 +17103,8 @@ n/s/q> n
Select s3
storage.
Choose a number from below, or type in your own value
- 1 / 1Fichier
- \ (fichier)
- 2 / Akamai NetStorage
- \ (netstorage)
- 3 / Alias for an existing remote
- \ (alias)
- 4 / Amazon Drive
- \ (amazon cloud drive)
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Liara, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
+[snip]
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -16609,7 +17291,7 @@ Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
- X / Amazon S3 Compliant Storage Providers including AWS, ...Linode, ...and others
+XX / Amazon S3 Compliant Storage Providers including AWS, ...Linode, ...and others
\ (s3)
[snip]
Storage> s3
@@ -16713,6 +17395,111 @@ provider = Linode
access_key_id = ACCESS_KEY
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 file storage. It gives you access to backup and archived files and allows sharing. Files like profile image in the app, images sent by users or scanned documents can be stored securely and easily in our Object Storage service.
ArvanCloud provides an S3 interface which can be configured for use with rclone like this.
@@ -16828,13 +17615,8 @@ n/s/q> n
Select s3
storage.
Choose a number from below, or type in your own value
-1 / 1Fichier
- \ "fichier"
- 2 / Alias for an existing remote
- \ "alias"
- 3 / Amazon Drive
- \ "amazon cloud drive"
- 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, ChinaMobile, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Liara, Minio, and Tencent COS
+[snip]
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
[snip]
Storage> s3
@@ -16928,7 +17710,7 @@ cos s3
For Netease NOS configure as per the configurator rclone config
setting the provider Netease
. This will automatically set force_path_style = false
which is necessary for it to run properly.
Petabox
Here is an example of making a Petabox configuration. First run:
-
+
This will guide you through an interactive setup process.
No remotes found, make a new one?
n) New remote
@@ -17162,7 +17944,7 @@ 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
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, GCS, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Liara, Lyve Cloud, Minio, Netease, Petabox, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
Storage> s3
@@ -17261,3854 +18043,2934 @@ y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
-y/e/d> y
+y/e/d> y
+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
+--------------------
+[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.
+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 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 the following characters are also replaced:
+
+
+
+
+
+
+\ |
+0x5C |
+\ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, 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 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).
+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. 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
-# Backblaze B2
+$ 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
-B2 is [Backblaze's cloud storage system](https://www.backblaze.com/b2/).
+$ 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
-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`.
+$ rclone -q ls b2:cleanup-test
+ 9 one.txt
-## 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.
+$ 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
-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.
+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
-$ 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 authorization token will expire in s or suffix ms|s|m|h|d.
-
-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
-
-## 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] [<arguments>+]
-
-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
-
-- Edit existing remote
-- New remote
-- Delete remote
-- Rename remote
-- Copy remote
-- Set configuration password
-- 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)>
-- Yes
-- No y/n> n Value "client_secret" = "" Edit? (y/n)>
-- Yes
-- No y/n> n Remote config Already have a token - refresh?
-- Yes
-- No y/n> y Use web browser to automatically authenticate rclone with remote?
-
+Standard options
+Here are the Standard options specific to b2 (Backblaze B2).
+--b2-account
+Account ID or Application Key ID.
+Properties:
-- 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.
+- Config: account
+- Env Var: RCLONE_B2_ACCOUNT
+- Type: string
+- Required: true
-
-- Yes
-- 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"} --------------------
-- Yes this is OK
-- Edit this remote
-- Delete this remote y/e/d> y
-
-
-### Modification times and hashes
-
-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 supports SHA1 type hashes, so you can use the `--checksum`
-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 |
-| --------- |:-----:|:-----------:|
-| \ | 0x5C | \ |
-
-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 | ␠ |
-
-Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
-as they can't be used in JSON strings.
-
-### 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
-the multipart uploads). Chunks are buffered in memory and are
-normally 8 MiB so increasing `--transfers` 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.
-
-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 `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.
-
-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 last segment
-of the URL when you open the relevant folder in the Box web
-interface.
-
-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.
-
-
-### Standard options
-
-Here are the Standard options specific to box (Box).
-
-#### --box-client-id
-
-OAuth Client Id.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_id
-- Env Var: RCLONE_BOX_CLIENT_ID
-- Type: string
-- Required: false
-
-#### --box-client-secret
-
-OAuth Client Secret.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_secret
-- Env Var: RCLONE_BOX_CLIENT_SECRET
-- Type: string
-- Required: false
-
-#### --box-box-config-file
-
+--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] [<arguments>+]
+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] [<arguments>+]
+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] [<arguments>+]
+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.
-
-Properties:
-
-- Config: access_token
-- Env Var: RCLONE_BOX_ACCESS_TOKEN
-- Type: string
-- Required: false
-
-#### --box-box-sub-type
-
-
-
-Properties:
-
-- 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.
-
-### Advanced options
-
-Here are the Advanced options specific to box (Box).
-
-#### --box-token
-
-OAuth Access Token as a JSON blob.
-
-Properties:
-
-- Config: token
-- Env Var: RCLONE_BOX_TOKEN
-- Type: string
-- Required: false
-
-#### --box-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_BOX_AUTH_URL
-- Type: string
-- Required: false
-
-#### --box-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_BOX_TOKEN_URL
-- Type: string
-- Required: false
-
-#### --box-root-folder-id
-
-Fill in for rclone to use a non root folder as its starting point.
-
-Properties:
-
-- Config: root_folder_id
-- Env Var: RCLONE_BOX_ROOT_FOLDER_ID
-- Type: string
-- Default: "0"
-
-#### --box-upload-cutoff
-
-Cutoff for switching to multipart upload (>= 50 MiB).
-
-Properties:
-
-- Config: upload_cutoff
-- Env Var: RCLONE_BOX_UPLOAD_CUTOFF
-- Type: SizeSuffix
-- Default: 50Mi
-
-#### --box-commit-retries
-
-Max number of times to try committing a multipart file.
-
-Properties:
-
-- Config: commit_retries
-- Env Var: RCLONE_BOX_COMMIT_RETRIES
-- Type: int
-- Default: 100
-
-#### --box-list-chunk
-
-Size of listing chunk 1-1000.
-
-Properties:
-
-- Config: list_chunk
-- Env Var: RCLONE_BOX_LIST_CHUNK
-- Type: int
-- Default: 1000
-
-#### --box-owned-by
-
-Only show items owned by the login (email address) passed in.
-
-Properties:
-
-- Config: owned_by
-- Env Var: RCLONE_BOX_OWNED_BY
-- Type: string
-- Required: false
-
-#### --box-impersonate
-
-Impersonate this user ID when using a service account.
-
-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.
-
-See: https://developer.box.com/guides/authentication/jwt/as-user/
-
-
-Properties:
-
-- Config: impersonate
-- Env Var: RCLONE_BOX_IMPERSONATE
-- Type: string
-- Required: false
-
-#### --box-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_BOX_ENCODING
-- Type: Encoding
-- Default: Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot
-
-
-
-## Limitations
-
-Note that Box is case insensitive so you can't have a file called
-"Hello.doc" and one called "hello.doc".
-
-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).
-
-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.
-
-`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.
-
-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
-
-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 `My Apps` on the sidebar. Click `Create New App`
-and select `Custom App`.
-
-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`.
-
-3. In the second screen of the creation screen, select
-`User Authentication (OAuth 2.0)`. Then click `Create App`.
-
-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.
-
-5. Under "OAuth 2.0 Redirect URI", add `http://127.0.0.1:53682/`
-
-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.
-
-# Cache
-
-The `cache` remote wraps another existing remote and stores file structure
-and its data for long running tasks like `rclone mount`.
-
-## Status
-
-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.
-
-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'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.
-
-## Configuration
-
-To get started you just need to have an existing remote which can be configured
-with `cache`.
-
-Here is an example of how to make a remote called `test-cache`. First run:
-
- rclone config
-
-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.
-
-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, `cache` will function with its
-configured options without adapting any of its settings.
-
-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.
-
-Affected settings:
-- `cache-workers`: _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 `.plex.direct` 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:
-
-`https://ip-with-dots-replaced.server-hash.plex.direct:32400/`
-
-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`.
-
-To get the `server-hash` 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 `.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
-
+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
+Modification times and hashes
+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 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:
+
+
+
+
+
+
+\ |
+0x5C |
+\ |
+
+
+
+File names can also not end with the following characters. These only get replaced if they are the last character in the name:
+
+
+
+
+
+
+SP |
+0x20 |
+␠ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+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 the multipart uploads). Chunks are buffered in memory and are normally 8 MiB so increasing --transfers
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.
+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 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.
+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 last segment of the URL when you open the relevant folder in the Box web interface.
+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.
+Standard options
+Here are the Standard options specific to box (Box).
+--box-client-id
+OAuth Client Id.
+Leave blank normally.
+Properties:
+
+- Config: client_id
+- Env Var: RCLONE_BOX_CLIENT_ID
+- Type: string
+- Required: false
+
+--box-client-secret
+OAuth Client Secret.
+Leave blank normally.
+Properties:
+
+- Config: client_secret
+- Env Var: RCLONE_BOX_CLIENT_SECRET
+- Type: string
+- Required: false
+
+--box-box-config-file
+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
+Box App Primary Access Token
+Leave blank normally.
+Properties:
+
+- Config: access_token
+- Env Var: RCLONE_BOX_ACCESS_TOKEN
+- Type: string
+- Required: false
+
+--box-box-sub-type
+Properties:
+
+- 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.
+
+
+
+Advanced options
+Here are the Advanced options specific to box (Box).
+--box-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_BOX_TOKEN
+- Type: string
+- Required: false
+
+--box-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_BOX_AUTH_URL
+- Type: string
+- Required: false
+
+--box-token-url
+Token server url.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_BOX_TOKEN_URL
+- Type: string
+- Required: false
+
+--box-root-folder-id
+Fill in for rclone to use a non root folder as its starting point.
+Properties:
+
+- Config: root_folder_id
+- Env Var: RCLONE_BOX_ROOT_FOLDER_ID
+- Type: string
+- Default: "0"
+
+--box-upload-cutoff
+Cutoff for switching to multipart upload (>= 50 MiB).
+Properties:
+
+- Config: upload_cutoff
+- Env Var: RCLONE_BOX_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 50Mi
+
+--box-commit-retries
+Max number of times to try committing a multipart file.
+Properties:
+
+- Config: commit_retries
+- Env Var: RCLONE_BOX_COMMIT_RETRIES
+- Type: int
+- Default: 100
+
+--box-list-chunk
+Size of listing chunk 1-1000.
+Properties:
+
+- Config: list_chunk
+- Env Var: RCLONE_BOX_LIST_CHUNK
+- Type: int
+- Default: 1000
+
+--box-owned-by
+Only show items owned by the login (email address) passed in.
+Properties:
+
+- Config: owned_by
+- Env Var: RCLONE_BOX_OWNED_BY
+- Type: string
+- Required: false
+
+--box-impersonate
+Impersonate this user ID when using a service account.
+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.
+See: https://developer.box.com/guides/authentication/jwt/as-user/
+Properties:
+
+- Config: impersonate
+- Env Var: RCLONE_BOX_IMPERSONATE
+- Type: string
+- Required: false
+
+--box-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_BOX_ENCODING
+- Type: Encoding
+- Default: Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot
+
+--box-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_BOX_DESCRIPTION
+- Type: string
+- Required: false
+
+Limitations
+Note that Box is case insensitive so you can't have a file called "Hello.doc" and one called "hello.doc".
+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).
+Box only supports filenames up to 255 characters in length.
+Box has API rate limits that sometimes reduce the speed of rclone.
+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.
+See List of backends that do not support rclone about and rclone about
+Get your own Box App ID
+Here is how to create your own Box App ID for rclone:
+
+Go to the Box Developer Console and login, then click My Apps
on the sidebar. Click Create New App
and select Custom App
.
+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
.
+In the second screen of the creation screen, select User Authentication (OAuth 2.0)
. Then click Create App
.
+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.
+Under "OAuth 2.0 Redirect URI", add http://127.0.0.1:53682/
+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.
+
+Cache
+The cache
remote wraps another existing remote and stores file structure and its data for long running tasks like rclone mount
.
+Status
+The cache backend code is working but it currently doesn't have a maintainer so there are outstanding bugs which aren't getting fixed.
+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'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.
+Configuration
+To get started you just need to have an existing remote which can be configured with cache
.
+Here is an example of how to make a remote called test-cache
. First run:
+ rclone config
+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).
-
-Properties:
-
-- Config: remote
-- Env Var: RCLONE_CACHE_REMOTE
-- Type: string
-- Required: true
-
-#### --cache-plex-url
-
-The URL of the Plex server.
-
-Properties:
-
-- Config: plex_url
-- Env Var: RCLONE_CACHE_PLEX_URL
-- Type: string
-- Required: false
-
-#### --cache-plex-username
-
-The username of the Plex user.
-
-Properties:
-
-- Config: plex_username
-- Env Var: RCLONE_CACHE_PLEX_USERNAME
-- Type: string
-- Required: false
-
-#### --cache-plex-password
-
-The password of the Plex user.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: plex_password
-- Env Var: RCLONE_CACHE_PLEX_PASSWORD
-- Type: string
-- Required: false
-
-#### --cache-chunk-size
-
-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.
-
-Properties:
-
-- Config: chunk_size
-- Env Var: RCLONE_CACHE_CHUNK_SIZE
-- Type: SizeSuffix
-- Default: 5Mi
-- Examples:
- - "1M"
- - 1 MiB
- - "5M"
- - 5 MiB
- - "10M"
- - 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.
-
-Properties:
-
-- Config: info_age
-- Env Var: RCLONE_CACHE_INFO_AGE
-- Type: Duration
-- Default: 6h0m0s
-- Examples:
- - "1h"
- - 1 hour
- - "24h"
- - 24 hours
- - "48h"
- - 48 hours
-
-#### --cache-chunk-total-size
-
-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.
-
-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
-
-### Advanced options
-
-Here are the Advanced options specific to cache (Cache a remote).
-
-#### --cache-plex-token
-
-The plex token for authentication - auto set normally.
-
-Properties:
-
-- Config: plex_token
-- Env Var: RCLONE_CACHE_PLEX_TOKEN
-- Type: string
-- Required: false
-
-#### --cache-plex-insecure
-
-Skip all certificate verification when connecting to the Plex server.
-
-Properties:
-
-- Config: plex_insecure
-- Env Var: RCLONE_CACHE_PLEX_INSECURE
-- Type: string
-- Required: false
-
-#### --cache-db-path
-
-Directory to store file structure metadata DB.
-
-The remote name is used as the DB file name.
-
-Properties:
-
-- Config: db_path
-- Env Var: RCLONE_CACHE_DB_PATH
-- Type: string
-- Default: "$HOME/.cache/rclone/cache-backend"
-
-#### --cache-chunk-path
-
-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 "--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".
-
-Properties:
-
-- Config: chunk_path
-- Env Var: RCLONE_CACHE_CHUNK_PATH
-- Type: string
-- Default: "$HOME/.cache/rclone/cache-backend"
-
-#### --cache-db-purge
-
-Clear all the cached data for this remote on start.
-
-Properties:
-
-- Config: db_purge
-- Env Var: RCLONE_CACHE_DB_PURGE
-- Type: bool
-- Default: false
-
-#### --cache-chunk-clean-interval
-
-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 "cache-chunk-total-size" too often then try to lower
-this value to force it to perform cleanups more often.
-
-Properties:
-
-- Config: chunk_clean_interval
-- Env Var: RCLONE_CACHE_CHUNK_CLEAN_INTERVAL
-- Type: Duration
-- Default: 1m0s
-
-#### --cache-read-retries
-
-How many times to retry a read from a cache storage.
-
-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.
-
-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:
-
-- Config: read_retries
-- Env Var: RCLONE_CACHE_READ_RETRIES
-- Type: int
-- Default: 10
-
-#### --cache-workers
-
-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
-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.
-
-Properties:
-
-- Config: workers
-- Env Var: RCLONE_CACHE_WORKERS
-- Type: int
-- Default: 4
-
-#### --cache-chunk-no-memory
-
-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.
-
-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:
-
-- 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).
-
-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.
-
-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.
-
-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
-still pass.
-
-Properties:
-
-- Config: rps
-- Env Var: RCLONE_CACHE_RPS
-- Type: int
-- Default: -1
-
-#### --cache-writes
-
-Cache file data on writes through the FS.
-
-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.
-
-Properties:
-
-- 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
-
-## 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] [<arguments>+]
-
-
-
-# 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). 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> 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:
+
+- An upload is started (usually by copying a file on the cache remote)
+- 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)
+- 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
+- Reading the file still works during the upload but most modifications on it will be prohibited
+- Once the move is complete the file is unlocked for modifications as it becomes as any other regular file
+- 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.
+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, cache
will function with its configured options without adapting any of its settings.
+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.
+Affected settings: - cache-workers
: 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 .plex.direct
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:
+https://ip-with-dots-replaced.server-hash.plex.direct:32400/
+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
.
+To get the server-hash
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 .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
+Remote to cache.
+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_CACHE_REMOTE
+- Type: string
+- Required: true
+
+--cache-plex-url
+The URL of the Plex server.
+Properties:
+
+- Config: plex_url
+- Env Var: RCLONE_CACHE_PLEX_URL
+- Type: string
+- Required: false
+
+--cache-plex-username
+The username of the Plex user.
+Properties:
+
+- Config: plex_username
+- Env Var: RCLONE_CACHE_PLEX_USERNAME
+- Type: string
+- Required: false
+
+--cache-plex-password
+The password of the Plex user.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: plex_password
+- Env Var: RCLONE_CACHE_PLEX_PASSWORD
+- Type: string
+- Required: false
+
+--cache-chunk-size
+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.
+Properties:
+
+- Config: chunk_size
+- Env Var: RCLONE_CACHE_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 5Mi
+- Examples:
+
+- "1M"
+
+- "5M"
+
+- "10M"
+
+
+
+--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.
+Properties:
+
+- Config: info_age
+- Env Var: RCLONE_CACHE_INFO_AGE
+- Type: Duration
+- Default: 6h0m0s
+- Examples:
+
+- "1h"
+
+- "24h"
+
+- "48h"
+
+
+
+--cache-chunk-total-size
+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.
+Properties:
+
+- Config: chunk_total_size
+- Env Var: RCLONE_CACHE_CHUNK_TOTAL_SIZE
+- Type: SizeSuffix
+- Default: 10Gi
+- Examples:
+
+- "500M"
+
+- "1G"
+
+- "10G"
+
+
+
+Advanced options
+Here are the Advanced options specific to cache (Cache a remote).
+--cache-plex-token
+The plex token for authentication - auto set normally.
+Properties:
+
+- Config: plex_token
+- Env Var: RCLONE_CACHE_PLEX_TOKEN
+- Type: string
+- Required: false
+
+--cache-plex-insecure
+Skip all certificate verification when connecting to the Plex server.
+Properties:
+
+- Config: plex_insecure
+- Env Var: RCLONE_CACHE_PLEX_INSECURE
+- Type: string
+- Required: false
+
+--cache-db-path
+Directory to store file structure metadata DB.
+The remote name is used as the DB file name.
+Properties:
+
+- Config: db_path
+- Env Var: RCLONE_CACHE_DB_PATH
+- Type: string
+- Default: "$HOME/.cache/rclone/cache-backend"
+
+--cache-chunk-path
+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 "--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".
+Properties:
+
+- Config: chunk_path
+- Env Var: RCLONE_CACHE_CHUNK_PATH
+- Type: string
+- Default: "$HOME/.cache/rclone/cache-backend"
+
+--cache-db-purge
+Clear all the cached data for this remote on start.
+Properties:
+
+- Config: db_purge
+- Env Var: RCLONE_CACHE_DB_PURGE
+- Type: bool
+- Default: false
+
+--cache-chunk-clean-interval
+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 "cache-chunk-total-size" too often then try to lower this value to force it to perform cleanups more often.
+Properties:
+
+- Config: chunk_clean_interval
+- Env Var: RCLONE_CACHE_CHUNK_CLEAN_INTERVAL
+- Type: Duration
+- Default: 1m0s
+
+--cache-read-retries
+How many times to retry a read from a cache storage.
+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.
+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:
+
+- Config: read_retries
+- Env Var: RCLONE_CACHE_READ_RETRIES
+- Type: int
+- Default: 10
+
+--cache-workers
+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 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.
+Properties:
+
+- Config: workers
+- Env Var: RCLONE_CACHE_WORKERS
+- Type: int
+- Default: 4
+
+--cache-chunk-no-memory
+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.
+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:
+
+- 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).
+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.
+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.
+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 still pass.
+Properties:
+
+- Config: rps
+- Env Var: RCLONE_CACHE_RPS
+- Type: int
+- Default: -1
+
+--cache-writes
+Cache file data on writes through the FS.
+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.
+Properties:
+
+- 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] [<arguments>+]
+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.
-
-Properties:
-
-- 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.
-
-Properties:
-
-- 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.
-
-Properties:
-
-- Config: name_format
-- Env Var: RCLONE_CHUNKER_NAME_FORMAT
-- Type: string
-- Default: "*.rclone_chunk.###"
-
-#### --chunker-start-from
-
-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.
-
-
-
-# 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.
+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
.
+
+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.
+
+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.
+
+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:
+
+- 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.
+Properties:
+
+- 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"
+
+- "sha1all"
+
+- "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).
+
+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.
+Properties:
+
+- Config: name_format
+- Env Var: RCLONE_CHUNKER_NAME_FORMAT
+- Type: string
+- Default: "*.rclone_chunk.###"
+
+--chunker-start-from
+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
+
+
+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 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).
-
-Properties:
-
-- 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
-
-Here are the Advanced options specific to sharefile (Citrix Sharefile).
-
-#### --sharefile-token
-
-OAuth Access Token as a JSON blob.
-
-Properties:
-
-- Config: token
-- Env Var: RCLONE_SHAREFILE_TOKEN
-- Type: string
-- Required: false
-
-#### --sharefile-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_SHAREFILE_AUTH_URL
-- Type: string
-- Required: false
-
-#### --sharefile-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_SHAREFILE_TOKEN_URL
-- Type: string
-- Required: false
-
-#### --sharefile-upload-cutoff
-
-Cutoff for switching to multipart upload.
-
-Properties:
-
-- Config: upload_cutoff
-- Env Var: RCLONE_SHAREFILE_UPLOAD_CUTOFF
-- Type: SizeSuffix
-- Default: 128Mi
-
-#### --sharefile-chunk-size
-
-Upload chunk size.
-
-Must a power of 2 >= 256k.
-
-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.
-
-Properties:
-
-- Config: chunk_size
-- Env Var: RCLONE_SHAREFILE_CHUNK_SIZE
-- Type: SizeSuffix
-- Default: 64Mi
-
-#### --sharefile-endpoint
-
-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
-
-
-Properties:
-
-- Config: endpoint
-- Env Var: RCLONE_SHAREFILE_ENDPOINT
-- Type: string
-- Required: false
-
-#### --sharefile-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_SHAREFILE_ENCODING
-- Type: Encoding
-- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot
-
-
-## Limitations
-
-Note that ShareFile is case insensitive so you can't have a file called
-"Hello.doc" and one called "hello.doc".
-
-ShareFile only supports filenames up to 256 characters in length.
-
-`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.
-
-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 `crypt` remotes encrypt and decrypt other remotes.
-
-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.
-
-### 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
-
-Standard
-
- * 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.
-
-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
-"Standard" 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 `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
+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 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 the following characters are also replaced:
+
+
+
+
+
+
+\ |
+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:
+
+
+
+
+
+
+SP |
+0x20 |
+␠ |
+
+
+. |
+0x2E |
+. |
+
+
+
+Invalid UTF-8 bytes will also be replaced, 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.
+Leave blank to access "Personal Folders". 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:
+
+- ""
+
+- 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
+Here are the Advanced options specific to sharefile (Citrix Sharefile).
+--sharefile-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_SHAREFILE_TOKEN
+- Type: string
+- Required: false
+
+--sharefile-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_SHAREFILE_AUTH_URL
+- Type: string
+- Required: false
+
+--sharefile-token-url
+Token server url.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_SHAREFILE_TOKEN_URL
+- Type: string
+- Required: false
+
+--sharefile-upload-cutoff
+Cutoff for switching to multipart upload.
+Properties:
+
+- Config: upload_cutoff
+- Env Var: RCLONE_SHAREFILE_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 128Mi
+
+--sharefile-chunk-size
+Upload chunk size.
+Must a power of 2 >= 256k.
+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.
+Properties:
+
+- Config: chunk_size
+- Env Var: RCLONE_SHAREFILE_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 64Mi
+
+--sharefile-endpoint
+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
+Properties:
+
+- Config: endpoint
+- Env Var: RCLONE_SHAREFILE_ENDPOINT
+- Type: string
+- Required: false
+
+--sharefile-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+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.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SHAREFILE_DESCRIPTION
+- Type: string
+- Required: false
+
+Limitations
+Note that ShareFile is case insensitive so you can't have a file called "Hello.doc" and one called "hello.doc".
+ShareFile only supports filenames up to 256 characters in length.
+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.
+See List of backends that do not support rclone about and rclone about
+Crypt
+Rclone crypt
remotes encrypt and decrypt other remotes.
+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.
+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.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-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
-
-Deprecated: use --server-side-across-configs instead.
-
-Allow server-side operations (e.g. copy) to work across different crypt configs.
-
-Normally this option is not what you want, but if you have two crypts
-pointing to the same backend you can use it.
-
-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.
-
-Properties:
-
-- Config: server_side_across_configs
-- Env Var: RCLONE_CRYPT_SERVER_SIDE_ACROSS_CONFIGS
-- Type: bool
-- Default: false
-
-#### --crypt-show-mapping
-
-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.
-
-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.
-
-Properties:
-
-- Config: show_mapping
-- Env Var: RCLONE_CRYPT_SHOW_MAPPING
-- Type: bool
-- Default: false
-
-#### --crypt-no-data-encryption
-
-Option to either encrypt file data or leave it unencrypted.
-
-Properties:
-
-- 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.
-
-#### --crypt-pass-bad-blocks
-
-If set this will pass bad blocks through as all 0.
-
-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.
-
-Properties:
-
-- Config: pass_bad_blocks
-- Env Var: RCLONE_CRYPT_PASS_BAD_BLOCKS
-- Type: bool
-- Default: false
-
-#### --crypt-filename-encoding
-
-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's case sensitive.
-
-Properties:
-
-- 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)
-
-#### --crypt-suffix
-
-If this is set it will override the default suffix of ".bin".
-
-Setting suffix to "none" will result in an empty suffix. This may be useful
-when the path length is critical.
-
-Properties:
-
-- Config: suffix
-- Env Var: RCLONE_CRYPT_SUFFIX
-- Type: string
-- Default: ".bin"
-
-### 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 crypt 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).
-
-### encode
-
-Encode the given filename(s)
-
- rclone backend encode remote: [options] [<arguments>+]
-
-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] [<arguments>+]
-
-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
-`rclone sync` on the encrypted files, and make sure the passwords are
-the same in the new encrypted remote.
-
-This will have the following advantages
-
- * `rclone sync` will check the checksums while copying
- * you can use `rclone check` between the encrypted remotes
- * you don't decrypt and encrypt unnecessarily
-
-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:`.
-
-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 `RCLONE\x00\x00`
- * 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¹⁸ bytes) you would have a probability of
-approximately 2×10⁻³² 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'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 `/` 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, Amazon Drive).
-
-### 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](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'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
-
-- Edit existing remote $ rclone config
-- New remote
-- Delete remote
-- Rename remote
-- Copy remote
-- Set configuration password
-- 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. 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
-
-### Compression Modes
-
-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.
-
-### 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 `*.###########.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.
-
-
-### Standard options
-
-Here are the Standard options specific to compress (Compress a remote).
-
-#### --compress-remote
+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
+
+Standard
+
+- 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.
+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 "Standard" file name encryption. Where file names are 143 or fewer characters in length issues should not be encountered, irrespective of cloud storage provider.
+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
+Remote to encrypt/decrypt.
+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_CRYPT_REMOTE
+- Type: string
+- Required: true
+
+--crypt-filename-encryption
+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
+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
+Password or pass phrase for encryption.
+NB Input to this must be obscured - see 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. Should be different to the previous password.
+NB Input to this must be obscured - see rclone obscure.
+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
+Deprecated: use --server-side-across-configs instead.
+Allow server-side operations (e.g. copy) to work across different crypt configs.
+Normally this option is not what you want, but if you have two crypts pointing to the same backend you can use it.
+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.
+Properties:
+
+- Config: server_side_across_configs
+- Env Var: RCLONE_CRYPT_SERVER_SIDE_ACROSS_CONFIGS
+- Type: bool
+- Default: false
+
+--crypt-show-mapping
+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.
+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.
+Properties:
+
+- Config: show_mapping
+- Env Var: RCLONE_CRYPT_SHOW_MAPPING
+- Type: bool
+- Default: false
+
+--crypt-no-data-encryption
+Option to either encrypt file data or leave it unencrypted.
+Properties:
+
+- 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"
+
+
+
+--crypt-pass-bad-blocks
+If set this will pass bad blocks through as all 0.
+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.
+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'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.
+Properties:
+
+- Config: strict_names
+- Env Var: RCLONE_CRYPT_STRICT_NAMES
+- Type: bool
+- Default: false
+
+--crypt-filename-encoding
+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's case sensitive.
+Properties:
+
+- 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)
+
+
+
+--crypt-suffix
+If this is set it will override the default suffix of ".bin".
+Setting suffix to "none" will result in an empty suffix. This may be useful when the path length is critical.
+Properties:
+
+- Config: suffix
+- Env Var: RCLONE_CRYPT_SUFFIX
+- Type: string
+- Default: ".bin"
+
+--crypt-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_CRYPT_DESCRIPTION
+- Type: string
+- Required: false
+
+
+Any metadata supported by the underlying remote is read and written.
+See the metadata docs for more info.
+Backend commands
+Here are the commands specific to the crypt 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.
+encode
+Encode the given filename(s)
+rclone backend encode remote: [options] [<arguments>+]
+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] [<arguments>+]
+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 rclone sync
on the encrypted files, and make sure the passwords are the same in the new encrypted remote.
+This will have the following advantages
+
+rclone sync
will check the checksums while copying
+- you can use
rclone check
between the encrypted remotes
+- you don't decrypt and encrypt unnecessarily
+
+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:
.
+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 encryption
+Files are encrypted 1:1 source file to destination object. The file has a header and is divided into chunks.
+
+
+- 8 bytes magic string
RCLONE\x00\x00
+- 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¹⁸ bytes) you would have a probability of approximately 2×10⁻³² 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'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 /
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
+
+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.
-
-Properties:
-
-- Config: mode
-- Env Var: RCLONE_COMPRESS_MODE
-- Type: string
-- Default: "gzip"
-- Examples:
- - "gzip"
- - Standard gzip compression with fastest parameters.
-
-### Advanced options
-
-Here are the Advanced options specific to compress (Compress a remote).
-
-#### --compress-level
-
-GZIP compression level (-2 to 9).
-
-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.
-Level 0 turns off compression.
-
-Properties:
-
-- Config: level
-- Env Var: RCLONE_COMPRESS_LEVEL
-- Type: int
-- Default: -1
-
-#### --compress-ram-cache-limit
-
-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.
-
-Files smaller than this limit will be cached in RAM, files larger than
-this limit will be cached on disk.
-
-Properties:
-
-- Config: ram_cache_limit
-- Env Var: RCLONE_COMPRESS_RAM_CACHE_LIMIT
-- Type: SizeSuffix
-- Default: 20Mi
-
-### Metadata
-
-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 `combine` backend joins remotes together into a single directory
-tree.
-
-For example you might have a remote for images on one provider:
-
-$ rclone tree s3:imagesbucket / ├── image1.jpg └── image2.jpg
-
-And a remote for files on another:
-
-$ rclone tree drive:important/files / ├── file1.txt └── file2.txt
-
-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
-
-You'd do this by specifying an `upstreams` parameter in the config
-like this
-
- upstreams = images=s3:imagesbucket files=drive:important/files
-
-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.
-
-## Configuration
-
-Here is an example of how to make a combine called `remote` for the
-example above. 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 / 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.
-
-Assuming your main (non shared drive) Google drive remote is called
-`drive:` 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 = "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
-
+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
+Compression Modes
+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.
+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 *.###########.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.
+Standard options
+Here are the Standard options specific to compress (Compress a remote).
+--compress-remote
+Remote to compress.
+Properties:
+
+- Config: remote
+- Env Var: RCLONE_COMPRESS_REMOTE
+- Type: string
+- Required: true
+
+--compress-mode
+Compression mode.
+Properties:
+
+- Config: mode
+- Env Var: RCLONE_COMPRESS_MODE
+- Type: string
+- Default: "gzip"
+- Examples:
+
+- "gzip"
+
+- Standard gzip compression with fastest parameters.
+
+
+
+Advanced options
+Here are the Advanced options specific to compress (Compress a remote).
+--compress-level
+GZIP compression level (-2 to 9).
+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. Level 0 turns off compression.
+Properties:
+
+- Config: level
+- Env Var: RCLONE_COMPRESS_LEVEL
+- Type: int
+- Default: -1
+
+--compress-ram-cache-limit
+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.
+Files smaller than this limit will be cached in RAM, files larger than this limit will be cached on disk.
+Properties:
+
+- Config: ram_cache_limit
+- Env Var: RCLONE_COMPRESS_RAM_CACHE_LIMIT
+- Type: SizeSuffix
+- Default: 20Mi
+
+--compress-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_COMPRESS_DESCRIPTION
+- Type: string
+- Required: false
+
+
+Any metadata supported by the underlying remote is read and written.
+See the metadata docs for more info.
+Combine
+The combine
backend joins remotes together into a single directory tree.
+For example you might have a remote for images on one provider:
+$ rclone tree s3:imagesbucket
+/
+├── image1.jpg
+└── image2.jpg
+And a remote for files on another:
+$ rclone tree drive:important/files
+/
+├── file1.txt
+└── file2.txt
+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
+You'd do this by specifying an upstreams
parameter in the config like this
+upstreams = images=s3:imagesbucket files=drive:important/files
+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.
+Configuration
+Here is an example of how to make a combine called remote
for the example above. 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 / 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.
+Assuming your main (non shared drive) Google drive remote is called drive:
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=:
-
-Properties:
-
-- Config: upstreams
-- Env Var: RCLONE_COMBINE_UPSTREAMS
-- Type: SpaceSepList
-- Default:
-
-### 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 `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:
-
-
-- New remote
-- Delete remote
-- 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 --------------------
-- Yes this is OK
-- Edit this remote
-- Delete this remote y/e/d> y
+[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 for full info.
+Standard options
+Here are the Standard options specific to combine (Combine several remotes into one).
+--combine-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"
+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
+
+
+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
+--------------------
+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 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,
+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 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.
+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.
+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'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.
+Restricted filename characters
+
+
+
+
+
+
+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:
+
+
+
+
+
+
+SP |
+0x20 |
+␠ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+Batch mode uploads
+Using batch mode uploads is very important for performance when using the Dropbox API. See the dropbox 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 too_many_requests
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 --transfers
is large, so this mode isn'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 --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.
+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 --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.
+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).
+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 "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:
+
+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)
+Choose an API => Usually this should be Dropbox API
+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).
+Name your App. The app name is global, so you can't use rclone
for example
+Click the button Create App
+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
+Switch to the Settings
tab. Fill OAuth2 - Redirect URIs
as http://localhost:53682/
and click on Add
+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
-
-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.
-
-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 `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.
-
-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.
-
-### 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'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](https://www.dropbox.com/developers/reference/content-hash) which
-is checked for all transfers.
-
-### Restricted filename characters
-
-| 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:
-
-| Character | Value | Replacement |
-| --------- |:-----:|:-----------:|
-| SP | 0x20 | ␠ |
-
-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}
-
-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 `too_many_requests` 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 `--transfers` is large, so this mode
-isn'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
-`--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.
-
-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
-`--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.
-
-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).
-
-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 "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.
-
-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
-
-
-
-## 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.
-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
-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
-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
-
-Once configured you can then use `rclone` 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't be used in JSON strings.
-
-### Empty files
-
-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.
-
-### 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 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 `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
-
-$ 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/
-
-The ID for "S3 Storage" would be `120673761`.
-
-
-### 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:
- - "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
-
-ID of the root folder.
-
+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.
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.
+Enter a string value. Press Enter for the default ("").
+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
@@ -21119,12367 +20981,11559 @@ 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
-
-
-
-# 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
-
-
-
-## 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:
-
-
-- New remote
-- Delete remote
-- 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?
-
+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
+Once configured you can then use rclone
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 will be replaced.
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+Empty files
+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.
+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 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 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
+$ 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/
+The ID for "S3 Storage" would be 120673761
.
+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:
-- 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.
+- Config: url
+- Env Var: RCLONE_FILEFABRIC_URL
+- Type: string
+- Required: true
+- Examples:
+
+- "https://storagemadeeasy.com"
+
+- "https://eu.storagemadeeasy.com"
+
+- "https://yourfabric.smestorage.com"
+
+- Connect to your Enterprise File Fabric
+
+
-
-- Yes
-- 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 --------------------
-- Yes this is OK
-- Edit this remote
-- 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 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](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.
-
-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](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 `--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.
-
-### Custom upload headers
-
-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)
-
-- Cache-Control
-- Content-Disposition
-- Content-Encoding
-- Content-Language
-- Content-Type
-- X-Goog-Storage-Class
-- X-Goog-Meta-
-
-Eg `--header-upload "Content-Type text/potato"`
-
-Note that the last of these is for setting custom metadata in the form
-`--header-upload "x-goog-meta-key: value"`
-
-### Modification times
-
-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.
-
-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.
-
-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`.
-
-### Restricted filename characters
-
-| Character | Value | Replacement |
-| --------- |:-----:|:-----------:|
-| NUL | 0x00 | ␀ |
-| LF | 0x0A | ␊ |
-| CR | 0x0D | ␍ |
-| / | 0x2F | / |
-
-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 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 `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
-
-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 'true' if you just want to download files and don't configure credentials.
-
-Properties:
-
-- Config: anonymous
-- Env Var: RCLONE_GCS_ANONYMOUS
-- Type: bool
-- Default: false
-
-#### --gcs-object-acl
-
-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
-
-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:
-
-- Config: token
-- Env Var: RCLONE_GCS_TOKEN
-- Type: string
-- Required: false
-
-#### --gcs-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_GCS_AUTH_URL
-- Type: string
-- Required: false
-
-#### --gcs-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-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 "/", to persist the folder.
-
-
-Properties:
-
-- Config: directory_markers
-- Env Var: RCLONE_GCS_DIRECTORY_MARKERS
-- Type: bool
-- Default: false
-
-#### --gcs-no-check-bucket
-
-If set, don't attempt to check the bucket exists or create it.
-
-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 "Content-Encoding: gzip"
-set. Normally rclone will download these files as compressed objects.
-
-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.
-
-
-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
-
-
-
-## 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](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/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.
-
-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 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](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 `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](https://developers.google.com/drive/v3/web/about-auth).
-
-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.
-
-### Root folder ID
-
-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.
-
-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 or to access data within the "Computers" tab on the drive
-web interface (where files from Google's Backup and Sync desktop
-program go).
-
-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.
-
-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.
-
-**NB** folders under the "Computers" tab seem to be read only (drive
-gives a 500 error) when using rclone.
-
-There doesn't appear to be an API to discover the folder IDs of the
-"Computers" tab - please contact us if you know otherwise!
-
-Note also that rclone can't access any data under the "Backups" 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'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 `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.
-
-#### Use case - Google Apps/G-suite account and individual Drive
-
-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](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.
-
-##### 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](https://rclone.org/docs/#fast-list) 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
-
-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't be used in JSON strings.
-
-In contrast to other backends, `/` can also be used in names and `.`
-or `..` 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
-`--drive-use-trash=false` flag, or set the equivalent environment
-variable.
-
-### Shortcuts
-
-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).
-
-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.
-
-By default rclone treats these as follows.
-
-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 `--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.
-
-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 `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.
-
-The [rclone backend](https://rclone.org/commands/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.
-
-### Emptying trash
-
-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.
-
-### 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:
-
-- Config: client_id
-- Env Var: RCLONE_DRIVE_CLIENT_ID
-- Type: string
-- Required: false
-
-#### --drive-client-secret
-
-OAuth Client Secret.
-
-Leave blank normally.
-
-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.
-
-Properties:
-
-- 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.
-
-#### --drive-service-account-file
-
-Service Account Credentials JSON file path.
-
-Leave blank normally.
-Needed only if you want use SA instead of interactive login.
-
-Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
-
-Properties:
-
-- Config: service_account_file
-- Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_FILE
-- Type: string
-- Required: false
-
-#### --drive-alternate-export
-
-Deprecated: No longer needed.
-
-Properties:
-
-- Config: alternate_export
-- Env Var: RCLONE_DRIVE_ALTERNATE_EXPORT
-- Type: bool
-- Default: false
-
-### Advanced options
-
-Here are the Advanced options specific to drive (Google Drive).
-
-#### --drive-token
-
-OAuth Access Token as a JSON blob.
-
-Properties:
-
-- Config: token
-- Env Var: RCLONE_DRIVE_TOKEN
-- Type: string
-- Required: false
-
-#### --drive-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_DRIVE_AUTH_URL
-- Type: string
-- Required: false
-
-#### --drive-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_DRIVE_TOKEN_URL
-- Type: string
-- Required: false
-
-#### --drive-root-folder-id
-
-ID of the root folder.
-Leave blank normally.
-
-Fill in to access "Computers" folders (see docs), or for rclone to use
-a non root folder as its starting point.
-
-
-Properties:
-
-- Config: root_folder_id
-- Env Var: RCLONE_DRIVE_ROOT_FOLDER_ID
-- Type: string
-- Required: false
-
-#### --drive-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_DRIVE_SERVICE_ACCOUNT_CREDENTIALS
-- Type: string
-- Required: false
-
-#### --drive-team-drive
-
-ID of the Shared Drive (Team Drive).
-
-Properties:
-
-- Config: team_drive
-- Env Var: RCLONE_DRIVE_TEAM_DRIVE
-- Type: string
-- Required: false
-
-#### --drive-auth-owner-only
-
-Only consider files owned by the authenticated user.
-
-Properties:
-
-- Config: auth_owner_only
-- Env Var: RCLONE_DRIVE_AUTH_OWNER_ONLY
-- Type: bool
-- Default: false
-
-#### --drive-use-trash
-
-Send files to the trash instead of deleting permanently.
-
-Defaults to true, namely sending files to the trash.
-Use `--drive-use-trash=false` to delete files permanently instead.
-
-Properties:
-
-- Config: use_trash
-- Env Var: RCLONE_DRIVE_USE_TRASH
-- Type: bool
-- Default: true
-
-#### --drive-copy-shortcut-content
-
-Server side copy contents of shortcuts instead of the shortcut.
-
-When doing server side copies, normally rclone will copy shortcuts as
-shortcuts.
-
-If this flag is used then rclone will copy the contents of shortcuts
-rather than shortcuts themselves when doing server side copies.
-
-Properties:
-
-- Config: copy_shortcut_content
-- Env Var: RCLONE_DRIVE_COPY_SHORTCUT_CONTENT
-- Type: bool
-- Default: false
-
-#### --drive-skip-gdocs
-
-Skip google documents in all listings.
-
-If given, gdocs practically become invisible to rclone.
-
-Properties:
-
-- Config: skip_gdocs
-- Env Var: RCLONE_DRIVE_SKIP_GDOCS
-- Type: bool
-- Default: false
-
-#### --drive-show-all-gdocs
-
-Show all Google Docs including non-exportable ones in listings.
-
-If you try a server side copy on a Google Form without this flag, you
-will get this error:
-
- No export formats found for "application/vnd.google-apps.form"
-
-However adding this flag will allow the form to be server side copied.
-
-Note that rclone doesn'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.
-
-
-Properties:
-
-- Config: show_all_gdocs
-- Env Var: RCLONE_DRIVE_SHOW_ALL_GDOCS
-- Type: bool
-- Default: false
-
-#### --drive-skip-checksum-gphotos
-
-Skip checksums on Google photos and videos only.
-
-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.
-
-Google photos are identified by being in the "photos" space.
-
-Corrupted checksums are caused by Google modifying the image/video but
-not updating the checksum.
-
-Properties:
-
-- Config: skip_checksum_gphotos
-- Env Var: RCLONE_DRIVE_SKIP_CHECKSUM_GPHOTOS
-- Type: bool
-- Default: false
-
-#### --drive-shared-with-me
-
-Only show files that are shared with me.
-
-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).
-
-This works both with the "list" (lsd, lsl, etc.) and the "copy"
-commands (copy, sync, etc.), and with all other commands too.
-
-Properties:
-
-- Config: shared_with_me
-- Env Var: RCLONE_DRIVE_SHARED_WITH_ME
-- Type: bool
-- Default: false
-
-#### --drive-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_DRIVE_TRASHED_ONLY
-- Type: bool
-- Default: false
-
-#### --drive-starred-only
-
-Only show files that are starred.
-
-Properties:
-
-- Config: starred_only
-- Env Var: RCLONE_DRIVE_STARRED_ONLY
-- Type: bool
-- Default: false
-
-#### --drive-formats
-
-Deprecated: See export_formats.
-
-Properties:
-
-- Config: formats
-- Env Var: RCLONE_DRIVE_FORMATS
-- Type: string
-- Required: false
-
-#### --drive-export-formats
-
-Comma separated list of preferred formats for downloading Google docs.
-
-Properties:
-
-- Config: export_formats
-- Env Var: RCLONE_DRIVE_EXPORT_FORMATS
-- Type: string
-- Default: "docx,xlsx,pptx,svg"
-
-#### --drive-import-formats
-
-Comma separated list of preferred formats for uploading Google docs.
-
-Properties:
-
-- Config: import_formats
-- Env Var: RCLONE_DRIVE_IMPORT_FORMATS
-- Type: string
-- Required: false
-
-#### --drive-allow-import-name-change
-
-Allow the filetype to change when uploading Google docs.
-
-E.g. file.doc to file.docx. This will confuse sync and reupload every time.
-
-Properties:
-
-- Config: allow_import_name_change
-- Env Var: RCLONE_DRIVE_ALLOW_IMPORT_NAME_CHANGE
-- Type: bool
-- Default: false
-
-#### --drive-use-created-date
-
-Use file created date instead of modified date.
-
-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.
-
-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.
-
-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.
-
-Properties:
-
-- Config: use_created_date
-- Env Var: RCLONE_DRIVE_USE_CREATED_DATE
-- Type: bool
-- Default: false
-
-#### --drive-use-shared-date
-
-Use date file was shared instead of modified date.
-
-Note that, as with "--drive-use-created-date", this flag may have
-unexpected consequences when uploading/downloading files.
-
-If both this flag and "--drive-use-created-date" are set, the created
-date is used.
-
-Properties:
-
-- Config: use_shared_date
-- Env Var: RCLONE_DRIVE_USE_SHARED_DATE
-- Type: bool
-- Default: false
-
-#### --drive-list-chunk
-
-Size of listing chunk 100-1000, 0 to disable.
-
-Properties:
-
-- Config: list_chunk
-- Env Var: RCLONE_DRIVE_LIST_CHUNK
-- Type: int
-- Default: 1000
-
-#### --drive-impersonate
-
-Impersonate this user when using a service account.
-
-Properties:
-
-- Config: impersonate
-- Env Var: RCLONE_DRIVE_IMPERSONATE
-- Type: string
-- Required: false
-
-#### --drive-upload-cutoff
-
-Cutoff for switching to chunked upload.
-
-Properties:
-
-- Config: upload_cutoff
-- Env Var: RCLONE_DRIVE_UPLOAD_CUTOFF
-- Type: SizeSuffix
-- Default: 8Mi
-
-#### --drive-chunk-size
-
-Upload chunk size.
-
-Must a power of 2 >= 256k.
-
-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.
-
-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 "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.
-
-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.
-
-Properties:
-
-- Config: acknowledge_abuse
-- Env Var: RCLONE_DRIVE_ACKNOWLEDGE_ABUSE
-- Type: bool
-- Default: false
-
-#### --drive-keep-revision-forever
-
-Keep new head revision of each file forever.
-
-Properties:
-
-- Config: keep_revision_forever
-- Env Var: RCLONE_DRIVE_KEEP_REVISION_FOREVER
-- Type: bool
-- Default: false
-
-#### --drive-size-as-quota
-
-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.
-
-Properties:
-
-- Config: size_as_quota
-- Env Var: RCLONE_DRIVE_SIZE_AS_QUOTA
-- Type: bool
-- Default: false
-
-#### --drive-v2-download-min-size
-
-If Object's are greater, use drive v2 API to download.
-
-Properties:
-
-- Config: v2_download_min_size
-- Env Var: RCLONE_DRIVE_V2_DOWNLOAD_MIN_SIZE
-- Type: SizeSuffix
-- Default: off
-
-#### --drive-pacer-min-sleep
-
-Minimum time to sleep between API calls.
-
-Properties:
-
-- Config: pacer_min_sleep
-- Env Var: RCLONE_DRIVE_PACER_MIN_SLEEP
-- Type: Duration
-- Default: 100ms
-
-#### --drive-pacer-burst
-
-Number of API calls to allow without sleeping.
-
-Properties:
-
-- Config: pacer_burst
-- Env Var: RCLONE_DRIVE_PACER_BURST
-- Type: int
-- Default: 100
-
-#### --drive-server-side-across-configs
-
-Deprecated: use --server-side-across-configs instead.
-
-Allow server-side operations (e.g. copy) to work across different drive configs.
-
-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:
-
-- Config: server_side_across_configs
-- Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS
-- Type: bool
-- Default: false
-
-#### --drive-disable-http2
-
-Disable drive using http2.
-
-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.
-
-See: https://github.com/rclone/rclone/issues/3631
-
-
-
-Properties:
-
-- Config: disable_http2
-- Env Var: RCLONE_DRIVE_DISABLE_HTTP2
-- Type: bool
-- Default: true
-
-#### --drive-stop-on-upload-limit
-
-Make upload limit errors be fatal.
-
-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.
-
-Note that this detection is relying on error message strings which
-Google don't document so it may break in the future.
-
-See: https://github.com/rclone/rclone/issues/3857
-
-
-Properties:
-
-- Config: stop_on_upload_limit
-- Env Var: RCLONE_DRIVE_STOP_ON_UPLOAD_LIMIT
-- Type: bool
-- Default: false
-
-#### --drive-stop-on-download-limit
-
-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.
-
-Note that this detection is relying on error message strings which
-Google don't document so it may break in the future.
-
-
-Properties:
-
-- Config: stop_on_download_limit
-- Env Var: RCLONE_DRIVE_STOP_ON_DOWNLOAD_LIMIT
-- Type: bool
-- Default: false
-
-#### --drive-skip-shortcuts
-
-If set skip shortcut files.
-
-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.
-
-
-Properties:
-
-- Config: skip_shortcuts
-- Env Var: RCLONE_DRIVE_SKIP_SHORTCUTS
-- Type: bool
-- Default: false
-
-#### --drive-skip-dangling-shortcuts
-
-If set skip dangling shortcut files.
-
-If this is set then rclone will not show any dangling shortcuts in listings.
-
-
-Properties:
-
-- Config: skip_dangling_shortcuts
-- Env Var: RCLONE_DRIVE_SKIP_DANGLING_SHORTCUTS
-- Type: bool
-- Default: false
-
-#### --drive-resource-key
-
-Resource key for accessing a link-shared file.
-
-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 "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.
-
-See: https://developers.google.com/drive/api/guides/resource-keys
-
-This resource key requirement only applies to a subset of old files.
-
-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: resource_key
-- Env Var: RCLONE_DRIVE_RESOURCE_KEY
-- Type: string
-- Required: false
-
-#### --drive-fast-list-bug-fix
-
-Work around a bug in Google Drive listing.
-
-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
-
-Rclone detects this by finding no items in more than one directory
-when listing and retries them as lists of individual directories.
-
-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:
-
-- Config: fast_list_bug_fix
-- Env Var: RCLONE_DRIVE_FAST_LIST_BUG_FIX
-- Type: bool
-- Default: true
-
-#### --drive-metadata-owner
-
-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't always desirable to set the owner from the 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:
-
-- 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.
-
-#### --drive-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.
-
-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.
-
-
-Properties:
-
-- 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-labels
-
-Control whether labels should be read or written in 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.
-
-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.
-
-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.
-
-
-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
- - "read,write"
- - Read and Write the value.
-
-#### --drive-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_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.
-
-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).
-
-### Metadata
-
-User metadata is stored in the properties field of the drive object.
-
-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'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 |
-
-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] [<arguments>+]
-
-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:
-
-- "chunk_size": show the current upload chunk size
-- "service_account_file": show the current service account file
-
-### set
-
-Set command for updating the drive config parameters
-
- rclone backend set remote: [options] [<arguments>+]
-
-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:
-
-- "chunk_size": update the current upload chunk size
-- "service_account_file": update the current service account file
-
-### shortcut
-
-Create shortcuts from files or directories
-
- rclone backend shortcut remote: [options] [<arguments>+]
-
-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 "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:"
-
-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:".
-
-
-Options:
-
-- "target": optional target remote for the shortcut destination
-
-### drives
-
-List the Shared Drives available to this account
-
- rclone backend drives remote: [options] [<arguments>+]
-
-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
-
- [
- {
- "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.
-
- [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 = "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] [<arguments>+]
-
-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:
-
- {
- "Untrashed": 17,
- "Errors": 0
- }
-
-
-### copyid
-
-Copy files by ID
-
- rclone backend copyid remote: [options] [<arguments>+]
-
-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'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] [<arguments>+]
-
-### importformats
-
-Dump the import formats for debug purposes
-
- rclone backend importformats remote: [options] [<arguments>+]
-
-
-
-## 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 `--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](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)
-
-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
-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.
-
- (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).
-
-6. 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. 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.
- 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 "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.
-
-(Thanks to @balazer on github for these instructions.)
-
-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.
-
-# 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. `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 / 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.
-
-
-
-
+--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'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 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 package.
+Limitations of Rclone's FTP backend
+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.
+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 or connection string 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 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:
+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
. The default FTPS port is 990
, not 21
and can be set with --ftp-port
.
+Restricted filename characters
+In addition to the default restricted characters set 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:
+
-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. |
-
-
-Properties: |
-
-
-- Config: read_only - Env Var: RCLONE_GPHOTOS_READ_ONLY - Type: bool - Default: false |
-
-
-### Advanced options |
-
-
-Here are the Advanced options specific to google photos (Google Photos). |
-
-
-#### --gphotos-token |
-
-
-OAuth Access Token as a JSON blob. |
-
-
-Properties: |
-
-
-- Config: token - Env Var: RCLONE_GPHOTOS_TOKEN - Type: string - Required: false |
-
-
-#### --gphotos-auth-url |
-
-
-Auth server URL. |
-
-
-Leave blank to use the provider defaults. |
-
-
-Properties: |
-
-
-- Config: auth_url - Env Var: RCLONE_GPHOTOS_AUTH_URL - Type: string - Required: false |
-
-
-#### --gphotos-token-url |
-
-
-Token server url. |
-
-
-Leave blank to use the provider defaults. |
-
-
-Properties: |
-
-
-- Config: token_url - Env Var: RCLONE_GPHOTOS_TOKEN_URL - Type: string - Required: false |
-
-
-#### --gphotos-read-size |
-
-
-Set to read the size of media items. |
-
-
-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. |
-
-
-Properties: |
-
-
-- Config: read_size - Env Var: RCLONE_GPHOTOS_READ_SIZE - Type: bool - Default: false |
-
-
-#### --gphotos-start-year |
-
-
-Year limits the photos to be downloaded to those which are uploaded after the given year. |
-
-
-Properties: |
-
-
-- Config: start_year - Env Var: RCLONE_GPHOTOS_START_YEAR - Type: int - Default: 2000 |
-
-
-#### --gphotos-include-archived |
-
-
-Also view and download archived media. |
-
-
-By default, rclone does not request archived media. Thus, when syncing, archived media is not visible in directory listings or transferred. |
-
-
-Note that media in albums is always visible and synced, no matter their archive status. |
-
-
-With this flag, archived media are always visible in directory listings and transferred. |
-
-
-Without this flag, archived media will not be visible in directory listings and won't be transferred. |
-
-
-Properties: |
-
-
-- Config: include_archived - Env Var: RCLONE_GPHOTOS_INCLUDE_ARCHIVED - Type: bool - Default: false |
-
-
-#### --gphotos-encoding |
-
-
-The encoding for the backend. |
-
-
-See the encoding section in the overview for more info. |
-
-
-Properties: |
-
-
-- Config: encoding - Env Var: RCLONE_GPHOTOS_ENCODING - Type: Encoding - Default: Slash,CrLf,InvalidUtf8,Dot |
-
-
-#### --gphotos-batch-mode |
-
-
-Upload file batching sync|async|off. |
-
-
-This sets the batch mode used by rclone. |
-
-
-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_GPHOTOS_BATCH_MODE - Type: string - Default: "sync" |
-
-
-#### --gphotos-batch-size |
-
-
-Max number of files in upload batch. |
-
-
-This sets the batch size of files to upload. It has to be less than 50. |
-
-
-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 50 - 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_GPHOTOS_BATCH_SIZE - Type: int - Default: 0 |
-
-
-#### --gphotos-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 1s - batch_mode: off - not in use |
-
-
-Properties: |
-
-
-- Config: batch_timeout - Env Var: RCLONE_GPHOTOS_BATCH_TIMEOUT - Type: Duration - Default: 0s |
-
-
-#### --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 |
-
-
-## 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 |
+SP |
+0x20 |
+␠ |
-[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
+Not all FTP servers can have all characters in file names, for example:
+
+
+
+
+
+
+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.
+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 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.
+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
+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.
+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 --fast-list
which allows you to use fewer transactions in exchange for more memory. See the rclone docs for more details.
+
+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
+
+- Cache-Control
+- Content-Disposition
+- Content-Encoding
+- Content-Language
+- Content-Type
+- X-Goog-Storage-Class
+- X-Goog-Meta-
+
+Eg --header-upload "Content-Type text/potato"
+Note that the last of these is for setting custom metadata in the form --header-upload "x-goog-meta-key: value"
+Modification times
+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.
+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.
+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
.
+Restricted filename characters
+
+
+
+
+
+
+NUL |
+0x00 |
+␀ |
+
+
+LF |
+0x0A |
+␊ |
+
+
+CR |
+0x0D |
+␍ |
+
+
+/ |
+0x2F |
+/ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can'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 ~
will be expanded in the file name as will environment variables such as ${RCLONE_CONFIG_DIR}
.
+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 'true' if you just want to download files and don't configure credentials.
+Properties:
+
+- Config: anonymous
+- Env Var: RCLONE_GCS_ANONYMOUS
+- Type: bool
+- Default: false
+
+--gcs-object-acl
+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
+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"
+
+- "asia-east2"
+
+- "asia-northeast1"
+
+- "asia-northeast2"
+
+- "asia-northeast3"
+
+- "asia-south1"
+
+- "asia-south2"
+
+- "asia-southeast1"
+
+- "asia-southeast2"
+
+- "australia-southeast1"
+
+- "australia-southeast2"
+
+- "europe-north1"
+
+- "europe-west1"
+
+- "europe-west2"
+
+- "europe-west3"
+
+- "europe-west4"
+
+- "europe-west6"
+
+- "europe-central2"
+
+- "us-central1"
+
+- "us-east1"
+
+- "us-east4"
+
+- "us-west1"
+
+- "us-west2"
+
+- "us-west3"
+
+- "us-west4"
+
+- "northamerica-northeast1"
+
+- "northamerica-northeast2"
+
+- "southamerica-east1"
+
+- "southamerica-west1"
+
+- "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:
+
+- ""
+
+- "MULTI_REGIONAL"
+
+- Multi-regional storage class
+
+- "REGIONAL"
+
+- Regional storage class
+
+- "NEARLINE"
+
+- Nearline storage class
+
+- "COLDLINE"
+
+- Coldline storage class
+
+- "ARCHIVE"
+
+- "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:
+
+- Config: token
+- Env Var: RCLONE_GCS_TOKEN
+- Type: string
+- Required: false
+
+--gcs-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_GCS_AUTH_URL
+- Type: string
+- Required: false
+
+--gcs-token-url
+Token server url.
+Leave blank to use the provider defaults.
+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 "/", to persist the folder.
+Properties:
+
+- Config: directory_markers
+- Env Var: RCLONE_GCS_DIRECTORY_MARKERS
+- Type: bool
+- Default: false
+
+--gcs-no-check-bucket
+If set, don't attempt to check the bucket exists or create it.
+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 "Content-Encoding: gzip" set. Normally rclone will download these files as compressed objects.
+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.
+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 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
+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.
+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
+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.
+
+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 root_folder_id
for rclone. This is the directory (identified by its Folder ID
) 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.
+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).
+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.
+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.
+NB folders under the "Computers" tab seem to be read only (drive gives a 500 error) when using rclone.
+There doesn't appear to be an API to discover the folder IDs of the "Computers" tab - please contact us if you know otherwise!
+Note also that rclone can't access any data under the "Backups" 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'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 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.
+Use case - Google Apps/G-suite account and individual Drive
+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.
+
+
+
+- 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.
+
+
+rclone config
-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:
+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
-[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).
+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
+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, as they can't be used in JSON strings.
+In contrast to other backends, /
can also be used in names and .
or ..
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 --drive-use-trash=false
flag, or set the equivalent environment variable.
+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.
+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.
+By default rclone treats these as follows.
+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
--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.
+
+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
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.
+
+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.
+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:
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.
+
+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.
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+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:
+
+- Config: client_id
+- Env Var: RCLONE_DRIVE_CLIENT_ID
+- Type: string
+- Required: false
+
+--drive-client-secret
+OAuth Client Secret.
+Leave blank normally.
+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.
+Properties:
+
+- 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.
+
+
+
+--drive-service-account-file
+Service Account Credentials JSON file path.
+Leave blank normally. Needed only if you want use SA instead of interactive login.
+Leading ~
will be expanded in the file name as will environment variables such as ${RCLONE_CONFIG_DIR}
.
+Properties:
+
+- Config: service_account_file
+- Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_FILE
+- Type: string
+- Required: false
+
+--drive-alternate-export
+Deprecated: No longer needed.
+Properties:
+
+- Config: alternate_export
+- Env Var: RCLONE_DRIVE_ALTERNATE_EXPORT
+- Type: bool
+- Default: false
+
+Advanced options
+Here are the Advanced options specific to drive (Google Drive).
+--drive-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_DRIVE_TOKEN
+- Type: string
+- Required: false
+
+--drive-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_DRIVE_AUTH_URL
+- Type: string
+- Required: false
+
+--drive-token-url
+Token server url.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_DRIVE_TOKEN_URL
+- Type: string
+- Required: false
+
+--drive-root-folder-id
+ID of the root folder. Leave blank normally.
+Fill in to access "Computers" folders (see docs), or for rclone to use a non root folder as its starting point.
+Properties:
+
+- Config: root_folder_id
+- Env Var: RCLONE_DRIVE_ROOT_FOLDER_ID
+- Type: string
+- Required: false
+
+--drive-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_DRIVE_SERVICE_ACCOUNT_CREDENTIALS
+- Type: string
+- Required: false
+
+--drive-team-drive
+ID of the Shared Drive (Team Drive).
+Properties:
+
+- Config: team_drive
+- Env Var: RCLONE_DRIVE_TEAM_DRIVE
+- Type: string
+- Required: false
+
+--drive-auth-owner-only
+Only consider files owned by the authenticated user.
+Properties:
+
+- Config: auth_owner_only
+- Env Var: RCLONE_DRIVE_AUTH_OWNER_ONLY
+- Type: bool
+- Default: false
+
+--drive-use-trash
+Send files to the trash instead of deleting permanently.
+Defaults to true, namely sending files to the trash. Use --drive-use-trash=false
to delete files permanently instead.
+Properties:
+
+- Config: use_trash
+- Env Var: RCLONE_DRIVE_USE_TRASH
+- Type: bool
+- Default: true
+
+--drive-copy-shortcut-content
+Server side copy contents of shortcuts instead of the shortcut.
+When doing server side copies, normally rclone will copy shortcuts as shortcuts.
+If this flag is used then rclone will copy the contents of shortcuts rather than shortcuts themselves when doing server side copies.
+Properties:
+
+- Config: copy_shortcut_content
+- Env Var: RCLONE_DRIVE_COPY_SHORTCUT_CONTENT
+- Type: bool
+- Default: false
+
+--drive-skip-gdocs
+Skip google documents in all listings.
+If given, gdocs practically become invisible to rclone.
+Properties:
+
+- Config: skip_gdocs
+- Env Var: RCLONE_DRIVE_SKIP_GDOCS
+- Type: bool
+- Default: false
+
+--drive-show-all-gdocs
+Show all Google Docs including non-exportable ones in listings.
+If you try a server side copy on a Google Form without this flag, you will get this error:
+No export formats found for "application/vnd.google-apps.form"
+However adding this flag will allow the form to be server side copied.
+Note that rclone doesn'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.
+Properties:
+
+- Config: show_all_gdocs
+- Env Var: RCLONE_DRIVE_SHOW_ALL_GDOCS
+- Type: bool
+- Default: false
+
+--drive-skip-checksum-gphotos
+Skip checksums on Google photos and videos only.
+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.
+Google photos are identified by being in the "photos" space.
+Corrupted checksums are caused by Google modifying the image/video but not updating the checksum.
+Properties:
+
+- Config: skip_checksum_gphotos
+- Env Var: RCLONE_DRIVE_SKIP_CHECKSUM_GPHOTOS
+- Type: bool
+- Default: false
+
+--drive-shared-with-me
+Only show files that are shared with me.
+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).
+This works both with the "list" (lsd, lsl, etc.) and the "copy" commands (copy, sync, etc.), and with all other commands too.
+Properties:
+
+- Config: shared_with_me
+- Env Var: RCLONE_DRIVE_SHARED_WITH_ME
+- Type: bool
+- Default: false
+
+--drive-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_DRIVE_TRASHED_ONLY
+- Type: bool
+- Default: false
+
+--drive-starred-only
+Only show files that are starred.
+Properties:
+
+- Config: starred_only
+- Env Var: RCLONE_DRIVE_STARRED_ONLY
+- Type: bool
+- Default: false
+
+
+Deprecated: See export_formats.
+Properties:
+
+- Config: formats
+- Env Var: RCLONE_DRIVE_FORMATS
+- Type: string
+- Required: false
+
+
+Comma separated list of preferred formats for downloading Google docs.
+Properties:
+
+- Config: export_formats
+- Env Var: RCLONE_DRIVE_EXPORT_FORMATS
+- Type: string
+- Default: "docx,xlsx,pptx,svg"
+
+
+Comma separated list of preferred formats for uploading Google docs.
+Properties:
+
+- Config: import_formats
+- Env Var: RCLONE_DRIVE_IMPORT_FORMATS
+- Type: string
+- Required: false
+
+--drive-allow-import-name-change
+Allow the filetype to change when uploading Google docs.
+E.g. file.doc to file.docx. This will confuse sync and reupload every time.
+Properties:
+
+- Config: allow_import_name_change
+- Env Var: RCLONE_DRIVE_ALLOW_IMPORT_NAME_CHANGE
+- Type: bool
+- Default: false
+
+--drive-use-created-date
+Use file created date instead of modified date.
+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.
+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.
+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.
+Properties:
+
+- Config: use_created_date
+- Env Var: RCLONE_DRIVE_USE_CREATED_DATE
+- Type: bool
+- Default: false
+
+--drive-use-shared-date
+Use date file was shared instead of modified date.
+Note that, as with "--drive-use-created-date", this flag may have unexpected consequences when uploading/downloading files.
+If both this flag and "--drive-use-created-date" are set, the created date is used.
+Properties:
+
+- Config: use_shared_date
+- Env Var: RCLONE_DRIVE_USE_SHARED_DATE
+- Type: bool
+- Default: false
+
+--drive-list-chunk
+Size of listing chunk 100-1000, 0 to disable.
+Properties:
+
+- Config: list_chunk
+- Env Var: RCLONE_DRIVE_LIST_CHUNK
+- Type: int
+- Default: 1000
+
+--drive-impersonate
+Impersonate this user when using a service account.
+Properties:
+
+- Config: impersonate
+- Env Var: RCLONE_DRIVE_IMPERSONATE
+- Type: string
+- Required: false
+
+--drive-upload-cutoff
+Cutoff for switching to chunked upload.
+Properties:
+
+- Config: upload_cutoff
+- Env Var: RCLONE_DRIVE_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 8Mi
+
+--drive-chunk-size
+Upload chunk size.
+Must a power of 2 >= 256k.
+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.
+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 "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.
+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.
+Properties:
+
+- Config: acknowledge_abuse
+- Env Var: RCLONE_DRIVE_ACKNOWLEDGE_ABUSE
+- Type: bool
+- Default: false
+
+--drive-keep-revision-forever
+Keep new head revision of each file forever.
+Properties:
+
+- Config: keep_revision_forever
+- Env Var: RCLONE_DRIVE_KEEP_REVISION_FOREVER
+- Type: bool
+- Default: false
+
+--drive-size-as-quota
+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.
+Properties:
+
+- Config: size_as_quota
+- Env Var: RCLONE_DRIVE_SIZE_AS_QUOTA
+- Type: bool
+- Default: false
+
+--drive-v2-download-min-size
+If Object's are greater, use drive v2 API to download.
+Properties:
+
+- Config: v2_download_min_size
+- Env Var: RCLONE_DRIVE_V2_DOWNLOAD_MIN_SIZE
+- Type: SizeSuffix
+- Default: off
+
+--drive-pacer-min-sleep
+Minimum time to sleep between API calls.
+Properties:
+
+- Config: pacer_min_sleep
+- Env Var: RCLONE_DRIVE_PACER_MIN_SLEEP
+- Type: Duration
+- Default: 100ms
+
+--drive-pacer-burst
+Number of API calls to allow without sleeping.
+Properties:
+
+- Config: pacer_burst
+- Env Var: RCLONE_DRIVE_PACER_BURST
+- Type: int
+- Default: 100
+
+--drive-server-side-across-configs
+Deprecated: use --server-side-across-configs instead.
+Allow server-side operations (e.g. copy) to work across different drive configs.
+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:
+
+- Config: server_side_across_configs
+- Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS
+- Type: bool
+- Default: false
+
+--drive-disable-http2
+Disable drive using http2.
+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.
+See: https://github.com/rclone/rclone/issues/3631
+Properties:
+
+- Config: disable_http2
+- Env Var: RCLONE_DRIVE_DISABLE_HTTP2
+- Type: bool
+- Default: true
+
+--drive-stop-on-upload-limit
+Make upload limit errors be fatal.
+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.
+Note that this detection is relying on error message strings which Google don't document so it may break in the future.
+See: https://github.com/rclone/rclone/issues/3857
+Properties:
+
+- Config: stop_on_upload_limit
+- Env Var: RCLONE_DRIVE_STOP_ON_UPLOAD_LIMIT
+- Type: bool
+- Default: false
+
+--drive-stop-on-download-limit
+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.
+Note that this detection is relying on error message strings which Google don't document so it may break in the future.
+Properties:
+
+- Config: stop_on_download_limit
+- Env Var: RCLONE_DRIVE_STOP_ON_DOWNLOAD_LIMIT
+- Type: bool
+- Default: false
+
+--drive-skip-shortcuts
+If set skip shortcut files.
+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.
+Properties:
+
+- Config: skip_shortcuts
+- Env Var: RCLONE_DRIVE_SKIP_SHORTCUTS
+- Type: bool
+- Default: false
+
+--drive-skip-dangling-shortcuts
+If set skip dangling shortcut files.
+If this is set then rclone will not show any dangling shortcuts in listings.
+Properties:
+
+- Config: skip_dangling_shortcuts
+- Env Var: RCLONE_DRIVE_SKIP_DANGLING_SHORTCUTS
+- Type: bool
+- Default: false
+
+--drive-resource-key
+Resource key for accessing a link-shared file.
+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 "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.
+See: https://developers.google.com/drive/api/guides/resource-keys
+This resource key requirement only applies to a subset of old files.
+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: resource_key
+- Env Var: RCLONE_DRIVE_RESOURCE_KEY
+- Type: string
+- Required: false
+
+--drive-fast-list-bug-fix
+Work around a bug in Google Drive listing.
+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
+Rclone detects this by finding no items in more than one directory when listing and retries them as lists of individual directories.
+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:
+
+- Config: fast_list_bug_fix
+- Env Var: RCLONE_DRIVE_FAST_LIST_BUG_FIX
+- Type: bool
+- Default: true
+
+
+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't always desirable to set the owner from the 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:
+
+- Config: metadata_owner
+- Env Var: RCLONE_DRIVE_METADATA_OWNER
+- Type: Bits
+- Default: read
+- Examples:
+
+- "off"
+
+- Do not read or write the value
+
+- "read"
+
+- "write"
+
+- "failok"
+
+- If writing fails log errors only, don't fail the transfer
+
+- "read,write"
+
+- Read and Write the value.
+
+
+
+
+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.
+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.
+Properties:
+
+- Config: metadata_permissions
+- Env Var: RCLONE_DRIVE_METADATA_PERMISSIONS
+- Type: Bits
+- Default: off
+- Examples:
+
+- "off"
+
+- Do not read or write the value
+
+- "read"
+
+- "write"
+
+- "failok"
+
+- If writing fails log errors only, don't fail the transfer
+
+- "read,write"
+
+- Read and Write the value.
+
+
+
+
+Control whether labels should be read or written in 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.
+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.
+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.
+Properties:
+
+- Config: metadata_labels
+- Env Var: RCLONE_DRIVE_METADATA_LABELS
+- Type: Bits
+- Default: off
+- Examples:
+
+- "off"
+
+- Do not read or write the value
+
+- "read"
+
+- "write"
+
+- "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.
+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).
+
+
+
+--drive-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_DRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
+
+User metadata is stored in the properties field of the drive object.
+Metadata is supported on files and directories.
+Here are the possible system metadata items for the drive backend.
+
+
+
+
+
+
+
+
+
+
+
+
+
+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 and ignored when setting for items in shared drives. |
+boolean |
+false |
+N |
+
+
+
+See the 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 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.
+get
+Get command for fetching the drive config parameters
+rclone backend get remote: [options] [<arguments>+]
+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:
+
+- "chunk_size": show the current upload chunk size
+- "service_account_file": show the current service account file
+
+set
+Set command for updating the drive config parameters
+rclone backend set remote: [options] [<arguments>+]
+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:
+
+- "chunk_size": update the current upload chunk size
+- "service_account_file": update the current service account file
+
+shortcut
+Create shortcuts from files or directories
+rclone backend shortcut remote: [options] [<arguments>+]
+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 "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:"
+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:".
+Options:
+
+- "target": optional target remote for the shortcut destination
+
+drives
+List the Shared Drives available to this account
+rclone backend drives remote: [options] [<arguments>+]
+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
+[
+ {
+ "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.
+[My Drive]
+type = alias
+remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=:
-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**.
+[Test Drive]
+type = alias
+remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=:
-## Usage
+[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] [<arguments>+]
+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:
+{
+ "Untrashed": 17,
+ "Errors": 0
+}
+copyid
+Copy files by ID
+rclone backend copyid remote: [options] [<arguments>+]
+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'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.
+
+Dump the export formats for debug purposes
+rclone backend exportformats remote: [options] [<arguments>+]
+
+Dump the import formats for debug purposes
+rclone backend importformats remote: [options] [<arguments>+]
+query
+List files using Google Drive query language
+rclone backend query remote: [options] [<arguments>+]
+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.
+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
+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:
+
+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)
+Select a project or create a new project.
+Under "ENABLE APIS AND SERVICES" search for "Drive", and enable the "Google Drive API".
+Click "Credentials" in the left-side panel (not "Create credentials", which opens the wizard).
+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
+
+
+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
.
+
+
+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).
+Click on the "+ CREATE CREDENTIALS" button at the top of the screen, then select "OAuth client ID".
+Choose an application type of "Desktop app" and click "Create". (the default name is fine)
+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.)
+Go to "Oauth consent screen" and then click "PUBLISH APP" button and confirm. You will also want to add yourself as a test user.
+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" 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.
+(Thanks to @balazer on github for these instructions.)
+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.
+Google Photos
+The rclone backend for Google Photos 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 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. 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 / Google Photos
+ \ "google photos"
+[snip]
+Storage> google photos
+** See help for google photos backend at: https://rclone.org/googlephotos/ **
-### Basic operations
+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.
-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
+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
-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
+*** 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
+
+- images/dir
+
+- images/dir2/dir3
+
+
+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.
+Properties:
+
+- Config: read_only
+- Env Var: RCLONE_GPHOTOS_READ_ONLY
+- Type: bool
+- Default: false
+
+Advanced options
+Here are the Advanced options specific to google photos (Google Photos).
+--gphotos-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_GPHOTOS_TOKEN
+- Type: string
+- Required: false
+
+--gphotos-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_GPHOTOS_AUTH_URL
+- Type: string
+- Required: false
+
+--gphotos-token-url
+Token server url.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_GPHOTOS_TOKEN_URL
+- Type: string
+- Required: false
+
+--gphotos-read-size
+Set to read the size of media items.
+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.
+Properties:
+
+- Config: read_size
+- Env Var: RCLONE_GPHOTOS_READ_SIZE
+- Type: bool
+- Default: false
+
+--gphotos-start-year
+Year limits the photos to be downloaded to those which are uploaded after the given year.
+Properties:
+
+- Config: start_year
+- Env Var: RCLONE_GPHOTOS_START_YEAR
+- Type: int
+- Default: 2000
+
+--gphotos-include-archived
+Also view and download archived media.
+By default, rclone does not request archived media. Thus, when syncing, archived media is not visible in directory listings or transferred.
+Note that media in albums is always visible and synced, no matter their archive status.
+With this flag, archived media are always visible in directory listings and transferred.
+Without this flag, archived media will not be visible in directory listings and won't be transferred.
+Properties:
+
+- Config: include_archived
+- Env Var: RCLONE_GPHOTOS_INCLUDE_ARCHIVED
+- Type: bool
+- Default: false
+
+--gphotos-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_GPHOTOS_ENCODING
+- Type: Encoding
+- Default: Slash,CrLf,InvalidUtf8,Dot
+
+--gphotos-batch-mode
+Upload file batching sync|async|off.
+This sets the batch mode used by rclone.
+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_GPHOTOS_BATCH_MODE
+- Type: string
+- Default: "sync"
+
+--gphotos-batch-size
+Max number of files in upload batch.
+This sets the batch size of files to upload. It has to be less than 50.
+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 50
+- 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_GPHOTOS_BATCH_SIZE
+- Type: int
+- Default: 0
+
+--gphotos-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 1s
+- batch_mode: off - not in use
+
+Properties:
+
+- Config: batch_timeout
+- Env Var: RCLONE_GPHOTOS_BATCH_TIMEOUT
+- Type: Duration
+- Default: 0s
+
+--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.
-
-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
-
-### 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] [<arguments>+]
-
-Completely drop checksum cache.
-Usage Example:
- rclone backend drop hasher:
-
-
-### dump
-
-Dump the database
-
- rclone backend dump remote: [options] [<arguments>+]
-
-Dump cache records covered by the current remote
-
-### fulldump
-
-Full dump of the database
-
- rclone backend fulldump remote: [options] [<arguments>+]
-
-Dump all cache records in the database
-
-### import
-
-Import a SUM file
-
- rclone backend import remote: [options] [<arguments>+]
-
-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] [<arguments>+]
-
-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 `rclone hashsum` (or `md5sum` or `sha1sum`) command will:
-
-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.
-
-### 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 `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.
-
-If you set `max_age = off`, checksums in cache will never age, unless you
-fully rewrite or delete the file.
-
-### 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.
-
-# 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 `remote:` or `remote:path/to/dir`.
-
-## 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. 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/ **
-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:
-Name Type ==== ==== hadoop hdfs
-
-- Edit existing remote
-- New remote
-- Delete remote
-- Rename remote
-- Copy remote
-- Set configuration password
-- Quit config e/n/d/r/c/s/q> q
+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
+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
+
+
+Any metadata supported by the underlying remote is read and written.
+See the 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 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.
+drop
+Drop cache
+rclone backend drop remote: [options] [<arguments>+]
+Completely drop checksum cache. Usage Example: rclone backend drop hasher:
+dump
+Dump the database
+rclone backend dump remote: [options] [<arguments>+]
+Dump cache records covered by the current remote
+fulldump
+Full dump of the database
+rclone backend fulldump remote: [options] [<arguments>+]
+Dump all cache records in the database
+import
+Import a SUM file
+rclone backend import remote: [options] [<arguments>+]
+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] [<arguments>+]
+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 rclone hashsum
(or md5sum
or sha1sum
) command will:
+
+- if requested hash is supported by lower level, just pass it.
+- if object size is below
auto_size
then download object and calculate requested hashes on the fly.
+- if unsupported and the size is big enough, build object
fingerprint
(including size, modtime if supported, first-found other hash if any).
+- if the strict match is found in cache for the requested remote, return the stored hash.
+- if remote found but fingerprint mismatched, then purge the entry and proceed to step 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.
-
-This remote is called `remote` 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 `directory` to `/home/local/directory`, 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
-
-git clone https://github.com/rclone/rclone.git cd rclone/fstest/testserver/images/test-hdfs docker build --rm -t rclone/test-hdfs .
-
-Or you can just use the latest one pushed
-
-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
-
-**NB** it need few seconds to startup.
-
-For this docker image the remote needs to be configured like this:
-
-[remote] type = hdfs namenode = 127.0.0.1:8020 username = root
-
-You can stop this image with `docker kill rclone-hdfs` (**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 `rclone about remote:` 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 | : |
-
-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. "namenode-1:8020,namenode-2:8020,..." to connect to host namenodes at port 8020.
-
-Properties:
-
-- Config: namenode
-- Env Var: RCLONE_HDFS_NAMENODE
-- Type: CommaSepList
-- Default:
-
-#### --hdfs-username
-
-Hadoop user name.
-
-Properties:
-
-- Config: username
-- Env Var: RCLONE_HDFS_USERNAME
-- Type: string
-- Required: false
-- Examples:
- - "root"
- - Connect to hdfs as root.
-
-### Advanced options
-
-Here are the Advanced options specific to hdfs (Hadoop distributed file system).
-
-#### --hdfs-service-principal-name
-
-Kerberos service principal name for the namenode.
-
-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'.
-
-Properties:
-
-- Config: service_principal_name
-- Env Var: RCLONE_HDFS_SERVICE_PRINCIPAL_NAME
-- Type: string
-- Required: false
-
-#### --hdfs-data-transfer-protection
-
-Kerberos data transfer protection: authentication|integrity|privacy.
-
-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.
-
-Properties:
-
-- 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
-
-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_HDFS_ENCODING
-- Type: Encoding
-- Default: Slash,Colon,Del,Ctl,InvalidUtf8,Dot
-
-
-
-## Limitations
-
-- No server-side `Move` or `DirMove`.
-- Checksums not implemented.
-
-# HiDrive
-
-Paths are specified as `remote:path`
-
-Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
-
-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.
-
-## 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 / 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
-
-**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 `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.
-
-Once configured you can then use `rclone` 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'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'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 `refresh_token` (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'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
-`/` (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
-
+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
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.
+If you set max_age = off
, checksums in cache will never age, unless you fully rewrite or delete the file.
+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.
+HDFS
+HDFS is a distributed file-system, part of the Apache Hadoop framework.
+Paths are specified as remote:
or remote:path/to/dir
.
+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.
+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/ **
+
+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:
+
+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
+This remote is called remote
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 directory
to /home/local/directory
, 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 or use the docker image from the tests:
+If you want to build the docker image
+git clone https://github.com/rclone/rclone.git
+cd rclone/fstest/testserver/images/test-hdfs
+docker build --rm -t rclone/test-hdfs .
+Or you can just use the latest one pushed
+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
+NB it need few seconds to startup.
+For this docker image the remote needs to be configured like this:
+[remote]
+type = hdfs
+namenode = 127.0.0.1:8020
+username = root
+You can stop this image with docker kill rclone-hdfs
(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.
+
+You can use the rclone about remote:
command which will display filesystem size and current usage.
+Restricted filename characters
+In addition to the default restricted characters set the following characters are also replaced:
+
+
+
+
+
+
+: |
+0x3A |
+: |
+
+
+
+Invalid UTF-8 bytes will also be replaced.
+Standard options
+Here are the Standard options specific to hdfs (Hadoop distributed file system).
+--hdfs-namenode
+Hadoop name nodes and ports.
+E.g. "namenode-1:8020,namenode-2:8020,..." to connect to host namenodes at port 8020.
+Properties:
+
+- Config: namenode
+- Env Var: RCLONE_HDFS_NAMENODE
+- Type: CommaSepList
+- Default:
+
+--hdfs-username
+Hadoop user name.
+Properties:
+
+- Config: username
+- Env Var: RCLONE_HDFS_USERNAME
+- Type: string
+- Required: false
+- Examples:
+
+- "root"
+
+- Connect to hdfs as root.
+
+
+
+Advanced options
+Here are the Advanced options specific to hdfs (Hadoop distributed file system).
+--hdfs-service-principal-name
+Kerberos service principal name for the namenode.
+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'.
+Properties:
+
+- Config: service_principal_name
+- Env Var: RCLONE_HDFS_SERVICE_PRINCIPAL_NAME
+- Type: string
+- Required: false
+
+--hdfs-data-transfer-protection
+Kerberos data transfer protection: authentication|integrity|privacy.
+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.
+Properties:
+
+- 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
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_HDFS_ENCODING
+- Type: Encoding
+- Default: Slash,Colon,Del,Ctl,InvalidUtf8,Dot
+
+--hdfs-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_HDFS_DESCRIPTION
+- Type: string
+- Required: false
+
+Limitations
+
+- No server-side
Move
or DirMove
.
+- Checksums not implemented.
+
+HiDrive
+Paths are specified as remote:path
+Paths may be as deep as required, e.g. remote:directory/subdirectory
.
+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.
+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 / 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.
-
-Properties:
-
-- 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.
-
-### Advanced options
-
-Here are the Advanced options specific to hidrive (HiDrive).
-
-#### --hidrive-token
-
-OAuth Access Token as a JSON blob.
-
-Properties:
-
-- Config: token
-- Env Var: RCLONE_HIDRIVE_TOKEN
-- Type: string
-- Required: false
-
-#### --hidrive-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_HIDRIVE_AUTH_URL
-- Type: string
-- Required: false
-
-#### --hidrive-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_HIDRIVE_TOKEN_URL
-- Type: string
-- Required: false
-
-#### --hidrive-scope-role
-
-User-level that rclone should use when requesting access from HiDrive.
-
-Properties:
-
-- 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.
-
-#### --hidrive-root-prefix
-
-The root/parent folder for all paths.
-
-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.
-
-Properties:
-
-- 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
-
-Endpoint for the service.
-
-This is the URL that API-calls will be made to.
-
-Properties:
-
-- Config: endpoint
-- Env Var: RCLONE_HIDRIVE_ENDPOINT
-- Type: string
-- Default: "https://api.hidrive.strato.com/2.1"
-
-#### --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.
-
-Properties:
-
-- Config: disable_fetching_member_count
-- Env Var: RCLONE_HIDRIVE_DISABLE_FETCHING_MEMBER_COUNT
-- Type: bool
-- Default: false
-
-#### --hidrive-chunk-size
-
-Chunksize for chunked uploads.
-
-Any files larger than the configured cutoff (or files of unknown size) will be uploaded in chunks of this size.
-
-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.
-It can be set to smaller values smaller to save on memory.
-
-Properties:
-
-- Config: chunk_size
-- Env Var: RCLONE_HIDRIVE_CHUNK_SIZE
-- Type: SizeSuffix
-- Default: 48Mi
-
-#### --hidrive-upload-cutoff
-
-Cutoff/Threshold for chunked uploads.
-
-Any files larger than this will be uploaded in chunks of the configured chunksize.
-
-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.
-
-Properties:
-
-- Config: upload_cutoff
-- Env Var: RCLONE_HIDRIVE_UPLOAD_CUTOFF
-- Type: SizeSuffix
-- Default: 96Mi
-
-#### --hidrive-upload-concurrency
-
-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.
-
-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_HIDRIVE_UPLOAD_CONCURRENCY
-- Type: int
-- Default: 4
-
-#### --hidrive-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_HIDRIVE_ENCODING
-- Type: Encoding
-- Default: Slash,Dot
-
-
-
-## Limitations
-
-### Symbolic links
-
-HiDrive is able to store symbolic links (*symlinks*) by design,
-for example, when unpacked from a zip archive.
-
-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.
-
-*This does not affect the `.rclonelink`-files
-that rclone uses to encode and store symbolic links.*
-
-### Sparse files
-
-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't then please file an
-issue, or send a pull request!)
-
-Paths are specified as `remote:` or `remote:path`.
-
-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.
-
-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.
-
-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 `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 / 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:
-Name Type ==== ==== remote http
-
-- Edit existing remote
-- New remote
-- Delete remote
-- Rename remote
-- Copy remote
-- Set configuration password
-- Quit config e/n/d/r/c/s/q> q
-
-
-This remote is called `remote` 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 `directory` to `/home/local/directory`, deleting any excess files.
-
- rclone sync --interactive remote:directory /home/local/directory
-
-### Read only
-
-This remote is read only - you can't upload files to an HTTP server.
-
-### Modification times
-
-Most HTTP servers store time accurate to 1 second.
-
-### 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:
-
- rclone lsd --http-url https://beta.rclone.org :http:
-
-or:
-
- rclone lsd :http,url='https://beta.rclone.org':
-
-
-### Standard options
-
-Here are the Standard options specific to http (HTTP).
-
-#### --http-url
-
-URL of HTTP host to connect to.
-
-E.g. "https://example.com", or "https://user:pass@example.com" to use a username and password.
-
-Properties:
-
-- Config: url
-- Env Var: RCLONE_HTTP_URL
-- Type: string
-- Required: true
-
-### Advanced options
-
-Here are the Advanced options specific to http (HTTP).
-
-#### --http-headers
-
-Set HTTP headers for all transactions.
-
-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 'Cookie,name=value', or '"Cookie","name=value"'.
-
-You can set multiple headers, e.g. '"Cookie","name=value","Authorization","xxx"'.
-
-Properties:
-
-- Config: headers
-- Env Var: RCLONE_HTTP_HEADERS
-- Type: CommaSepList
-- Default:
-
-#### --http-no-slash
-
-Set this if the site doesn't end directories with /.
-
-Use this if your target website does not use / on the end of
-directories.
-
-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.
-
-Note that this may cause rclone to confuse genuine HTML files with
-directories.
-
-Properties:
-
-- Config: no_slash
-- Env Var: RCLONE_HTTP_NO_SLASH
-- Type: bool
-- Default: false
-
-#### --http-no-head
-
-Don't use HEAD requests.
-
-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't have the times or
-sizes of any files, and some files that don't exist may be in the listing.
-
-Properties:
-
-- Config: no_head
-- Env Var: RCLONE_HTTP_NO_HEAD
-- Type: bool
-- Default: 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] [<arguments>+]
-
-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](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 `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 Enter a value. endpoint> https://ik.imagekit.io/imagekit_id
-Option public_key. You can find your ImageKit.io public key in your dashboard Enter a value. public_key> public_****************************
-Option private_key. You can find your ImageKit.io private key in your dashboard 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 "imagekit-media-library" remote? y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y
-List directories in the top level of your Media Library
-rclone lsd imagekit-media-library:
-Make a new directory.
-rclone mkdir imagekit-media-library:directory
-List the contents of a directory.
-rclone ls imagekit-media-library:directory
-
-### 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
-
+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
+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.
+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 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.
+Once configured you can then use rclone
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'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's configuration file. You can find information on securing your configuration file by viewing the configuration encryption docs.
+Invalid refresh token
+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.
+This means that if you
+
+- Don'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 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.
+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
+Access permissions that rclone should use when requesting access from HiDrive.
+Properties:
+
+- 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.
+
+
+
+Advanced options
+Here are the Advanced options specific to hidrive (HiDrive).
+--hidrive-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_HIDRIVE_TOKEN
+- Type: string
+- Required: false
+
+--hidrive-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_HIDRIVE_AUTH_URL
+- Type: string
+- Required: false
+
+--hidrive-token-url
+Token server url.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_HIDRIVE_TOKEN_URL
+- Type: string
+- Required: false
+
+--hidrive-scope-role
+User-level that rclone should use when requesting access from HiDrive.
+Properties:
+
+- 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.
+
+
+
+--hidrive-root-prefix
+The root/parent folder for all paths.
+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.
+Properties:
+
+- 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
+Endpoint for the service.
+This is the URL that API-calls will be made to.
+Properties:
+
+- Config: endpoint
+- Env Var: RCLONE_HIDRIVE_ENDPOINT
+- Type: string
+- Default: "https://api.hidrive.strato.com/2.1"
+
+--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.
+Properties:
+
+- Config: disable_fetching_member_count
+- Env Var: RCLONE_HIDRIVE_DISABLE_FETCHING_MEMBER_COUNT
+- Type: bool
+- Default: false
+
+--hidrive-chunk-size
+Chunksize for chunked uploads.
+Any files larger than the configured cutoff (or files of unknown size) will be uploaded in chunks of this size.
+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. It can be set to smaller values smaller to save on memory.
+Properties:
+
+- Config: chunk_size
+- Env Var: RCLONE_HIDRIVE_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 48Mi
+
+--hidrive-upload-cutoff
+Cutoff/Threshold for chunked uploads.
+Any files larger than this will be uploaded in chunks of the configured chunksize.
+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.
+Properties:
+
+- Config: upload_cutoff
+- Env Var: RCLONE_HIDRIVE_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 96Mi
+
+--hidrive-upload-concurrency
+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.
+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_HIDRIVE_UPLOAD_CONCURRENCY
+- Type: int
+- Default: 4
+
+--hidrive-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_HIDRIVE_ENCODING
+- Type: Encoding
+- Default: Slash,Dot
+
+--hidrive-description
+Description of the remote.
+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, for example, when unpacked from a zip archive.
+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.
+This does not affect the .rclonelink
-files that rclone uses to encode and store symbolic links.
+Sparse files
+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't then please file an issue, or send a pull request!)
+Paths are specified as remote:
or remote:path
.
+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.
+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.
+To just download a single file it is easier to use copyurl.
+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 / 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:
+
+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
+This remote is called remote
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 directory
to /home/local/directory
, deleting any excess files.
+rclone sync --interactive remote:directory /home/local/directory
+Read only
+This remote is read only - you can't upload files to an HTTP server.
+Modification times
+Most HTTP servers store time accurate to 1 second.
+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:
+rclone lsd --http-url https://beta.rclone.org :http:
+or:
+rclone lsd :http,url='https://beta.rclone.org':
+Standard options
+Here are the Standard options specific to http (HTTP).
+--http-url
+URL of HTTP host to connect to.
+E.g. "https://example.com", or "https://user:pass@example.com" to use a username and password.
+Properties:
+
+- Config: url
+- Env Var: RCLONE_HTTP_URL
+- 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).
+
+Set HTTP headers for all transactions.
+Use this to set additional HTTP headers for all transactions.
+The input format is comma separated list of key,value pairs. Standard CSV encoding may be used.
+For example, to set a Cookie use 'Cookie,name=value', or '"Cookie","name=value"'.
+You can set multiple headers, e.g. '"Cookie","name=value","Authorization","xxx"'.
+Properties:
+
+- Config: headers
+- Env Var: RCLONE_HTTP_HEADERS
+- Type: CommaSepList
+- Default:
+
+--http-no-slash
+Set this if the site doesn't end directories with /.
+Use this if your target website does not use / on the end of directories.
+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.
+Note that this may cause rclone to confuse genuine HTML files with directories.
+Properties:
+
+- Config: no_slash
+- Env Var: RCLONE_HTTP_NO_SLASH
+- Type: bool
+- Default: false
+
+--http-no-head
+Don't use HEAD requests.
+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't have the times or sizes of any files, and some files that don'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 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] [<arguments>+]
+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
-
-### Advanced options
-
-Here are the Advanced options specific to imagekit (ImageKit.io).
-
-#### --imagekit-only-signed
-
-If you have configured `Restrict unsigned image URLs` in your dashboard settings, set this to true.
-
-Properties:
-
-- Config: only_signed
-- Env Var: RCLONE_IMAGEKIT_ONLY_SIGNED
-- Type: bool
-- Default: false
-
-#### --imagekit-versions
-
-Include old versions in directory listings.
-
-Properties:
-
-- Config: versions
-- Env Var: RCLONE_IMAGEKIT_VERSIONS
-- Type: bool
-- Default: false
-
-#### --imagekit-upload-tags
-
-Tags to add to the uploaded files, e.g. "tag1,tag2".
-
-Properties:
-
-- Config: upload_tags
-- Env Var: RCLONE_IMAGEKIT_UPLOAD_TAGS
-- Type: string
-- Required: false
-
-#### --imagekit-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_IMAGEKIT_ENCODING
-- Type: Encoding
-- Default: Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket
-
-### Metadata
-
-Any metadata supported by the underlying remote is read and written.
-
-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 `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.](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'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](https://rclone.org/filtering/#metadata).
-
- 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](#providers).
-
-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 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
-
-
-### Standard options
-
-Here are the Standard options specific to internetarchive (Internet Archive).
-
-#### --internetarchive-access-key-id
+Configuration complete.
+Options:
+- type: imagekit
+- endpoint: https://ik.imagekit.io/imagekit_id
+- public_key: public_****************************
+- private_key: private_****************************
+Keep this "imagekit-media-library" remote?
+y) Yes this is OK (default)
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+List directories in the top level of your Media Library
+rclone lsd imagekit-media-library:
+Make a new directory.
+rclone mkdir imagekit-media-library:directory
+List the contents of a directory.
+rclone ls imagekit-media-library:directory
+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
+Properties:
+
+- Config: endpoint
+- Env Var: RCLONE_IMAGEKIT_ENDPOINT
+- Type: string
+- Required: true
+
+--imagekit-public-key
+You can find your ImageKit.io public key in your dashboard
+Properties:
+
+- Config: public_key
+- Env Var: RCLONE_IMAGEKIT_PUBLIC_KEY
+- Type: string
+- Required: true
+
+--imagekit-private-key
+You can find your ImageKit.io private key in your dashboard
+Properties:
+
+- Config: private_key
+- Env Var: RCLONE_IMAGEKIT_PRIVATE_KEY
+- Type: string
+- Required: true
+
+Advanced options
+Here are the Advanced options specific to imagekit (ImageKit.io).
+--imagekit-only-signed
+If you have configured Restrict unsigned image URLs
in your dashboard settings, set this to true.
+Properties:
+
+- Config: only_signed
+- Env Var: RCLONE_IMAGEKIT_ONLY_SIGNED
+- Type: bool
+- Default: false
+
+--imagekit-versions
+Include old versions in directory listings.
+Properties:
+
+- Config: versions
+- Env Var: RCLONE_IMAGEKIT_VERSIONS
+- Type: bool
+- Default: false
+
+
+Tags to add to the uploaded files, e.g. "tag1,tag2".
+Properties:
+
+- Config: upload_tags
+- Env Var: RCLONE_IMAGEKIT_UPLOAD_TAGS
+- Type: string
+- Required: false
+
+--imagekit-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+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.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_IMAGEKIT_DESCRIPTION
+- Type: string
+- Required: false
+
+
+Any metadata supported by the underlying remote is read and written.
+Here are the possible system metadata items for the imagekit backend.
+
+
+
+
+
+
+
+
+
+
+
+
+
+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 docs for more info.
+Internet Archive
+The Internet Archive backend utilizes Items on archive.org
+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.
+
+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.
-
-Properties:
-
-- Config: encoding
-- Env Var: RCLONE_INTERNETARCHIVE_ENCODING
-- Type: Encoding
-- Default: Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot
-
-### Metadata
-
-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ø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)
-
-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: <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](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
-
-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](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 `--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.
-
-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 |
-| --------- |:-----:|:-----------:|
-| " | 0x22 | " |
-| * | 0x2A | * |
-| : | 0x3A | : |
-| < | 0x3C | < |
-| > | 0x3E | > |
-| ? | 0x3F | ? |
-| \| | 0x7C | | |
-
-Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
-as they can'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 `--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.
-
-### Quota information
-
-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.
-
-
-### 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'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
-
-### 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'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](https://app.koofr.net/app/admin/preferences/password),
-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. 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
-
-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 `rclone` 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 |
-| --------- |:-----:|:-----------:|
-| \ | 0x5C | \ |
-
-Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
-as they can'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
-
+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
+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
+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.
+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: "https://s3.us.archive.org"
+
+--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: "https://archive.org"
+
+--internetarchive-disable-checksum
+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.
+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
+The encoding for the backend.
+See the encoding section in the overview 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 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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+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 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, 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)
+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: 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> <your token here>
+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.
+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).
+Restricted filename characters
+In addition to the default restricted characters set the following characters are also replaced:
+
+
+
+
+
+
+" |
+0x22 |
+" |
+
+
+* |
+0x2A |
+* |
+
+
+: |
+0x3A |
+: |
+
+
+< |
+0x3C |
+< |
+
+
+> |
+0x3E |
+> |
+
+
+? |
+0x3F |
+? |
+
+
+| |
+0x7C |
+| |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can'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 flag, or set the equivalent environment variable. Emptying the trash is supported by the 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 --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.
+
+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.
+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'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 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
+
+
+Jottacloud has limited support for metadata, currently an extended set of timestamps.
+Here are the possible system metadata items for the jottacloud backend.
+
+
+
+
+
+
+
+
+
+
+
+
+
+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 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
+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 rclone
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 the following characters are also replaced:
+
+
+
+
+
+
+\ |
+0x5C |
+\ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can'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:
+
+- "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
+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.
+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 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't have a file called "Hello.doc" and one called "hello.doc".
+Providers
+Koofr
+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.
+Here is an example of how to make a remote called ds
. 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> 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
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
+Enter name for new remote.
+name> remote
-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
-
-
-
-## Limitations
-
-Note that Koofr is case insensitive so you can't have a file called
-"Hello.doc" and one called "hello.doc".
-
-## 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 `ds`. 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> 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](https://linkbox.to/).
-
-## 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
-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
-
-
-### Standard options
-
-Here are the Standard options specific to linkbox (Linkbox).
-
-#### --linkbox-token
+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:
-
-- Config: token
-- Env Var: RCLONE_LINKBOX_TOKEN
-- Type: string
-- Required: true
-
-
-
-## Limitations
-
-Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
-as they can'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. `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)
-
-## 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 `oauth2: server response missing access_token`.
-
-- 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.
-
-Now run
-
- rclone config
-
-This will guide you through an interactive setup process:
+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
-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. 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
-
-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.
+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, as they can't be used in JSON strings.
+Mail.ru Cloud
+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.
+Features highlights
+
+- 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)
+
+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 oauth2: server response missing access_token
.
+
+- 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.
+
+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
+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.
-
-Properties:
-
-- Config: speedup_enable
-- Env Var: RCLONE_MAILRU_SPEEDUP_ENABLE
-- Type: bool
-- Default: true
-- Examples:
- - "true"
- - Enable
- - "false"
- - Disable
-
-### Advanced options
-
-Here are the Advanced options specific to mailru (Mail.ru Cloud).
-
-#### --mailru-token
-
-OAuth Access Token as a JSON blob.
-
-Properties:
-
-- Config: token
-- Env Var: RCLONE_MAILRU_TOKEN
-- Type: string
-- Required: false
-
-#### --mailru-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_MAILRU_AUTH_URL
-- Type: string
-- Required: false
-
-#### --mailru-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-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 '*' or '?' meta characters.
-
-Properties:
-
-- 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-speedup-max-disk
-
-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.
-
-Properties:
-
-- 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-speedup-max-memory
-
-Files larger than the size given below will always be hashed on disk.
-
-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.
-
-#### --mailru-check-hash
-
-What should copy do if file checksum is mismatched or invalid.
-
-Properties:
-
-- Config: check_hash
-- Env Var: RCLONE_MAILRU_CHECK_HASH
-- Type: bool
-- Default: true
-- Examples:
- - "true"
- - Fail with error.
- - "false"
- - Ignore and continue.
-
-#### --mailru-user-agent
-
-HTTP user agent used internally by client.
-
-Defaults to "rclone/VERSION" or "--user-agent" provided on command line.
-
-Properties:
-
-- Config: user_agent
-- Env Var: RCLONE_MAILRU_USER_AGENT
-- Type: string
-- Required: false
-
-#### --mailru-quirks
-
-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.
-Quirks will be removed when the backend grows stable.
-Supported quirks: atomicmkdir binlist unknowndirs
-
-Properties:
-
-- Config: quirks
-- Env Var: RCLONE_MAILRU_QUIRKS
-- Type: string
-- Required: false
-
-#### --mailru-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_MAILRU_ENCODING
-- Type: Encoding
-- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot
-
-
-
-## 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.
-
-Note that Mailru is case insensitive so you can't have a file called
-"Hello.doc" and one called "hello.doc".
-
-# Mega
-
-[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.
-
-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 `remote:path`
-
-Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
-
-## 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 / 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
-
-**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.
-
-Once configured you can then use `rclone` like this,
-
-List directories in top level of your Mega
-
- rclone lsd remote:
-
-List all the files in your Mega
-
- rclone ls remote:
-
-To copy a local directory to an Mega directory called backup
-
- rclone copy /home/source remote:backup
-
-### Modification times and hashes
-
-Mega does not support modification times or hashes yet.
-
-### Restricted filename characters
-
-| Character | Value | Replacement |
-| --------- |:-----:|:-----------:|
-| NUL | 0x00 | ␀ |
-| / | 0x2F | / |
-
-Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
-as they can't be used in JSON strings.
-
-### Duplicated files
-
-Mega can have two files with exactly the same name and path (unlike a
-normal file system).
-
-Duplicated files cause problems with the syncing and you will see
-messages in the log about duplicates.
-
-Use `rclone dedupe` 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
-
-Failed to create file system for "my-mega-remote:": couldn't login: Object (typically, node or user) not found
-
-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.
-
-MEGA CMD> login me@example.com Password: Fetching nodes ... Loading transfers from local cache Login complete as me@example.com me@example.com:/$
-
-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 "heavy use".
-We haven'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 `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.
-
-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...
-
-Note that this has been observed by trial and error and might not be
-set in stone.
-
-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.
-
-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.
-
-Investigation is continuing in relation to workarounds based on
-timeouts, pacers, retrials and tpslimits - if you discover something
-relevant, please post on the forum.
-
-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
-
-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
-
-Password.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: pass
-- Env Var: RCLONE_MEGA_PASS
-- Type: string
-- Required: true
-
-### Advanced options
-
-Here are the Advanced options specific to mega (Mega).
-
-#### --mega-debug
-
-Output more debug from Mega.
-
-If this flag is set (along with -vv) it will print further debugging
-information from the mega backend.
-
-Properties:
-
-- Config: debug
-- Env Var: RCLONE_MEGA_DEBUG
-- Type: bool
-- Default: false
-
-#### --mega-hard-delete
-
-Delete files permanently rather than putting them into the trash.
-
-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:
-
-- Config: hard_delete
-- Env Var: RCLONE_MEGA_HARD_DELETE
-- Type: bool
-- Default: false
-
-#### --mega-use-https
-
-Use HTTPS for transfers.
-
-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.
-
-Properties:
-
-- Config: use_https
-- Env Var: RCLONE_MEGA_USE_HTTPS
-- Type: bool
-- Default: false
-
-#### --mega-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_MEGA_ENCODING
-- Type: Encoding
-- Default: Slash,InvalidUtf8,Dot
-
-
-
-### Process `killed`
-
-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'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.
-
-Mega allows duplicate files which may confuse rclone.
-
-# Memory
-
-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
-`:memory:` remote name.
-
-## Configuration
-
-You can configure it as a remote like this with `rclone config` too if
-you want to:
-
-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/ **
-Remote config
+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
+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.
+
+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 the following characters are also replaced:
+
+
+
-[remote] |
+" |
+0x22 |
+" |
-type = memory |
+* |
+0x2A |
+* |
+
+
+: |
+0x3A |
+: |
+
+
+< |
+0x3C |
+< |
+
+
+> |
+0x3E |
+> |
+
+
+? |
+0x3F |
+? |
+
+
+\ |
+0x5C |
+\ |
+
+
+| |
+0x7C |
+| |
-
-- Yes this is OK (default)
-- Edit this remote
-- Delete this remote y/e/d> y
-
-
-Because the memory backend isn'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).
-
-
-
-
-# Akamai NetStorage
-
-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 \<domain>\/\<cpcode>\/\<internal directories within cpcode>.
-
-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`
-
-
-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.
-
-## Configuration
-
-Here's an example of how to make a remote called `ns1`.
-
-1. To begin the interactive configuration process, enter this command:
-
-rclone config
-
-2. Type `n` to create a new remote.
-
-
-- New remote
-- Delete remote
-- Quit config e/n/d/q> n
-
-
-3. For this example, enter `ns1` when you reach the name> prompt.
-
-name> ns1
-
-4. Enter `netstorage` as the 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 XX / NetStorage "netstorage" Storage> netstorage
-
-5. Select between the HTTP or HTTPS protocol. Most users should choose HTTPS, which is the default. HTTP is provided primarily for debugging purposes.
-
-
-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
-
-6. Specify your NetStorage host, CP code, and any necessary content paths using this format: `<domain>/<cpcode>/<content>/`
-
-Enter a string value. Press Enter for the default (""). host> baseball-nsu.akamaihd.net/123456/content/
-
-7. Set the netstorage account name
-Enter a string value. Press Enter for the default (""). account> username
-
-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.
-
-
-- Yes type in my own password
-- Generate random password y/g> y Enter the password: password: Confirm the password: password:
-
-
-9. View the summary and confirm your remote configuration.
-
-[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
-
-This remote is called `ns1` 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'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 `--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.
-
-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.
-
-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.
-
-**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 "implicit." While the directories aren'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.
-
-### `--fast-list` / ListR support
-
-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.
-
-* **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.
-
-* **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.
-
-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.
-
-**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.
-
-### Purge
-
-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.
-
-**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.
-
-
-### 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 `<domain>/<internal folders>`
-
-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 'y' 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: "https"
-- Examples:
- - "http"
- - HTTP protocol
- - "https"
- - HTTPS protocol
-
-## 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] [<arguments>+]
-
-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] [<arguments>+]
-
-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 <src> <path>`
-
-
-
-# Microsoft Azure Blob Storage
-
-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
-
-Here is an example of making a Microsoft Azure Blob 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 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
-
-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 `/home/local/directory` to the remote container, deleting any excess
-files in the container.
-
- rclone sync --interactive /home/local/directory remote:container
-
-### --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 and hashes
-
-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.
-
-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.
-
-### 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 | / |
-| \ | 0x5C | \ |
-
-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.
-
-### Authentication {#authentication}
-
-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 `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 :azureblob,env_auth,account=ACCOUNT:CONTAINER
-
-Or
-
- rclone lsf --azureblob-env-auth --azureblob-account=ACCOUNT :azureblob:CONTAINER
-
-Which is analogous to using the `az` 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 `account` and `key` lines and leave the rest blank.
-
-#### SAS URL
-
-This can be an account level SAS URL or container level SAS URL.
-
-To use it leave `account` and `key` blank and fill in `sas_url`.
-
-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 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/
-
-Note that you can't see or access any other containers - this will
-fail
-
- rclone ls azureblob:othercontainer
-
-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.
-
-- `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 azureblob (Microsoft Azure Blob Storage).
-
-#### --azureblob-account
-
-Azure Storage Account Name.
-
-Set this to the Azure Storage Account Name in use.
-
-Leave blank to use SAS URL or Emulator, 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_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 "<name>" \
- --role "Storage Blob Data Owner" \
- --scopes "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>/blobServices/default/containers/<container>" \
- > 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
-
-
-
-### 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)://<host>:<port>/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 "<name>" \
- --role "Storage Files Data Owner" \
- --scopes "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>/blobServices/default/containers/<container>" \
- > 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
-
-
-
-### 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:
-
-
-- Edit existing remote
-- New remote
-- Delete remote
-- Rename remote
-- Copy remote
-- Set configuration password
-- 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)
-- Yes
-- No y/n> n Remote config Use web browser to automatically authenticate rclone with remote?
-
+Invalid UTF-8 bytes will also be replaced, 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:
-- 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.
+- Config: client_id
+- Env Var: RCLONE_MAILRU_CLIENT_ID
+- Type: string
+- Required: false
-
-- Yes
-- 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?
-- Yes
-- 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 --------------------
-- Yes this is OK
-- Edit this remote
-- 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
-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 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-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_ONEDRIVE_ENCODING
-- Type: Encoding
-- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,LeftSpace,LeftTilde,RightSpace,RightPeriod,InvalidUtf8,Dot
-
-
-
-## Limitations
-
-If you don't use rclone for 90 days the refresh token will
-expire. This will result in authorization problems. This is easy to
-fix by running the `rclone config reconnect remote:` command to get a
-new token and refresh token.
-
-### Naming
-
-Note that OneDrive 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 OneDrive 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.
-
-### File sizes
-
-The largest allowed file size is 250 GiB for both OneDrive Personal and OneDrive for Business [(Updated 13 Jan 2021)](https://support.microsoft.com/en-us/office/invalid-file-names-and-file-types-in-onedrive-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa?ui=en-us&rs=en-us&ad=us#individualfilesize).
-
-### Path length
-
-The entire path, including the file name, must contain fewer than 400 characters for OneDrive, OneDrive for Business and SharePoint Online. If you are encrypting file and folder names with rclone, you may want to pay attention to this limitation because the encrypted names are typically longer than the original ones.
-
-### Number of files
-
-OneDrive seems to be OK with at least 50,000 files in a folder, but at
-100,000 rclone will get errors listing the directory like `couldn’t
-list files: UnknownError:`. See
-[#2707](https://github.com/rclone/rclone/issues/2707) for more info.
-
-An official document about the limitations for different types of OneDrive can be found [here](https://support.office.com/en-us/article/invalid-file-names-and-file-types-in-onedrive-onedrive-for-business-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa).
-
-## Versions
-
-Every change in a file OneDrive causes the service to create a new
-version of the file. This counts against a users quota. For
-example changing the modification time of a file creates a second
-version, so the file apparently uses twice the space.
-
-For example the `copy` command is affected by this as rclone copies
-the file and then afterwards sets the modification time to match the
-source file which uses another version.
-
-You can use the `rclone cleanup` command (see below) to remove all old
-versions.
-
-Or you can set the `no_versions` parameter to `true` and rclone will
-remove versions after operations which create new versions. This takes
-extra transactions so only enable it if you need it.
-
-**Note** At the time of writing Onedrive Personal creates versions
-(but not for setting the modification time) but the API for removing
-them returns "API not found" so cleanup and `no_versions` should not
-be used on Onedrive Personal.
-
-### Disabling versioning
-
-Starting October 2018, users will no longer be able to
-disable versioning by default. This is because Microsoft has brought
-an
-[update](https://techcommunity.microsoft.com/t5/Microsoft-OneDrive-Blog/New-Updates-to-OneDrive-and-SharePoint-Team-Site-Versioning/ba-p/204390)
-to the mechanism. To change this new default setting, a PowerShell
-command is required to be run by a SharePoint admin. If you are an
-admin, you can run these commands in PowerShell to change that
-setting:
-
-1. `Install-Module -Name Microsoft.Online.SharePoint.PowerShell` (in case you haven't installed this already)
-2. `Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking`
-3. `Connect-SPOService -Url https://YOURSITE-admin.sharepoint.com -Credential YOU@YOURSITE.COM` (replacing `YOURSITE`, `YOU`, `YOURSITE.COM` with the actual values; this will prompt for your credentials)
-4. `Set-SPOTenant -EnableMinimumVersionRequirement $False`
-5. `Disconnect-SPOService` (to disconnect from the server)
-
-*Below are the steps for normal users to disable versioning. If you don't see the "No Versioning" option, make sure the above requirements are met.*
-
-User [Weropol](https://github.com/Weropol) has found a method to disable
-versioning on OneDrive
-
-1. Open the settings menu by clicking on the gear symbol at the top of the OneDrive Business page.
-2. Click Site settings.
-3. Once on the Site settings page, navigate to Site Administration > Site libraries and lists.
-4. Click Customize "Documents".
-5. Click General Settings > Versioning Settings.
-6. Under Document Version History select the option No versioning.
-Note: This will disable the creation of new file versions, but will not remove any previous versions. Your documents are safe.
-7. Apply the changes by clicking OK.
-8. Use rclone to upload or modify files. (I also use the --no-update-modtime flag)
-9. Restore the versioning settings after using rclone. (Optional)
-
-## Cleanup
-
-OneDrive supports `rclone cleanup` which causes rclone to look through
-every file under the path supplied and delete all version but the
-current version. Because this involves traversing all the files, then
-querying each file for versions it can be quite slow. Rclone does
-`--checkers` tests in parallel. The command also supports `--interactive`/`i`
-or `--dry-run` which is a great way to see what it would do.
-
- rclone cleanup --interactive remote:path/subdir # interactively remove all old version for path/subdir
- rclone cleanup remote:path/subdir # unconditionally remove all old version for path/subdir
-
-**NB** Onedrive personal can't currently delete versions
-
-## Troubleshooting ##
-
-### Excessive throttling or blocked on SharePoint
-
-If you experience excessive throttling or is being blocked on SharePoint then it may help to set the user agent explicitly with a flag like this: `--user-agent "ISV|rclone.org|rclone/v1.55.1"`
-
-The specific details can be found in the Microsoft document: [Avoid getting throttled or blocked in SharePoint Online](https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online#how-to-decorate-your-http-traffic-to-avoid-throttling)
-
-### Unexpected file size/hash differences on Sharepoint ####
-
-It is a
-[known](https://github.com/OneDrive/onedrive-api-docs/issues/935#issuecomment-441741631)
-issue that Sharepoint (not OneDrive or OneDrive for Business) silently modifies
-uploaded files, mainly Office files (.docx, .xlsx, etc.), causing file size and
-hash checks to fail. There are also other situations that will cause OneDrive to
-report inconsistent file sizes. To use rclone with such
-affected files on Sharepoint, you
-may disable these checks with the following command line arguments:
-
---ignore-checksum --ignore-size
-
-Alternatively, if you have write access to the OneDrive files, it may be possible
-to fix this problem for certain files, by attempting the steps below.
-Open the web interface for [OneDrive](https://onedrive.live.com) and find the
-affected files (which will be in the error messages/log for rclone). Simply click on
-each of these files, causing OneDrive to open them on the web. This will cause each
-file to be converted in place to a format that is functionally equivalent
-but which will no longer trigger the size discrepancy. Once all problematic files
-are converted you will no longer need the ignore options above.
-
-### Replacing/deleting existing files on Sharepoint gets "item not found" ####
-
-It is a [known](https://github.com/OneDrive/onedrive-api-docs/issues/1068) issue
-that Sharepoint (not OneDrive or OneDrive for Business) may return "item not
-found" errors when users try to replace or delete uploaded files; this seems to
-mainly affect Office files (.docx, .xlsx, etc.) and web files (.html, .aspx, etc.). As a workaround, you may use
-the `--backup-dir <BACKUP_DIR>` command line argument so rclone moves the
-files to be replaced/deleted into a given backup directory (instead of directly
-replacing/deleting them). For example, to instruct rclone to move the files into
-the directory `rclone-backup-dir` on backend `mysharepoint`, you may use:
-
---backup-dir mysharepoint:rclone-backup-dir
-
-### access\_denied (AADSTS65005) ####
-
-Error: access_denied Code: AADSTS65005 Description: Using application 'rclone' is currently not supported for your organization [YOUR_ORGANIZATION] because it is in an unmanaged state. An administrator needs to claim ownership of the company by DNS validation of [YOUR_ORGANIZATION] before the application rclone can be provisioned.
-
-This means that rclone can't use the OneDrive for Business API with your account. You can't do much about it, maybe write an email to your admins.
-
-However, there are other ways to interact with your OneDrive account. Have a look at the WebDAV backend: https://rclone.org/webdav/#sharepoint
-
-### invalid\_grant (AADSTS50076) ####
-
-Error: invalid_grant Code: AADSTS50076 Description: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '...'.
-
-If you see the error above after enabling multi-factor authentication for your account, you can fix it by refreshing your OAuth refresh token. To do that, run `rclone config`, and choose to edit your OneDrive backend. Then, you don't need to actually make any changes until you reach this question: `Already have a token - refresh?`. For this question, answer `y` and go through the process to refresh your token, just like the first time the backend is configured. After this, rclone should work again for this backend.
-
-### Invalid request when making public links ####
-
-On Sharepoint and OneDrive for Business, `rclone link` may return an "Invalid
-request" error. A possible cause is that the organisation admin didn't allow
-public links to be made for the organisation/sharepoint library. To fix the
-permissions as an admin, take a look at the docs:
-[1](https://docs.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off),
-[2](https://support.microsoft.com/en-us/office/set-up-and-manage-access-requests-94b26e0b-2822-49d4-929a-8455698654b3).
-
-### Can not access `Shared` with me files
-
-Shared with me files is not supported by rclone [currently](https://github.com/rclone/rclone/issues/4062), but there is a workaround:
-
-1. Visit [https://onedrive.live.com](https://onedrive.live.com/)
-2. Right click a item in `Shared`, then click `Add shortcut to My files` in the context
- ")
-3. The shortcut will appear in `My files`, you can access it with rclone, it behaves like a normal folder/file.
- ")
- ")
-
-### Live Photos uploaded from iOS (small video clips in .heic files)
-
-The iOS OneDrive app introduced [upload and storage](https://techcommunity.microsoft.com/t5/microsoft-onedrive-blog/live-photos-come-to-onedrive/ba-p/1953452)
-of [Live Photos](https://support.apple.com/en-gb/HT207310) in 2020.
-The usage and download of these uploaded Live Photos is unfortunately still work-in-progress
-and this introduces several issues when copying, synchronising and mounting – both in rclone and in the native OneDrive client on Windows.
-
-The root cause can easily be seen if you locate one of your Live Photos in the OneDrive web interface.
-Then download the photo from the web interface. You will then see that the size of downloaded .heic file is smaller than the size displayed in the web interface.
-The downloaded file is smaller because it only contains a single frame (still photo) extracted from the Live Photo (movie) stored in OneDrive.
-
-The different sizes will cause `rclone copy/sync` to repeatedly recopy unmodified photos something like this:
-
- DEBUG : 20230203_123826234_iOS.heic: Sizes differ (src 4470314 vs dst 1298667)
- DEBUG : 20230203_123826234_iOS.heic: sha1 = fc2edde7863b7a7c93ca6771498ac797f8460750 OK
- INFO : 20230203_123826234_iOS.heic: Copied (replaced existing)
-
-These recopies can be worked around by adding `--ignore-size`. Please note that this workaround only syncs the still-picture not the movie clip,
-and relies on modification dates being correctly updated on all files in all situations.
-
-The different sizes will also cause `rclone check` to report size errors something like this:
-
- ERROR : 20230203_123826234_iOS.heic: sizes differ
-
-These check errors can be suppressed by adding `--ignore-size`.
-
-The different sizes will also cause `rclone mount` to fail downloading with an error something like this:
-
- ERROR : 20230203_123826234_iOS.heic: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
-
-or like this when using `--cache-mode=full`:
-
- INFO : 20230203_123826234_iOS.heic: vfs cache: downloader: error count now 1: vfs reader: failed to write to cache file: 416 Requested Range Not Satisfiable:
- ERROR : 20230203_123826234_iOS.heic: vfs cache: failed to download: vfs reader: failed to write to cache file: 416 Requested Range Not Satisfiable:
-
-# OpenDrive
-
-Paths are specified as `remote:path`
-
-Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
-
-## 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:
-
-
-- New remote
-- Delete remote
-- 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 / OpenDrive "opendrive" [snip] Storage> opendrive Username username> Password
-- Yes type in my own password
-- Generate random password y/g> y Enter the password: password: Confirm the password: password: -------------------- [remote] username = password = *** ENCRYPTED *** --------------------
-- Yes this is OK
-- Edit this remote
-- Delete this remote y/e/d> y
-
-
-List directories in top level of your OpenDrive
-
- rclone lsd remote:
-
-List all the files in your OpenDrive
-
- rclone ls remote:
-
-To copy a local directory to an OpenDrive directory called backup
-
- rclone copy /home/source remote:backup
-
-### Modification times and hashes
-
-OpenDrive allows modification times to be set on objects accurate to 1
-second. These will be used to detect whether objects need syncing or
-not.
-
-The MD5 hash algorithm is supported.
-
-### Restricted filename characters
-
-| Character | Value | Replacement |
-| --------- |:-----:|:-----------:|
-| NUL | 0x00 | ␀ |
-| / | 0x2F | / |
-| " | 0x22 | " |
-| * | 0x2A | * |
-| : | 0x3A | : |
-| < | 0x3C | < |
-| > | 0x3E | > |
-| ? | 0x3F | ? |
-| \ | 0x5C | \ |
-| \| | 0x7C | | |
-
-File names can also not begin 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 | ␠ |
-| HT | 0x09 | ␉ |
-| LF | 0x0A | ␊ |
-| VT | 0x0B | ␋ |
-| CR | 0x0D | ␍ |
-
-
-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 opendrive (OpenDrive).
-
-#### --opendrive-username
-
-Username.
-
-Properties:
-
-- Config: username
-- Env Var: RCLONE_OPENDRIVE_USERNAME
-- Type: string
-- Required: true
-
-#### --opendrive-password
-
+--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.
+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 "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.
+Properties:
+
+- Config: speedup_enable
+- Env Var: RCLONE_MAILRU_SPEEDUP_ENABLE
+- Type: bool
+- Default: true
+- Examples:
+
+
+Advanced options
+Here are the Advanced options specific to mailru (Mail.ru Cloud).
+--mailru-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_MAILRU_TOKEN
+- Type: string
+- Required: false
+
+--mailru-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_MAILRU_AUTH_URL
+- Type: string
+- Required: false
+
+--mailru-token-url
+Token server url.
+Leave blank to use the provider defaults.
+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 '*' or '?' meta characters.
+Properties:
+
+- 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-speedup-max-disk
+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.
+Properties:
+
+- 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-speedup-max-memory
+Files larger than the size given below will always be hashed on disk.
+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.
+
+
+
+--mailru-check-hash
+What should copy do if file checksum is mismatched or invalid.
+Properties:
+
+- Config: check_hash
+- Env Var: RCLONE_MAILRU_CHECK_HASH
+- Type: bool
+- Default: true
+- Examples:
+
+
+--mailru-user-agent
+HTTP user agent used internally by client.
+Defaults to "rclone/VERSION" or "--user-agent" provided on command line.
+Properties:
+
+- Config: user_agent
+- Env Var: RCLONE_MAILRU_USER_AGENT
+- Type: string
+- Required: false
+
+--mailru-quirks
+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. Quirks will be removed when the backend grows stable. Supported quirks: atomicmkdir binlist unknowndirs
+Properties:
+
+- Config: quirks
+- Env Var: RCLONE_MAILRU_QUIRKS
+- Type: string
+- Required: false
+
+--mailru-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+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.
+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.
+Note that Mailru is case insensitive so you can't have a file called "Hello.doc" and one called "hello.doc".
+Mega
+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.
+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 remote:path
+Paths may be as deep as required, e.g. remote:directory/subdirectory
.
+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 / 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
+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.
+Once configured you can then use rclone
like this,
+List directories in top level of your Mega
+rclone lsd remote:
+List all the files in your Mega
+rclone ls remote:
+To copy a local directory to an Mega directory called backup
+rclone copy /home/source remote:backup
+Modification times and hashes
+Mega does not support modification times or hashes yet.
+Restricted filename characters
+
+
+
+
+
+
+NUL |
+0x00 |
+␀ |
+
+
+/ |
+0x2F |
+/ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+Duplicated files
+Mega can have two files with exactly the same name and path (unlike a normal file system).
+Duplicated files cause problems with the syncing and you will see messages in the log about duplicates.
+Use rclone dedupe
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
+Failed to create file system for "my-mega-remote:":
+couldn't login: Object (typically, node or user) not found
+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.
+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.
+MEGA CMD> login me@example.com
+Password:
+Fetching nodes ...
+Loading transfers from local cache
+Login complete as me@example.com
+me@example.com:/$
+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 "heavy use". We haven'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 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.
+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...
+Note that this has been observed by trial and error and might not be set in stone.
+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.
+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.
+Investigation is continuing in relation to workarounds based on timeouts, pacers, retrials and tpslimits - if you discover something relevant, please post on the forum.
+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
+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
+Password.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: pass
+- Env Var: RCLONE_MEGA_PASS
+- Type: string
+- Required: true
+
+Advanced options
+Here are the Advanced options specific to mega (Mega).
+--mega-debug
+Output more debug from Mega.
+If this flag is set (along with -vv) it will print further debugging information from the mega backend.
+Properties:
+
+- Config: debug
+- Env Var: RCLONE_MEGA_DEBUG
+- Type: bool
+- Default: false
+
+--mega-hard-delete
+Delete files permanently rather than putting them into the trash.
+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:
+
+- Config: hard_delete
+- Env Var: RCLONE_MEGA_HARD_DELETE
+- Type: bool
+- Default: false
+
+--mega-use-https
+Use HTTPS for transfers.
+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.
+Properties:
+
+- Config: use_https
+- Env Var: RCLONE_MEGA_USE_HTTPS
+- Type: bool
+- Default: false
+
+--mega-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_MEGA_ENCODING
+- Type: Encoding
+- Default: Slash,InvalidUtf8,Dot
+
+--mega-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_MEGA_DESCRIPTION
+- Type: string
+- Required: false
+
+Process killed
+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.
+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.
+Mega allows duplicate files which may confuse rclone.
+Memory
+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 :memory:
remote name.
+Configuration
+You can configure it as a remote like this with rclone config
too if you want to:
+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/ **
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
+Remote config
-Properties:
-
-- Config: password
-- Env Var: RCLONE_OPENDRIVE_PASSWORD
-- Type: string
-- Required: true
-
-### Advanced options
-
-Here are the Advanced options specific to opendrive (OpenDrive).
-
-#### --opendrive-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_OPENDRIVE_ENCODING
-- Type: Encoding
-- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot
-
-#### --opendrive-chunk-size
-
-Files will be uploaded in chunks this size.
-
-Note that these chunks are buffered in memory so increasing them will
-increase memory use.
-
-Properties:
-
-- Config: chunk_size
-- Env Var: RCLONE_OPENDRIVE_CHUNK_SIZE
-- Type: SizeSuffix
-- Default: 10Mi
-
-
-
-## 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.
-
-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/)
-
-# Oracle Object Storage
-- [Oracle Object Storage Overview](https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/objectstorageoverview.htm)
-- [Oracle Object Storage FAQ](https://www.oracle.com/cloud/storage/object-storage/faq/)
-- [Oracle Object Storage Limits](https://docs.oracle.com/en-us/iaas/Content/Resources/Assets/whitepapers/oci-object-storage-best-practices.pdf)
-
-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
-
-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
-
-This will guide you through an interactive setup process:
-
-
-
-- New remote
-- Delete remote
-- Rename remote
-- Copy remote
-- Set configuration password
-- Quit config e/n/d/r/c/s/q> n
+--------------------
+[remote]
+type = memory
+--------------------
+y) Yes this is OK (default)
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+Because the memory backend isn'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.
+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 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 <domain>/<cpcode>/<internal directories within cpcode>.
+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
+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.
+Configuration
+Here's an example of how to make a remote called ns1
.
+
+- To begin the interactive configuration process, enter this command:
-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. [snip] XX / Oracle Cloud Infrastructure Object Storage (oracleobjectstorage) Storage> oracleobjectstorage
-Option provider. Choose your Auth Provider Choose a number from below, or type in your own string value. Press Enter for the default (env_auth). 1 / automatically pickup the credentials from runtime(env), first one to provide auth wins (env_auth) / use an OCI user and an API key for authentication. 2 | you’ll need to put in a config file your tenancy OCID, user OCID, region, the path, fingerprint to an API key. | https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm (user_principal_auth) / use instance principals to authorize an instance to make API calls. 3 | each instance has its own identity, and authenticates using the certificates that are read from instance metadata. | https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm (instance_principal_auth) 4 / use resource principals to make API calls (resource_principal_auth) 5 / no credentials needed, this is typically for reading public buckets (no_auth) provider> 2
-Option namespace. Object storage namespace Enter a value. namespace> idbamagbg734
-Option compartment. Object storage compartment OCID Enter a value. compartment> ocid1.compartment.oc1..aaaaaaaapufkxc7ame3sthry5i7ujrwfc7ejnthhu6bhanm5oqfjpyasjkba
-Option region. Object storage Region Enter a value. region> us-ashburn-1
-Option endpoint. Endpoint for Object storage API. Leave blank to use the default endpoint for the region. Enter a value. Press Enter to leave empty. endpoint>
-Option config_file. Full Path to OCI config file Choose a number from below, or type in your own string value. Press Enter for the default (~/.oci/config). 1 / oci configuration file location (~/.oci/config) config_file> /etc/oci/dev.conf
-Option config_profile. Profile name inside OCI config file Choose a number from below, or type in your own string value. Press Enter for the default (Default). 1 / Use the default profile (Default) config_profile> Test
-Edit advanced config? y) Yes n) No (default) y/n> n
-Configuration complete. Options: - type: oracleobjectstorage - namespace: idbamagbg734 - compartment: ocid1.compartment.oc1..aaaaaaaapufkxc7ame3sthry5i7ujrwfc7ejnthhu6bhanm5oqfjpyasjkba - region: us-ashburn-1 - provider: user_principal_auth - config_file: /etc/oci/dev.conf - config_profile: Test Keep this "remote" remote? y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y
-
-See all buckets
-
- rclone lsd remote:
-
-Create a new bucket
-
- rclone mkdir remote:bucket
-
-List the contents of a bucket
-
- rclone ls remote:bucket
- rclone ls remote:bucket --max-depth 1
-
-## Authentication Providers
-
-OCI has various authentication methods. To learn more about authentication methods please refer [oci authentication
-methods](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm)
-These choices can be specified in the rclone config file.
-
-Rclone supports the following OCI authentication provider.
-
- User Principal
- Instance Principal
- Resource Principal
- No authentication
-
-### User Principal
-
-Sample rclone config file for Authentication Provider User Principal:
-
- [oos]
- type = oracleobjectstorage
- namespace = id<redacted>34
- compartment = ocid1.compartment.oc1..aa<redacted>ba
- region = us-ashburn-1
- provider = user_principal_auth
- config_file = /home/opc/.oci/config
- config_profile = Default
-
-Advantages:
-- One can use this method from any server within OCI or on-premises or from other cloud provider.
-
-Considerations:
-- you need to configure user’s privileges / policy to allow access to object storage
-- Overhead of managing users and keys.
-- If the user is deleted, the config file will no longer work and may cause automation regressions that use the user's credentials.
-
-### Instance Principal
-
-An OCI compute instance can be authorized to use rclone by using it's identity and certificates as an instance principal.
-With this approach no credentials have to be stored and managed.
-
-Sample rclone configuration file for Authentication Provider Instance Principal:
-
- [opc@rclone ~]$ cat ~/.config/rclone/rclone.conf
- [oos]
- type = oracleobjectstorage
- namespace = id<redacted>fn
- compartment = ocid1.compartment.oc1..aa<redacted>k7a
- region = us-ashburn-1
- provider = instance_principal_auth
-
-Advantages:
-
-- With instance principals, you don't need to configure user credentials and transfer/ save it to disk in your compute
- instances or rotate the credentials.
-- You don’t need to deal with users and keys.
-- Greatly helps in automation as you don't have to manage access keys, user private keys, storing them in vault,
- using kms etc.
-
-Considerations:
-
-- You need to configure a dynamic group having this instance as member and add policy to read object storage to that
- dynamic group.
-- Everyone who has access to this machine can execute the CLI commands.
-- It is applicable for oci compute instances only. It cannot be used on external instance or resources.
-
-### Resource Principal
-
-Resource principal auth is very similar to instance principal auth but used for resources that are not
-compute instances such as [serverless functions](https://docs.oracle.com/en-us/iaas/Content/Functions/Concepts/functionsoverview.htm).
-To use resource principal ensure Rclone process is started with these environment variables set in its process.
-
- export OCI_RESOURCE_PRINCIPAL_VERSION=2.2
- export OCI_RESOURCE_PRINCIPAL_REGION=us-ashburn-1
- export OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM=/usr/share/model-server/key.pem
- export OCI_RESOURCE_PRINCIPAL_RPST=/usr/share/model-server/security_token
-
-Sample rclone configuration file for Authentication Provider Resource Principal:
-
- [oos]
- type = oracleobjectstorage
- namespace = id<redacted>34
- compartment = ocid1.compartment.oc1..aa<redacted>ba
- region = us-ashburn-1
- provider = resource_principal_auth
-
-### No authentication
-
-Public buckets do not require any authentication mechanism to read objects.
-Sample rclone configuration file for No authentication:
-
- [oos]
- type = oracleobjectstorage
- namespace = id<redacted>34
- compartment = ocid1.compartment.oc1..aa<redacted>ba
- region = us-ashburn-1
- provider = no_auth
-
-### 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.
-
-The MD5 hash algorithm is supported.
-
-### Multipart uploads
-
-rclone supports multipart uploads with OOS which means that it can
-upload files bigger than 5 GiB.
-
-Note that files uploaded *both* with multipart upload *and* through
-crypt remotes do not have MD5 sums.
-
-rclone switches from single part uploads to multipart uploads at the
-point specified by `--oos-upload-cutoff`. This can be a maximum of 5 GiB
-and a minimum of 0 (ie always upload multipart files).
-
-The chunk sizes used in the multipart upload are specified by
-`--oos-chunk-size` and the number of chunks uploaded concurrently is
-specified by `--oos-upload-concurrency`.
-
-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
-
-Here are the Standard options specific to oracleobjectstorage (Oracle Cloud Infrastructure Object Storage).
-
-#### --oos-provider
-
-Choose your Auth Provider
-
-Properties:
-
-- Config: provider
-- Env Var: RCLONE_OOS_PROVIDER
-- Type: string
-- Default: "env_auth"
-- Examples:
- - "env_auth"
- - automatically pickup the credentials from runtime(env), first one to provide auth wins
- - "user_principal_auth"
- - use an OCI user and an API key for authentication.
- - you’ll need to put in a config file your tenancy OCID, user OCID, region, the path, fingerprint to an API key.
- - https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
- - "instance_principal_auth"
- - use instance principals to authorize an instance to make API calls.
- - each instance has its own identity, and authenticates using the certificates that are read from instance metadata.
- - https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
- - "resource_principal_auth"
- - use resource principals to make API calls
- - "no_auth"
- - no credentials needed, this is typically for reading public buckets
-
-#### --oos-namespace
-
-Object storage namespace
-
-Properties:
-
-- Config: namespace
-- Env Var: RCLONE_OOS_NAMESPACE
-- Type: string
-- Required: true
-
-#### --oos-compartment
-
-Object storage compartment OCID
-
-Properties:
-
-- Config: compartment
-- Env Var: RCLONE_OOS_COMPARTMENT
-- Provider: !no_auth
-- Type: string
-- Required: true
-
-#### --oos-region
-
-Object storage Region
-
-Properties:
-
-- Config: region
-- Env Var: RCLONE_OOS_REGION
-- Type: string
-- Required: true
-
-#### --oos-endpoint
-
-Endpoint for Object storage API.
-
-Leave blank to use the default endpoint for the region.
-
-Properties:
-
-- Config: endpoint
-- Env Var: RCLONE_OOS_ENDPOINT
-- Type: string
-- Required: false
-
-#### --oos-config-file
-
-Path to OCI config file
-
-Properties:
-
-- Config: config_file
-- Env Var: RCLONE_OOS_CONFIG_FILE
-- Provider: user_principal_auth
-- Type: string
-- Default: "~/.oci/config"
-- Examples:
- - "~/.oci/config"
- - oci configuration file location
-
-#### --oos-config-profile
-
-Profile name inside the oci config file
-
-Properties:
-
-- Config: config_profile
-- Env Var: RCLONE_OOS_CONFIG_PROFILE
-- Provider: user_principal_auth
-- Type: string
-- Default: "Default"
-- Examples:
- - "Default"
- - Use the default profile
-
-### 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
-
-Properties:
-
-- Config: storage_tier
-- Env Var: RCLONE_OOS_STORAGE_TIER
-- Type: string
-- Default: "Standard"
-- Examples:
- - "Standard"
- - Standard storage tier, this is the default tier
- - "InfrequentAccess"
- - InfrequentAccess storage tier
- - "Archive"
- - Archive storage tier
-
-#### --oos-upload-cutoff
-
-Cutoff for switching to chunked upload.
-
-Any files larger than this will be uploaded in chunks of chunk_size.
-The minimum is 0 and the maximum is 5 GiB.
-
-Properties:
-
-- Config: upload_cutoff
-- Env Var: RCLONE_OOS_UPLOAD_CUTOFF
-- Type: SizeSuffix
-- Default: 200Mi
-
-#### --oos-chunk-size
-
-Chunk size to use for uploading.
-
-When uploading files larger than upload_cutoff or files with unknown
-size (e.g. from "rclone rcat" or uploaded with "rclone mount" they will be uploaded
-as multipart uploads using this chunk size.
-
-Note that "upload_concurrency" chunks of this size are buffered
-in memory per transfer.
-
-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.
-
-Files of unknown size are uploaded with the configured
-chunk_size. Since the default chunk size is 5 MiB and there can be at
-most 10,000 chunks, this means that by default the maximum size of
-a file you can stream upload is 48 GiB. If you wish to stream upload
-larger files then you will need to increase chunk_size.
-
-Increasing the chunk size decreases the accuracy of the progress
-statistics displayed with "-P" flag.
-
-
-Properties:
-
-- Config: chunk_size
-- Env Var: RCLONE_OOS_CHUNK_SIZE
-- Type: SizeSuffix
-- Default: 5Mi
-
-#### --oos-max-upload-parts
-
-Maximum number of parts in a multipart upload.
-
-This option defines the maximum number of multipart chunks to use
-when doing a multipart upload.
-
-OCI has max parts limit of 10,000 chunks.
-
-Rclone will automatically increase the chunk size when uploading a
-large file of a known size to stay below this number of chunks limit.
-
-
-Properties:
-
-- Config: max_upload_parts
-- Env Var: RCLONE_OOS_MAX_UPLOAD_PARTS
-- Type: int
-- Default: 10000
-
-#### --oos-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.
-
-Properties:
-
-- Config: upload_concurrency
-- Env Var: RCLONE_OOS_UPLOAD_CONCURRENCY
-- Type: int
-- Default: 10
-
-#### --oos-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 5 GiB.
-
-Properties:
-
-- Config: copy_cutoff
-- Env Var: RCLONE_OOS_COPY_CUTOFF
-- Type: SizeSuffix
-- Default: 4.656Gi
-
-#### --oos-copy-timeout
-
-Timeout for copy.
-
-Copy is an asynchronous operation, specify timeout to wait for copy to succeed
-
-
-Properties:
-
-- Config: copy_timeout
-- Env Var: RCLONE_OOS_COPY_TIMEOUT
-- Type: Duration
-- Default: 1m0s
-
-#### --oos-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_OOS_DISABLE_CHECKSUM
-- Type: bool
-- Default: false
-
-#### --oos-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_OOS_ENCODING
-- Type: Encoding
-- Default: Slash,InvalidUtf8,Dot
-
-#### --oos-leave-parts-on-error
-
-If true avoid calling abort upload on a failure, leaving all successfully uploaded parts for manual recovery.
-
-It should be set to true for resuming uploads across different sessions.
-
-WARNING: Storing parts of an incomplete multipart upload counts towards space usage on object storage and will add
-additional costs if not cleaned up.
-
-
-Properties:
-
-- Config: leave_parts_on_error
-- Env Var: RCLONE_OOS_LEAVE_PARTS_ON_ERROR
-- Type: bool
-- Default: false
-
-#### --oos-attempt-resume-upload
-
-If true attempt to resume previously started multipart upload for the object.
-This will be helpful to speed up multipart transfers by resuming uploads from past session.
-
-WARNING: If chunk size differs in resumed session from past incomplete session, then the resumed multipart upload is
-aborted and a new multipart upload is started with the new chunk size.
-
-The flag leave_parts_on_error must be true to resume and optimize to skip parts that were already uploaded successfully.
-
-
-Properties:
-
-- Config: attempt_resume_upload
-- Env Var: RCLONE_OOS_ATTEMPT_RESUME_UPLOAD
-- Type: bool
-- Default: false
-
-#### --oos-no-check-bucket
-
-If set, don't attempt to check the bucket exists or create it.
-
-This can be useful when trying to minimise the number of transactions
-rclone does if you know the bucket exists already.
-
-It can also be needed if the user you are using does not have bucket
-creation permissions.
-
-
-Properties:
-
-- Config: no_check_bucket
-- Env Var: RCLONE_OOS_NO_CHECK_BUCKET
-- Type: bool
-- Default: false
-
-#### --oos-sse-customer-key-file
-
-To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated
-with the object. Please note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id is needed.'
-
-Properties:
-
-- Config: sse_customer_key_file
-- Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY_FILE
-- Type: string
-- Required: false
-- Examples:
- - ""
- - None
-
-#### --oos-sse-customer-key
-
-To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to
-encrypt or decrypt the data. Please note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id is
-needed. For more information, see Using Your Own Keys for Server-Side Encryption
-(https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm)
-
-Properties:
-
-- Config: sse_customer_key
-- Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY
-- Type: string
-- Required: false
-- Examples:
- - ""
- - None
-
-#### --oos-sse-customer-key-sha256
-
-If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption
-key. This value is used to check the integrity of the encryption key. see Using Your Own Keys for
-Server-Side Encryption (https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm).
-
-Properties:
-
-- Config: sse_customer_key_sha256
-- Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY_SHA256
-- Type: string
-- Required: false
-- Examples:
- - ""
- - None
-
-#### --oos-sse-kms-key-id
-
-if using your own master key in vault, this header specifies the
-OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a master encryption key used to call
-the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
-Please note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id is needed.
-
-Properties:
-
-- Config: sse_kms_key_id
-- Env Var: RCLONE_OOS_SSE_KMS_KEY_ID
-- Type: string
-- Required: false
-- Examples:
- - ""
- - None
-
-#### --oos-sse-customer-algorithm
-
-If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm.
-Object Storage supports "AES256" as the encryption algorithm. For more information, see
-Using Your Own Keys for Server-Side Encryption (https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm).
-
-Properties:
-
-- Config: sse_customer_algorithm
-- Env Var: RCLONE_OOS_SSE_CUSTOMER_ALGORITHM
-- Type: string
-- Required: false
-- Examples:
- - ""
- - None
- - "AES256"
- - AES256
-
-## Backend commands
-
-Here are the commands specific to the oracleobjectstorage 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).
-
-### rename
-
-change the name of an object
-
- rclone backend rename remote: [options] [<arguments>+]
-
-This command can be used to rename a object.
-
-Usage Examples:
-
- rclone backend rename oos:bucket relative-object-path-under-bucket object-new-name
-
-
-### list-multipart-uploads
-
-List the unfinished multipart uploads
-
- rclone backend list-multipart-uploads remote: [options] [<arguments>+]
-
-This command lists the unfinished multipart uploads in JSON format.
-
- rclone backend list-multipart-uploads oos:bucket/path/to/object
-
-It returns a dictionary of buckets with values as lists of unfinished
-multipart uploads.
-
-You can call it with no bucket in which case it lists all bucket, with
-a bucket or with a bucket and path.
-
- {
- "test-bucket": [
- {
- "namespace": "test-namespace",
- "bucket": "test-bucket",
- "object": "600m.bin",
- "uploadId": "51dd8114-52a4-b2f2-c42f-5291f05eb3c8",
- "timeCreated": "2022-07-29T06:21:16.595Z",
- "storageTier": "Standard"
- }
- ]
-
-
-### 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.
-
-Note that you can use --interactive/-i or --dry-run with this command to see what
-it would do.
-
- rclone backend cleanup oos:bucket/path/to/object
- rclone backend cleanup -o max-age=7w oos:bucket/path/to/object
-
-Durations are parsed as per the rest of rclone, 2h, 7d, 7w etc.
-
-
+rclone config
+
+- Type
n
to create a new remote.
+
+n) New remote
+d) Delete remote
+q) Quit config
+e/n/d/q> n
+
+- For this example, enter
ns1
when you reach the name> prompt.
+
+name> ns1
+
+- Enter
netstorage
as the 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
+XX / NetStorage
+ \ "netstorage"
+Storage> netstorage
+
+- Select between the HTTP or HTTPS protocol. Most users should choose HTTPS, which is the default. HTTP is provided primarily for debugging purposes.
+
+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
+
+- Specify your NetStorage host, CP code, and any necessary content paths using this format:
<domain>/<cpcode>/<content>/
+
+Enter a string value. Press Enter for the default ("").
+host> baseball-nsu.akamaihd.net/123456/content/
+
+- Set the netstorage account name
+
+Enter a string value. Press Enter for the default ("").
+account> username
+
+- 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.
+
+y) Yes type in my own password
+g) Generate random password
+y/g> y
+Enter the password:
+password:
+Confirm the password:
+password:
+
+- View the summary and confirm your remote configuration.
+
+[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
+This remote is called ns1
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'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 --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.
+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.
+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.
+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:
+
+- Explicit Directory. This is an actual, physical directory that you have created in a storage group.
+- 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.
+
+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.
+--fast-list
/ ListR support
+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.
+
+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.
+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.
+
+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.
+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.
+Purge
+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.
+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.
+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 <domain>/<internal folders>
+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 'y' option to set your own password then enter your secret.
+NB Input to this must be obscured - see 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: "https"
+- Examples:
+
+
+--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 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.
+du
+Return disk usage information for a specified directory
+rclone backend du remote: [options] [<arguments>+]
+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] [<arguments>+]
+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 <src> <path>
+Microsoft Azure Blob Storage
+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
+Here is an example of making a Microsoft Azure Blob 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 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
+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 /home/local/directory
to the remote container, deleting any excess files in the container.
+rclone sync --interactive /home/local/directory remote:container
+--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.
+Modification times and hashes
+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.
+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.
+
+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.
+Restricted filename characters
+In addition to the default restricted characters set the following characters are also replaced:
+
+
+
+
+
+
+/ |
+0x2F |
+/ |
+
+
+\ |
+0x5C |
+\ |
+
+
+
+File names can also not end with the following characters. These only get replaced if they are the last character in the name:
+
+
+
+
+
+
+. |
+0x2E |
+. |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+Authentication
+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 env_auth
config parameter is true
then rclone will pull credentials from the environment or runtime.
+It tries these authentication methods in this order:
+
+- Environment Variables
+- Managed Service Identity Credentials
+- 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:
+
+- 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
+
+- 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.
+
+- 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
+
+- 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.
+
+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 :azureblob,env_auth,account=ACCOUNT:CONTAINER
+Or
+rclone lsf --azureblob-env-auth --azureblob-account=ACCOUNT :azureblob:CONTAINER
+Which is analogous to using the az
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 account
and key
lines and leave the rest blank.
+SAS URL
+This can be an account level SAS URL or container level SAS URL.
+To use it leave account
and key
blank and fill in sas_url
.
+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 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/
+Note that you can't see or access any other containers - this will fail
+rclone ls azureblob:othercontainer
+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.
+
+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 azureblob (Microsoft Azure Blob Storage).
+--azureblob-account
+Azure Storage Account Name.
+Set this to the Azure Storage Account Name in use.
+Leave blank to use SAS URL or Emulator, 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_AZUREBLOB_ACCOUNT
+- Type: string
+- Required: false
+
+--azureblob-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_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.
+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 "<name>" \
+ --role "Storage Blob Data Owner" \
+ --scopes "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>/blobServices/default/containers/<container>" \
+ > 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
+
+
+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)://<host>:<port>/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
+
+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:
+
+
+
+
+
+
+" |
+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:
+
+
+
+
+
+
+. |
+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:
+
+- Environment Variables
+- Managed Service Identity Credentials
+- 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:
+
+- 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
+
+- 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.
+
+- 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
+
+- 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.
+
+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 "<name>" \
+ --role "Storage Files Data Owner" \
+ --scopes "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>/blobServices/default/containers/<container>" \
+ > 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
+
+
+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:
+
+- Open https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade and then click
New registration
.
+- 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.
+- 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).
+- Under
manage
select API permissions
, click Add a permission
and select Microsoft Graph
then select delegated permissions
.
+- 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.
+
+- Make sure to create the App with your business account.
+- 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.
+- Find the tenant ID of your organization.
+- In the rclone config, set
auth_url
to https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/authorize
.
+- 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:
+
+
+
+
+
+
+" |
+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:
+
+
+
+
+
+
+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:
+
+
+
+
+
+
+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"
+
+- "sha1"
+
+- "sha256"
+
+- "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
+
+
+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"
+
+- "write"
+
+- "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
+
+
+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:
+[
+ {
+ "id": "1234567890ABC!123",
+ "grantedTo": {
+ "user": {
+ "id": "ryan@contoso.com"
+ },
+ "application": {},
+ "device": {}
+ },
+ "invitation": {
+ "email": "ryan@contoso.com"
+ },
+ "link": {
+ "webUrl": "https://1drv.ms/t/s!1234567890ABC"
+ },
+ "roles": [
+ "read"
+ ],
+ "shareId": "s!1234567890ABC"
+ }
+]
+Example for OneDrive Business:
+[
+ {
+ "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
+ "grantedToIdentities": [
+ {
+ "user": {
+ "displayName": "ryan@contoso.com"
+ },
+ "application": {},
+ "device": {}
+ }
+ ],
+ "link": {
+ "type": "view",
+ "scope": "users",
+ "webUrl": "https://contoso.sharepoint.com/:w:/t/design/a577ghg9hgh737613bmbjf839026561fmzhsr85ng9f3hjck2t5s"
+ },
+ "roles": [
+ "read"
+ ],
+ "shareId": "u!LKj1lkdlals90j1nlkascl"
+ },
+ {
+ "id": "5D33DD65C6932946",
+ "grantedTo": {
+ "user": {
+ "displayName": "John Doe",
+ "id": "efee1b77-fb3b-4f65-99d6-274c11914d12"
+ },
+ "application": {},
+ "device": {}
+ },
+ "roles": [
+ "owner"
+ ],
+ "shareId": "FWxc1lasfdbEAGM5fI7B67aB5ZMPDMmQ11U"
+ }
+]
+To write permissions, pass in a "permissions" metadata key using this same format. The --metadata-mapper
tool can 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
. 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 with --metadata-mapper
:
+{
+ "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.
+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.) 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 --onedrive-metadata-permissions
.
+Metadata and permissions are supported for Folders (directories) as well as Files. Note that setting the mtime
or btime
on a Folder requires one extra API call on OneDrive Business only.
+OneDrive does not currently support User Metadata. When writing metadata, only writeable system properties will be written -- any read-only or unrecognized keys passed in will be ignored.
+TIP: to see the metadata and permissions for any file or folder, run:
+rclone lsjson remote:path --stat -M --onedrive-metadata-permissions read
+Here are the possible system metadata items for the onedrive backend.
+
+
+
+
+
+
+
+
+
+
+
+
+
+btime |
+Time of file birth (creation) with S accuracy (mS for OneDrive Personal). |
+RFC 3339 |
+2006-01-02T15:04:05Z |
+N |
+
+
+content-type |
+The MIME type of the file. |
+string |
+text/plain |
+Y |
+
+
+created-by-display-name |
+Display name of the user that created the item. |
+string |
+John Doe |
+Y |
+
+
+created-by-id |
+ID of the user that created the item. |
+string |
+48d31887-5fad-4d73-a9f5-3c356e68a038 |
+Y |
+
+
+description |
+A short description of the file. Max 1024 characters. Only supported for OneDrive Personal. |
+string |
+Contract for signing |
+N |
+
+
+id |
+The unique identifier of the item within OneDrive. |
+string |
+01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K |
+Y |
+
+
+last-modified-by-display-name |
+Display name of the user that last modified the item. |
+string |
+John Doe |
+Y |
+
+
+last-modified-by-id |
+ID of the user that last modified the item. |
+string |
+48d31887-5fad-4d73-a9f5-3c356e68a038 |
+Y |
+
+
+malware-detected |
+Whether OneDrive has detected that the item contains malware. |
+boolean |
+true |
+Y |
+
+
+mtime |
+Time of last modification with S accuracy (mS for OneDrive Personal). |
+RFC 3339 |
+2006-01-02T15:04:05Z |
+N |
+
+
+package-type |
+If present, indicates that this item is a package instead of a folder or file. Packages are treated like files in some contexts and folders in others. |
+string |
+oneNote |
+Y |
+
+
+permissions |
+Permissions in a JSON dump of OneDrive format. Enable with --onedrive-metadata-permissions. Properties: id, grantedTo, grantedToIdentities, invitation, inheritedFrom, link, roles, shareId |
+JSON |
+{} |
+N |
+
+
+shared-by-id |
+ID of the user that shared the item (if shared). |
+string |
+48d31887-5fad-4d73-a9f5-3c356e68a038 |
+Y |
+
+
+shared-owner-id |
+ID of the owner of the shared item (if shared). |
+string |
+48d31887-5fad-4d73-a9f5-3c356e68a038 |
+Y |
+
+
+shared-scope |
+If shared, indicates the scope of how the item is shared: anonymous, organization, or users. |
+string |
+users |
+Y |
+
+
+shared-time |
+Time when the item was shared, with S accuracy (mS for OneDrive Personal). |
+RFC 3339 |
+2006-01-02T15:04:05Z |
+Y |
+
+
+utime |
+Time of upload with S accuracy (mS for OneDrive Personal). |
+RFC 3339 |
+2006-01-02T15:04:05Z |
+Y |
+
+
+
+See the metadata docs for more info.
+Limitations
+If you don't use rclone for 90 days the refresh token will expire. This will result in authorization problems. This is easy to fix by running the rclone config reconnect remote:
command to get a new token and refresh token.
+Naming
+Note that OneDrive 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 OneDrive 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.
+File sizes
+The largest allowed file size is 250 GiB for both OneDrive Personal and OneDrive for Business (Updated 13 Jan 2021).
+Path length
+The entire path, including the file name, must contain fewer than 400 characters for OneDrive, OneDrive for Business and SharePoint Online. If you are encrypting file and folder names with rclone, you may want to pay attention to this limitation because the encrypted names are typically longer than the original ones.
+Number of files
+OneDrive seems to be OK with at least 50,000 files in a folder, but at 100,000 rclone will get errors listing the directory like couldn’t list files: UnknownError:
. See #2707 for more info.
+An official document about the limitations for different types of OneDrive can be found here.
+Versions
+Every change in a file OneDrive causes the service to create a new version of the file. This counts against a users quota. For example changing the modification time of a file creates a second version, so the file apparently uses twice the space.
+For example the copy
command is affected by this as rclone copies the file and then afterwards sets the modification time to match the source file which uses another version.
+You can use the rclone cleanup
command (see below) to remove all old versions.
+Or you can set the no_versions
parameter to true
and rclone will remove versions after operations which create new versions. This takes extra transactions so only enable it if you need it.
+Note At the time of writing Onedrive Personal creates versions (but not for setting the modification time) but the API for removing them returns "API not found" so cleanup and no_versions
should not be used on Onedrive Personal.
+Disabling versioning
+Starting October 2018, users will no longer be able to disable versioning by default. This is because Microsoft has brought an update to the mechanism. To change this new default setting, a PowerShell command is required to be run by a SharePoint admin. If you are an admin, you can run these commands in PowerShell to change that setting:
+
+Install-Module -Name Microsoft.Online.SharePoint.PowerShell
(in case you haven't installed this already)
+Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
+Connect-SPOService -Url https://YOURSITE-admin.sharepoint.com -Credential YOU@YOURSITE.COM
(replacing YOURSITE
, YOU
, YOURSITE.COM
with the actual values; this will prompt for your credentials)
+Set-SPOTenant -EnableMinimumVersionRequirement $False
+Disconnect-SPOService
(to disconnect from the server)
+
+Below are the steps for normal users to disable versioning. If you don't see the "No Versioning" option, make sure the above requirements are met.
+User Weropol has found a method to disable versioning on OneDrive
+
+- Open the settings menu by clicking on the gear symbol at the top of the OneDrive Business page.
+- Click Site settings.
+- Once on the Site settings page, navigate to Site Administration > Site libraries and lists.
+- Click Customize "Documents".
+- Click General Settings > Versioning Settings.
+- Under Document Version History select the option No versioning. Note: This will disable the creation of new file versions, but will not remove any previous versions. Your documents are safe.
+- Apply the changes by clicking OK.
+- Use rclone to upload or modify files. (I also use the --no-update-modtime flag)
+- Restore the versioning settings after using rclone. (Optional)
+
+Cleanup
+OneDrive supports rclone cleanup
which causes rclone to look through every file under the path supplied and delete all version but the current version. Because this involves traversing all the files, then querying each file for versions it can be quite slow. Rclone does --checkers
tests in parallel. The command also supports --interactive
/i
or --dry-run
which is a great way to see what it would do.
+rclone cleanup --interactive remote:path/subdir # interactively remove all old version for path/subdir
+rclone cleanup remote:path/subdir # unconditionally remove all old version for path/subdir
+NB Onedrive personal can't currently delete versions
+Troubleshooting
+Excessive throttling or blocked on SharePoint
+If you experience excessive throttling or is being blocked on SharePoint then it may help to set the user agent explicitly with a flag like this: --user-agent "ISV|rclone.org|rclone/v1.55.1"
+The specific details can be found in the Microsoft document: Avoid getting throttled or blocked in SharePoint Online
+Unexpected file size/hash differences on Sharepoint
+It is a known issue that Sharepoint (not OneDrive or OneDrive for Business) silently modifies uploaded files, mainly Office files (.docx, .xlsx, etc.), causing file size and hash checks to fail. There are also other situations that will cause OneDrive to report inconsistent file sizes. To use rclone with such affected files on Sharepoint, you may disable these checks with the following command line arguments:
+--ignore-checksum --ignore-size
+Alternatively, if you have write access to the OneDrive files, it may be possible to fix this problem for certain files, by attempting the steps below. Open the web interface for OneDrive and find the affected files (which will be in the error messages/log for rclone). Simply click on each of these files, causing OneDrive to open them on the web. This will cause each file to be converted in place to a format that is functionally equivalent but which will no longer trigger the size discrepancy. Once all problematic files are converted you will no longer need the ignore options above.
+Replacing/deleting existing files on Sharepoint gets "item not found"
+It is a known issue that Sharepoint (not OneDrive or OneDrive for Business) may return "item not found" errors when users try to replace or delete uploaded files; this seems to mainly affect Office files (.docx, .xlsx, etc.) and web files (.html, .aspx, etc.). As a workaround, you may use the --backup-dir <BACKUP_DIR>
command line argument so rclone moves the files to be replaced/deleted into a given backup directory (instead of directly replacing/deleting them). For example, to instruct rclone to move the files into the directory rclone-backup-dir
on backend mysharepoint
, you may use:
+--backup-dir mysharepoint:rclone-backup-dir
+access_denied (AADSTS65005)
+Error: access_denied
+Code: AADSTS65005
+Description: Using application 'rclone' is currently not supported for your organization [YOUR_ORGANIZATION] because it is in an unmanaged state. An administrator needs to claim ownership of the company by DNS validation of [YOUR_ORGANIZATION] before the application rclone can be provisioned.
+This means that rclone can't use the OneDrive for Business API with your account. You can't do much about it, maybe write an email to your admins.
+However, there are other ways to interact with your OneDrive account. Have a look at the WebDAV backend: https://rclone.org/webdav/#sharepoint
+invalid_grant (AADSTS50076)
+Error: invalid_grant
+Code: AADSTS50076
+Description: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '...'.
+If you see the error above after enabling multi-factor authentication for your account, you can fix it by refreshing your OAuth refresh token. To do that, run rclone config
, and choose to edit your OneDrive backend. Then, you don't need to actually make any changes until you reach this question: Already have a token - refresh?
. For this question, answer y
and go through the process to refresh your token, just like the first time the backend is configured. After this, rclone should work again for this backend.
+Invalid request when making public links
+On Sharepoint and OneDrive for Business, rclone link
may return an "Invalid request" error. A possible cause is that the organisation admin didn't allow public links to be made for the organisation/sharepoint library. To fix the permissions as an admin, take a look at the docs: 1, 2.
+Can not access Shared
with me files
+Shared with me files is not supported by rclone currently, but there is a workaround:
+
+- Visit https://onedrive.live.com
+- Right click a item in
Shared
, then click Add shortcut to My files
in the context 
+- The shortcut will appear in
My files
, you can access it with rclone, it behaves like a normal folder/file.

+
+Live Photos uploaded from iOS (small video clips in .heic files)
+The iOS OneDrive app introduced upload and storage of Live Photos in 2020. The usage and download of these uploaded Live Photos is unfortunately still work-in-progress and this introduces several issues when copying, synchronising and mounting – both in rclone and in the native OneDrive client on Windows.
+The root cause can easily be seen if you locate one of your Live Photos in the OneDrive web interface. Then download the photo from the web interface. You will then see that the size of downloaded .heic file is smaller than the size displayed in the web interface. The downloaded file is smaller because it only contains a single frame (still photo) extracted from the Live Photo (movie) stored in OneDrive.
+The different sizes will cause rclone copy/sync
to repeatedly recopy unmodified photos something like this:
+DEBUG : 20230203_123826234_iOS.heic: Sizes differ (src 4470314 vs dst 1298667)
+DEBUG : 20230203_123826234_iOS.heic: sha1 = fc2edde7863b7a7c93ca6771498ac797f8460750 OK
+INFO : 20230203_123826234_iOS.heic: Copied (replaced existing)
+These recopies can be worked around by adding --ignore-size
. Please note that this workaround only syncs the still-picture not the movie clip, and relies on modification dates being correctly updated on all files in all situations.
+The different sizes will also cause rclone check
to report size errors something like this:
+ERROR : 20230203_123826234_iOS.heic: sizes differ
+These check errors can be suppressed by adding --ignore-size
.
+The different sizes will also cause rclone mount
to fail downloading with an error something like this:
+ERROR : 20230203_123826234_iOS.heic: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
+or like this when using --cache-mode=full
:
+INFO : 20230203_123826234_iOS.heic: vfs cache: downloader: error count now 1: vfs reader: failed to write to cache file: 416 Requested Range Not Satisfiable:
+ERROR : 20230203_123826234_iOS.heic: vfs cache: failed to download: vfs reader: failed to write to cache file: 416 Requested Range Not Satisfiable:
+OpenDrive
+Paths are specified as remote:path
+Paths may be as deep as required, e.g. remote:directory/subdirectory
.
+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:
+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 / OpenDrive
+ \ "opendrive"
+[snip]
+Storage> opendrive
+Username
+username>
+Password
+y) Yes type in my own password
+g) Generate random password
+y/g> y
+Enter the password:
+password:
+Confirm the password:
+password:
+--------------------
+[remote]
+username =
+password = *** ENCRYPTED ***
+--------------------
+y) Yes this is OK
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+List directories in top level of your OpenDrive
+rclone lsd remote:
+List all the files in your OpenDrive
+rclone ls remote:
+To copy a local directory to an OpenDrive directory called backup
+rclone copy /home/source remote:backup
+Modification times and hashes
+OpenDrive allows modification times to be set on objects accurate to 1 second. These will be used to detect whether objects need syncing or not.
+The MD5 hash algorithm is supported.
+Restricted filename characters
+
+
+
+
+
+
+NUL |
+0x00 |
+␀ |
+
+
+/ |
+0x2F |
+/ |
+
+
+" |
+0x22 |
+" |
+
+
+* |
+0x2A |
+* |
+
+
+: |
+0x3A |
+: |
+
+
+< |
+0x3C |
+< |
+
+
+> |
+0x3E |
+> |
+
+
+? |
+0x3F |
+? |
+
+
+\ |
+0x5C |
+\ |
+
+
+| |
+0x7C |
+| |
+
+
+
+File names can also not begin or end with the following characters. These only get replaced if they are the first or last character in the name:
+
+
+
+
+
+
+SP |
+0x20 |
+␠ |
+
+
+HT |
+0x09 |
+␉ |
+
+
+LF |
+0x0A |
+␊ |
+
+
+VT |
+0x0B |
+␋ |
+
+
+CR |
+0x0D |
+␍ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+Standard options
+Here are the Standard options specific to opendrive (OpenDrive).
+--opendrive-username
+Username.
+Properties:
+
+- Config: username
+- Env Var: RCLONE_OPENDRIVE_USERNAME
+- Type: string
+- Required: true
+
+--opendrive-password
+Password.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: password
+- Env Var: RCLONE_OPENDRIVE_PASSWORD
+- Type: string
+- Required: true
+
+Advanced options
+Here are the Advanced options specific to opendrive (OpenDrive).
+--opendrive-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_OPENDRIVE_ENCODING
+- Type: Encoding
+- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot
+
+--opendrive-chunk-size
+Files will be uploaded in chunks this size.
+Note that these chunks are buffered in memory so increasing them will increase memory use.
+Properties:
+
+- Config: chunk_size
+- Env Var: RCLONE_OPENDRIVE_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 10Mi
+
+--opendrive-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_OPENDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
+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.
+See List of backends that do not support rclone about and rclone about
+Oracle Object 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
.
+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
+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
+This will guide you through an interactive setup process:
+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
-- "max-age": Max age of upload to delete
+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.
+[snip]
+XX / Oracle Cloud Infrastructure Object Storage
+ \ (oracleobjectstorage)
+Storage> oracleobjectstorage
+Option provider.
+Choose your Auth Provider
+Choose a number from below, or type in your own string value.
+Press Enter for the default (env_auth).
+ 1 / automatically pickup the credentials from runtime(env), first one to provide auth wins
+ \ (env_auth)
+ / use an OCI user and an API key for authentication.
+ 2 | you’ll need to put in a config file your tenancy OCID, user OCID, region, the path, fingerprint to an API key.
+ | https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
+ \ (user_principal_auth)
+ / use instance principals to authorize an instance to make API calls.
+ 3 | each instance has its own identity, and authenticates using the certificates that are read from instance metadata.
+ | https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
+ \ (instance_principal_auth)
+ / use workload identity to grant Kubernetes pods policy-driven access to Oracle Cloud
+ 4 | Infrastructure (OCI) resources using OCI Identity and Access Management (IAM).
+ | https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contenggrantingworkloadaccesstoresources.htm
+ \ (workload_identity_auth)
+ 5 / use resource principals to make API calls
+ \ (resource_principal_auth)
+ 6 / no credentials needed, this is typically for reading public buckets
+ \ (no_auth)
+provider> 2
-## Tutorials
-### [Mounting Buckets](https://rclone.org/oracleobjectstorage/tutorial_mount/)
+Option namespace.
+Object storage namespace
+Enter a value.
+namespace> idbamagbg734
-# QingStor
+Option compartment.
+Object storage compartment OCID
+Enter a value.
+compartment> ocid1.compartment.oc1..aaaaaaaapufkxc7ame3sthry5i7ujrwfc7ejnthhu6bhanm5oqfjpyasjkba
-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`.
+Option region.
+Object storage Region
+Enter a value.
+region> us-ashburn-1
-## Configuration
+Option endpoint.
+Endpoint for Object storage API.
+Leave blank to use the default endpoint for the region.
+Enter a value. Press Enter to leave empty.
+endpoint>
-Here is an example of making an QingStor configuration. First run
+Option config_file.
+Full Path to OCI config file
+Choose a number from below, or type in your own string value.
+Press Enter for the default (~/.oci/config).
+ 1 / oci configuration file location
+ \ (~/.oci/config)
+config_file> /etc/oci/dev.conf
- rclone config
+Option config_profile.
+Profile name inside OCI config file
+Choose a number from below, or type in your own string value.
+Press Enter for the default (Default).
+ 1 / Use the default profile
+ \ (Default)
+config_profile> Test
-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> remote Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / QingStor Object Storage "qingstor" [snip] Storage> qingstor Get QingStor credentials from runtime. Only applies if access_key_id and secret_access_key is blank. Choose a number from below, or type in your own value 1 / Enter QingStor credentials in the next step "false" 2 / Get QingStor credentials from the environment (env vars or IAM) "true" env_auth> 1 QingStor Access Key ID - leave blank for anonymous access or runtime credentials. access_key_id> access_key QingStor Secret Access Key (password) - leave blank for anonymous access or runtime credentials. secret_access_key> secret_key Enter an endpoint URL to connection QingStor API. Leave blank will use the default value "https://qingstor.com:443" endpoint> Zone connect to. Default is "pek3a". Choose a number from below, or type in your own value / The Beijing (China) Three Zone 1 | Needs location constraint pek3a. "pek3a" / The Shanghai (China) First Zone 2 | Needs location constraint sh1a. "sh1a" zone> 1 Number of connection retry. Leave blank will use the default value "3". connection_retries> Remote config -------------------- [remote] env_auth = false access_key_id = access_key secret_access_key = secret_key endpoint = zone = pek3a connection_retries = -------------------- 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
+Edit advanced config?
+y) Yes
+n) No (default)
+y/n> n
-See all buckets
+Configuration complete.
+Options:
+- type: oracleobjectstorage
+- namespace: idbamagbg734
+- compartment: ocid1.compartment.oc1..aaaaaaaapufkxc7ame3sthry5i7ujrwfc7ejnthhu6bhanm5oqfjpyasjkba
+- region: us-ashburn-1
+- provider: user_principal_auth
+- config_file: /etc/oci/dev.conf
+- config_profile: Test
+Keep this "remote" remote?
+y) Yes this is OK (default)
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+See all buckets
+rclone lsd remote:
+Create a new bucket
+rclone mkdir remote:bucket
+List the contents of a bucket
+rclone ls remote:bucket
+rclone ls remote:bucket --max-depth 1
+Authentication Providers
+OCI has various authentication methods. To learn more about authentication methods please refer oci authentication methods These choices can be specified in the rclone config file.
+Rclone supports the following OCI authentication provider.
+User Principal
+Instance Principal
+Resource Principal
+Workload Identity
+No authentication
+User Principal
+Sample rclone config file for Authentication Provider User Principal:
+[oos]
+type = oracleobjectstorage
+namespace = id<redacted>34
+compartment = ocid1.compartment.oc1..aa<redacted>ba
+region = us-ashburn-1
+provider = user_principal_auth
+config_file = /home/opc/.oci/config
+config_profile = Default
+Advantages: - One can use this method from any server within OCI or on-premises or from other cloud provider.
+Considerations: - you need to configure user’s privileges / policy to allow access to object storage - Overhead of managing users and keys. - If the user is deleted, the config file will no longer work and may cause automation regressions that use the user's credentials.
+Instance Principal
+An OCI compute instance can be authorized to use rclone by using it's identity and certificates as an instance principal. With this approach no credentials have to be stored and managed.
+Sample rclone configuration file for Authentication Provider Instance Principal:
+[opc@rclone ~]$ cat ~/.config/rclone/rclone.conf
+[oos]
+type = oracleobjectstorage
+namespace = id<redacted>fn
+compartment = ocid1.compartment.oc1..aa<redacted>k7a
+region = us-ashburn-1
+provider = instance_principal_auth
+Advantages:
+
+- With instance principals, you don't need to configure user credentials and transfer/ save it to disk in your compute instances or rotate the credentials.
+- You don’t need to deal with users and keys.
+- Greatly helps in automation as you don't have to manage access keys, user private keys, storing them in vault, using kms etc.
+
+Considerations:
+
+- You need to configure a dynamic group having this instance as member and add policy to read object storage to that dynamic group.
+- Everyone who has access to this machine can execute the CLI commands.
+- It is applicable for oci compute instances only. It cannot be used on external instance or resources.
+
+Resource Principal
+Resource principal auth is very similar to instance principal auth but used for resources that are not compute instances such as serverless functions. To use resource principal ensure Rclone process is started with these environment variables set in its process.
+export OCI_RESOURCE_PRINCIPAL_VERSION=2.2
+export OCI_RESOURCE_PRINCIPAL_REGION=us-ashburn-1
+export OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM=/usr/share/model-server/key.pem
+export OCI_RESOURCE_PRINCIPAL_RPST=/usr/share/model-server/security_token
+Sample rclone configuration file for Authentication Provider Resource Principal:
+[oos]
+type = oracleobjectstorage
+namespace = id<redacted>34
+compartment = ocid1.compartment.oc1..aa<redacted>ba
+region = us-ashburn-1
+provider = resource_principal_auth
+Workload Identity
+Workload Identity auth may be used when running Rclone from Kubernetes pod on a Container Engine for Kubernetes (OKE) cluster. For more details on configuring Workload Identity, see Granting Workloads Access to OCI Resources. To use workload identity, ensure Rclone is started with these environment variables set in its process.
+export OCI_RESOURCE_PRINCIPAL_VERSION=2.2
+export OCI_RESOURCE_PRINCIPAL_REGION=us-ashburn-1
+No authentication
+Public buckets do not require any authentication mechanism to read objects. Sample rclone configuration file for No authentication:
+[oos]
+type = oracleobjectstorage
+namespace = id<redacted>34
+compartment = ocid1.compartment.oc1..aa<redacted>ba
+region = us-ashburn-1
+provider = no_auth
+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.
+The MD5 hash algorithm is supported.
+Multipart uploads
+rclone supports multipart uploads with OOS which means that it can upload files bigger than 5 GiB.
+Note that files uploaded both with multipart upload and through crypt remotes do not have MD5 sums.
+rclone switches from single part uploads to multipart uploads at the point specified by --oos-upload-cutoff
. This can be a maximum of 5 GiB and a minimum of 0 (ie always upload multipart files).
+The chunk sizes used in the multipart upload are specified by --oos-chunk-size
and the number of chunks uploaded concurrently is specified by --oos-upload-concurrency
.
+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
+Here are the Standard options specific to oracleobjectstorage (Oracle Cloud Infrastructure Object Storage).
+--oos-provider
+Choose your Auth Provider
+Properties:
+
+- Config: provider
+- Env Var: RCLONE_OOS_PROVIDER
+- Type: string
+- Default: "env_auth"
+- Examples:
+
+- "env_auth"
+
+- automatically pickup the credentials from runtime(env), first one to provide auth wins
+
+- "user_principal_auth"
+
+- use an OCI user and an API key for authentication.
+- you’ll need to put in a config file your tenancy OCID, user OCID, region, the path, fingerprint to an API key.
+- https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
+
+- "instance_principal_auth"
+
+- use instance principals to authorize an instance to make API calls.
+- each instance has its own identity, and authenticates using the certificates that are read from instance metadata.
+- https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
+
+- "workload_identity_auth"
+
+- use workload identity to grant OCI Container Engine for Kubernetes workloads policy-driven access to OCI resources using OCI Identity and Access Management (IAM).
+- https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contenggrantingworkloadaccesstoresources.htm
+
+- "resource_principal_auth"
+
+- use resource principals to make API calls
+
+- "no_auth"
+
+- no credentials needed, this is typically for reading public buckets
+
+
+
+--oos-namespace
+Object storage namespace
+Properties:
+
+- Config: namespace
+- Env Var: RCLONE_OOS_NAMESPACE
+- Type: string
+- Required: true
+
+--oos-compartment
+Object storage compartment OCID
+Properties:
+
+- Config: compartment
+- Env Var: RCLONE_OOS_COMPARTMENT
+- Provider: !no_auth
+- Type: string
+- Required: true
+
+--oos-region
+Object storage Region
+Properties:
+
+- Config: region
+- Env Var: RCLONE_OOS_REGION
+- Type: string
+- Required: true
+
+--oos-endpoint
+Endpoint for Object storage API.
+Leave blank to use the default endpoint for the region.
+Properties:
+
+- Config: endpoint
+- Env Var: RCLONE_OOS_ENDPOINT
+- Type: string
+- Required: false
+
+--oos-config-file
+Path to OCI config file
+Properties:
+
+- Config: config_file
+- Env Var: RCLONE_OOS_CONFIG_FILE
+- Provider: user_principal_auth
+- Type: string
+- Default: "~/.oci/config"
+- Examples:
+
+- "~/.oci/config"
+
+- oci configuration file location
+
+
+
+--oos-config-profile
+Profile name inside the oci config file
+Properties:
+
+- Config: config_profile
+- Env Var: RCLONE_OOS_CONFIG_PROFILE
+- Provider: user_principal_auth
+- Type: string
+- Default: "Default"
+- Examples:
+
+- "Default"
+
+- Use the default profile
+
+
+
+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
+Properties:
+
+- Config: storage_tier
+- Env Var: RCLONE_OOS_STORAGE_TIER
+- Type: string
+- Default: "Standard"
+- Examples:
+
+- "Standard"
+
+- Standard storage tier, this is the default tier
+
+- "InfrequentAccess"
+
+- InfrequentAccess storage tier
+
+- "Archive"
+
+
+
+--oos-upload-cutoff
+Cutoff for switching to chunked upload.
+Any files larger than this will be uploaded in chunks of chunk_size. The minimum is 0 and the maximum is 5 GiB.
+Properties:
+
+- Config: upload_cutoff
+- Env Var: RCLONE_OOS_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 200Mi
+
+--oos-chunk-size
+Chunk size to use for uploading.
+When uploading files larger than upload_cutoff or files with unknown size (e.g. from "rclone rcat" or uploaded with "rclone mount" they will be uploaded as multipart uploads using this chunk size.
+Note that "upload_concurrency" chunks of this size are buffered in memory per transfer.
+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.
+Files of unknown size are uploaded with the configured chunk_size. Since the default chunk size is 5 MiB and there can be at most 10,000 chunks, this means that by default the maximum size of a file you can stream upload is 48 GiB. If you wish to stream upload larger files then you will need to increase chunk_size.
+Increasing the chunk size decreases the accuracy of the progress statistics displayed with "-P" flag.
+Properties:
+
+- Config: chunk_size
+- Env Var: RCLONE_OOS_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 5Mi
+
+--oos-max-upload-parts
+Maximum number of parts in a multipart upload.
+This option defines the maximum number of multipart chunks to use when doing a multipart upload.
+OCI has max parts limit of 10,000 chunks.
+Rclone will automatically increase the chunk size when uploading a large file of a known size to stay below this number of chunks limit.
+Properties:
+
+- Config: max_upload_parts
+- Env Var: RCLONE_OOS_MAX_UPLOAD_PARTS
+- Type: int
+- Default: 10000
+
+--oos-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.
+Properties:
+
+- Config: upload_concurrency
+- Env Var: RCLONE_OOS_UPLOAD_CONCURRENCY
+- Type: int
+- Default: 10
+
+--oos-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 5 GiB.
+Properties:
+
+- Config: copy_cutoff
+- Env Var: RCLONE_OOS_COPY_CUTOFF
+- Type: SizeSuffix
+- Default: 4.656Gi
+
+--oos-copy-timeout
+Timeout for copy.
+Copy is an asynchronous operation, specify timeout to wait for copy to succeed
+Properties:
+
+- Config: copy_timeout
+- Env Var: RCLONE_OOS_COPY_TIMEOUT
+- Type: Duration
+- Default: 1m0s
+
+--oos-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_OOS_DISABLE_CHECKSUM
+- Type: bool
+- Default: false
+
+--oos-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_OOS_ENCODING
+- Type: Encoding
+- Default: Slash,InvalidUtf8,Dot
+
+--oos-leave-parts-on-error
+If true avoid calling abort upload on a failure, leaving all successfully uploaded parts for manual recovery.
+It should be set to true for resuming uploads across different sessions.
+WARNING: Storing parts of an incomplete multipart upload counts towards space usage on object storage and will add additional costs if not cleaned up.
+Properties:
+
+- Config: leave_parts_on_error
+- Env Var: RCLONE_OOS_LEAVE_PARTS_ON_ERROR
+- Type: bool
+- Default: false
+
+--oos-attempt-resume-upload
+If true attempt to resume previously started multipart upload for the object. This will be helpful to speed up multipart transfers by resuming uploads from past session.
+WARNING: If chunk size differs in resumed session from past incomplete session, then the resumed multipart upload is aborted and a new multipart upload is started with the new chunk size.
+The flag leave_parts_on_error must be true to resume and optimize to skip parts that were already uploaded successfully.
+Properties:
+
+- Config: attempt_resume_upload
+- Env Var: RCLONE_OOS_ATTEMPT_RESUME_UPLOAD
+- Type: bool
+- Default: false
+
+--oos-no-check-bucket
+If set, don't attempt to check the bucket exists or create it.
+This can be useful when trying to minimise the number of transactions rclone does if you know the bucket exists already.
+It can also be needed if the user you are using does not have bucket creation permissions.
+Properties:
+
+- Config: no_check_bucket
+- Env Var: RCLONE_OOS_NO_CHECK_BUCKET
+- Type: bool
+- Default: false
+
+--oos-sse-customer-key-file
+To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated with the object. Please note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id is needed.'
+Properties:
+
+- Config: sse_customer_key_file
+- Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY_FILE
+- Type: string
+- Required: false
+- Examples:
+
+
+--oos-sse-customer-key
+To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to encrypt or decrypt the data. Please note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id is needed. For more information, see Using Your Own Keys for Server-Side Encryption (https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm)
+Properties:
+
+- Config: sse_customer_key
+- Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY
+- Type: string
+- Required: false
+- Examples:
+
+
+--oos-sse-customer-key-sha256
+If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption key. This value is used to check the integrity of the encryption key. see Using Your Own Keys for Server-Side Encryption (https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm).
+Properties:
+
+- Config: sse_customer_key_sha256
+- Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY_SHA256
+- Type: string
+- Required: false
+- Examples:
+
+
+--oos-sse-kms-key-id
+if using your own master key in vault, this header specifies the OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key. Please note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id is needed.
+Properties:
+
+- Config: sse_kms_key_id
+- Env Var: RCLONE_OOS_SSE_KMS_KEY_ID
+- Type: string
+- Required: false
+- Examples:
+
+
+--oos-sse-customer-algorithm
+If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm. Object Storage supports "AES256" as the encryption algorithm. For more information, see Using Your Own Keys for Server-Side Encryption (https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm).
+Properties:
+
+- Config: sse_customer_algorithm
+- Env Var: RCLONE_OOS_SSE_CUSTOMER_ALGORITHM
+- Type: string
+- Required: false
+- Examples:
+
+
+--oos-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_OOS_DESCRIPTION
+- Type: string
+- Required: false
+
+Backend commands
+Here are the commands specific to the oracleobjectstorage 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.
+rename
+change the name of an object
+rclone backend rename remote: [options] [<arguments>+]
+This command can be used to rename a object.
+Usage Examples:
+rclone backend rename oos:bucket relative-object-path-under-bucket object-new-name
+list-multipart-uploads
+List the unfinished multipart uploads
+rclone backend list-multipart-uploads remote: [options] [<arguments>+]
+This command lists the unfinished multipart uploads in JSON format.
+rclone backend list-multipart-uploads oos:bucket/path/to/object
+It returns a dictionary of buckets with values as lists of unfinished multipart uploads.
+You can call it with no bucket in which case it lists all bucket, with a bucket or with a bucket and path.
+{
+ "test-bucket": [
+ {
+ "namespace": "test-namespace",
+ "bucket": "test-bucket",
+ "object": "600m.bin",
+ "uploadId": "51dd8114-52a4-b2f2-c42f-5291f05eb3c8",
+ "timeCreated": "2022-07-29T06:21:16.595Z",
+ "storageTier": "Standard"
+ }
+ ]
+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.
+Note that you can use --interactive/-i or --dry-run with this command to see what it would do.
+rclone backend cleanup oos:bucket/path/to/object
+rclone backend cleanup -o max-age=7w oos: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
+
+restore
+Restore objects from Archive to Standard storage
+rclone backend restore remote: [options] [<arguments>+]
+This command can be used to restore one or more objects from Archive to Standard storage.
+Usage Examples:
- rclone lsd remote:
+rclone backend restore oos:bucket/path/to/directory -o hours=HOURS
+rclone backend restore oos:bucket -o hours=HOURS
+This flag also obeys the filters. Test first with --interactive/-i or --dry-run flags
+rclone --interactive backend restore --include "*.txt" oos:bucket/path -o hours=72
+All the objects shown will be marked for restore, then
+rclone backend restore --include "*.txt" oos:bucket/path -o hours=72
-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
-
-### --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.
-
-### 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.
-
-Note that incomplete multipart uploads older than 24 hours can be
-removed with `rclone cleanup remote:bucket` just for one bucket
-`rclone cleanup remote:` for all buckets. QingStor does not ever
-remove incomplete multipart uploads so it may be necessary to run this
-from time to time.
-
-### Buckets and Zone
-
-With QingStor you can list buckets (`rclone lsd`) using any zone,
-but you can only access the content of a bucket from the zone it was
-created in. If you attempt to access a bucket from the wrong zone,
-you will get an error, `incorrect zone, the bucket is not in 'XXX'
-zone`.
-
-### Authentication
-
-There are two ways to supply `rclone` with a set of QingStor
-credentials. In order of precedence:
-
- - Directly in the rclone configuration file (as configured by `rclone config`)
- - set `access_key_id` and `secret_access_key`
- - Runtime configuration:
- - set `env_auth` to `true` in the config file
- - Exporting the following environment variables before running `rclone`
- - Access Key ID: `QS_ACCESS_KEY_ID` or `QS_ACCESS_KEY`
- - Secret Access Key: `QS_SECRET_ACCESS_KEY` or `QS_SECRET_KEY`
-
-### Restricted filename characters
-
-The control characters 0x00-0x1F and / are replaced as in the [default
-restricted characters set](https://rclone.org/overview/#restricted-characters). Note
-that 0x7F is not replaced.
-
-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 qingstor (QingCloud Object Storage).
-
-#### --qingstor-env-auth
-
-Get QingStor credentials from runtime.
-
-Only applies if access_key_id and secret_access_key is blank.
-
-Properties:
-
-- Config: env_auth
-- Env Var: RCLONE_QINGSTOR_ENV_AUTH
-- Type: bool
-- Default: false
-- Examples:
- - "false"
- - Enter QingStor credentials in the next step.
- - "true"
- - Get QingStor credentials from the environment (env vars or IAM).
-
-#### --qingstor-access-key-id
-
-QingStor Access Key ID.
-
-Leave blank for anonymous access or runtime credentials.
-
-Properties:
-
-- Config: access_key_id
-- Env Var: RCLONE_QINGSTOR_ACCESS_KEY_ID
-- Type: string
-- Required: false
-
-#### --qingstor-secret-access-key
-
-QingStor Secret Access Key (password).
-
-Leave blank for anonymous access or runtime credentials.
-
-Properties:
-
-- Config: secret_access_key
-- Env Var: RCLONE_QINGSTOR_SECRET_ACCESS_KEY
-- Type: string
-- Required: false
-
-#### --qingstor-endpoint
+It returns a list of status dictionaries with Object Name and Status
+keys. The Status will be "RESTORED"" if it was successful or an error message
+if not.
+[
+ {
+ "Object": "test.txt"
+ "Status": "RESTORED",
+ },
+ {
+ "Object": "test/file4.txt"
+ "Status": "RESTORED",
+ }
+]
+Options:
+
+- "hours": The number of hours for which this object will be restored. Default is 24 hrs.
+
+Tutorials
+
+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
+Here is an example of making an QingStor configuration. First run
+rclone config
+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> remote
+Type of storage to configure.
+Choose a number from below, or type in your own value
+[snip]
+XX / QingStor Object Storage
+ \ "qingstor"
+[snip]
+Storage> qingstor
+Get QingStor credentials from runtime. Only applies if access_key_id and secret_access_key is blank.
+Choose a number from below, or type in your own value
+ 1 / Enter QingStor credentials in the next step
+ \ "false"
+ 2 / Get QingStor credentials from the environment (env vars or IAM)
+ \ "true"
+env_auth> 1
+QingStor Access Key ID - leave blank for anonymous access or runtime credentials.
+access_key_id> access_key
+QingStor Secret Access Key (password) - leave blank for anonymous access or runtime credentials.
+secret_access_key> secret_key
Enter an endpoint URL to connection QingStor API.
+Leave blank will use the default value "https://qingstor.com:443"
+endpoint>
+Zone connect to. Default is "pek3a".
+Choose a number from below, or type in your own value
+ / The Beijing (China) Three Zone
+ 1 | Needs location constraint pek3a.
+ \ "pek3a"
+ / The Shanghai (China) First Zone
+ 2 | Needs location constraint sh1a.
+ \ "sh1a"
+zone> 1
+Number of connection retry.
+Leave blank will use the default value "3".
+connection_retries>
+Remote config
+--------------------
+[remote]
+env_auth = false
+access_key_id = access_key
+secret_access_key = secret_key
+endpoint =
+zone = pek3a
+connection_retries =
+--------------------
+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:
+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
+--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.
+Note that incomplete multipart uploads older than 24 hours can be removed with rclone cleanup remote:bucket
just for one bucket rclone cleanup remote:
for all buckets. QingStor does not ever remove incomplete multipart uploads so it may be necessary to run this from time to time.
+Buckets and Zone
+With QingStor you can list buckets (rclone lsd
) using any zone, but you can only access the content of a bucket from the zone it was created in. If you attempt to access a bucket from the wrong zone, you will get an error, incorrect zone, the bucket is not in 'XXX' zone
.
+Authentication
+There are two ways to supply rclone
with a set of QingStor credentials. In order of precedence:
+
+- Directly in the rclone configuration file (as configured by
rclone config
)
+
+- set
access_key_id
and secret_access_key
+
+- Runtime configuration:
+
+- set
env_auth
to true
in the config file
+- Exporting the following environment variables before running
rclone
+
+- Access Key ID:
QS_ACCESS_KEY_ID
or QS_ACCESS_KEY
+- Secret Access Key:
QS_SECRET_ACCESS_KEY
or QS_SECRET_KEY
+
+
+
+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
+Here are the Standard options specific to qingstor (QingCloud Object Storage).
+--qingstor-env-auth
+Get QingStor credentials from runtime.
+Only applies if access_key_id and secret_access_key is blank.
+Properties:
+
+- Config: env_auth
+- Env Var: RCLONE_QINGSTOR_ENV_AUTH
+- Type: bool
+- Default: false
+- Examples:
+
+- "false"
+
+- Enter QingStor credentials in the next step.
+
+- "true"
+
+- Get QingStor credentials from the environment (env vars or IAM).
+
+
+
+--qingstor-access-key-id
+QingStor Access Key ID.
+Leave blank for anonymous access or runtime credentials.
+Properties:
+
+- Config: access_key_id
+- Env Var: RCLONE_QINGSTOR_ACCESS_KEY_ID
+- Type: string
+- Required: false
+
+--qingstor-secret-access-key
+QingStor Secret Access Key (password).
+Leave blank for anonymous access or runtime credentials.
+Properties:
+
+- Config: secret_access_key
+- Env Var: RCLONE_QINGSTOR_SECRET_ACCESS_KEY
+- Type: string
+- Required: false
+
+--qingstor-endpoint
+Enter an endpoint URL to connection QingStor API.
+Leave blank will use the default value "https://qingstor.com:443".
+Properties:
+
+- Config: endpoint
+- Env Var: RCLONE_QINGSTOR_ENDPOINT
+- Type: string
+- Required: false
+
+--qingstor-zone
+Zone to connect to.
+Default is "pek3a".
+Properties:
+
+- Config: zone
+- Env Var: RCLONE_QINGSTOR_ZONE
+- Type: string
+- Required: false
+- Examples:
+
+- "pek3a"
+
+- The Beijing (China) Three Zone.
+- Needs location constraint pek3a.
+
+- "sh1a"
+
+- The Shanghai (China) First Zone.
+- Needs location constraint sh1a.
+
+- "gd2a"
+
+- The Guangdong (China) Second Zone.
+- Needs location constraint gd2a.
+
+
+
+Advanced options
+Here are the Advanced options specific to qingstor (QingCloud Object Storage).
+--qingstor-connection-retries
+Number of connection retries.
+Properties:
+
+- Config: connection_retries
+- Env Var: RCLONE_QINGSTOR_CONNECTION_RETRIES
+- Type: int
+- Default: 3
+
+--qingstor-upload-cutoff
+Cutoff for switching to chunked upload.
+Any files larger than this will be uploaded in chunks of chunk_size. The minimum is 0 and the maximum is 5 GiB.
+Properties:
+
+- Config: upload_cutoff
+- Env Var: RCLONE_QINGSTOR_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 200Mi
+
+--qingstor-chunk-size
+Chunk size to use for uploading.
+When uploading files larger than upload_cutoff they will be uploaded as multipart uploads using this chunk size.
+Note that "--qingstor-upload-concurrency" chunks of this size are buffered in memory per transfer.
+If you are transferring large files over high-speed links and you have enough memory, then increasing this will speed up the transfers.
+Properties:
+
+- Config: chunk_size
+- Env Var: RCLONE_QINGSTOR_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 4Mi
+
+--qingstor-upload-concurrency
+Concurrency for multipart uploads.
+This is the number of chunks of the same file that are uploaded concurrently.
+NB if you set this to > 1 then the checksums of multipart uploads become corrupted (the uploads themselves are not corrupted though).
+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_QINGSTOR_UPLOAD_CONCURRENCY
+- Type: int
+- Default: 1
+
+--qingstor-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_QINGSTOR_ENCODING
+- Type: Encoding
+- Default: Slash,Ctl,InvalidUtf8
+
+--qingstor-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_QINGSTOR_DESCRIPTION
+- Type: string
+- Required: false
+
+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
+Quatrix by Maytech is Quatrix Secure Compliant File Sharing | Maytech.
+Paths are specified as remote:path
+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
+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 / Quatrix by Maytech
+ \ "quatrix"
+[snip]
+Storage> quatrix
+API key for accessing Quatrix account.
+api_key> your_api_key
+Host name of Quatrix account.
+host> example.quatrix.it
-Leave blank will use the default value "https://qingstor.com:443".
+--------------------
+[remote]
+api_key = your_api_key
+host = example.quatrix.it
+--------------------
+y) Yes this is OK
+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 Quatrix
+rclone lsd remote:
+List all the files in your Quatrix
+rclone ls remote:
+To copy a local directory to an Quatrix directory called backup
+rclone copy /home/source remote:backup
+API key validity
+API Key is created with no expiration date. It will be valid until you delete or deactivate it in your account. After disabling, the API Key can be enabled back. If the API Key was deleted and a new key was created, you can update it in rclone config. The same happens if the hostname was changed.
+$ rclone config
+Current remotes:
-Properties:
+Name Type
+==== ====
+remote quatrix
-- Config: endpoint
-- Env Var: RCLONE_QINGSTOR_ENDPOINT
-- Type: string
-- Required: false
-
-#### --qingstor-zone
-
-Zone to connect to.
-
-Default is "pek3a".
-
-Properties:
-
-- Config: zone
-- Env Var: RCLONE_QINGSTOR_ZONE
-- Type: string
-- Required: false
-- Examples:
- - "pek3a"
- - The Beijing (China) Three Zone.
- - Needs location constraint pek3a.
- - "sh1a"
- - The Shanghai (China) First Zone.
- - Needs location constraint sh1a.
- - "gd2a"
- - The Guangdong (China) Second Zone.
- - Needs location constraint gd2a.
-
-### Advanced options
-
-Here are the Advanced options specific to qingstor (QingCloud Object Storage).
-
-#### --qingstor-connection-retries
-
-Number of connection retries.
-
-Properties:
-
-- Config: connection_retries
-- Env Var: RCLONE_QINGSTOR_CONNECTION_RETRIES
-- Type: int
-- Default: 3
-
-#### --qingstor-upload-cutoff
-
-Cutoff for switching to chunked upload.
-
-Any files larger than this will be uploaded in chunks of chunk_size.
-The minimum is 0 and the maximum is 5 GiB.
-
-Properties:
-
-- Config: upload_cutoff
-- Env Var: RCLONE_QINGSTOR_UPLOAD_CUTOFF
-- Type: SizeSuffix
-- Default: 200Mi
-
-#### --qingstor-chunk-size
-
-Chunk size to use for uploading.
-
-When uploading files larger than upload_cutoff they will be uploaded
-as multipart uploads using this chunk size.
-
-Note that "--qingstor-upload-concurrency" chunks of this size are buffered
-in memory per transfer.
-
-If you are transferring large files over high-speed links and you have
-enough memory, then increasing this will speed up the transfers.
-
-Properties:
-
-- Config: chunk_size
-- Env Var: RCLONE_QINGSTOR_CHUNK_SIZE
-- Type: SizeSuffix
-- Default: 4Mi
-
-#### --qingstor-upload-concurrency
-
-Concurrency for multipart uploads.
-
-This is the number of chunks of the same file that are uploaded
-concurrently.
-
-NB if you set this to > 1 then the checksums of multipart uploads
-become corrupted (the uploads themselves are not corrupted though).
-
-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_QINGSTOR_UPLOAD_CONCURRENCY
-- Type: int
-- Default: 1
-
-#### --qingstor-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_QINGSTOR_ENCODING
-- Type: Encoding
-- Default: Slash,Ctl,InvalidUtf8
-
-
-
-## 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](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/)
-
-# Quatrix
-
-Quatrix by Maytech is [Quatrix Secure Compliant File Sharing | Maytech](https://www.maytech.net/products/quatrix-business).
-
-Paths are specified as `remote:path`
-
-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
-
-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 / Quatrix by Maytech "quatrix" [snip] Storage> quatrix API key for accessing Quatrix account. api_key> your_api_key Host name of Quatrix account. host> example.quatrix.it
-
-
-
-
-
-
-
-
-
-y) Yes this is OK 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 Quatrix |
-
-
-rclone lsd remote: |
-
-
-List all the files in your Quatrix |
-
-
-rclone ls remote: |
-
-
-To copy a local directory to an Quatrix directory called backup |
-
-
-rclone copy /home/source remote:backup |
-
-
-### API key validity |
-
-
-API Key is created with no expiration date. It will be valid until you delete or deactivate it in your account. After disabling, the API Key can be enabled back. If the API Key was deleted and a new key was created, you can update it in rclone config. The same happens if the hostname was changed. |
-
-
-``` $ rclone config Current remotes: |
-
-
-Name Type ==== ==== remote quatrix |
-
-
-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 = quatrix host = some_host.quatrix.it api_key = your_api_key -------------------- Edit remote Option api_key. API key for accessing Quatrix account Enter a string value. Press Enter for the default (your_api_key) api_key> Option host. Host name of Quatrix account Enter a string value. Press Enter for the default (some_host.quatrix.it).
-
-
-
-
-
-
-
-
-
-y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y ``` |
-
-
-### 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 |
-
-
-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 |
-
-
-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 |
-
-
-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 |
-
-
-Here are the Standard options specific to quatrix (Quatrix by Maytech). |
-
-
-#### --quatrix-api-key |
-
-
-API key for accessing Quatrix account |
-
-
-Properties: |
-
-
-- Config: api_key - Env Var: RCLONE_QUATRIX_API_KEY - Type: string - Required: true |
-
-
-#### --quatrix-host |
-
-
-Host name of Quatrix account |
-
-
-Properties: |
-
-
-- Config: host - Env Var: RCLONE_QUATRIX_HOST - Type: string - Required: true |
-
-
-### Advanced options |
-
-
-Here are the Advanced options specific to quatrix (Quatrix by Maytech). |
-
-
-#### --quatrix-encoding |
-
-
-The encoding for the backend. |
-
-
-See the encoding section in the overview for more info. |
-
-
-Properties: |
-
-
-- Config: encoding - Env Var: RCLONE_QUATRIX_ENCODING - Type: Encoding - Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot |
-
-
-#### --quatrix-effective-upload-time |
-
-
-Wanted upload time for one chunk |
-
-
-Properties: |
-
-
-- Config: effective_upload_time - Env Var: RCLONE_QUATRIX_EFFECTIVE_UPLOAD_TIME - Type: string - Default: "4s" |
-
-
-#### --quatrix-minimal-chunk-size |
-
-
-The minimal size for one chunk |
-
-
-Properties: |
-
-
-- Config: minimal_chunk_size - Env Var: RCLONE_QUATRIX_MINIMAL_CHUNK_SIZE - Type: SizeSuffix - Default: 9.537Mi |
-
-
-#### --quatrix-maximal-summary-chunk-size |
-
-
-The maximal summary for all chunks. It should not be less than 'transfers'*'minimal_chunk_size' |
-
-
-Properties: |
-
-
-- Config: maximal_summary_chunk_size - Env Var: RCLONE_QUATRIX_MAXIMAL_SUMMARY_CHUNK_SIZE - Type: SizeSuffix - Default: 95.367Mi |
-
-
-#### --quatrix-hard-delete |
-
-
-Delete files permanently rather than putting them into the trash. |
-
-
-Properties: |
-
-
-- Config: hard_delete - Env Var: RCLONE_QUATRIX_HARD_DELETE - Type: bool - Default: false |
-
-
-## Storage usage |
-
-
-The storage usage in Quatrix is restricted to the account during the purchase. You can restrict any user with a smaller storage limit. The account limit is applied if the user has no custom storage limit. Once you've reached the limit, the upload of files will fail. This can be fixed by freeing up the space or increasing the quota. |
-
-
-## Server-side operations |
-
-
-Quatrix supports server-side operations (copy and move). In case of conflict, files are overwritten during server-side operation. |
-
-
-# Sia |
-
-
-Sia (sia.tech) is a decentralized cloud storage platform based on the blockchain technology. With rclone you can use it like any other remote filesystem or mount Sia folders locally. The technology behind it involves a number of new concepts such as Siacoins and Wallet, Blockchain and Consensus, Renting and Hosting, and so on. If you are new to it, you'd better first familiarize yourself using their excellent support documentation. |
-
-
-## Introduction |
-
-
-Before you can use rclone with Sia, you will need to have a running copy of Sia-UI or siad (the Sia daemon) locally on your computer or on local network (e.g. a NAS). Please follow the Get started guide and install one. |
-
-
-rclone interacts with Sia network by talking to the Sia daemon via HTTP API which is usually available on port 9980. By default you will run the daemon locally on the same computer so it's safe to leave the API password blank (the API URL will be http://127.0.0.1:9980 making external access impossible). |
-
-
-However, if you want to access Sia daemon running on another node, for example due to memory constraints or because you want to share single daemon between several rclone and Sia-UI instances, you'll need to make a few more provisions: - Ensure you have Sia daemon installed directly or in a docker container because Sia-UI does not support this mode natively. - Run it on externally accessible port, for example provide --api-addr :9980 and --disable-api-security arguments on the daemon command line. - Enforce API password for the siad daemon via environment variable SIA_API_PASSWORD or text file named apipassword in the daemon directory. - Set rclone backend option api_password taking it from above locations. |
-
-
-Notes: 1. If your wallet is locked, rclone cannot unlock it automatically. You should either unlock it in advance by using Sia-UI or via command line siac wallet unlock . Alternatively you can make siad unlock your wallet automatically upon startup by running it with environment variable SIA_WALLET_PASSWORD . 2. If siad cannot find the SIA_API_PASSWORD variable or the apipassword file in the SIA_DIR directory, it will generate a random password and store in the text file named apipassword under YOUR_HOME/.sia/ directory on Unix or C:\Users\YOUR_HOME\AppData\Local\Sia\apipassword on Windows. Remember this when you configure password in rclone. 3. The only way to use siad without API password is to run it on localhost with command line argument --authorize-api=false , but this is insecure and strongly discouraged. |
-
-
-## Configuration |
-
-
-Here is an example of how to make a sia remote called mySia . 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> mySia 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 ... 29 / Sia Decentralized Cloud "sia" ... Storage> sia Sia daemon API URL, like http://sia.daemon.host:9980. Note that siad must run with --disable-api-security to open API port for other hosts (not recommended). Keep default if Sia daemon runs on localhost. Enter a string value. Press Enter for the default ("http://127.0.0.1:9980"). api_url> http://127.0.0.1:9980 Sia Daemon API Password. Can be found in the apipassword file located in HOME/.sia/ or in the daemon directory. 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 |
-
-
-
-[mySia] type = sia api_url = http://127.0.0.1:9980 api_password = *** ENCRYPTED *** -------------------- 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 Sia storage
-
-rclone lsd mySia:
-
-- List all the files in your Sia storage
-
-rclone ls mySia:
-
-- Upload a local directory to the Sia directory called _backup_
-
-rclone copy /home/source mySia:backup
-
-
-### Standard options
-
-Here are the Standard options specific to sia (Sia Decentralized Cloud).
-
-#### --sia-api-url
+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 = quatrix
+host = some_host.quatrix.it
+api_key = your_api_key
+--------------------
+Edit remote
+Option api_key.
+API key for accessing Quatrix account
+Enter a string value. Press Enter for the default (your_api_key)
+api_key>
+Option host.
+Host name of Quatrix account
+Enter a string value. Press Enter for the default (some_host.quatrix.it).
+--------------------
+[remote]
+type = quatrix
+host = some_host.quatrix.it
+api_key = your_api_key
+--------------------
+y) Yes this is OK
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+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
+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
+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
+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
+Here are the Standard options specific to quatrix (Quatrix by Maytech).
+--quatrix-api-key
+API key for accessing Quatrix account
+Properties:
+
+- Config: api_key
+- Env Var: RCLONE_QUATRIX_API_KEY
+- Type: string
+- Required: true
+
+--quatrix-host
+Host name of Quatrix account
+Properties:
+
+- Config: host
+- Env Var: RCLONE_QUATRIX_HOST
+- Type: string
+- Required: true
+
+Advanced options
+Here are the Advanced options specific to quatrix (Quatrix by Maytech).
+--quatrix-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_QUATRIX_ENCODING
+- Type: Encoding
+- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
+
+--quatrix-effective-upload-time
+Wanted upload time for one chunk
+Properties:
+
+- Config: effective_upload_time
+- Env Var: RCLONE_QUATRIX_EFFECTIVE_UPLOAD_TIME
+- Type: string
+- Default: "4s"
+
+--quatrix-minimal-chunk-size
+The minimal size for one chunk
+Properties:
+
+- Config: minimal_chunk_size
+- Env Var: RCLONE_QUATRIX_MINIMAL_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 9.537Mi
+
+--quatrix-maximal-summary-chunk-size
+The maximal summary for all chunks. It should not be less than 'transfers'*'minimal_chunk_size'
+Properties:
+
+- Config: maximal_summary_chunk_size
+- Env Var: RCLONE_QUATRIX_MAXIMAL_SUMMARY_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 95.367Mi
+
+--quatrix-hard-delete
+Delete files permanently rather than putting them into the trash
+Properties:
+
+- Config: hard_delete
+- Env Var: RCLONE_QUATRIX_HARD_DELETE
+- Type: bool
+- Default: false
+
+--quatrix-skip-project-folders
+Skip project folders in operations
+Properties:
+
+- Config: skip_project_folders
+- Env Var: RCLONE_QUATRIX_SKIP_PROJECT_FOLDERS
+- Type: bool
+- Default: false
+
+--quatrix-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_QUATRIX_DESCRIPTION
+- Type: string
+- Required: false
+
+Storage usage
+The storage usage in Quatrix is restricted to the account during the purchase. You can restrict any user with a smaller storage limit. The account limit is applied if the user has no custom storage limit. Once you've reached the limit, the upload of files will fail. This can be fixed by freeing up the space or increasing the quota.
+Server-side operations
+Quatrix supports server-side operations (copy and move). In case of conflict, files are overwritten during server-side operation.
+Sia
+Sia (sia.tech) is a decentralized cloud storage platform based on the blockchain technology. With rclone you can use it like any other remote filesystem or mount Sia folders locally. The technology behind it involves a number of new concepts such as Siacoins and Wallet, Blockchain and Consensus, Renting and Hosting, and so on. If you are new to it, you'd better first familiarize yourself using their excellent support documentation.
+Introduction
+Before you can use rclone with Sia, you will need to have a running copy of Sia-UI
or siad
(the Sia daemon) locally on your computer or on local network (e.g. a NAS). Please follow the Get started guide and install one.
+rclone interacts with Sia network by talking to the Sia daemon via HTTP API which is usually available on port 9980. By default you will run the daemon locally on the same computer so it's safe to leave the API password blank (the API URL will be http://127.0.0.1:9980
making external access impossible).
+However, if you want to access Sia daemon running on another node, for example due to memory constraints or because you want to share single daemon between several rclone and Sia-UI instances, you'll need to make a few more provisions: - Ensure you have Sia daemon installed directly or in a docker container because Sia-UI does not support this mode natively. - Run it on externally accessible port, for example provide --api-addr :9980
and --disable-api-security
arguments on the daemon command line. - Enforce API password for the siad
daemon via environment variable SIA_API_PASSWORD
or text file named apipassword
in the daemon directory. - Set rclone backend option api_password
taking it from above locations.
+Notes: 1. If your wallet is locked, rclone cannot unlock it automatically. You should either unlock it in advance by using Sia-UI or via command line siac wallet unlock
. Alternatively you can make siad
unlock your wallet automatically upon startup by running it with environment variable SIA_WALLET_PASSWORD
. 2. If siad
cannot find the SIA_API_PASSWORD
variable or the apipassword
file in the SIA_DIR
directory, it will generate a random password and store in the text file named apipassword
under YOUR_HOME/.sia/
directory on Unix or C:\Users\YOUR_HOME\AppData\Local\Sia\apipassword
on Windows. Remember this when you configure password in rclone. 3. The only way to use siad
without API password is to run it on localhost with command line argument --authorize-api=false
, but this is insecure and strongly discouraged.
+Configuration
+Here is an example of how to make a sia
remote called mySia
. 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> mySia
+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
+...
+29 / Sia Decentralized Cloud
+ \ "sia"
+...
+Storage> sia
Sia daemon API URL, like http://sia.daemon.host:9980.
-
Note that siad must run with --disable-api-security to open API port for other hosts (not recommended).
Keep default if Sia daemon runs on localhost.
-
-Properties:
-
-- Config: api_url
-- Env Var: RCLONE_SIA_API_URL
-- Type: string
-- Default: "http://127.0.0.1:9980"
-
-#### --sia-api-password
-
+Enter a string value. Press Enter for the default ("http://127.0.0.1:9980").
+api_url> http://127.0.0.1:9980
Sia Daemon API Password.
-
Can be found in the apipassword file located in HOME/.sia/ or in the daemon directory.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: api_password
-- Env Var: RCLONE_SIA_API_PASSWORD
-- Type: string
-- Required: false
-
-### Advanced options
-
-Here are the Advanced options specific to sia (Sia Decentralized Cloud).
-
-#### --sia-user-agent
-
-Siad User Agent
-
-Sia daemon requires the 'Sia-Agent' user agent by default for security
-
-Properties:
-
-- Config: user_agent
-- Env Var: RCLONE_SIA_USER_AGENT
-- Type: string
-- Default: "Sia-Agent"
-
-#### --sia-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_SIA_ENCODING
-- Type: Encoding
-- Default: Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot
-
-
-
-## Limitations
-
-- Modification times not supported
-- Checksums not supported
-- `rclone about` not supported
-- rclone can work only with _Siad_ or _Sia-UI_ at the moment,
- the **SkyNet daemon is not supported yet.**
-- Sia does not allow control characters or symbols like question and pound
- signs in file names. rclone will transparently [encode](https://rclone.org/overview/#encoding)
- them for you, but you'd better be aware
-
-# Swift
-
-Swift refers to [OpenStack Object Storage](https://docs.openstack.org/swift/latest/).
-Commercial implementations of that being:
-
- * [Rackspace Cloud Files](https://www.rackspace.com/cloud/files/)
- * [Memset Memstore](https://www.memset.com/cloud/storage/)
- * [OVH Object Storage](https://www.ovh.co.uk/public-cloud/storage/object-storage/)
- * [Oracle Cloud Storage](https://docs.oracle.com/en-us/iaas/integration/doc/configure-object-storage.html)
- * [Blomp Cloud Storage](https://www.blomp.com/cloud-storage/)
- * [IBM Bluemix Cloud ObjectStorage Swift](https://console.bluemix.net/docs/infrastructure/objectstorage-swift/index.html)
-
-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
-
-Here is an example of making a swift 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 name> remote Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH) "swift" [snip] Storage> swift Get swift credentials from environment variables in standard OpenStack form. Choose a number from below, or type in your own value 1 / Enter swift credentials in the next step "false" 2 / Get swift credentials from environment vars. Leave other fields blank if using this. "true" env_auth> true User name to log in (OS_USERNAME). user> API key or password (OS_PASSWORD). key> Authentication URL for server (OS_AUTH_URL). Choose a number from below, or type in your own value 1 / Rackspace US "https://auth.api.rackspacecloud.com/v1.0" 2 / Rackspace UK "https://lon.auth.api.rackspacecloud.com/v1.0" 3 / Rackspace v2 "https://identity.api.rackspacecloud.com/v2.0" 4 / Memset Memstore UK "https://auth.storage.memset.com/v1.0" 5 / Memset Memstore UK v2 "https://auth.storage.memset.com/v2.0" 6 / OVH "https://auth.cloud.ovh.net/v3" 7 / Blomp Cloud Storage "https://authenticate.ain.net" auth> User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID). user_id> User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) domain> Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME) tenant> Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID) tenant_id> Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME) tenant_domain> Region name - optional (OS_REGION_NAME) region> Storage URL - optional (OS_STORAGE_URL) storage_url> Auth Token from alternate authentication - optional (OS_AUTH_TOKEN) auth_token> AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION) auth_version> Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE) Choose a number from below, or type in your own value 1 / Public (default, choose this if not sure) "public" 2 / Internal (use internal service net) "internal" 3 / Admin "admin" endpoint_type> Remote config -------------------- [test] env_auth = true user = key = auth = user_id = domain = tenant = tenant_id = tenant_domain = region = storage_url = auth_token = auth_version = endpoint_type = -------------------- 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 containers
-
- rclone lsd remote:
-
-Make a new container
-
- rclone mkdir remote:container
-
-List the contents of a container
-
- rclone ls remote:container
-
-Sync `/home/local/directory` to the remote container, deleting any
-excess files in the container.
-
- rclone sync --interactive /home/local/directory remote:container
-
-### Configuration from an OpenStack credentials file
-
-An OpenStack credentials file typically looks something something
-like this (without the comments)
-
-export OS_AUTH_URL=https://a.provider.net/v2.0 export OS_TENANT_ID=ffffffffffffffffffffffffffffffff export OS_TENANT_NAME="1234567890123456" export OS_USERNAME="123abc567xy" echo "Please enter your OpenStack Password: " read -sr OS_PASSWORD_INPUT export OS_PASSWORD=$OS_PASSWORD_INPUT export OS_REGION_NAME="SBG1" if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
-
-The config file needs to look something like this where `$OS_USERNAME`
-represents the value of the `OS_USERNAME` variable - `123abc567xy` in
-the example above.
-
-[remote] type = swift user = $OS_USERNAME key = $OS_PASSWORD auth = $OS_AUTH_URL tenant = $OS_TENANT_NAME
-
-Note that you may (or may not) need to set `region` too - try without first.
-
-### Configuration from the environment
-
-If you prefer you can configure rclone to use swift using a standard
-set of OpenStack environment variables.
-
-When you run through the config, make sure you choose `true` for
-`env_auth` and leave everything else blank.
-
-rclone will then set any empty config parameters from the environment
-using standard OpenStack environment variables. There is [a list of
-the
-variables](https://godoc.org/github.com/ncw/swift#Connection.ApplyEnvironment)
-in the docs for the swift library.
-
-### Using an alternate authentication method
-
-If your OpenStack installation uses a non-standard authentication method
-that might not be yet supported by rclone or the underlying swift library,
-you can authenticate externally (e.g. calling manually the `openstack`
-commands to get a token). Then, you just need to pass the two
-configuration variables ``auth_token`` and ``storage_url``.
-If they are both provided, the other variables are ignored. rclone will
-not try to authenticate but instead assume it is already authenticated
-and use these two variables to access the OpenStack installation.
-
-#### Using rclone without a config file
-
-You can use rclone with swift without a config file, if desired, like
-this:
-
-source openstack-credentials-file export RCLONE_CONFIG_MYREMOTE_TYPE=swift export RCLONE_CONFIG_MYREMOTE_ENV_AUTH=true rclone lsd myremote:
-
-### --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.
-
-### --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
-
-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
-
-| Character | Value | Replacement |
-| --------- |:-----:|:-----------:|
-| NUL | 0x00 | ␀ |
-| / | 0x2F | / |
-
-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 swift (OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)).
-
-#### --swift-env-auth
-
+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
+--------------------
+[mySia]
+type = sia
+api_url = http://127.0.0.1:9980
+api_password = *** ENCRYPTED ***
+--------------------
+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 Sia storage
+
+rclone lsd mySia:
+
+- List all the files in your Sia storage
+
+rclone ls mySia:
+
+- Upload a local directory to the Sia directory called backup
+
+rclone copy /home/source mySia:backup
+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.
+Note that siad must run with --disable-api-security to open API port for other hosts (not recommended). Keep default if Sia daemon runs on localhost.
+Properties:
+
+- Config: api_url
+- Env Var: RCLONE_SIA_API_URL
+- Type: string
+- Default: "http://127.0.0.1:9980"
+
+--sia-api-password
+Sia Daemon API Password.
+Can be found in the apipassword file located in HOME/.sia/ or in the daemon directory.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: api_password
+- Env Var: RCLONE_SIA_API_PASSWORD
+- Type: string
+- Required: false
+
+Advanced options
+Here are the Advanced options specific to sia (Sia Decentralized Cloud).
+--sia-user-agent
+Siad User Agent
+Sia daemon requires the 'Sia-Agent' user agent by default for security
+Properties:
+
+- Config: user_agent
+- Env Var: RCLONE_SIA_USER_AGENT
+- Type: string
+- Default: "Sia-Agent"
+
+--sia-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_SIA_ENCODING
+- Type: Encoding
+- Default: Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot
+
+--sia-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SIA_DESCRIPTION
+- Type: string
+- Required: false
+
+Limitations
+
+- Modification times not supported
+- Checksums not supported
+rclone about
not supported
+- rclone can work only with Siad or Sia-UI at the moment, the SkyNet daemon is not supported yet.
+- Sia does not allow control characters or symbols like question and pound signs in file names. rclone will transparently encode them for you, but you'd better be aware
+
+Swift
+Swift refers to OpenStack Object Storage. Commercial implementations of that being:
+
+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
+Here is an example of making a swift 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
+name> remote
+Type of storage to configure.
+Choose a number from below, or type in your own value
+[snip]
+XX / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)
+ \ "swift"
+[snip]
+Storage> swift
Get swift credentials from environment variables in standard OpenStack form.
-
-Properties:
-
-- Config: env_auth
-- Env Var: RCLONE_SWIFT_ENV_AUTH
-- Type: bool
-- Default: false
-- Examples:
- - "false"
- - Enter swift credentials in the next step.
- - "true"
- - Get swift credentials from environment vars.
- - Leave other fields blank if using this.
-
-#### --swift-user
-
+Choose a number from below, or type in your own value
+ 1 / Enter swift credentials in the next step
+ \ "false"
+ 2 / Get swift credentials from environment vars. Leave other fields blank if using this.
+ \ "true"
+env_auth> true
User name to log in (OS_USERNAME).
-
-Properties:
-
-- Config: user
-- Env Var: RCLONE_SWIFT_USER
-- Type: string
-- Required: false
-
-#### --swift-key
-
+user>
API key or password (OS_PASSWORD).
-
-Properties:
-
-- Config: key
-- Env Var: RCLONE_SWIFT_KEY
-- Type: string
-- Required: false
-
-#### --swift-auth
-
+key>
Authentication URL for server (OS_AUTH_URL).
-
-Properties:
-
-- Config: auth
-- Env Var: RCLONE_SWIFT_AUTH
-- Type: string
-- Required: false
-- Examples:
- - "https://auth.api.rackspacecloud.com/v1.0"
- - Rackspace US
- - "https://lon.auth.api.rackspacecloud.com/v1.0"
- - Rackspace UK
- - "https://identity.api.rackspacecloud.com/v2.0"
- - Rackspace v2
- - "https://auth.storage.memset.com/v1.0"
- - Memset Memstore UK
- - "https://auth.storage.memset.com/v2.0"
- - Memset Memstore UK v2
- - "https://auth.cloud.ovh.net/v3"
- - OVH
- - "https://authenticate.ain.net"
- - Blomp Cloud Storage
-
-#### --swift-user-id
-
+Choose a number from below, or type in your own value
+ 1 / Rackspace US
+ \ "https://auth.api.rackspacecloud.com/v1.0"
+ 2 / Rackspace UK
+ \ "https://lon.auth.api.rackspacecloud.com/v1.0"
+ 3 / Rackspace v2
+ \ "https://identity.api.rackspacecloud.com/v2.0"
+ 4 / Memset Memstore UK
+ \ "https://auth.storage.memset.com/v1.0"
+ 5 / Memset Memstore UK v2
+ \ "https://auth.storage.memset.com/v2.0"
+ 6 / OVH
+ \ "https://auth.cloud.ovh.net/v3"
+ 7 / Blomp Cloud Storage
+ \ "https://authenticate.ain.net"
+auth>
User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID).
-
-Properties:
-
-- Config: user_id
-- Env Var: RCLONE_SWIFT_USER_ID
-- Type: string
-- Required: false
-
-#### --swift-domain
-
+user_id>
User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME)
-
-Properties:
-
-- Config: domain
-- Env Var: RCLONE_SWIFT_DOMAIN
-- Type: string
-- Required: false
-
-#### --swift-tenant
-
-Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME).
-
-Properties:
-
-- Config: tenant
-- Env Var: RCLONE_SWIFT_TENANT
-- Type: string
-- Required: false
-
-#### --swift-tenant-id
-
-Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID).
-
-Properties:
-
-- Config: tenant_id
-- Env Var: RCLONE_SWIFT_TENANT_ID
-- Type: string
-- Required: false
-
-#### --swift-tenant-domain
-
-Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME).
-
-Properties:
-
-- Config: tenant_domain
-- Env Var: RCLONE_SWIFT_TENANT_DOMAIN
-- Type: string
-- Required: false
-
-#### --swift-region
-
-Region name - optional (OS_REGION_NAME).
-
-Properties:
-
-- Config: region
-- Env Var: RCLONE_SWIFT_REGION
-- Type: string
-- Required: false
-
-#### --swift-storage-url
-
-Storage URL - optional (OS_STORAGE_URL).
-
-Properties:
-
-- Config: storage_url
-- Env Var: RCLONE_SWIFT_STORAGE_URL
-- Type: string
-- Required: false
-
-#### --swift-auth-token
-
-Auth Token from alternate authentication - optional (OS_AUTH_TOKEN).
-
-Properties:
-
-- Config: auth_token
-- Env Var: RCLONE_SWIFT_AUTH_TOKEN
-- Type: string
-- Required: false
-
-#### --swift-application-credential-id
-
-Application Credential ID (OS_APPLICATION_CREDENTIAL_ID).
-
-Properties:
-
-- Config: application_credential_id
-- Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_ID
-- Type: string
-- Required: false
-
-#### --swift-application-credential-name
-
-Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME).
-
-Properties:
-
-- Config: application_credential_name
-- Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_NAME
-- Type: string
-- Required: false
-
-#### --swift-application-credential-secret
-
-Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET).
-
-Properties:
-
-- Config: application_credential_secret
-- Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_SECRET
-- Type: string
-- Required: false
-
-#### --swift-auth-version
-
-AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION).
-
-Properties:
-
-- Config: auth_version
-- Env Var: RCLONE_SWIFT_AUTH_VERSION
-- Type: int
-- Default: 0
-
-#### --swift-endpoint-type
-
-Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE).
-
-Properties:
-
-- Config: endpoint_type
-- Env Var: RCLONE_SWIFT_ENDPOINT_TYPE
-- Type: string
-- Default: "public"
-- Examples:
- - "public"
- - Public (default, choose this if not sure)
- - "internal"
- - Internal (use internal service net)
- - "admin"
- - Admin
-
-#### --swift-storage-policy
-
-The storage policy to use when creating a new container.
-
-This applies the specified storage policy when creating a new
-container. The policy cannot be changed afterwards. The allowed
-configuration values and their meaning depend on your Swift storage
-provider.
-
-Properties:
-
-- Config: storage_policy
-- Env Var: RCLONE_SWIFT_STORAGE_POLICY
-- Type: string
-- Required: false
-- Examples:
- - ""
- - Default
- - "pcs"
- - OVH Public Cloud Storage
- - "pca"
- - OVH Public Cloud Archive
-
-### 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.
-
-It should be set to true for resuming uploads across different sessions.
-
-Properties:
-
-- Config: leave_parts_on_error
-- Env Var: RCLONE_SWIFT_LEAVE_PARTS_ON_ERROR
-- Type: bool
-- 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.
-
-Properties:
-
-- Config: chunk_size
-- Env Var: RCLONE_SWIFT_CHUNK_SIZE
-- Type: SizeSuffix
-- Default: 5Gi
-
-#### --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.
-
-Properties:
-
-- Config: no_chunk
-- Env Var: RCLONE_SWIFT_NO_CHUNK
-- Type: bool
-- Default: false
-
-#### --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.
-
-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.
-
-
-Properties:
-
-- Config: no_large_objects
-- Env Var: RCLONE_SWIFT_NO_LARGE_OBJECTS
-- Type: bool
-- Default: false
-
-#### --swift-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_SWIFT_ENCODING
-- Type: Encoding
-- Default: Slash,InvalidUtf8
-
-
-
-## 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
-
-### 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.
-
-This may also be caused by specifying the region when you shouldn't
-have (e.g. OVH).
-
-### Rclone gives Failed to create file system: Response didn't have storage url and auth token
-
-This is most likely caused by forgetting to specify your tenant when
-setting up a swift remote.
-
-## OVH Cloud Archive
-
-To use rclone with OVH cloud archive, first use `rclone config` to set up a `swift` backend with OVH, choosing `pca` as the `storage_policy`.
-
-### Uploading Objects
-
-Uploading objects to OVH cloud archive is no different to object storage, you just simply run the command you like (move, copy or sync) to upload the objects. Once uploaded the objects will show in a "Frozen" state within the OVH control panel.
-
-### Retrieving Objects
-
-To retrieve objects use `rclone copy` as normal. If the objects are in a frozen state then rclone will ask for them all to be unfrozen and it will wait at the end of the output with a message like the following:
-
-`2019/03/23 13:06:33 NOTICE: Received retry after error - sleeping until 2019-03-23T13:16:33.481657164+01:00 (9m59.99985121s)`
-
-Rclone will wait for the time specified then retry the copy.
-
-# pCloud
-
-Paths are specified as `remote:path`
-
-Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
-
-## 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
-
-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 / Pcloud "pcloud" [snip] Storage> pcloud Pcloud App Client Id - leave blank normally. client_id> Pcloud App Client Secret - leave blank normally. client_secret> 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","expiry":"0001-01-01T00:00:00Z"} -------------------- 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 pCloud. 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 pCloud
-
- rclone lsd remote:
-
-List all the files in your pCloud
-
- rclone ls remote:
-
-To copy a local directory to a pCloud directory called backup
-
- rclone copy /home/source remote:backup
-
-### 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
-
-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.
-
-### 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
-
-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
-
-Here are the Standard options specific to pcloud (Pcloud).
-
-#### --pcloud-client-id
-
-OAuth Client Id.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_id
-- Env Var: RCLONE_PCLOUD_CLIENT_ID
-- Type: string
-- Required: false
-
-#### --pcloud-client-secret
-
-OAuth Client Secret.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_secret
-- Env Var: RCLONE_PCLOUD_CLIENT_SECRET
-- Type: string
-- Required: false
-
-### Advanced options
-
-Here are the Advanced options specific to pcloud (Pcloud).
-
-#### --pcloud-token
-
-OAuth Access Token as a JSON blob.
-
-Properties:
-
-- Config: token
-- Env Var: RCLONE_PCLOUD_TOKEN
-- Type: string
-- Required: false
-
-#### --pcloud-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_PCLOUD_AUTH_URL
-- Type: string
-- Required: false
-
-#### --pcloud-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_PCLOUD_TOKEN_URL
-- Type: string
-- Required: false
-
-#### --pcloud-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_PCLOUD_ENCODING
-- Type: Encoding
-- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
-
-#### --pcloud-root-folder-id
-
-Fill in for rclone to use a non root folder as its starting point.
-
-Properties:
-
-- Config: root_folder_id
-- Env Var: RCLONE_PCLOUD_ROOT_FOLDER_ID
-- Type: string
-- Default: "d0"
-
-#### --pcloud-hostname
-
-Hostname to connect to.
-
-This is normally set when rclone initially does the oauth connection,
-however you will need to set it by hand if you are using remote config
-with rclone authorize.
-
-
-Properties:
-
-- Config: hostname
-- Env Var: RCLONE_PCLOUD_HOSTNAME
-- Type: string
-- Default: "api.pcloud.com"
-- Examples:
- - "api.pcloud.com"
- - Original/US region
- - "eapi.pcloud.com"
- - EU region
-
-#### --pcloud-username
-
-Your pcloud username.
-
-This is only required when you want to use the cleanup command. Due to a bug
-in the pcloud API the required API does not support OAuth authentication so
-we have to rely on user password authentication for it.
-
-Properties:
-
-- Config: username
-- Env Var: RCLONE_PCLOUD_USERNAME
-- Type: string
-- Required: false
-
-#### --pcloud-password
-
-Your pcloud password.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: password
-- Env Var: RCLONE_PCLOUD_PASSWORD
-- Type: string
-- Required: false
-
-
-
-# PikPak
-
-PikPak is [a private cloud drive](https://mypikpak.com/).
-
-Paths are specified as `remote:path`, and may be as deep as required, e.g. `remote:directory/subdirectory`.
-
-## Configuration
-
-Here is an example of making a remote for PikPak.
-
-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 / PikPak (pikpak) Storage> XX
-Option user. Pikpak username. Enter a value. user> USERNAME
-Option pass. Pikpak 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>
-Configuration complete. Options: - type: pikpak - user: USERNAME - pass: *** ENCRYPTED *** - token: {"access_token":"eyJ...","token_type":"Bearer","refresh_token":"os...","expiry":"2023-01-26T18:54:32.170582647+09:00"} Keep this "remote" remote? y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y
-
-### Modification times and hashes
-
-PikPak keeps modification times on objects, and updates them when uploading objects,
-but it does not support changing only the modification time
-
-The MD5 hash algorithm is supported.
-
-
-### Standard options
-
-Here are the Standard options specific to pikpak (PikPak).
-
-#### --pikpak-user
-
-Pikpak username.
-
-Properties:
-
-- Config: user
-- Env Var: RCLONE_PIKPAK_USER
-- Type: string
-- Required: true
-
-#### --pikpak-pass
-
-Pikpak password.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: pass
-- Env Var: RCLONE_PIKPAK_PASS
-- Type: string
-- Required: true
-
-### Advanced options
-
-Here are the Advanced options specific to pikpak (PikPak).
-
-#### --pikpak-client-id
-
-OAuth Client Id.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_id
-- Env Var: RCLONE_PIKPAK_CLIENT_ID
-- Type: string
-- Required: false
-
-#### --pikpak-client-secret
-
-OAuth Client Secret.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_secret
-- Env Var: RCLONE_PIKPAK_CLIENT_SECRET
-- Type: string
-- Required: false
-
-#### --pikpak-token
-
-OAuth Access Token as a JSON blob.
-
-Properties:
-
-- Config: token
-- Env Var: RCLONE_PIKPAK_TOKEN
-- Type: string
-- Required: false
-
-#### --pikpak-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_PIKPAK_AUTH_URL
-- Type: string
-- Required: false
-
-#### --pikpak-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_PIKPAK_TOKEN_URL
-- Type: string
-- Required: false
-
-#### --pikpak-root-folder-id
-
-ID of the root folder.
-Leave blank normally.
-
-Fill in for rclone to use a non root folder as its starting point.
-
-
-Properties:
-
-- Config: root_folder_id
-- Env Var: RCLONE_PIKPAK_ROOT_FOLDER_ID
-- Type: string
-- Required: false
-
-#### --pikpak-use-trash
-
-Send files to the trash instead of deleting permanently.
-
-Defaults to true, namely sending files to the trash.
-Use `--pikpak-use-trash=false` to delete files permanently instead.
-
-Properties:
-
-- Config: use_trash
-- Env Var: RCLONE_PIKPAK_USE_TRASH
-- Type: bool
-- Default: true
-
-#### --pikpak-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_PIKPAK_TRASHED_ONLY
-- Type: bool
-- Default: false
-
-#### --pikpak-hash-memory-limit
-
-Files bigger than this will be cached on disk to calculate hash if required.
-
-Properties:
-
-- Config: hash_memory_limit
-- Env Var: RCLONE_PIKPAK_HASH_MEMORY_LIMIT
-- Type: SizeSuffix
-- Default: 10Mi
-
-#### --pikpak-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_PIKPAK_ENCODING
-- Type: Encoding
-- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot
-
-## Backend commands
-
-Here are the commands specific to the pikpak 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).
-
-### addurl
-
-Add offline download task for url
-
- rclone backend addurl remote: [options] [<arguments>+]
-
-This command adds offline download task for url.
-
-Usage:
-
- rclone backend addurl pikpak:dirpath url
-
-Downloads will be stored in 'dirpath'. If 'dirpath' is invalid,
-download will fallback to default 'My Pack' folder.
-
-
-### decompress
-
-Request decompress of a file/files in a folder
-
- rclone backend decompress remote: [options] [<arguments>+]
-
-This command requests decompress of file/files in a folder.
-
-Usage:
-
- rclone backend decompress pikpak:dirpath {filename} -o password=password
- rclone backend decompress pikpak:dirpath {filename} -o delete-src-file
-
-An optional argument 'filename' can be specified for a file located in
-'pikpak:dirpath'. You may want to pass '-o password=password' for a
-password-protected files. Also, pass '-o delete-src-file' to delete
-source files after decompression finished.
-
-Result:
-
- {
- "Decompressed": 17,
- "SourceDeleted": 0,
- "Errors": 0
- }
-
-
-
-
-## 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
-
-Deleted files will still be visible with `--pikpak-trashed-only` even after the
-trash emptied. This goes away after few days.
-
-# premiumize.me
-
-Paths are specified as `remote:path`
-
-Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
-
-## Configuration
-
-The initial setup for [premiumize.me](https://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
-
-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 / premiumize.me "premiumizeme" [snip] Storage> premiumizeme ** See help for premiumizeme backend at: https://rclone.org/premiumizeme/ **
-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 = premiumizeme token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2029-08-07T18:44:15.548915378+01:00"} -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d>
-
-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 premiumize.me. 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 premiumize.me
-
- rclone lsd remote:
-
-List all the files in your premiumize.me
-
- 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
-
-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
-
-In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters)
-the following characters are also replaced:
-
-| Character | Value | Replacement |
-| --------- |:-----:|:-----------:|
-| \ | 0x5C | \ |
-| " | 0x22 | " |
-
-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 premiumizeme (premiumize.me).
-
-#### --premiumizeme-client-id
-
-OAuth Client Id.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_id
-- Env Var: RCLONE_PREMIUMIZEME_CLIENT_ID
-- Type: string
-- Required: false
-
-#### --premiumizeme-client-secret
-
-OAuth Client Secret.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_secret
-- Env Var: RCLONE_PREMIUMIZEME_CLIENT_SECRET
-- Type: string
-- Required: false
-
-#### --premiumizeme-api-key
-
-API Key.
-
-This is not normally used - use oauth instead.
-
-
-Properties:
-
-- Config: api_key
-- Env Var: RCLONE_PREMIUMIZEME_API_KEY
-- Type: string
-- Required: false
-
-### Advanced options
-
-Here are the Advanced options specific to premiumizeme (premiumize.me).
-
-#### --premiumizeme-token
-
-OAuth Access Token as a JSON blob.
-
-Properties:
-
-- Config: token
-- Env Var: RCLONE_PREMIUMIZEME_TOKEN
-- Type: string
-- Required: false
-
-#### --premiumizeme-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_PREMIUMIZEME_AUTH_URL
-- Type: string
-- Required: false
-
-#### --premiumizeme-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_PREMIUMIZEME_TOKEN_URL
-- Type: string
-- Required: false
-
-#### --premiumizeme-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_PREMIUMIZEME_ENCODING
-- Type: Encoding
-- Default: Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot
-
-
-
-## 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.
-
-# Proton Drive
-
-[Proton Drive](https://proton.me/drive) is an end-to-end encrypted Swiss vault
- for your files that protects your data.
-
-This is an rclone backend for Proton Drive which supports the file transfer
-features of Proton Drive using the same client-side encryption.
-
-Due to the fact that Proton Drive doesn't publish its API documentation, this
-backend is implemented with best efforts by reading the open-sourced client
-source code and observing the Proton Drive traffic in the browser.
-
-**NB** This backend is currently in Beta. It is believed to be correct
-and all the integration tests pass. However the Proton Drive protocol
-has evolved over time there may be accounts it is not compatible
-with. Please [post on the rclone forum](https://forum.rclone.org/) if
-you find an incompatibility.
-
-Paths are specified as `remote:path`
-
-Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
-
-## Configurations
-
-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 / Proton Drive "Proton Drive" [snip] Storage> protondrive User name user> you@protonmail.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: Option 2fa. 2FA code (if the account requires one) Enter a value. Press Enter to leave empty. 2fa> 123456 Remote config -------------------- [remote] type = protondrive user = you@protonmail.com pass = *** ENCRYPTED *** -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y
-
-**NOTE:** The Proton Drive 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.
-
-Once configured you can then use `rclone` like this,
-
-List directories in top level of your Proton Drive
-
- rclone lsd remote:
-
-List all the files in your Proton Drive
-
- 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
-
-Proton Drive Bridge does not support updating modification times yet.
-
-The SHA1 hash algorithm is supported.
-
-### Restricted filename characters
-
-Invalid UTF-8 bytes will be [replaced](https://rclone.org/overview/#invalid-utf8), also left and
-right spaces will be removed ([code reference](https://github.com/ProtonMail/WebClients/blob/b4eba99d241af4fdae06ff7138bd651a40ef5d3c/applications/drive/src/app/store/_links/validation.ts#L51))
-
-### 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](https://proton.me/support/the-difference-between-the-mailbox-password-and-login-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
-
-Here are the Standard options specific to protondrive (Proton Drive).
-
-#### --protondrive-username
-
-The username of your proton account
-
-Properties:
-
-- Config: username
-- Env Var: RCLONE_PROTONDRIVE_USERNAME
-- Type: string
-- Required: true
-
-#### --protondrive-password
-
-The password of your proton account.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: password
-- Env Var: RCLONE_PROTONDRIVE_PASSWORD
-- Type: string
-- Required: true
-
-#### --protondrive-2fa
-
-The 2FA code
-
-The value can also be provided with --protondrive-2fa=000000
-
-The 2FA code of your proton drive account if the account is set up with
-two-factor authentication
-
-Properties:
-
-- Config: 2fa
-- Env Var: RCLONE_PROTONDRIVE_2FA
-- Type: string
-- Required: false
-
-### Advanced options
-
-Here are the Advanced options specific to protondrive (Proton Drive).
-
-#### --protondrive-mailbox-password
-
-The mailbox password of your two-password proton account.
-
-For more information regarding the mailbox password, please check the
-following official knowledge base article:
-https://proton.me/support/the-difference-between-the-mailbox-password-and-login-password
-
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: mailbox_password
-- Env Var: RCLONE_PROTONDRIVE_MAILBOX_PASSWORD
-- Type: string
-- Required: false
-
-#### --protondrive-client-uid
-
-Client uid key (internal use only)
-
-Properties:
-
-- Config: client_uid
-- Env Var: RCLONE_PROTONDRIVE_CLIENT_UID
-- Type: string
-- Required: false
-
-#### --protondrive-client-access-token
-
-Client access token key (internal use only)
-
-Properties:
-
-- Config: client_access_token
-- Env Var: RCLONE_PROTONDRIVE_CLIENT_ACCESS_TOKEN
-- Type: string
-- Required: false
-
-#### --protondrive-client-refresh-token
-
-Client refresh token key (internal use only)
-
-Properties:
-
-- Config: client_refresh_token
-- Env Var: RCLONE_PROTONDRIVE_CLIENT_REFRESH_TOKEN
-- Type: string
-- Required: false
-
-#### --protondrive-client-salted-key-pass
-
-Client salted key pass key (internal use only)
-
-Properties:
-
-- Config: client_salted_key_pass
-- Env Var: RCLONE_PROTONDRIVE_CLIENT_SALTED_KEY_PASS
-- Type: string
-- Required: false
-
-#### --protondrive-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_PROTONDRIVE_ENCODING
-- Type: Encoding
-- Default: Slash,LeftSpace,RightSpace,InvalidUtf8,Dot
-
-#### --protondrive-original-file-size
-
-Return the file size before encryption
-
-The size of the encrypted file will be different from (bigger than) the
-original file size. Unless there is a reason to return the file size
-after encryption is performed, otherwise, set this option to true, as
-features like Open() which will need to be supplied with original content
-size, will fail to operate properly
-
-Properties:
-
-- Config: original_file_size
-- Env Var: RCLONE_PROTONDRIVE_ORIGINAL_FILE_SIZE
-- Type: bool
-- Default: true
-
-#### --protondrive-app-version
-
-The app version string
-
-The app version string indicates the client that is currently performing
-the API request. This information is required and will be sent with every
-API request.
-
-Properties:
-
-- Config: app_version
-- Env Var: RCLONE_PROTONDRIVE_APP_VERSION
-- Type: string
-- Default: "macos-drive@1.0.0-alpha.1+rclone"
-
-#### --protondrive-replace-existing-draft
-
-Create a new revision when filename conflict is detected
-
-When a file upload is cancelled or failed before completion, a draft will be
-created and the subsequent upload of the same file to the same location will be
-reported as a conflict.
-
-The value can also be set by --protondrive-replace-existing-draft=true
-
-If the option is set to true, the draft will be replaced and then the upload
-operation will restart. If there are other clients also uploading at the same
-file location at the same time, the behavior is currently unknown. Need to set
-to true for integration tests.
-If the option is set to false, an error "a draft exist - usually this means a
-file is being uploaded at another client, or, there was a failed upload attempt"
-will be returned, and no upload will happen.
-
-Properties:
-
-- Config: replace_existing_draft
-- Env Var: RCLONE_PROTONDRIVE_REPLACE_EXISTING_DRAFT
-- Type: bool
-- Default: false
-
-#### --protondrive-enable-caching
-
-Caches the files and folders metadata to reduce API calls
-
-Notice: If you are mounting ProtonDrive as a VFS, please disable this feature,
-as the current implementation doesn't update or clear the cache when there are
-external changes.
-
-The files and folders on ProtonDrive are represented as links with keyrings,
-which can be cached to improve performance and be friendly to the API server.
-
-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.
-
-Properties:
-
-- Config: enable_caching
-- Env Var: RCLONE_PROTONDRIVE_ENABLE_CACHING
-- Type: bool
-- Default: true
-
-
-
-## Limitations
-
-This backend uses the
-[Proton-API-Bridge](https://github.com/henrybear327/Proton-API-Bridge), which
-is based on [go-proton-api](https://github.com/henrybear327/go-proton-api), a
-fork of the [official repo](https://github.com/ProtonMail/go-proton-api).
-
-There is no official API documentation available from Proton Drive. But, thanks
-to Proton open sourcing [proton-go-api](https://github.com/ProtonMail/go-proton-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](https://github.com/ProtonMail/go-proton-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.
-
-# put.io
-
-Paths are specified as `remote:path`
-
-put.io paths may be as deep as required, e.g.
-`remote:directory/subdirectory`.
-
-## 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
-
-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> putio 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 / Put.io "putio" [snip] Storage> putio ** See help for putio backend at: https://rclone.org/putio/ **
-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 -------------------- [putio] type = putio token = {"access_token":"XXXXXXXX","expiry":"0001-01-01T00:00:00Z"} -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y Current remotes:
-Name Type ==== ==== putio putio
-
-- Edit existing remote
-- New remote
-- Delete remote
-- Rename remote
-- Copy remote
-- Set configuration password
-- Quit config e/n/d/r/c/s/q> q
-
-
-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 put.io 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.
-
-You can then use it like this,
-
-List directories in top level of your put.io
-
- rclone lsd remote:
-
-List all the files in your put.io
-
- rclone ls remote:
-
-To copy a local directory to a put.io directory called backup
-
- rclone copy /home/source remote: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 |
-| --------- |:-----:|:-----------:|
-| \ | 0x5C | \ |
-
-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 putio (Put.io).
-
-#### --putio-client-id
-
-OAuth Client Id.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_id
-- Env Var: RCLONE_PUTIO_CLIENT_ID
-- Type: string
-- Required: false
-
-#### --putio-client-secret
-
-OAuth Client Secret.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_secret
-- Env Var: RCLONE_PUTIO_CLIENT_SECRET
-- Type: string
-- Required: false
-
-### Advanced options
-
-Here are the Advanced options specific to putio (Put.io).
-
-#### --putio-token
-
-OAuth Access Token as a JSON blob.
-
-Properties:
-
-- Config: token
-- Env Var: RCLONE_PUTIO_TOKEN
-- Type: string
-- Required: false
-
-#### --putio-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_PUTIO_AUTH_URL
-- Type: string
-- Required: false
-
-#### --putio-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_PUTIO_TOKEN_URL
-- Type: string
-- Required: false
-
-#### --putio-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_PUTIO_ENCODING
-- Type: Encoding
-- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
-
-
-
-## 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
-
-[Proton Drive](https://proton.me/drive) is an end-to-end encrypted Swiss vault
- for your files that protects your data.
-
-This is an rclone backend for Proton Drive which supports the file transfer
-features of Proton Drive using the same client-side encryption.
-
-Due to the fact that Proton Drive doesn't publish its API documentation, this
-backend is implemented with best efforts by reading the open-sourced client
-source code and observing the Proton Drive traffic in the browser.
-
-**NB** This backend is currently in Beta. It is believed to be correct
-and all the integration tests pass. However the Proton Drive protocol
-has evolved over time there may be accounts it is not compatible
-with. Please [post on the rclone forum](https://forum.rclone.org/) if
-you find an incompatibility.
-
-Paths are specified as `remote:path`
-
-Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
-
-## Configurations
-
-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 / Proton Drive "Proton Drive" [snip] Storage> protondrive User name user> you@protonmail.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: Option 2fa. 2FA code (if the account requires one) Enter a value. Press Enter to leave empty. 2fa> 123456 Remote config -------------------- [remote] type = protondrive user = you@protonmail.com pass = *** ENCRYPTED *** -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y
-
-**NOTE:** The Proton Drive 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.
-
-Once configured you can then use `rclone` like this,
-
-List directories in top level of your Proton Drive
-
- rclone lsd remote:
-
-List all the files in your Proton Drive
-
- 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
-
-Proton Drive Bridge does not support updating modification times yet.
-
-The SHA1 hash algorithm is supported.
-
-### Restricted filename characters
-
-Invalid UTF-8 bytes will be [replaced](https://rclone.org/overview/#invalid-utf8), also left and
-right spaces will be removed ([code reference](https://github.com/ProtonMail/WebClients/blob/b4eba99d241af4fdae06ff7138bd651a40ef5d3c/applications/drive/src/app/store/_links/validation.ts#L51))
-
-### 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](https://proton.me/support/the-difference-between-the-mailbox-password-and-login-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
-
-Here are the Standard options specific to protondrive (Proton Drive).
-
-#### --protondrive-username
-
-The username of your proton account
-
-Properties:
-
-- Config: username
-- Env Var: RCLONE_PROTONDRIVE_USERNAME
-- Type: string
-- Required: true
-
-#### --protondrive-password
-
-The password of your proton account.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: password
-- Env Var: RCLONE_PROTONDRIVE_PASSWORD
-- Type: string
-- Required: true
-
-#### --protondrive-2fa
-
-The 2FA code
-
-The value can also be provided with --protondrive-2fa=000000
-
-The 2FA code of your proton drive account if the account is set up with
-two-factor authentication
-
-Properties:
-
-- Config: 2fa
-- Env Var: RCLONE_PROTONDRIVE_2FA
-- Type: string
-- Required: false
-
-### Advanced options
-
-Here are the Advanced options specific to protondrive (Proton Drive).
-
-#### --protondrive-mailbox-password
-
-The mailbox password of your two-password proton account.
-
-For more information regarding the mailbox password, please check the
-following official knowledge base article:
-https://proton.me/support/the-difference-between-the-mailbox-password-and-login-password
-
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: mailbox_password
-- Env Var: RCLONE_PROTONDRIVE_MAILBOX_PASSWORD
-- Type: string
-- Required: false
-
-#### --protondrive-client-uid
-
-Client uid key (internal use only)
-
-Properties:
-
-- Config: client_uid
-- Env Var: RCLONE_PROTONDRIVE_CLIENT_UID
-- Type: string
-- Required: false
-
-#### --protondrive-client-access-token
-
-Client access token key (internal use only)
-
-Properties:
-
-- Config: client_access_token
-- Env Var: RCLONE_PROTONDRIVE_CLIENT_ACCESS_TOKEN
-- Type: string
-- Required: false
-
-#### --protondrive-client-refresh-token
-
-Client refresh token key (internal use only)
-
-Properties:
-
-- Config: client_refresh_token
-- Env Var: RCLONE_PROTONDRIVE_CLIENT_REFRESH_TOKEN
-- Type: string
-- Required: false
-
-#### --protondrive-client-salted-key-pass
-
-Client salted key pass key (internal use only)
-
-Properties:
-
-- Config: client_salted_key_pass
-- Env Var: RCLONE_PROTONDRIVE_CLIENT_SALTED_KEY_PASS
-- Type: string
-- Required: false
-
-#### --protondrive-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_PROTONDRIVE_ENCODING
-- Type: Encoding
-- Default: Slash,LeftSpace,RightSpace,InvalidUtf8,Dot
-
-#### --protondrive-original-file-size
-
-Return the file size before encryption
-
-The size of the encrypted file will be different from (bigger than) the
-original file size. Unless there is a reason to return the file size
-after encryption is performed, otherwise, set this option to true, as
-features like Open() which will need to be supplied with original content
-size, will fail to operate properly
-
-Properties:
-
-- Config: original_file_size
-- Env Var: RCLONE_PROTONDRIVE_ORIGINAL_FILE_SIZE
-- Type: bool
-- Default: true
-
-#### --protondrive-app-version
-
-The app version string
-
-The app version string indicates the client that is currently performing
-the API request. This information is required and will be sent with every
-API request.
-
-Properties:
-
-- Config: app_version
-- Env Var: RCLONE_PROTONDRIVE_APP_VERSION
-- Type: string
-- Default: "macos-drive@1.0.0-alpha.1+rclone"
-
-#### --protondrive-replace-existing-draft
-
-Create a new revision when filename conflict is detected
-
-When a file upload is cancelled or failed before completion, a draft will be
-created and the subsequent upload of the same file to the same location will be
-reported as a conflict.
-
-The value can also be set by --protondrive-replace-existing-draft=true
-
-If the option is set to true, the draft will be replaced and then the upload
-operation will restart. If there are other clients also uploading at the same
-file location at the same time, the behavior is currently unknown. Need to set
-to true for integration tests.
-If the option is set to false, an error "a draft exist - usually this means a
-file is being uploaded at another client, or, there was a failed upload attempt"
-will be returned, and no upload will happen.
-
-Properties:
-
-- Config: replace_existing_draft
-- Env Var: RCLONE_PROTONDRIVE_REPLACE_EXISTING_DRAFT
-- Type: bool
-- Default: false
-
-#### --protondrive-enable-caching
-
-Caches the files and folders metadata to reduce API calls
-
-Notice: If you are mounting ProtonDrive as a VFS, please disable this feature,
-as the current implementation doesn't update or clear the cache when there are
-external changes.
-
-The files and folders on ProtonDrive are represented as links with keyrings,
-which can be cached to improve performance and be friendly to the API server.
-
-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.
-
-Properties:
-
-- Config: enable_caching
-- Env Var: RCLONE_PROTONDRIVE_ENABLE_CACHING
-- Type: bool
-- Default: true
-
-
-
-## Limitations
-
-This backend uses the
-[Proton-API-Bridge](https://github.com/henrybear327/Proton-API-Bridge), which
-is based on [go-proton-api](https://github.com/henrybear327/go-proton-api), a
-fork of the [official repo](https://github.com/ProtonMail/go-proton-api).
-
-There is no official API documentation available from Proton Drive. But, thanks
-to Proton open sourcing [proton-go-api](https://github.com/ProtonMail/go-proton-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](https://github.com/ProtonMail/go-proton-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](https://www.seafile.com/) 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
-
-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
-
- rclone config
-
-This will guide you through an interactive setup process. To authenticate
-you will need the URL of your server, your email (or username) and your password.
-
-No remotes found, make a new one? n) New remote s) Set configuration password q) Quit config n/s/q> n name> seafile 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 / Seafile "seafile" [snip] Storage> seafile ** See help for seafile backend at: https://rclone.org/seafile/ **
-URL of seafile 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 cloud.seafile.com "https://cloud.seafile.com/" url> http://my.seafile.server/ User name (usually email address) Enter a string value. Press Enter for the default (""). user> me@example.com Password y) Yes type in my own password g) Generate random password n) No leave this optional password blank (default) y/g> y Enter the password: password: Confirm the password: password: Two-factor authentication ('true' if the account has 2FA enabled) Enter a boolean value (true or false). Press Enter for the default ("false"). 2fa> false Name of the library. Leave blank to access all non-encrypted libraries. Enter a string value. Press Enter for the default (""). library> Library password (for encrypted libraries only). Leave blank if you pass it through the command line. y) Yes type in my own password g) Generate random password n) No leave this optional password blank (default) y/g/n> n Edit advanced config? (y/n) y) Yes n) No (default) y/n> n Remote config Two-factor authentication is not enabled on this account. -------------------- [seafile] type = seafile url = http://my.seafile.server/ user = me@example.com pass = *** ENCRYPTED *** 2fa = false -------------------- y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y
-
-This remote is called `seafile`. It's pointing to the root of your seafile server and can now be used like this:
-
-See all libraries
-
- rclone lsd seafile:
-
-Create a new library
-
- rclone mkdir seafile:library
-
-List the contents of a library
-
- rclone ls seafile:library
-
-Sync `/home/local/directory` to the remote library, deleting any
-excess files in the library.
-
- rclone sync --interactive /home/local/directory seafile:library
-
-### Configuration in library mode
-
-Here's an example of a configuration in library mode with a user that has the two-factor authentication enabled. Your 2FA code will be asked at the end of the configuration, and will attempt to authenticate you:
-
-No remotes found, make a new one? n) New remote s) Set configuration password q) Quit config n/s/q> n name> seafile 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 / Seafile "seafile" [snip] Storage> seafile ** See help for seafile backend at: https://rclone.org/seafile/ **
-URL of seafile 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 cloud.seafile.com "https://cloud.seafile.com/" url> http://my.seafile.server/ User name (usually email address) Enter a string value. Press Enter for the default (""). user> me@example.com Password y) Yes type in my own password g) Generate random password n) No leave this optional password blank (default) y/g> y Enter the password: password: Confirm the password: password: Two-factor authentication ('true' if the account has 2FA enabled) Enter a boolean value (true or false). Press Enter for the default ("false"). 2fa> true Name of the library. Leave blank to access all non-encrypted libraries. Enter a string value. Press Enter for the default (""). library> My Library Library password (for encrypted libraries only). Leave blank if you pass it through the command line. y) Yes type in my own password g) Generate random password n) No leave this optional password blank (default) y/g/n> n Edit advanced config? (y/n) y) Yes n) No (default) y/n> n Remote config Two-factor authentication: please enter your 2FA code 2fa code> 123456 Authenticating... Success! -------------------- [seafile] type = seafile url = http://my.seafile.server/ user = me@example.com pass = 2fa = true library = My Library -------------------- y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y
-
-You'll notice your password is blank in the configuration. It's because we only need the password to authenticate you once.
-
-You specified `My Library` during the configuration. The root of the remote is pointing at the
-root of the library `My Library`:
-
-See all files in the library:
-
- rclone lsd seafile:
-
-Create a new directory inside the library
-
- rclone mkdir seafile:directory
-
-List the contents of a directory
-
- 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
-
-Seafile version 7+ 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.
-Please note this is not supported on seafile server version 6.x
-
-
-### 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 | / |
-| " | 0x22 | " |
-| \ | 0x5C | \ |
-
-Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
-as they can't be used in JSON strings.
-
-### Seafile and rclone link
-
-Rclone supports generating share links for non-encrypted libraries only.
-They can either be for a file or a directory:
-
-rclone link seafile:seafile-tutorial.doc http://my.seafile.server/f/fdcd8a2f93f84b8b90f4/
-
-or if run on a directory you will get:
-
-rclone link seafile:dir http://my.seafile.server/d/9ea2455f6f55478bbb0d/
-
-Please note a share link is unique for each file or directory. If you run a link command on a file/dir
-that has already been shared, you will get the exact same link.
-
-### Compatibility
-
-It has been actively developed using the [seafile docker image](https://github.com/haiwen/seafile-docker) 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](https://hub.docker.com/r/seafileltd/seafile-mc/) of the seafile community server.
-
-
-### Standard options
-
-Here are the Standard options specific to seafile (seafile).
-
-#### --seafile-url
-
-URL of seafile host to connect to.
-
-Properties:
-
-- Config: url
-- Env Var: RCLONE_SEAFILE_URL
-- Type: string
-- Required: true
-- Examples:
- - "https://cloud.seafile.com/"
- - Connect to cloud.seafile.com.
-
-#### --seafile-user
-
-User name (usually email address).
-
-Properties:
-
-- Config: user
-- Env Var: RCLONE_SEAFILE_USER
-- Type: string
-- Required: true
-
-#### --seafile-pass
-
-Password.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: pass
-- Env Var: RCLONE_SEAFILE_PASS
-- Type: string
-- Required: false
-
-#### --seafile-2fa
-
-Two-factor authentication ('true' if the account has 2FA enabled).
-
-Properties:
-
-- Config: 2fa
-- Env Var: RCLONE_SEAFILE_2FA
-- Type: bool
-- Default: false
-
-#### --seafile-library
-
-Name of the library.
-
-Leave blank to access all non-encrypted libraries.
-
-Properties:
-
-- Config: library
-- Env Var: RCLONE_SEAFILE_LIBRARY
-- Type: string
-- Required: false
-
-#### --seafile-library-key
-
-Library password (for encrypted libraries only).
-
-Leave blank if you pass it through the command line.
-
-**NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
-Properties:
-
-- Config: library_key
-- Env Var: RCLONE_SEAFILE_LIBRARY_KEY
-- Type: string
-- Required: false
-
-#### --seafile-auth-token
-
-Authentication token.
-
-Properties:
-
-- Config: auth_token
-- Env Var: RCLONE_SEAFILE_AUTH_TOKEN
-- Type: string
-- Required: false
-
-### Advanced options
-
-Here are the Advanced options specific to seafile (seafile).
-
-#### --seafile-create-library
-
-Should rclone create a library if it doesn't exist.
-
-Properties:
-
-- Config: create_library
-- Env Var: RCLONE_SEAFILE_CREATE_LIBRARY
-- Type: bool
-- Default: false
-
-#### --seafile-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_SEAFILE_ENCODING
-- Type: Encoding
-- Default: Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8
-
-
-
-# SFTP
-
-SFTP is the [Secure (or SSH) File Transfer
-Protocol](https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol).
-
-The SFTP backend can be used with a number of different providers:
-
-
-- Hetzner Storage Box
-- rsync.net
-
-
-SFTP runs over SSH v2 and is installed as standard with most modern
-SSH installations.
-
-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. For example, `rclone lsd remote:`
-would list the home directory of the user configured in the rclone remote config
-(`i.e /home/sftpuser`). However, `rclone lsd remote:/` would list the root
-directory for remote machine (i.e. `/`)
-
-Note that some SFTP servers will need the leading / - Synology is a
-good example of this. rsync.net and Hetzner, on the other hand, requires users to
-OMIT the leading /.
-
-Note that by default rclone will try to execute shell commands on
-the server, see [shell access considerations](#shell-access-considerations).
-
-## Configuration
-
-Here is an example of making an SFTP 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 name> remote Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / SSH/SFTP "sftp" [snip] Storage> sftp SSH host to connect to Choose a number from below, or type in your own value 1 / Connect to example.com "example.com" host> example.com SSH username Enter a string value. Press Enter for the default ("$USER"). user> sftpuser SSH port number Enter a signed integer. Press Enter for the default (22). port> SSH password, leave blank to use ssh-agent. y) Yes type in my own password g) Generate random password n) No leave this optional password blank y/g/n> n Path to unencrypted PEM-encoded private key file, leave blank to use ssh-agent. key_file> Remote config -------------------- [remote] host = example.com user = sftpuser port = pass = key_file = -------------------- 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 directories in the home directory
-
- rclone lsd remote:
-
-See all directories in the root directory
-
- 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
-
-Mount the remote path `/srv/www-data/` to the local path
-`/mnt/www-data`
-
- rclone mount remote:/srv/www-data/ /mnt/www-data
-
-### SSH Authentication
-
-The SFTP remote supports three authentication methods:
-
- * Password
- * Key file, including certificate signed keys
- * ssh-agent
-
-Key files should be PEM-encoded private key files. For instance `/home/$USER/.ssh/id_rsa`.
-Only unencrypted OpenSSH or PEM encrypted files are supported.
-
-The key file can be specified in either an external file (key_file) or contained within the
-rclone config file (key_pem). If using key_pem in the config file, the entry should be on a
-single line with new line ('\n' or '\r\n') separating lines. i.e.
-
- key_pem = -----BEGIN RSA PRIVATE KEY-----\nMaMbaIXtE\n0gAMbMbaSsd\nMbaass\n-----END RSA PRIVATE KEY-----
-
-This will generate it correctly for key_pem for use in the config:
-
- awk '{printf "%s\\n", $0}' < ~/.ssh/id_rsa
-
-If you don't specify `pass`, `key_file`, or `key_pem` or `ask_password` then
-rclone will attempt to contact an ssh-agent. You can also specify `key_use_agent`
-to force the usage of an ssh-agent. In this case `key_file` or `key_pem` can
-also be specified to force the usage of a specific key in the ssh-agent.
-
-Using an ssh-agent is the only way to load encrypted OpenSSH keys at the moment.
-
-If you set the `ask_password` option, rclone will prompt for a password when
-needed and no password has been configured.
-
-#### Certificate-signed keys
-
-With traditional key-based authentication, you configure your private key only,
-and the public key built into it will be used during the authentication process.
-
-If you have a certificate you may use it to sign your public key, creating a
-separate SSH user certificate that should be used instead of the plain public key
-extracted from the private key. Then you must provide the path to the
-user certificate public key file in `pubkey_file`.
-
-Note: This is not the traditional public key paired with your private key,
-typically saved as `/home/$USER/.ssh/id_rsa.pub`. Setting this path in
-`pubkey_file` will not work.
-
-Example:
-
-[remote] type = sftp host = example.com user = sftpuser key_file = ~/id_rsa pubkey_file = ~/id_rsa-cert.pub
-
-If you concatenate a cert with a private key then you can specify the
-merged file in both places.
-
-Note: the cert must come first in the file. e.g.
-
-```
-cat id_rsa-cert.pub id_rsa > merged_key
-```
-
-### Host key validation
-
-By default rclone will not check the server's host key for validation. This
-can allow an attacker to replace a server with their own and if you use
-password authentication then this can lead to that password being exposed.
-
-Host key matching, using standard `known_hosts` files can be turned on by
-enabling the `known_hosts_file` option. This can point to the file maintained
-by `OpenSSH` or can point to a unique file.
-
-e.g. using the OpenSSH `known_hosts` file:
-
-```
+domain>
+Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME)
+tenant>
+Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID)
+tenant_id>
+Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME)
+tenant_domain>
+Region name - optional (OS_REGION_NAME)
+region>
+Storage URL - optional (OS_STORAGE_URL)
+storage_url>
+Auth Token from alternate authentication - optional (OS_AUTH_TOKEN)
+auth_token>
+AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION)
+auth_version>
+Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE)
+Choose a number from below, or type in your own value
+ 1 / Public (default, choose this if not sure)
+ \ "public"
+ 2 / Internal (use internal service net)
+ \ "internal"
+ 3 / Admin
+ \ "admin"
+endpoint_type>
+Remote config
+--------------------
+[test]
+env_auth = true
+user =
+key =
+auth =
+user_id =
+domain =
+tenant =
+tenant_id =
+tenant_domain =
+region =
+storage_url =
+auth_token =
+auth_version =
+endpoint_type =
+--------------------
+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 containers
+rclone lsd remote:
+Make a new container
+rclone mkdir remote:container
+List the contents of a container
+rclone ls remote:container
+Sync /home/local/directory
to the remote container, deleting any excess files in the container.
+rclone sync --interactive /home/local/directory remote:container
+Configuration from an OpenStack credentials file
+An OpenStack credentials file typically looks something something like this (without the comments)
+export OS_AUTH_URL=https://a.provider.net/v2.0
+export OS_TENANT_ID=ffffffffffffffffffffffffffffffff
+export OS_TENANT_NAME="1234567890123456"
+export OS_USERNAME="123abc567xy"
+echo "Please enter your OpenStack Password: "
+read -sr OS_PASSWORD_INPUT
+export OS_PASSWORD=$OS_PASSWORD_INPUT
+export OS_REGION_NAME="SBG1"
+if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
+The config file needs to look something like this where $OS_USERNAME
represents the value of the OS_USERNAME
variable - 123abc567xy
in the example above.
+[remote]
+type = swift
+user = $OS_USERNAME
+key = $OS_PASSWORD
+auth = $OS_AUTH_URL
+tenant = $OS_TENANT_NAME
+Note that you may (or may not) need to set region
too - try without first.
+Configuration from the environment
+If you prefer you can configure rclone to use swift using a standard set of OpenStack environment variables.
+When you run through the config, make sure you choose true
for env_auth
and leave everything else blank.
+rclone will then set any empty config parameters from the environment using standard OpenStack environment variables. There is a list of the variables in the docs for the swift library.
+Using an alternate authentication method
+If your OpenStack installation uses a non-standard authentication method that might not be yet supported by rclone or the underlying swift library, you can authenticate externally (e.g. calling manually the openstack
commands to get a token). Then, you just need to pass the two configuration variables auth_token
and storage_url
. If they are both provided, the other variables are ignored. rclone will not try to authenticate but instead assume it is already authenticated and use these two variables to access the OpenStack installation.
+Using rclone without a config file
+You can use rclone with swift without a config file, if desired, like this:
+source openstack-credentials-file
+export RCLONE_CONFIG_MYREMOTE_TYPE=swift
+export RCLONE_CONFIG_MYREMOTE_ENV_AUTH=true
+rclone lsd myremote:
+--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
+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
+
+
+
+
+
+
+NUL |
+0x00 |
+␀ |
+
+
+/ |
+0x2F |
+/ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+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.
+Properties:
+
+- Config: env_auth
+- Env Var: RCLONE_SWIFT_ENV_AUTH
+- Type: bool
+- Default: false
+- Examples:
+
+- "false"
+
+- Enter swift credentials in the next step.
+
+- "true"
+
+- Get swift credentials from environment vars.
+- Leave other fields blank if using this.
+
+
+
+--swift-user
+User name to log in (OS_USERNAME).
+Properties:
+
+- Config: user
+- Env Var: RCLONE_SWIFT_USER
+- Type: string
+- Required: false
+
+--swift-key
+API key or password (OS_PASSWORD).
+Properties:
+
+- Config: key
+- Env Var: RCLONE_SWIFT_KEY
+- Type: string
+- Required: false
+
+--swift-auth
+Authentication URL for server (OS_AUTH_URL).
+Properties:
+
+- Config: auth
+- Env Var: RCLONE_SWIFT_AUTH
+- Type: string
+- Required: false
+- Examples:
+
+- "https://auth.api.rackspacecloud.com/v1.0"
+
+- "https://lon.auth.api.rackspacecloud.com/v1.0"
+
+- "https://identity.api.rackspacecloud.com/v2.0"
+
+- "https://auth.storage.memset.com/v1.0"
+
+- "https://auth.storage.memset.com/v2.0"
+
+- "https://auth.cloud.ovh.net/v3"
+
+- "https://authenticate.ain.net"
+
+
+
+--swift-user-id
+User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID).
+Properties:
+
+- Config: user_id
+- Env Var: RCLONE_SWIFT_USER_ID
+- Type: string
+- Required: false
+
+--swift-domain
+User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME)
+Properties:
+
+- Config: domain
+- Env Var: RCLONE_SWIFT_DOMAIN
+- Type: string
+- Required: false
+
+--swift-tenant
+Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME).
+Properties:
+
+- Config: tenant
+- Env Var: RCLONE_SWIFT_TENANT
+- Type: string
+- Required: false
+
+--swift-tenant-id
+Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID).
+Properties:
+
+- Config: tenant_id
+- Env Var: RCLONE_SWIFT_TENANT_ID
+- Type: string
+- Required: false
+
+--swift-tenant-domain
+Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME).
+Properties:
+
+- Config: tenant_domain
+- Env Var: RCLONE_SWIFT_TENANT_DOMAIN
+- Type: string
+- Required: false
+
+--swift-region
+Region name - optional (OS_REGION_NAME).
+Properties:
+
+- Config: region
+- Env Var: RCLONE_SWIFT_REGION
+- Type: string
+- Required: false
+
+--swift-storage-url
+Storage URL - optional (OS_STORAGE_URL).
+Properties:
+
+- Config: storage_url
+- Env Var: RCLONE_SWIFT_STORAGE_URL
+- Type: string
+- Required: false
+
+--swift-auth-token
+Auth Token from alternate authentication - optional (OS_AUTH_TOKEN).
+Properties:
+
+- Config: auth_token
+- Env Var: RCLONE_SWIFT_AUTH_TOKEN
+- Type: string
+- Required: false
+
+--swift-application-credential-id
+Application Credential ID (OS_APPLICATION_CREDENTIAL_ID).
+Properties:
+
+- Config: application_credential_id
+- Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_ID
+- Type: string
+- Required: false
+
+--swift-application-credential-name
+Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME).
+Properties:
+
+- Config: application_credential_name
+- Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_NAME
+- Type: string
+- Required: false
+
+--swift-application-credential-secret
+Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET).
+Properties:
+
+- Config: application_credential_secret
+- Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_SECRET
+- Type: string
+- Required: false
+
+--swift-auth-version
+AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION).
+Properties:
+
+- Config: auth_version
+- Env Var: RCLONE_SWIFT_AUTH_VERSION
+- Type: int
+- Default: 0
+
+--swift-endpoint-type
+Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE).
+Properties:
+
+- Config: endpoint_type
+- Env Var: RCLONE_SWIFT_ENDPOINT_TYPE
+- Type: string
+- Default: "public"
+- Examples:
+
+- "public"
+
+- Public (default, choose this if not sure)
+
+- "internal"
+
+- Internal (use internal service net)
+
+- "admin"
+
+
+
+--swift-storage-policy
+The storage policy to use when creating a new container.
+This applies the specified storage policy when creating a new container. The policy cannot be changed afterwards. The allowed configuration values and their meaning depend on your Swift storage provider.
+Properties:
+
+- Config: storage_policy
+- Env Var: RCLONE_SWIFT_STORAGE_POLICY
+- Type: string
+- Required: false
+- Examples:
+
+- ""
+
+- "pcs"
+
+- OVH Public Cloud Storage
+
+- "pca"
+
+- OVH Public Cloud Archive
+
+
+
+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.
+It should be set to true for resuming uploads across different sessions.
+Properties:
+
+- Config: leave_parts_on_error
+- Env Var: RCLONE_SWIFT_LEAVE_PARTS_ON_ERROR
+- Type: bool
+- Default: false
+
+--swift-chunk-size
+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:
+
+- Config: chunk_size
+- Env Var: RCLONE_SWIFT_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 5Gi
+
+--swift-no-chunk
+Don't chunk files during streaming upload.
+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:
+
+- Config: no_chunk
+- Env Var: RCLONE_SWIFT_NO_CHUNK
+- Type: bool
+- Default: false
+
+--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 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.
+Properties:
+
+- Config: no_large_objects
+- Env Var: RCLONE_SWIFT_NO_LARGE_OBJECTS
+- 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.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_SWIFT_ENCODING
+- Type: Encoding
+- Default: Slash,InvalidUtf8
+
+--swift-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SWIFT_DESCRIPTION
+- Type: string
+- Required: false
+
+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
+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.
+This may also be caused by specifying the region when you shouldn't have (e.g. OVH).
+Rclone gives Failed to create file system: Response didn't have storage url and auth token
+This is most likely caused by forgetting to specify your tenant when setting up a swift remote.
+OVH Cloud Archive
+To use rclone with OVH cloud archive, first use rclone config
to set up a swift
backend with OVH, choosing pca
as the storage_policy
.
+Uploading Objects
+Uploading objects to OVH cloud archive is no different to object storage, you just simply run the command you like (move, copy or sync) to upload the objects. Once uploaded the objects will show in a "Frozen" state within the OVH control panel.
+Retrieving Objects
+To retrieve objects use rclone copy
as normal. If the objects are in a frozen state then rclone will ask for them all to be unfrozen and it will wait at the end of the output with a message like the following:
+2019/03/23 13:06:33 NOTICE: Received retry after error - sleeping until 2019-03-23T13:16:33.481657164+01:00 (9m59.99985121s)
+Rclone will wait for the time specified then retry the copy.
+pCloud
+Paths are specified as remote:path
+Paths may be as deep as required, e.g. remote:directory/subdirectory
.
+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
+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 / Pcloud
+ \ "pcloud"
+[snip]
+Storage> pcloud
+Pcloud App Client Id - leave blank normally.
+client_id>
+Pcloud App Client Secret - leave blank normally.
+client_secret>
+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","expiry":"0001-01-01T00:00:00Z"}
+--------------------
+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 pCloud. 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 pCloud
+rclone lsd remote:
+List all the files in your pCloud
+rclone ls remote:
+To copy a local directory to a pCloud directory called backup
+rclone copy /home/source remote:backup
+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
+In addition to the default restricted characters set the following characters are also replaced:
+
+
+
+
+
+
+\ |
+0x5C |
+\ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+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
+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
+Here are the Standard options specific to pcloud (Pcloud).
+--pcloud-client-id
+OAuth Client Id.
+Leave blank normally.
+Properties:
+
+- Config: client_id
+- Env Var: RCLONE_PCLOUD_CLIENT_ID
+- Type: string
+- Required: false
+
+--pcloud-client-secret
+OAuth Client Secret.
+Leave blank normally.
+Properties:
+
+- Config: client_secret
+- Env Var: RCLONE_PCLOUD_CLIENT_SECRET
+- Type: string
+- Required: false
+
+Advanced options
+Here are the Advanced options specific to pcloud (Pcloud).
+--pcloud-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_PCLOUD_TOKEN
+- Type: string
+- Required: false
+
+--pcloud-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_PCLOUD_AUTH_URL
+- Type: string
+- Required: false
+
+--pcloud-token-url
+Token server url.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_PCLOUD_TOKEN_URL
+- Type: string
+- Required: false
+
+--pcloud-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_PCLOUD_ENCODING
+- Type: Encoding
+- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
+
+--pcloud-root-folder-id
+Fill in for rclone to use a non root folder as its starting point.
+Properties:
+
+- Config: root_folder_id
+- Env Var: RCLONE_PCLOUD_ROOT_FOLDER_ID
+- Type: string
+- Default: "d0"
+
+--pcloud-hostname
+Hostname to connect to.
+This is normally set when rclone initially does the oauth connection, however you will need to set it by hand if you are using remote config with rclone authorize.
+Properties:
+
+- Config: hostname
+- Env Var: RCLONE_PCLOUD_HOSTNAME
+- Type: string
+- Default: "api.pcloud.com"
+- Examples:
+
+- "api.pcloud.com"
+
+- "eapi.pcloud.com"
+
+
+
+--pcloud-username
+Your pcloud username.
+This is only required when you want to use the cleanup command. Due to a bug in the pcloud API the required API does not support OAuth authentication so we have to rely on user password authentication for it.
+Properties:
+
+- Config: username
+- Env Var: RCLONE_PCLOUD_USERNAME
+- Type: string
+- Required: false
+
+--pcloud-password
+Your pcloud password.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: password
+- Env Var: RCLONE_PCLOUD_PASSWORD
+- Type: string
+- Required: false
+
+--pcloud-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PCLOUD_DESCRIPTION
+- Type: string
+- Required: false
+
+PikPak
+PikPak is a private cloud drive.
+Paths are specified as remote:path
, and may be as deep as required, e.g. remote:directory/subdirectory
.
+Configuration
+Here is an example of making a remote for PikPak.
+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 / PikPak
+ \ (pikpak)
+Storage> XX
+
+Option user.
+Pikpak username.
+Enter a value.
+user> USERNAME
+
+Option pass.
+Pikpak 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>
+
+Configuration complete.
+Options:
+- type: pikpak
+- user: USERNAME
+- pass: *** ENCRYPTED ***
+- token: {"access_token":"eyJ...","token_type":"Bearer","refresh_token":"os...","expiry":"2023-01-26T18:54:32.170582647+09:00"}
+Keep this "remote" remote?
+y) Yes this is OK (default)
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+Modification times and hashes
+PikPak keeps modification times on objects, and updates them when uploading objects, but it does not support changing only the modification time
+The MD5 hash algorithm is supported.
+Standard options
+Here are the Standard options specific to pikpak (PikPak).
+--pikpak-user
+Pikpak username.
+Properties:
+
+- Config: user
+- Env Var: RCLONE_PIKPAK_USER
+- Type: string
+- Required: true
+
+--pikpak-pass
+Pikpak password.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: pass
+- Env Var: RCLONE_PIKPAK_PASS
+- Type: string
+- Required: true
+
+Advanced options
+Here are the Advanced options specific to pikpak (PikPak).
+--pikpak-client-id
+OAuth Client Id.
+Leave blank normally.
+Properties:
+
+- Config: client_id
+- Env Var: RCLONE_PIKPAK_CLIENT_ID
+- Type: string
+- Required: false
+
+--pikpak-client-secret
+OAuth Client Secret.
+Leave blank normally.
+Properties:
+
+- Config: client_secret
+- Env Var: RCLONE_PIKPAK_CLIENT_SECRET
+- Type: string
+- Required: false
+
+--pikpak-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_PIKPAK_TOKEN
+- Type: string
+- Required: false
+
+--pikpak-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_PIKPAK_AUTH_URL
+- Type: string
+- Required: false
+
+--pikpak-token-url
+Token server url.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_PIKPAK_TOKEN_URL
+- Type: string
+- Required: false
+
+--pikpak-root-folder-id
+ID of the root folder. Leave blank normally.
+Fill in for rclone to use a non root folder as its starting point.
+Properties:
+
+- Config: root_folder_id
+- Env Var: RCLONE_PIKPAK_ROOT_FOLDER_ID
+- Type: string
+- Required: false
+
+--pikpak-use-trash
+Send files to the trash instead of deleting permanently.
+Defaults to true, namely sending files to the trash. Use --pikpak-use-trash=false
to delete files permanently instead.
+Properties:
+
+- Config: use_trash
+- Env Var: RCLONE_PIKPAK_USE_TRASH
+- Type: bool
+- Default: true
+
+--pikpak-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_PIKPAK_TRASHED_ONLY
+- Type: bool
+- Default: false
+
+--pikpak-hash-memory-limit
+Files bigger than this will be cached on disk to calculate hash if required.
+Properties:
+
+- Config: hash_memory_limit
+- Env Var: RCLONE_PIKPAK_HASH_MEMORY_LIMIT
+- 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.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_PIKPAK_ENCODING
+- Type: Encoding
+- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot
+
+--pikpak-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PIKPAK_DESCRIPTION
+- Type: string
+- Required: false
+
+Backend commands
+Here are the commands specific to the pikpak 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.
+addurl
+Add offline download task for url
+rclone backend addurl remote: [options] [<arguments>+]
+This command adds offline download task for url.
+Usage:
+rclone backend addurl pikpak:dirpath url
+Downloads will be stored in 'dirpath'. If 'dirpath' is invalid, download will fallback to default 'My Pack' folder.
+decompress
+Request decompress of a file/files in a folder
+rclone backend decompress remote: [options] [<arguments>+]
+This command requests decompress of file/files in a folder.
+Usage:
+rclone backend decompress pikpak:dirpath {filename} -o password=password
+rclone backend decompress pikpak:dirpath {filename} -o delete-src-file
+An optional argument 'filename' can be specified for a file located in 'pikpak:dirpath'. You may want to pass '-o password=password' for a password-protected files. Also, pass '-o delete-src-file' to delete source files after decompression finished.
+Result:
+{
+ "Decompressed": 17,
+ "SourceDeleted": 0,
+ "Errors": 0
+}
+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
+Deleted files will still be visible with --pikpak-trashed-only
even after the trash emptied. This goes away after few days.
+premiumize.me
+Paths are specified as remote:path
+Paths may be as deep as required, e.g. remote:directory/subdirectory
.
+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
+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 / premiumize.me
+ \ "premiumizeme"
+[snip]
+Storage> premiumizeme
+** See help for premiumizeme backend at: https://rclone.org/premiumizeme/ **
+
+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 = premiumizeme
+token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2029-08-07T18:44:15.548915378+01:00"}
+--------------------
+y) Yes this is OK
+e) Edit this remote
+d) Delete this remote
+y/e/d>
+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 premiumize.me. 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 premiumize.me
+rclone lsd remote:
+List all the files in your premiumize.me
+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
+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
+In addition to the default restricted characters set the following characters are also replaced:
+
+
+
+
+
+
+\ |
+0x5C |
+\ |
+
+
+" |
+0x22 |
+" |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+Standard options
+Here are the Standard options specific to premiumizeme (premiumize.me).
+--premiumizeme-client-id
+OAuth Client Id.
+Leave blank normally.
+Properties:
+
+- Config: client_id
+- Env Var: RCLONE_PREMIUMIZEME_CLIENT_ID
+- Type: string
+- Required: false
+
+--premiumizeme-client-secret
+OAuth Client Secret.
+Leave blank normally.
+Properties:
+
+- Config: client_secret
+- Env Var: RCLONE_PREMIUMIZEME_CLIENT_SECRET
+- Type: string
+- Required: false
+
+--premiumizeme-api-key
+API Key.
+This is not normally used - use oauth instead.
+Properties:
+
+- Config: api_key
+- Env Var: RCLONE_PREMIUMIZEME_API_KEY
+- Type: string
+- Required: false
+
+Advanced options
+Here are the Advanced options specific to premiumizeme (premiumize.me).
+--premiumizeme-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_PREMIUMIZEME_TOKEN
+- Type: string
+- Required: false
+
+--premiumizeme-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_PREMIUMIZEME_AUTH_URL
+- Type: string
+- Required: false
+
+--premiumizeme-token-url
+Token server url.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_PREMIUMIZEME_TOKEN_URL
+- Type: string
+- Required: false
+
+--premiumizeme-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_PREMIUMIZEME_ENCODING
+- Type: Encoding
+- Default: Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot
+
+--premiumizeme-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PREMIUMIZEME_DESCRIPTION
+- Type: string
+- Required: false
+
+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.
+Proton Drive
+Proton Drive is an end-to-end encrypted Swiss vault for your files that protects your data.
+This is an rclone backend for Proton Drive which supports the file transfer features of Proton Drive using the same client-side encryption.
+Due to the fact that Proton Drive doesn't publish its API documentation, this backend is implemented with best efforts by reading the open-sourced client source code and observing the Proton Drive traffic in the browser.
+NB This backend is currently in Beta. It is believed to be correct and all the integration tests pass. However the Proton Drive protocol has evolved over time there may be accounts it is not compatible with. Please post on the rclone forum if you find an incompatibility.
+Paths are specified as remote:path
+Paths may be as deep as required, e.g. remote:directory/subdirectory
.
+Configurations
+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 / Proton Drive
+ \ "protondrive"
+[snip]
+Storage> protondrive
+User name
+user> you@protonmail.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:
+Option 2fa.
+2FA code (if the account requires one)
+Enter a value. Press Enter to leave empty.
+2fa> 123456
+Remote config
+--------------------
+[remote]
+type = protondrive
+user = you@protonmail.com
+pass = *** ENCRYPTED ***
+--------------------
+y) Yes this is OK
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+NOTE: The Proton Drive 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.
+Once configured you can then use rclone
like this,
+List directories in top level of your Proton Drive
+rclone lsd remote:
+List all the files in your Proton Drive
+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
+Proton Drive Bridge does not support updating modification times yet.
+The SHA1 hash algorithm is supported.
+Restricted filename characters
+Invalid UTF-8 bytes will be replaced, also left and right spaces will be removed (code reference)
+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.
+
+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
+Here are the Standard options specific to protondrive (Proton Drive).
+--protondrive-username
+The username of your proton account
+Properties:
+
+- Config: username
+- Env Var: RCLONE_PROTONDRIVE_USERNAME
+- Type: string
+- Required: true
+
+--protondrive-password
+The password of your proton account.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: password
+- Env Var: RCLONE_PROTONDRIVE_PASSWORD
+- Type: string
+- Required: true
+
+--protondrive-2fa
+The 2FA code
+The value can also be provided with --protondrive-2fa=000000
+The 2FA code of your proton drive account if the account is set up with two-factor authentication
+Properties:
+
+- Config: 2fa
+- Env Var: RCLONE_PROTONDRIVE_2FA
+- Type: string
+- Required: false
+
+Advanced options
+Here are the Advanced options specific to protondrive (Proton Drive).
+--protondrive-mailbox-password
+The mailbox password of your two-password proton account.
+For more information regarding the mailbox password, please check the following official knowledge base article: https://proton.me/support/the-difference-between-the-mailbox-password-and-login-password
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: mailbox_password
+- Env Var: RCLONE_PROTONDRIVE_MAILBOX_PASSWORD
+- Type: string
+- Required: false
+
+--protondrive-client-uid
+Client uid key (internal use only)
+Properties:
+
+- Config: client_uid
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_UID
+- Type: string
+- Required: false
+
+--protondrive-client-access-token
+Client access token key (internal use only)
+Properties:
+
+- Config: client_access_token
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_ACCESS_TOKEN
+- Type: string
+- Required: false
+
+--protondrive-client-refresh-token
+Client refresh token key (internal use only)
+Properties:
+
+- Config: client_refresh_token
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_REFRESH_TOKEN
+- Type: string
+- Required: false
+
+--protondrive-client-salted-key-pass
+Client salted key pass key (internal use only)
+Properties:
+
+- Config: client_salted_key_pass
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_SALTED_KEY_PASS
+- Type: string
+- Required: false
+
+--protondrive-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_PROTONDRIVE_ENCODING
+- Type: Encoding
+- Default: Slash,LeftSpace,RightSpace,InvalidUtf8,Dot
+
+--protondrive-original-file-size
+Return the file size before encryption
+The size of the encrypted file will be different from (bigger than) the original file size. Unless there is a reason to return the file size after encryption is performed, otherwise, set this option to true, as features like Open() which will need to be supplied with original content size, will fail to operate properly
+Properties:
+
+- Config: original_file_size
+- Env Var: RCLONE_PROTONDRIVE_ORIGINAL_FILE_SIZE
+- Type: bool
+- Default: true
+
+--protondrive-app-version
+The app version string
+The app version string indicates the client that is currently performing the API request. This information is required and will be sent with every API request.
+Properties:
+
+- Config: app_version
+- Env Var: RCLONE_PROTONDRIVE_APP_VERSION
+- Type: string
+- Default: "macos-drive@1.0.0-alpha.1+rclone"
+
+--protondrive-replace-existing-draft
+Create a new revision when filename conflict is detected
+When a file upload is cancelled or failed before completion, a draft will be created and the subsequent upload of the same file to the same location will be reported as a conflict.
+The value can also be set by --protondrive-replace-existing-draft=true
+If the option is set to true, the draft will be replaced and then the upload operation will restart. If there are other clients also uploading at the same file location at the same time, the behavior is currently unknown. Need to set to true for integration tests. If the option is set to false, an error "a draft exist - usually this means a file is being uploaded at another client, or, there was a failed upload attempt" will be returned, and no upload will happen.
+Properties:
+
+- Config: replace_existing_draft
+- Env Var: RCLONE_PROTONDRIVE_REPLACE_EXISTING_DRAFT
+- Type: bool
+- Default: false
+
+--protondrive-enable-caching
+Caches the files and folders metadata to reduce API calls
+Notice: If you are mounting ProtonDrive as a VFS, please disable this feature, as the current implementation doesn't update or clear the cache when there are external changes.
+The files and folders on ProtonDrive are represented as links with keyrings, which can be cached to improve performance and be friendly to the API server.
+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.
+Properties:
+
+- Config: enable_caching
+- Env Var: RCLONE_PROTONDRIVE_ENABLE_CACHING
+- Type: bool
+- Default: true
+
+--protondrive-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PROTONDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
+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.
+put.io
+Paths are specified as remote:path
+put.io paths may be as deep as required, e.g. remote:directory/subdirectory
.
+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
+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> putio
+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 / Put.io
+ \ "putio"
+[snip]
+Storage> putio
+** See help for putio backend at: https://rclone.org/putio/ **
+
+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
+--------------------
+[putio]
+type = putio
+token = {"access_token":"XXXXXXXX","expiry":"0001-01-01T00:00:00Z"}
+--------------------
+y) Yes this is OK
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+Current remotes:
+
+Name Type
+==== ====
+putio putio
+
+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
+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 put.io 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.
+You can then use it like this,
+List directories in top level of your put.io
+rclone lsd remote:
+List all the files in your put.io
+rclone ls remote:
+To copy a local directory to a put.io directory called backup
+rclone copy /home/source remote:backup
+Restricted filename characters
+In addition to the default restricted characters set the following characters are also replaced:
+
+
+
+
+
+
+\ |
+0x5C |
+\ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+Standard options
+Here are the Standard options specific to putio (Put.io).
+--putio-client-id
+OAuth Client Id.
+Leave blank normally.
+Properties:
+
+- Config: client_id
+- Env Var: RCLONE_PUTIO_CLIENT_ID
+- Type: string
+- Required: false
+
+--putio-client-secret
+OAuth Client Secret.
+Leave blank normally.
+Properties:
+
+- Config: client_secret
+- Env Var: RCLONE_PUTIO_CLIENT_SECRET
+- Type: string
+- Required: false
+
+Advanced options
+Here are the Advanced options specific to putio (Put.io).
+--putio-token
+OAuth Access Token as a JSON blob.
+Properties:
+
+- Config: token
+- Env Var: RCLONE_PUTIO_TOKEN
+- Type: string
+- Required: false
+
+--putio-auth-url
+Auth server URL.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_PUTIO_AUTH_URL
+- Type: string
+- Required: false
+
+--putio-token-url
+Token server url.
+Leave blank to use the provider defaults.
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_PUTIO_TOKEN_URL
+- Type: string
+- Required: false
+
+--putio-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_PUTIO_ENCODING
+- Type: Encoding
+- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
+
+--putio-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PUTIO_DESCRIPTION
+- Type: string
+- Required: false
+
+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
+Proton Drive is an end-to-end encrypted Swiss vault for your files that protects your data.
+This is an rclone backend for Proton Drive which supports the file transfer features of Proton Drive using the same client-side encryption.
+Due to the fact that Proton Drive doesn't publish its API documentation, this backend is implemented with best efforts by reading the open-sourced client source code and observing the Proton Drive traffic in the browser.
+NB This backend is currently in Beta. It is believed to be correct and all the integration tests pass. However the Proton Drive protocol has evolved over time there may be accounts it is not compatible with. Please post on the rclone forum if you find an incompatibility.
+Paths are specified as remote:path
+Paths may be as deep as required, e.g. remote:directory/subdirectory
.
+Configurations
+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 / Proton Drive
+ \ "protondrive"
+[snip]
+Storage> protondrive
+User name
+user> you@protonmail.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:
+Option 2fa.
+2FA code (if the account requires one)
+Enter a value. Press Enter to leave empty.
+2fa> 123456
+Remote config
+--------------------
+[remote]
+type = protondrive
+user = you@protonmail.com
+pass = *** ENCRYPTED ***
+--------------------
+y) Yes this is OK
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+NOTE: The Proton Drive 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.
+Once configured you can then use rclone
like this,
+List directories in top level of your Proton Drive
+rclone lsd remote:
+List all the files in your Proton Drive
+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
+Proton Drive Bridge does not support updating modification times yet.
+The SHA1 hash algorithm is supported.
+Restricted filename characters
+Invalid UTF-8 bytes will be replaced, also left and right spaces will be removed (code reference)
+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.
+
+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
+Here are the Standard options specific to protondrive (Proton Drive).
+--protondrive-username
+The username of your proton account
+Properties:
+
+- Config: username
+- Env Var: RCLONE_PROTONDRIVE_USERNAME
+- Type: string
+- Required: true
+
+--protondrive-password
+The password of your proton account.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: password
+- Env Var: RCLONE_PROTONDRIVE_PASSWORD
+- Type: string
+- Required: true
+
+--protondrive-2fa
+The 2FA code
+The value can also be provided with --protondrive-2fa=000000
+The 2FA code of your proton drive account if the account is set up with two-factor authentication
+Properties:
+
+- Config: 2fa
+- Env Var: RCLONE_PROTONDRIVE_2FA
+- Type: string
+- Required: false
+
+Advanced options
+Here are the Advanced options specific to protondrive (Proton Drive).
+--protondrive-mailbox-password
+The mailbox password of your two-password proton account.
+For more information regarding the mailbox password, please check the following official knowledge base article: https://proton.me/support/the-difference-between-the-mailbox-password-and-login-password
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: mailbox_password
+- Env Var: RCLONE_PROTONDRIVE_MAILBOX_PASSWORD
+- Type: string
+- Required: false
+
+--protondrive-client-uid
+Client uid key (internal use only)
+Properties:
+
+- Config: client_uid
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_UID
+- Type: string
+- Required: false
+
+--protondrive-client-access-token
+Client access token key (internal use only)
+Properties:
+
+- Config: client_access_token
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_ACCESS_TOKEN
+- Type: string
+- Required: false
+
+--protondrive-client-refresh-token
+Client refresh token key (internal use only)
+Properties:
+
+- Config: client_refresh_token
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_REFRESH_TOKEN
+- Type: string
+- Required: false
+
+--protondrive-client-salted-key-pass
+Client salted key pass key (internal use only)
+Properties:
+
+- Config: client_salted_key_pass
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_SALTED_KEY_PASS
+- Type: string
+- Required: false
+
+--protondrive-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_PROTONDRIVE_ENCODING
+- Type: Encoding
+- Default: Slash,LeftSpace,RightSpace,InvalidUtf8,Dot
+
+--protondrive-original-file-size
+Return the file size before encryption
+The size of the encrypted file will be different from (bigger than) the original file size. Unless there is a reason to return the file size after encryption is performed, otherwise, set this option to true, as features like Open() which will need to be supplied with original content size, will fail to operate properly
+Properties:
+
+- Config: original_file_size
+- Env Var: RCLONE_PROTONDRIVE_ORIGINAL_FILE_SIZE
+- Type: bool
+- Default: true
+
+--protondrive-app-version
+The app version string
+The app version string indicates the client that is currently performing the API request. This information is required and will be sent with every API request.
+Properties:
+
+- Config: app_version
+- Env Var: RCLONE_PROTONDRIVE_APP_VERSION
+- Type: string
+- Default: "macos-drive@1.0.0-alpha.1+rclone"
+
+--protondrive-replace-existing-draft
+Create a new revision when filename conflict is detected
+When a file upload is cancelled or failed before completion, a draft will be created and the subsequent upload of the same file to the same location will be reported as a conflict.
+The value can also be set by --protondrive-replace-existing-draft=true
+If the option is set to true, the draft will be replaced and then the upload operation will restart. If there are other clients also uploading at the same file location at the same time, the behavior is currently unknown. Need to set to true for integration tests. If the option is set to false, an error "a draft exist - usually this means a file is being uploaded at another client, or, there was a failed upload attempt" will be returned, and no upload will happen.
+Properties:
+
+- Config: replace_existing_draft
+- Env Var: RCLONE_PROTONDRIVE_REPLACE_EXISTING_DRAFT
+- Type: bool
+- Default: false
+
+--protondrive-enable-caching
+Caches the files and folders metadata to reduce API calls
+Notice: If you are mounting ProtonDrive as a VFS, please disable this feature, as the current implementation doesn't update or clear the cache when there are external changes.
+The files and folders on ProtonDrive are represented as links with keyrings, which can be cached to improve performance and be friendly to the API server.
+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.
+Properties:
+
+- Config: enable_caching
+- Env Var: RCLONE_PROTONDRIVE_ENABLE_CACHING
+- Type: bool
+- Default: true
+
+--protondrive-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PROTONDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
+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
+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
+rclone config
+This will guide you through an interactive setup process. To authenticate you will need the URL of your server, your email (or username) and your password.
+No remotes found, make a new one?
+n) New remote
+s) Set configuration password
+q) Quit config
+n/s/q> n
+name> seafile
+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 / Seafile
+ \ "seafile"
+[snip]
+Storage> seafile
+** See help for seafile backend at: https://rclone.org/seafile/ **
+
+URL of seafile 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 cloud.seafile.com
+ \ "https://cloud.seafile.com/"
+url> http://my.seafile.server/
+User name (usually email address)
+Enter a string value. Press Enter for the default ("").
+user> me@example.com
+Password
+y) Yes type in my own password
+g) Generate random password
+n) No leave this optional password blank (default)
+y/g> y
+Enter the password:
+password:
+Confirm the password:
+password:
+Two-factor authentication ('true' if the account has 2FA enabled)
+Enter a boolean value (true or false). Press Enter for the default ("false").
+2fa> false
+Name of the library. Leave blank to access all non-encrypted libraries.
+Enter a string value. Press Enter for the default ("").
+library>
+Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
+y) Yes type in my own password
+g) Generate random password
+n) No leave this optional password blank (default)
+y/g/n> n
+Edit advanced config? (y/n)
+y) Yes
+n) No (default)
+y/n> n
+Remote config
+Two-factor authentication is not enabled on this account.
+--------------------
+[seafile]
+type = seafile
+url = http://my.seafile.server/
+user = me@example.com
+pass = *** ENCRYPTED ***
+2fa = false
+--------------------
+y) Yes this is OK (default)
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+This remote is called seafile
. It's pointing to the root of your seafile server and can now be used like this:
+See all libraries
+rclone lsd seafile:
+Create a new library
+rclone mkdir seafile:library
+List the contents of a library
+rclone ls seafile:library
+Sync /home/local/directory
to the remote library, deleting any excess files in the library.
+rclone sync --interactive /home/local/directory seafile:library
+Configuration in library mode
+Here's an example of a configuration in library mode with a user that has the two-factor authentication enabled. Your 2FA code will be asked at the end of the configuration, and will attempt to authenticate you:
+No remotes found, make a new one?
+n) New remote
+s) Set configuration password
+q) Quit config
+n/s/q> n
+name> seafile
+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 / Seafile
+ \ "seafile"
+[snip]
+Storage> seafile
+** See help for seafile backend at: https://rclone.org/seafile/ **
+
+URL of seafile 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 cloud.seafile.com
+ \ "https://cloud.seafile.com/"
+url> http://my.seafile.server/
+User name (usually email address)
+Enter a string value. Press Enter for the default ("").
+user> me@example.com
+Password
+y) Yes type in my own password
+g) Generate random password
+n) No leave this optional password blank (default)
+y/g> y
+Enter the password:
+password:
+Confirm the password:
+password:
+Two-factor authentication ('true' if the account has 2FA enabled)
+Enter a boolean value (true or false). Press Enter for the default ("false").
+2fa> true
+Name of the library. Leave blank to access all non-encrypted libraries.
+Enter a string value. Press Enter for the default ("").
+library> My Library
+Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
+y) Yes type in my own password
+g) Generate random password
+n) No leave this optional password blank (default)
+y/g/n> n
+Edit advanced config? (y/n)
+y) Yes
+n) No (default)
+y/n> n
+Remote config
+Two-factor authentication: please enter your 2FA code
+2fa code> 123456
+Authenticating...
+Success!
+--------------------
+[seafile]
+type = seafile
+url = http://my.seafile.server/
+user = me@example.com
+pass =
+2fa = true
+library = My Library
+--------------------
+y) Yes this is OK (default)
+e) Edit this remote
+d) Delete this remote
+y/e/d> y
+You'll notice your password is blank in the configuration. It's because we only need the password to authenticate you once.
+You specified My Library
during the configuration. The root of the remote is pointing at the root of the library My Library
:
+See all files in the library:
+rclone lsd seafile:
+Create a new directory inside the library
+rclone mkdir seafile:directory
+List the contents of a directory
+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
+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
+In addition to the default restricted characters set the following characters are also replaced:
+
+
+
+
+
+
+/ |
+0x2F |
+/ |
+
+
+" |
+0x22 |
+" |
+
+
+\ |
+0x5C |
+\ |
+
+
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON strings.
+Seafile and rclone link
+Rclone supports generating share links for non-encrypted libraries only. They can either be for a file or a directory:
+rclone link seafile:seafile-tutorial.doc
+http://my.seafile.server/f/fdcd8a2f93f84b8b90f4/
+
+or if run on a directory you will get:
+rclone link seafile:dir
+http://my.seafile.server/d/9ea2455f6f55478bbb0d/
+Please note a share link is unique for each file or directory. If you run a link command on a file/dir that has already been shared, you will get the exact same link.
+Compatibility
+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
+Here are the Standard options specific to seafile (seafile).
+--seafile-url
+URL of seafile host to connect to.
+Properties:
+
+- Config: url
+- Env Var: RCLONE_SEAFILE_URL
+- Type: string
+- Required: true
+- Examples:
+
+- "https://cloud.seafile.com/"
+
+- Connect to cloud.seafile.com.
+
+
+
+--seafile-user
+User name (usually email address).
+Properties:
+
+- Config: user
+- Env Var: RCLONE_SEAFILE_USER
+- Type: string
+- Required: true
+
+--seafile-pass
+Password.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: pass
+- Env Var: RCLONE_SEAFILE_PASS
+- Type: string
+- Required: false
+
+--seafile-2fa
+Two-factor authentication ('true' if the account has 2FA enabled).
+Properties:
+
+- Config: 2fa
+- Env Var: RCLONE_SEAFILE_2FA
+- Type: bool
+- Default: false
+
+--seafile-library
+Name of the library.
+Leave blank to access all non-encrypted libraries.
+Properties:
+
+- Config: library
+- Env Var: RCLONE_SEAFILE_LIBRARY
+- Type: string
+- Required: false
+
+--seafile-library-key
+Library password (for encrypted libraries only).
+Leave blank if you pass it through the command line.
+NB Input to this must be obscured - see rclone obscure.
+Properties:
+
+- Config: library_key
+- Env Var: RCLONE_SEAFILE_LIBRARY_KEY
+- Type: string
+- Required: false
+
+--seafile-auth-token
+Authentication token.
+Properties:
+
+- Config: auth_token
+- Env Var: RCLONE_SEAFILE_AUTH_TOKEN
+- Type: string
+- Required: false
+
+Advanced options
+Here are the Advanced options specific to seafile (seafile).
+--seafile-create-library
+Should rclone create a library if it doesn't exist.
+Properties:
+
+- Config: create_library
+- Env Var: RCLONE_SEAFILE_CREATE_LIBRARY
+- Type: bool
+- Default: false
+
+--seafile-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_SEAFILE_ENCODING
+- Type: Encoding
+- Default: Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8
+
+--seafile-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SEAFILE_DESCRIPTION
+- Type: string
+- Required: false
+
+SFTP
+SFTP is the Secure (or SSH) File Transfer Protocol.
+The SFTP backend can be used with a number of different providers:
+
+- Hetzner Storage Box
+- rsync.net
+
+SFTP runs over SSH v2 and is installed as standard with most modern SSH installations.
+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. For example, rclone lsd remote:
would list the home directory of the user configured in the rclone remote config (i.e /home/sftpuser
). However, rclone lsd remote:/
would list the root directory for remote machine (i.e. /
)
+Note that some SFTP servers will need the leading / - Synology is a good example of this. rsync.net and Hetzner, on the other hand, requires users to OMIT the leading /.
+Note that by default rclone will try to execute shell commands on the server, see shell access considerations.
+Configuration
+Here is an example of making an SFTP 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
+name> remote
+Type of storage to configure.
+Choose a number from below, or type in your own value
+[snip]
+XX / SSH/SFTP
+ \ "sftp"
+[snip]
+Storage> sftp
+SSH host to connect to
+Choose a number from below, or type in your own value
+ 1 / Connect to example.com
+ \ "example.com"
+host> example.com
+SSH username
+Enter a string value. Press Enter for the default ("$USER").
+user> sftpuser
+SSH port number
+Enter a signed integer. Press Enter for the default (22).
+port>
+SSH password, leave blank to use ssh-agent.
+y) Yes type in my own password
+g) Generate random password
+n) No leave this optional password blank
+y/g/n> n
+Path to unencrypted PEM-encoded private key file, leave blank to use ssh-agent.
+key_file>
+Remote config
+--------------------
+[remote]
+host = example.com
+user = sftpuser
+port =
+pass =
+key_file =
+--------------------
+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 directories in the home directory
+rclone lsd remote:
+See all directories in the root directory
+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
+Mount the remote path /srv/www-data/
to the local path /mnt/www-data
+rclone mount remote:/srv/www-data/ /mnt/www-data
+SSH Authentication
+The SFTP remote supports three authentication methods:
+
+- Password
+- Key file, including certificate signed keys
+- ssh-agent
+
+Key files should be PEM-encoded private key files. For instance /home/$USER/.ssh/id_rsa
. Only unencrypted OpenSSH or PEM encrypted files are supported.
+The key file can be specified in either an external file (key_file) or contained within the rclone config file (key_pem). If using key_pem in the config file, the entry should be on a single line with new line ('' or '') separating lines. i.e.
+key_pem = -----BEGIN RSA PRIVATE KEY-----\nMaMbaIXtE\n0gAMbMbaSsd\nMbaass\n-----END RSA PRIVATE KEY-----
+This will generate it correctly for key_pem for use in the config:
+awk '{printf "%s\\n", $0}' < ~/.ssh/id_rsa
+If you don't specify pass
, key_file
, or key_pem
or ask_password
then rclone will attempt to contact an ssh-agent. You can also specify key_use_agent
to force the usage of an ssh-agent. In this case key_file
or key_pem
can also be specified to force the usage of a specific key in the ssh-agent.
+Using an ssh-agent is the only way to load encrypted OpenSSH keys at the moment.
+If you set the ask_password
option, rclone will prompt for a password when needed and no password has been configured.
+Certificate-signed keys
+With traditional key-based authentication, you configure your private key only, and the public key built into it will be used during the authentication process.
+If you have a certificate you may use it to sign your public key, creating a separate SSH user certificate that should be used instead of the plain public key extracted from the private key. Then you must provide the path to the user certificate public key file in pubkey_file
.
+Note: This is not the traditional public key paired with your private key, typically saved as /home/$USER/.ssh/id_rsa.pub
. Setting this path in pubkey_file
will not work.
+Example:
+[remote]
+type = sftp
+host = example.com
+user = sftpuser
+key_file = ~/id_rsa
+pubkey_file = ~/id_rsa-cert.pub
+If you concatenate a cert with a private key then you can specify the merged file in both places.
+Note: the cert must come first in the file. e.g.
+cat id_rsa-cert.pub id_rsa > merged_key
+Host key validation
+By default rclone will not check the server's host key for validation. This can allow an attacker to replace a server with their own and if you use password authentication then this can lead to that password being exposed.
+Host key matching, using standard known_hosts
files can be turned on by enabling the known_hosts_file
option. This can point to the file maintained by OpenSSH
or can point to a unique file.
+e.g. using the OpenSSH known_hosts
file:
+[remote]
type = sftp
host = example.com
user = sftpuser
@@ -33509,26 +32563,26 @@ known_hosts_file = ~/.ssh/known_hosts
Shell access
Some functionality of the SFTP backend relies on remote shell access, and the possibility to execute commands. This includes checksum, and in some cases also about. The shell commands that must be executed may be different on different type of shells, and also quoting/escaping of file path arguments containing special characters may be different. Rclone therefore needs to know what type of shell it is, and if shell access is available at all.
Most servers run on some version of Unix, and then a basic Unix shell can be assumed, without further distinction. Windows 10, Server 2019, and later can also run a SSH server, which is a port of OpenSSH (see official installation guide). On a Windows server the shell handling is different: Although it can also be set up to use a Unix type shell, e.g. Cygwin bash, the default is to use Windows Command Prompt (cmd.exe), and PowerShell is a recommended alternative. All of these have behave differently, which rclone must handle.
-Rclone tries to auto-detect what type of shell is used on the server, first time you access the SFTP remote. If a remote shell session is successfully created, it will look for indications that it is CMD or PowerShell, with fall-back to Unix if not something else is detected. If unable to even create a remote shell session, then shell command execution will be disabled entirely. The result is stored in the SFTP remote configuration, in option shell_type
, so that the auto-detection 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.
+Rclone tries to auto-detect what type of shell is used on the server, first time you access the SFTP remote. If a remote shell session is successfully created, it will look for indications that it is CMD or PowerShell, with fall-back to Unix if not something else is detected. If unable to even create a remote shell session, then shell command execution will be disabled entirely. The result is stored in the SFTP remote configuration, in option shell_type
, so that the auto-detection 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. 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 server does not actually have a shell, but it accepts input commands matching the specific ones that the SFTP backend relies on for Unix shells, e.g. md5sum
and df
. Also it handles the string escape rules used for Unix shell. Treating it as a Unix type shell from a SFTP remote will therefore always be correct, and support all features.
Shell access considerations
The shell type auto-detection logic, described above, means that by default rclone will try to run a shell command the first time a new sftp remote is accessed. If you configure a sftp remote without a config file, e.g. an on the fly remote, rclone will have nowhere to store the result, and it will re-run the command on every access. To avoid this you should explicitly set the shell_type
option to the correct value, or to none
if you want to prevent rclone from executing any remote shell commands.
It is also important to note that, since the shell type decides how quoting and escaping of file paths used as command-line arguments are performed, configuring the wrong shell type may leave you exposed to command injection exploits. Make sure to confirm the auto-detected shell type, or explicitly set the shell type you know is correct, or disable shell access until you know.
-Checksum
+Checksum
SFTP does not natively support checksums (file hash), but rclone is able to use checksumming if the same login has shell access, and can execute remote commands. If there is a command that can calculate compatible checksums on the remote system, Rclone can then be configured to execute this whenever a checksum is needed, and read back the results. Currently MD5 and SHA-1 are supported.
Normally this requires an external utility being available on the server. By default rclone will try commands md5sum
, md5
and rclone md5sum
for MD5 checksums, and the first one found usable will be picked. Same with sha1sum
, sha1
and rclone sha1sum
commands for SHA-1 checksums. These utilities normally need to be in the remote's PATH to be found.
In some cases the shell itself is capable of calculating checksums. PowerShell is an example of such a shell. If rclone detects that the remote shell is PowerShell, which means it most probably is a Windows OpenSSH server, rclone will use a predefined script block to produce the checksums when no external checksum commands are found (see shell access). This assumes PowerShell version 4.0 or newer.
The options md5sum_command
and sha1_command
can be used to customize the command to be executed for calculation of checksums. You can for example set a specific path to where md5sum and sha1sum executables are located, or use them to specify some other tools that print checksums in compatible format. The value can include command-line arguments, or even shell script blocks as with PowerShell. Rclone has subcommands md5sum and sha1sum that use compatible format, which means if you have an rclone executable on the server it can be used. As mentioned above, they will be automatically picked up if found in PATH, but if not you can set something like /path/to/rclone md5sum
as the value of option md5sum_command
to make sure a specific executable is used.
Remote checksumming is recommended and enabled by default. First time rclone is using a SFTP remote, if options md5sum_command
or sha1_command
are not set, it will check if any of the default commands for each of them, as described above, can be used. The result will be saved in the remote configuration, so next time it will use the same. Value none
will be set if none of the default commands could be used for a specific algorithm, and this algorithm will not be supported by the remote.
Disabling the checksumming may be required if you are connecting to SFTP servers which are not under your control, and to which the execution of remote shell commands is prohibited. Set the configuration option disable_hashcheck
to true
to disable checksumming entirely, or set shell_type
to none
to disable all functionality based on remote shell command execution.
-Modification times and hashes
+Modification times and hashes
Modified times are stored on the server to 1 second precision.
Modified times are used in syncing and are fully supported.
Some SFTP servers disable setting/modifying the file modification time after upload (for example, certain configurations of ProFTPd with mod_sftp). If you are using one of these servers, you can set the option set_modtime = false
in your RClone backend configuration to disable this behaviour.
About command
The about
command returns the total space, free space, and used space on the remote for the disk of the specified path on the remote or, if not set, the disk of the root on the remote.
SFTP usually supports the about command, but it depends on the server. If the server implements the vendor-specific VFS statistics extension, which is normally the case with OpenSSH instances, it will be used. If not, but the same login has access to a Unix shell, where the df
command is available (e.g. in the remote's PATH), then this will be used instead. If the server shell is PowerShell, probably with a Windows OpenSSH server, rclone will use a built-in shell command (see shell access). If none of the above is applicable, about
will fail.
-Standard options
+Standard options
Here are the Standard options specific to sftp (SSH/SFTP).
--sftp-host
SSH host to connect to.
@@ -33679,7 +32733,7 @@ known_hosts_file = ~/.ssh/known_hosts
Type: SpaceSepList
Default:
-Advanced options
+Advanced options
Here are the Advanced options specific to sftp (SSH/SFTP).
--sftp-known-hosts-file
Optional path to known_hosts file.
@@ -33888,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:
+
+- Config: connections
+- Env Var: RCLONE_SFTP_CONNECTIONS
+- Type: int
+- Default: 0
+
--sftp-set-env
Environment variables to pass to sftp and commands
Set environment variables in the form:
@@ -33981,7 +33048,16 @@ server_command = sudo /usr/libexec/openssh/sftp-server
Type: bool
Default: false
-Limitations
+--sftp-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SFTP_DESCRIPTION
+- Type: string
+- Required: false
+
+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.
@@ -33998,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
@@ -34077,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.
@@ -34138,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.
@@ -34180,8 +33256,18 @@ y/e/d> d
Type: Encoding
Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot
+--smb-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SMB_DESCRIPTION
+- Type: string
+- Required: false
+
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.
@@ -34239,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
@@ -34336,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.
@@ -34415,7 +33501,18 @@ y/e/d> y
Type: string
Required: false
-Usage
+Advanced options
+Here are the Advanced options specific to storj (Storj Decentralized Cloud Storage).
+--storj-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_STORJ_DESCRIPTION
+- Type: string
+- Required: false
+
+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
@@ -34469,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
@@ -34542,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.
@@ -34591,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.
@@ -34663,16 +33760,197 @@ y/e/d> y
Type: Encoding
Default: Slash,Ctl,InvalidUtf8,Dot
-Limitations
+--sugarsync-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SUGARSYNC_DESCRIPTION
+- Type: string
+- Required: false
+
+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:
+
+
+
+
+
+
+\ |
+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 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
@@ -34726,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:
@@ -34752,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.
@@ -34764,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
@@ -34785,7 +34063,16 @@ y/e/d>
Type: Encoding
Default: Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot
-Limitations
+--uptobox-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_UPTOBOX_DESCRIPTION
+- Type: string
+- Required: false
+
+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
@@ -34799,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:
@@ -34936,7 +34223,7 @@ e/n/d/r/c/s/q> q
To check if your upstream supports the field, run rclone about remote: [flags]
and see if the required field exists.
-Filters
+Filters
Policies basically search upstream remotes and create a list of files / paths for functions to work on. The policy is responsible for filtering and sorting. The policy type defines the sorting but filtering is mostly uniform as described below.
- No search policies filter.
@@ -35032,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.
@@ -35081,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.
@@ -35093,13 +34380,22 @@ upstreams = /local:writeback remote:dir
Type: SizeSuffix
Default: 1Gi
-
+--union-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_UNION_DESCRIPTION
+- Type: string
+- Required: false
+
+
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
@@ -35173,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.
@@ -35257,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.
@@ -35312,9 +34608,36 @@ y/e/d> y
Type: SizeSuffix
Default: 10Mi
+--webdav-owncloud-exclude-shares
+Exclude ownCloud shares
+Properties:
+
+- Config: owncloud_exclude_shares
+- Env Var: RCLONE_WEBDAV_OWNCLOUD_EXCLUDE_SHARES
+- 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.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_WEBDAV_DESCRIPTION
+- Type: string
+- Required: false
+
Provider notes
See below for notes on specific providers.
-Fastmail Files
+Fastmail Files
Use https://webdav.fastmail.com/
or a subdirectory as the URL, and your Fastmail email username@domain.tld
as the username. Follow this documentation to create an app password with access to Files (WebDAV)
and use this as the password.
Fastmail supports modified times using the X-OC-Mtime
header.
Owncloud
@@ -35390,7 +34713,7 @@ vendor = other
bearer_token_command = oidc-token XDC
Yandex Disk
Yandex Disk is a cloud storage solution created by Yandex.
-Configuration
+Configuration
Here is an example of making a yandex configuration. First run
rclone config
This will guide you through an interactive setup process:
@@ -35444,17 +34767,17 @@ y/e/d> y
Sync /home/local/directory
to the remote path, deleting any excess files in the path.
rclone sync --interactive /home/local/directory remote:directory
Yandex paths may be as deep as required, e.g. remote:directory/subdirectory
.
-Modification times and hashes
+Modification times and hashes
Modified times are supported and are stored accurate to 1 ns in custom metadata called rclone_modified
in RFC3339 with nanoseconds format.
The MD5 hash algorithm is natively supported by Yandex Disk.
-Emptying Trash
+Emptying Trash
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.
-
+
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
+Restricted filename characters
The default restricted characters set are 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 yandex (Yandex Disk).
--yandex-client-id
OAuth Client Id.
@@ -35476,7 +34799,7 @@ y/e/d> y
Type: string
Required: false
-Advanced options
+Advanced options
Here are the Advanced options specific to yandex (Yandex Disk).
--yandex-token
OAuth Access Token as a JSON blob.
@@ -35526,13 +34849,22 @@ y/e/d> y
Type: Encoding
Default: Slash,Del,Ctl,InvalidUtf8,Dot
-Limitations
+--yandex-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_YANDEX_DESCRIPTION
+- Type: string
+- Required: false
+
+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:
@@ -35605,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.
-
+
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.
@@ -35671,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.
@@ -35712,6 +35044,15 @@ y/e/d>
Type: Encoding
Default: Del,Ctl,InvalidUtf8
+--zoho-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_ZOHO_DESCRIPTION
+- Type: string
+- Required: false
+
Setting up your own client_id
For Zoho we advise you to set up your own client_id. To do so you have to complete the following steps.
@@ -35724,9 +35065,9 @@ y/e/d>
Local paths are specified as normal filesystem paths, e.g. /path/to/wherever
, so
rclone sync --interactive /home/source /tmp/destination
Will sync /home/source
to /tmp/destination
.
-Configuration
+Configuration
For consistencies sake one can also configure a remote of type local
in the config file, and access the local filesystem using rclone remote paths, e.g. remote:path/to/wherever
, but it is probably easier not to.
-Modification times
+Modification times
Rclone reads and writes the modification times using an accuracy determined by the OS. Typically this is 1ns on Linux, 10 ns on Windows and 1 Second on OS X.
Filenames
Filenames should be encoded in UTF-8 on disk. This is the normal case for Windows and OS X.
@@ -36047,7 +35388,7 @@ nounc = true
├── file1 -> ./file4
└── file2 -> /home/user/file3
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
$ rclone ls remote:/tmp/a
5 file1.rclonelink
@@ -36059,7 +35400,7 @@ nounc = true
$ rclone cat remote:/tmp/a/file2.rclonelink
/home/user/file3
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
@@ -36072,6 +35413,12 @@ $ tree /tmp/b
/tmp/b
├── 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
Normally rclone will recurse through filesystems as mounted.
@@ -36095,7 +35442,7 @@ $ tree /tmp/b
0 file2
NB Rclone (like most unix tools such as du
, rsync
and tar
) treats a bind mount to the same device as being on the same filesystem.
NB This flag is only available on Unix based systems. On systems where it isn't supported (e.g. Windows) it will be ignored.
-Advanced options
+Advanced options
Here are the Advanced options specific to local (Local Disk).
--local-nounc
Disable UNC (long path names) conversion on Windows.
@@ -36249,6 +35596,44 @@ $ tree /tmp/b
- 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"
+
+- "btime"
+
+- "ctime"
+
+- The last status change time.
+
+
+
--local-encoding
The encoding for the backend.
See the encoding section in the overview for more info.
@@ -36259,9 +35644,19 @@ $ tree /tmp/b
- Type: Encoding
- Default: Slash,Dot
-
+--local-description
+Description of the remote.
+Properties:
+
+- Config: description
+- Env Var: RCLONE_LOCAL_DESCRIPTION
+- Type: string
+- Required: false
+
+
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.
Here are the possible system metadata items for the local backend.
@@ -36333,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:
@@ -36350,6 +35745,590 @@ $ tree /tmp/b
- "error": return an error based on option value
Changelog
+v1.67.0 - 2024-06-14
+See commits
+
+- New backends
+
+- uloz.to (iotmaestro)
+- New S3 providers
+
+
+- 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
+
+- Major features
+
+- Rclone will now sync directory modification times if the backend supports it.
+
+- Rclone will now sync directory metadata if the backend supports it when
-M
/--metadata
is in use.
+
+- See the overview and look for the
D
flags in the Metadata
column to see which backends support it.
+
+- Bisync has received many updates see below for more details or bisync's changelog
+
+- Removed backends
+
+- amazonclouddrive: Remove Amazon Drive backend code and docs (Nick Craig-Wood)
+
+- New Features
+
+- backend
+
+- Add description field for all backends (Paul Stern)
+
+- build
+
+- Update to go1.22 and make go1.20 the minimum required version (Nick Craig-Wood)
+- Fix
CVE-2024-24786
by upgrading google.golang.org/protobuf
(Nick Craig-Wood)
+
+- check: Respect
--no-unicode-normalization
and --ignore-case-sync
for --checkfile
(nielash)
+- cmd: Much improved shell auto completion which reduces the size of the completion file and works faster (Nick Craig-Wood)
+- doc updates (albertony, ben-ba, Eli, emyarod, huajin tong, Jack Provance, kapitainsky, keongalvin, Nick Craig-Wood, nielash, rarspace01, rzitzer, Tera, Vincent Murphy)
+- fs: Add more detailed logging for file includes/excludes (Kyle Reynolds)
+- lsf
+
+- Add
--time-format
flag (nielash)
+- Make metadata appear for directories (Nick Craig-Wood)
+
+- lsjson: Make metadata appear for directories (Nick Craig-Wood)
+- rc
+
+- Add
srcFs
and dstFs
to core/stats
and core/transferred
stats (Nick Craig-Wood)
+- Add
operations/hashsum
to the rc as rclone hashsum
equivalent (Nick Craig-Wood)
+- Add
config/paths
to the rc as rclone config paths
equivalent (Nick Craig-Wood)
+
+- sync
+
+- Optionally report list of synced paths to file (nielash)
+- Implement directory sync for mod times and metadata (Nick Craig-Wood)
+- Don't set directory modtimes if already set (nielash)
+- Don't sync directory modtimes from backends which don't have directories (Nick Craig-Wood)
+
+
+- Bug Fixes
+
+- backend
+
+- Make backends which use oauth implement the
Shutdown
and shutdown the oauth properly (rkonfj)
+
+- bisync
+
+- Handle unicode and case normalization consistently (nielash)
+- Partial uploads known issue on
local
/ftp
/sftp
has been resolved (unless using --inplace
) (nielash)
+- Fixed handling of unicode normalization and case insensitivity, support for
--fix-case
, --ignore-case-sync
, --no-unicode-normalization
(nielash)
+- Bisync no longer fails to find the correct listing file when configs are overridden with backend-specific flags. (nielash)
+
+- nfsmount
+
+- Fix exit after external unmount (nielash)
+- Fix
--volname
being ignored (nielash)
+
+- operations
+
+- Fix renaming a file on macOS (nielash)
+- Fix case-insensitive moves in operations.Move (nielash)
+- Fix TestCaseInsensitiveMoveFileDryRun on chunker integration tests (nielash)
+- Fix TestMkdirModTime test (Nick Craig-Wood)
+- Fix TestSetDirModTime for backends with SetDirModTime but not Metadata (Nick Craig-Wood)
+- Fix typo in log messages (nielash)
+
+- serve nfs: Fix writing files via Finder on macOS (nielash)
+- serve restic: Fix error handling (Michael Eischer)
+- serve webdav: Fix
--baseurl
without leading / (Nick Craig-Wood)
+- stats: Fix race between ResetCounters and stopAverageLoop called from time.AfterFunc (Nick Craig-Wood)
+- sync
+
+--fix-case
flag to rename case insensitive dest (nielash)
+- Use operations.DirMove instead of sync.MoveDir for
--fix-case
(nielash)
+
+- systemd: Fix detection and switch to the coreos package everywhere rather than having 2 separate libraries (Anagh Kumar Baranwal)
+
+- Mount
+
+- Fix macOS not noticing errors with
--daemon
(Nick Craig-Wood)
+- Notice daemon dying much quicker (Nick Craig-Wood)
+
+- VFS
+
+- Fix unicode normalization on macOS (nielash)
+
+- Bisync
+
+- Copies and deletes are now handled in one operation instead of two (nielash)
+--track-renames
and --backup-dir
are now supported (nielash)
+- Final listings are now generated from sync results, to avoid needing to re-list (nielash)
+- Bisync is now much more resilient to changes that happen during a bisync run, and far less prone to critical errors / undetected changes (nielash)
+- Bisync is now capable of rolling a file listing back in cases of uncertainty, essentially marking the file as needing to be rechecked next time. (nielash)
+- A few basic terminal colors are now supported, controllable with
--color
(AUTO
|NEVER
|ALWAYS
) (nielash)
+- Initial listing snapshots of Path1 and Path2 are now generated concurrently, using the same "march" infrastructure as
check
and sync
, for performance improvements and less risk of error. (nielash)
+--resync
is now much more efficient (especially for users of --create-empty-src-dirs
) (nielash)
+- Google Docs (and other files of unknown size) are now supported (with the same options as in
sync
) (nielash)
+- Equality checks before a sync conflict rename now fall back to
cryptcheck
(when possible) or --download
, (nielash) instead of of --size-only
, when check
is not available.
+- Bisync now fully supports comparing based on any combination of size, modtime, and checksum, lifting the prior restriction on backends without modtime support. (nielash)
+- Bisync now supports a "Graceful Shutdown" mode to cleanly cancel a run early without requiring
--resync
. (nielash)
+- New
--recover
flag allows robust recovery in the event of interruptions, without requiring --resync
. (nielash)
+- A new
--max-lock
setting allows lock files to automatically renew and expire, for better automatic recovery when a run is interrupted. (nielash)
+- Bisync now supports auto-resolving sync conflicts and customizing rename behavior with new
--conflict-resolve
, --conflict-loser
, and --conflict-suffix
flags. (nielash)
+- A new
--resync-mode
flag allows more control over which version of a file gets kept during a --resync
. (nielash)
+- Bisync now supports
--retries
and --retries-sleep
(when --resilient
is set.) (nielash)
+- Clarify file operation directions in dry-run logs (Kyle Reynolds)
+
+- Local
+
+- Fix cleanRootPath on Windows after go1.21.4 stdlib update (nielash)
+- Implement setting modification time on directories (nielash)
+- Implement modtime and metadata for directories (Nick Craig-Wood)
+- Fix setting of btime on directories on Windows (Nick Craig-Wood)
+- Delete backend implementation of Purge to speed up and make stats (Nick Craig-Wood)
+- Support metadata setting and mapping on server side Move (Nick Craig-Wood)
+
+- Cache
+
+- Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+- Implement setting metadata on directories (Nick Craig-Wood)
+
+- Crypt
+
+- Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+- Implement setting metadata on directories (Nick Craig-Wood)
+- Improve handling of undecryptable file names (nielash)
+- Add missing error check spotted by linter (Nick Craig-Wood)
+
+- Azure Blob
+
+- Implement
--azureblob-delete-snapshots
(Nick Craig-Wood)
+
+- B2
+
+- Clarify exactly what
--b2-download-auth-duration
does in the docs (Nick Craig-Wood)
+
+- Chunker
+
+- Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+- Implement setting metadata on directories (Nick Craig-Wood)
+
+- Combine
+
+- Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+- Implement setting metadata on directories (Nick Craig-Wood)
+- Fix directory metadata error on upstream root (nielash)
+- Fix directory move across upstreams (nielash)
+
+- Compress
+
+- Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+- Implement setting metadata on directories (Nick Craig-Wood)
+
+- Drive
+
+- Implement setting modification time on directories (nielash)
+- Implement modtime and metadata setting for directories (Nick Craig-Wood)
+- Support metadata setting and mapping on server side Move,Copy (Nick Craig-Wood)
+
+- FTP
+
+- Fix mkdir with rsftp which is returning the wrong code (Nick Craig-Wood)
+
+- Hasher
+
+- Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+- Implement setting metadata on directories (Nick Craig-Wood)
+- Fix error from trying to stop an already-stopped db (nielash)
+- Look for cached hash if passed hash unexpectedly blank (nielash)
+
+- Imagekit
+
+- Updated docs and web content (Harshit Budhraja)
+- Updated overview - supported operations (Harshit Budhraja)
+
+- Mega
+
+- Fix panic with go1.22 (Nick Craig-Wood)
+
+- Netstorage
+
+- Fix Root to return correct directory when pointing to a file (Nick Craig-Wood)
+
+- Onedrive
+
+- Add metadata support (nielash)
+
+- Opendrive
+
+- Fix moving file/folder within the same parent dir (nielash)
+
+- Oracle Object Storage
+
+- Support
backend restore
command (Nikhil Ahuja)
+- Support workload identity authentication for OKE (Anders Swanson)
+
+- Protondrive
+
+- Fix encoding of Root method (Nick Craig-Wood)
+
+- Quatrix
+
+- Fix
Content-Range
header (Volodymyr)
+- Add option to skip project folders (Oksana Zhykina)
+- Fix Root to return correct directory when pointing to a file (Nick Craig-Wood)
+
+- S3
+
+- Add
--s3-version-deleted
to show delete markers in listings when using versions. (Nick Craig-Wood)
+- Add IPv6 support with option
--s3-use-dual-stack
(Anthony Metzidis)
+- Copy parts in parallel when doing chunked server side copy (Nick Craig-Wood)
+- GCS provider: fix server side copy of files bigger than 5G (Nick Craig-Wood)
+- Support metadata setting and mapping on server side Copy (Nick Craig-Wood)
+
+- Seafile
+
+- Fix download/upload error when
FILE_SERVER_ROOT
is relative (DanielEgbers)
+- Fix Root to return correct directory when pointing to a file (Nick Craig-Wood)
+
+- SFTP
+
+- Implement setting modification time on directories (nielash)
+- Set directory modtimes update on write flag (Nick Craig-Wood)
+- Shorten wait delay for external ssh binaries now that we are using go1.20 (Nick Craig-Wood)
+
+- Swift
+
+- Avoid unnecessary container versioning check (Joe Cai)
+
+- Union
+
+- Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+- Implement setting metadata on directories (Nick Craig-Wood)
+
+- WebDAV
+
+- Reduce priority of chunks upload log (Gabriel Ramos)
+- owncloud: Add config
owncloud_exclude_shares
which allows to exclude shared files and folders when listing remote resources (Thomas Müller)
+
+
+v1.65.2 - 2024-01-24
+See commits
+
+- Bug Fixes
+
+- build: bump github.com/cloudflare/circl from 1.3.6 to 1.3.7 (dependabot)
+- docs updates (Nick Craig-Wood, kapitainsky, nielash, Tera, Harshit Budhraja)
+
+- VFS
+
+- Fix stale data when using
--vfs-cache-mode
full (Nick Craig-Wood)
+
+- Azure Blob
+
+- IMPORTANT Fix data corruption bug - see #7590 (Nick Craig-Wood)
+
+
+v1.65.1 - 2024-01-08
+See commits
+
+- Bug Fixes
+
+- build
+
+- Bump golang.org/x/crypto to fix ssh terrapin CVE-2023-48795 (dependabot)
+- Update to go1.21.5 to fix Windows path problems (Nick Craig-Wood)
+- Fix docker build on arm/v6 (Nick Craig-Wood)
+
+- install.sh: fix harmless error message on install (Nick Craig-Wood)
+- accounting: fix stats to show server side transfers (Nick Craig-Wood)
+- doc fixes (albertony, ben-ba, Eli Orzitzer, emyarod, keongalvin, rarspace01)
+- nfsmount: Compile for all unix oses, add
--sudo
and fix error/option handling (Nick Craig-Wood)
+- operations: Fix files moved by rclone move not being counted as transfers (Nick Craig-Wood)
+- oauthutil: Avoid panic when
*token
and *ts.token
are the same (rkonfj)
+- serve s3: Fix listing oddities (Nick Craig-Wood)
+
+- VFS
+
+- Note that
--vfs-refresh
runs in the background (Nick Craig-Wood)
+
+- Azurefiles
+
+- Fix storage base url (Oksana)
+
+- Crypt
+
+- Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+
+- Chunker
+
+- Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+
+- Compress
+
+- Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+
+- Dropbox
+
+- Fix used space on dropbox team accounts (Nick Craig-Wood)
+
+- FTP
+
+- Fix multi-thread copy (WeidiDeng)
+
+- Googlephotos
+
+- Fix nil pointer exception when batch failed (Nick Craig-Wood)
+
+- Hasher
+
+- Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+- Fix invalid memory address error when MaxAge == 0 (nielash)
+
+- Onedrive
+
+- Fix error listing: unknown object type
<nil>
(Nick Craig-Wood)
+- Fix "unauthenticated: Unauthenticated" errors when uploading (Nick Craig-Wood)
+
+- Oracleobjectstorage
+
+- Fix object storage endpoint for custom endpoints (Manoj Ghosh)
+- Multipart copy create bucket if it doesn't exist. (Manoj Ghosh)
+
+- Protondrive
+
+- Fix CVE-2023-45286 / GHSA-xwh9-gc39-5298 (Nick Craig-Wood)
+
+- S3
+
+- Fix crash if no UploadId in multipart upload (Nick Craig-Wood)
+
+- Smb
+
+- Fix shares not listed by updating go-smb2 (halms)
+
+- Union
+
+- Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+
+
v1.65.0 - 2023-11-26
See commits
@@ -43624,9 +43603,9 @@ $ tree /tmp/b
- Project started
Bugs and Limitations
-Limitations
-Directory timestamps aren't preserved
-Rclone doesn't currently preserve the timestamps of directories. This is because rclone only really considers objects when syncing.
+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
Currently rclone loads each directory/bucket entirely into memory before using it. Since each rclone object takes 0.5k-1k of memory this can take a very long time and use a large amount of memory.
Millions of files in a directory tends to occur on bucket-based remotes (e.g. S3 buckets) since those remotes do not segregate subdirectories within the bucket.
@@ -43664,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.
@@ -43798,7 +43777,7 @@ THE SOFTWARE.
- Scott McGillivray scott.mcgillivray@gmail.com
- Bjørn Erik Pedersen bjorn.erik.pedersen@gmail.com
- Lukas Loesche lukas@mesosphere.io
-- emyarod allllaboutyou@gmail.com
+- emyarod emyarod@users.noreply.github.com
- T.C. Ferguson tcf909@gmail.com
- Brandur brandur@mutelight.org
- Dario Giovannetti dev@dariogiovannetti.net
@@ -44127,7 +44106,7 @@ THE SOFTWARE.
- 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
@@ -44546,6 +44525,66 @@ THE SOFTWARE.
- Alen Šiljak dev@alensiljak.eu.org
- 你知道未来吗 rkonfj@gmail.com
- Abhinav Dhiman 8640877+ahnv@users.noreply.github.com
+- halms 7513146+halms@users.noreply.github.com
+- ben-ba benjamin.brauner@gmx.de
+- Eli Orzitzer e_orz@yahoo.com
+- Anthony Metzidis anthony.metzidis@gmail.com
+- emyarod afw5059@gmail.com
+- keongalvin keongalvin@gmail.com
+- rarspace01 rarspace01@users.noreply.github.com
+- Paul Stern paulstern45@gmail.com
+- Nikhil Ahuja nikhilahuja@live.com
+- Harshit Budhraja 52413945+harshit-budhraja@users.noreply.github.com
+- Tera 24725862+teraa@users.noreply.github.com
+- Kyle Reynolds kylereynoldsdev@gmail.com
+- Michael Eischer michael.eischer@gmx.de
+- Thomas Müller 1005065+DeepDiver1975@users.noreply.github.com
+- DanielEgbers 27849724+DanielEgbers@users.noreply.github.com
+- Jack Provance 49460795+njprov@users.noreply.github.com
+- Gabriel Ramos 109390599+gabrielramos02@users.noreply.github.com
+- Dan McArdle d@nmcardle.com
+- 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
Forum
diff --git a/MANUAL.md b/MANUAL.md
index 13bee7b75..27e5b2153 100644
--- a/MANUAL.md
+++ b/MANUAL.md
@@ -1,6 +1,6 @@
% rclone(1) User Manual
% Nick Craig-Wood
-% Nov 26, 2023
+% Jun 14, 2024
# Rclone syncs your files to cloud storage
@@ -89,6 +89,7 @@ Rclone helps you:
- Can use multi-threaded downloads to local disk
- [Copy](https://rclone.org/commands/rclone_copy/) new or changed files to cloud storage
- [Sync](https://rclone.org/commands/rclone_sync/) (one way) to make a directory identical
+- [Bisync](https://rclone.org/bisync/) (two way) to keep two directories in sync bidirectionally
- [Move](https://rclone.org/commands/rclone_move/) files to cloud storage deleting the local after verification
- [Check](https://rclone.org/commands/rclone_check/) hashes and for missing/extra files
- [Mount](https://rclone.org/commands/rclone_mount/) your cloud storage as a network disk
@@ -104,7 +105,6 @@ WebDAV or S3, that work out of the box.)
- 1Fichier
- Akamai Netstorage
- Alibaba Cloud (Aliyun) Object Storage System (OSS)
-- Amazon Drive
- Amazon S3
- Backblaze B2
- Box
@@ -127,6 +127,7 @@ WebDAV or S3, that work out of the box.)
- Hetzner Storage Box
- HiDrive
- HTTP
+- ImageKit
- Internet Archive
- Jottacloud
- IBM COS S3
@@ -137,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
@@ -176,6 +178,7 @@ WebDAV or S3, that work out of the box.)
- Synology
- SugarSync
- Tencent Cloud Object Storage (COS)
+- Uloz.to
- Uptobox
- Wasabi
- WebDAV
@@ -275,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.
[](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):
@@ -508,6 +511,7 @@ docker run --rm \
ls ~/data/mount
kill %1
```
+
## Snap installation {#snap}
[](https://snapcraft.io/rclone)
@@ -856,7 +860,6 @@ See the following for detailed instructions for
* [1Fichier](https://rclone.org/fichier/)
* [Akamai Netstorage](https://rclone.org/netstorage/)
* [Alias](https://rclone.org/alias/)
- * [Amazon Drive](https://rclone.org/amazonclouddrive/)
* [Amazon S3](https://rclone.org/s3/)
* [Backblaze B2](https://rclone.org/b2/)
* [Box](https://rclone.org/box/)
@@ -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.
@@ -1039,6 +1060,15 @@ recently very efficiently like this:
rclone copy --max-age 24h --no-traverse /path/to/src remote:
+
+Rclone will sync the modification times of files and directories if
+the backend supports it. If metadata syncing is required then use the
+`--metadata` flag.
+
+Note that the modification time and metadata for the root directory
+will **not** be synced. See https://github.com/rclone/rclone/issues/7652
+for more info.
+
**Note**: Use the `-P`/`--progress` flag to view real-time transfer statistics.
**Note**: Use the `--dry-run` or the `--interactive`/`-i` flag to test without copying anything.
@@ -1070,7 +1100,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -1084,6 +1114,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -1185,11 +1216,56 @@ the destination from the sync with a filter rule or by putting an
exclude-if-present file inside the destination directory and sync to a
destination that is inside the source directory.
+Rclone will sync the modification times of files and directories if
+the backend supports it. If metadata syncing is required then use the
+`--metadata` flag.
+
+Note that the modification time and metadata for the root directory
+will **not** be synced. See https://github.com/rclone/rclone/issues/7652
+for more info.
+
**Note**: Use the `-P`/`--progress` flag to view real-time transfer statistics
**Note**: Use the `rclone dedupe` command to deal with "Duplicate object/directory found in source/destination - ignoring" errors.
See [this forum post](https://forum.rclone.org/t/sync-not-clearing-duplicates/14372) for more info.
+# Logger Flags
+
+The `--differ`, `--missing-on-dst`, `--missing-on-src`, `--match` and `--error` flags write paths, one per line, to the file name (or
+stdout if it is `-`) supplied. What they write is described in the
+help below. For example `--differ` will write all paths which are
+present on both the source and destination but different.
+
+The `--combined` flag will write a file (or stdout) which contains all
+file paths with a symbol and then a space and then the path to tell
+you what happened to it. These are reminiscent of diff files.
+
+- `= path` means path was found in source and destination and was identical
+- `- path` means path was missing on the source, so only in the destination
+- `+ path` means path was missing on the destination, so only in the source
+- `* path` means path was present in source and destination but different.
+- `! path` means there was an error reading or hashing the source or dest.
+
+The `--dest-after` flag writes a list file using the same format flags
+as [`lsf`](https://rclone.org/commands/rclone_lsf/#synopsis) (including [customizable options
+for hash, modtime, etc.](https://rclone.org/commands/rclone_lsf/#synopsis))
+Conceptually it is similar to rsync's `--itemize-changes`, but not identical
+-- it should output an accurate list of what will be on the destination
+after the sync.
+
+Note that these logger flags have a few limitations, and certain scenarios
+are not currently supported:
+
+- `--max-duration` / `CutoffModeHard`
+- `--compare-dest` / `--copy-dest`
+- server-side moves of an entire dir at once
+- High-level retries, because there would be duplicates (use `--retries 1` to disable)
+- Possibly some unusual error scenarios
+
+Note also that each file is logged during the sync, as opposed to after, so it
+is most useful as a predictor of what SHOULD happen to each file
+(which may or may not match what actually DID.)
+
```
rclone sync source:path dest:path [flags]
@@ -1198,8 +1274,24 @@ rclone sync source:path dest:path [flags]
## Options
```
+ --absolute Put a leading / in front of path names
+ --combined string Make a combined report of changes to this file
--create-empty-src-dirs Create empty source dirs on destination after sync
+ --csv Output in CSV format
+ --dest-after string Report all files that exist on the dest post-sync
+ --differ string Report all non-matching files to this file
+ -d, --dir-slash Append a slash to directory names (default true)
+ --dirs-only Only list directories
+ --error string Report all files with errors (hashing or reading) to this file
+ --files-only Only list files (default true)
+ -F, --format string Output format - see lsf help for details (default "p")
+ --hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "md5")
-h, --help help for sync
+ --match string Report all matching files to this file
+ --missing-on-dst string Report all files missing from the destination to this file
+ --missing-on-src string Report all files missing from the source to this file
+ -s, --separator string Separator for the items in the format (default ";")
+ -t, --timeformat string Specify a custom time format, or 'max' for max precision supported by remote (default: 2006-01-02 15:04:05)
```
@@ -1217,7 +1309,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -1231,6 +1323,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -1250,6 +1343,7 @@ Flags just used for `rclone sync`.
--delete-after When synchronizing, delete files on destination after transferring (default)
--delete-before When synchronizing, delete files on destination before transferring
--delete-during When synchronizing, delete files during transfer
+ --fix-case Force rename of case insensitive dest to match source
--ignore-errors Delete even if there are I/O errors
--max-delete int When synchronizing, limit the number of deletes (default -1)
--max-delete-size SizeSuffix When synchronizing, limit the total size of deletes (default off)
@@ -1345,6 +1439,14 @@ whether rclone lists the destination directory or not. Supplying this
option when moving a small number of files into a large destination
can speed transfers up greatly.
+Rclone will sync the modification times of files and directories if
+the backend supports it. If metadata syncing is required then use the
+`--metadata` flag.
+
+Note that the modification time and metadata for the root directory
+will **not** be synced. See https://github.com/rclone/rclone/issues/7652
+for more info.
+
**Important**: Since this can cause data loss, test first with the
`--dry-run` or the `--interactive`/`-i` flag.
@@ -1378,7 +1480,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -1392,6 +1494,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -2783,6 +2886,11 @@ On each successive run it will:
Changes include `New`, `Newer`, `Older`, and `Deleted` files.
- Propagate changes on Path1 to Path2, and vice-versa.
+Bisync is **in beta** and is considered an **advanced command**, so use with care.
+Make sure you have read and understood the entire [manual](https://rclone.org/bisync)
+(especially the [Limitations](https://rclone.org/bisync/#limitations) section) before using,
+or data loss can result. Questions can be asked in the [Rclone Forum](https://forum.rclone.org/).
+
See [full bisync description](https://rclone.org/bisync/) for details.
@@ -2793,20 +2901,31 @@ rclone bisync remote1:path1 remote2:path2 [flags]
## Options
```
- --check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
- --check-filename string Filename for --check-access (default: RCLONE_TEST)
- --check-sync string Controls comparison of final listings: true|false|only (default: true) (default "true")
- --create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
- --filters-file string Read filtering patterns from a file
- --force Bypass --max-delete safety check and run the sync. Consider using with --verbose
- -h, --help help for bisync
- --ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
- --localtime Use local time in listings (default: UTC)
- --no-cleanup Retain working files (useful for troubleshooting and testing).
- --remove-empty-dirs Remove ALL empty directories at the final cleanup step.
- --resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync. Use at your own risk!
- -1, --resync Performs the resync run. Path1 files may overwrite Path2 versions. Consider using --verbose or --dry-run first.
- --workdir string Use custom working dir - useful for testing. (default: $HOME/.cache/rclone/bisync)
+ --backup-dir1 string --backup-dir for Path1. Must be a non-overlapping path on the same remote.
+ --backup-dir2 string --backup-dir for Path2. Must be a non-overlapping path on the same remote.
+ --check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
+ --check-filename string Filename for --check-access (default: RCLONE_TEST)
+ --check-sync string Controls comparison of final listings: true|false|only (default: true) (default "true")
+ --compare string Comma-separated list of bisync-specific compare options ex. 'size,modtime,checksum' (default: 'size,modtime')
+ --conflict-loser ConflictLoserAction Action to take on the loser of a sync conflict (when there is a winner) or on both files (when there is no winner): , num, pathname, delete (default: num)
+ --conflict-resolve string Automatically resolve conflicts by preferring the version that is: none, path1, path2, newer, older, larger, smaller (default: none) (default "none")
+ --conflict-suffix string Suffix to use when renaming a --conflict-loser. Can be either one string or two comma-separated strings to assign different suffixes to Path1/Path2. (default: 'conflict')
+ --create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
+ --download-hash Compute hash by downloading when otherwise unavailable. (warning: may be slow and use lots of data!)
+ --filters-file string Read filtering patterns from a file
+ --force Bypass --max-delete safety check and run the sync. Consider using with --verbose
+ -h, --help help for bisync
+ --ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
+ --max-lock Duration Consider lock files older than this to be expired (default: 0 (never expire)) (minimum: 2m) (default 0s)
+ --no-cleanup Retain working files (useful for troubleshooting and testing).
+ --no-slow-hash Ignore listing checksums only on backends where they are slow
+ --recover Automatically recover from interruptions without requiring --resync.
+ --remove-empty-dirs Remove ALL empty directories at the final cleanup step.
+ --resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync. Use at your own risk!
+ -1, --resync Performs the resync run. Equivalent to --resync-mode path1. Consider using --verbose or --dry-run first.
+ --resync-mode string During resync, prefer the version that is: path1, path2, newer, older, larger, smaller (default: path1 if --resync, otherwise none for no resync.) (default "none")
+ --slow-hash-sync-only Ignore slow checksums for listings and deltas, but still consider them during sync calls.
+ --workdir string Use custom working dir - useful for testing. (default: {WORKDIR})
```
@@ -2824,7 +2943,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -2838,6 +2957,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -3138,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]
@@ -3956,7 +4087,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -3970,6 +4101,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -4036,7 +4168,7 @@ See the [global flags page](https://rclone.org/flags/) for global options not li
# rclone copyurl
-Copy url content to dest.
+Copy the contents of the URL supplied content to dest:path.
## Synopsis
@@ -4044,11 +4176,14 @@ Copy url content to dest.
Download a URL's content and copy it to the destination without saving
it in temporary storage.
-Setting `--auto-filename` will attempt to automatically determine the filename from the URL
-(after any redirections) and used in the destination path.
-With `--auto-filename-header` in
-addition, if a specific filename is set in HTTP headers, it will be used instead of the name from the URL.
-With `--print-filename` in addition, the resulting file name will be printed.
+Setting `--auto-filename` will attempt to automatically determine the
+filename from the URL (after any redirections) and used in the
+destination path.
+
+With `--auto-filename-header` in addition, if a specific filename is
+set in HTTP headers, it will be used instead of the name from the URL.
+With `--print-filename` in addition, the resulting file name will be
+printed.
Setting `--no-clobber` will prevent overwriting file on the
destination if there is one with the same name.
@@ -4056,6 +4191,17 @@ destination if there is one with the same name.
Setting `--stdout` or making the output file name `-`
will cause the output to be written to standard output.
+## Troublshooting
+
+If you can't get `rclone copyurl` to work then here are some things you can try:
+
+- `--disable-http2` rclone will use HTTP2 if available - try disabling it
+- `--bind 0.0.0.0` rclone will use IPv6 if available - try disabling it
+- `--bind ::0` to disable IPv4
+- `--user agent curl` - some sites have whitelists for curl's user-agent - try that
+- Make sure the site works with `curl` directly
+
+
```
rclone copyurl https://example.com dest:path [flags]
@@ -4464,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
@@ -4627,7 +4867,7 @@ List all the remotes in the config file and defined in environment variables.
rclone listremotes lists all the available remotes from the config file.
-When used with the `--long` flag it lists the types too.
+When used with the `--long` flag it lists the types and the descriptions too.
```
@@ -4638,7 +4878,7 @@ rclone listremotes [flags]
```
-h, --help help for listremotes
- --long Show the type as well as names
+ --long Show the type and the description as well as names
```
@@ -4750,6 +4990,19 @@ those only (without traversing the whole directory structure):
rclone lsf --absolute --files-only --max-age 1d /path/to/local > new_files
rclone copy --files-from-raw new_files /path/to/local remote:path
+The default time format is `'2006-01-02 15:04:05'`.
+[Other formats](https://pkg.go.dev/time#pkg-constants) can be specified with the `--time-format` flag.
+Examples:
+
+ rclone lsf remote:path --format pt --time-format 'Jan 2, 2006 at 3:04pm (MST)'
+ rclone lsf remote:path --format pt --time-format '2006-01-02 15:04:05.000000000'
+ rclone lsf remote:path --format pt --time-format '2006-01-02T15:04:05.999999999Z07:00'
+ rclone lsf remote:path --format pt --time-format RFC3339
+ rclone lsf remote:path --format pt --time-format DateOnly
+ rclone lsf remote:path --format pt --time-format max
+`--time-format max` will automatically truncate '`2006-01-02 15:04:05.000000000`'
+to the maximum precision supported by the remote.
+
Any of the filtering options can be applied to this command.
@@ -4781,16 +5034,17 @@ rclone lsf remote:path [flags]
## 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)
- --dirs-only Only list directories
- --files-only Only list files
- -F, --format string Output format - see help for details (default "p")
- --hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "md5")
- -h, --help help for lsf
- -R, --recursive Recurse into the listing
- -s, --separator string Separator for the items in the format (default ";")
+ --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)
+ --dirs-only Only list directories
+ --files-only Only list files
+ -F, --format string Output format - see help for details (default "p")
+ --hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "md5")
+ -h, --help help for lsf
+ -R, --recursive Recurse into the listing
+ -s, --separator string Separator for the items in the format (default ";")
+ -t, --time-format string Specify a custom time format, or 'max' for max precision supported by remote (default: 2006-01-02 15:04:05)
```
@@ -4868,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`.
@@ -4880,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
@@ -5012,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.
@@ -5271,12 +5524,21 @@ Mounting on macOS can be done either via [built-in NFS server](https://rclone.or
FUSE driver utilizing a macOS kernel extension (kext). FUSE-T is an alternative FUSE system
which "mounts" via an NFSv4 local server.
-# NFS mount
+#### Unicode Normalization
+
+It is highly recommended to keep the default of `--no-unicode-normalization=false`
+for all `mount` and `serve` commands on macOS. For details, see [vfs-case-sensitivity](https://rclone.org/commands/rclone_mount/#vfs-case-sensitivity).
+
+### NFS mount
This method spins up an NFS server using [serve nfs](https://rclone.org/commands/rclone_serve_nfs/) command and mounts
it to the specified mountpoint. If you run this in background mode using |--daemon|, you will need to
send SIGTERM signal to the rclone process using |kill| command to stop the mount.
+Note that `--nfs-cache-handle-limit` controls the maximum number of cached file handles stored by the `nfsmount` caching handler.
+This should not be set too low or you may experience errors when trying to access files. The default is 1000000,
+but consider lowering this limit if the server's system resource usage causes problems.
+
### macFUSE Notes
If installing macFUSE using [dmg packages](https://github.com/osxfuse/osxfuse/releases) from
@@ -5304,15 +5566,6 @@ As per the [FUSE-T wiki](https://github.com/macos-fuse-t/fuse-t/wiki#caveats):
This means that viewing files with various tools, notably macOS Finder, will cause rlcone
to update the modification time of the file. This may make rclone upload a full new copy
of the file.
-
-#### Unicode Normalization
-
-Rclone includes flags for unicode normalization with macFUSE that should be updated
-for FUSE-T. See [this forum post](https://forum.rclone.org/t/some-unicode-forms-break-mount-on-macos-with-fuse-t/36403)
-and [FUSE-T issue #16](https://github.com/macos-fuse-t/fuse-t/issues/16). The following
-flag should be added to the `rclone mount` command.
-
- -o modules=iconv,from_code=UTF-8,to_code=UTF-8
#### Read Only mounts
@@ -5474,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
@@ -5785,6 +6039,28 @@ If the flag is not provided on the command line, then its default value depends
on the operating system where rclone runs: "true" on Windows and macOS, "false"
otherwise. If the flag is provided without a value, then it is "true".
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
## VFS Disk Options
This flag allows you to manually set the statistics about the filing system.
@@ -5806,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]
```
@@ -5826,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)
@@ -5843,6 +6121,7 @@ rclone mount remote:path /path/to/mountpoint [flags]
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -5855,7 +6134,7 @@ rclone mount remote:path /path/to/mountpoint [flags]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -5963,7 +6242,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -5977,6 +6256,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -6080,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.
@@ -6164,6 +6445,927 @@ See the [global flags page](https://rclone.org/flags/) for global options not li
* [rclone](https://rclone.org/commands/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.
+
+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).
+
+On Linux/macOS/FreeBSD start the mount like this, where `/path/to/local/mount`
+is an **empty** **existing** directory:
+
+ rclone nfsmount remote:path/to/files /path/to/local/mount
+
+On Windows you can start a mount in different ways. See [below](#mounting-modes-on-windows)
+for details. If foreground mount is used interactively from a console window,
+rclone will serve the mount and occupy the console so another window should be
+used to work with the mount until rclone is interrupted e.g. by pressing Ctrl-C.
+
+The following examples will mount to an automatically assigned drive,
+to specific drive letter `X:`, to path `C:\path\parent\mount`
+(where parent directory or drive must exist, and mount must **not** exist,
+and is not supported when [mounting as a network drive](#mounting-modes-on-windows)), and
+the last example will mount as network share `\\cloud\remote` and map it to an
+automatically assigned drive:
+
+ rclone nfsmount remote:path/to/files *
+ rclone nfsmount remote:path/to/files X:
+ rclone nfsmount remote:path/to/files C:\path\parent\mount
+ rclone nfsmount remote:path/to/files \\cloud\remote
+
+When the program ends while in foreground mode, either via Ctrl+C or receiving
+a SIGINT or SIGTERM signal, the mount should be automatically stopped.
+
+When running in background mode the user will have to stop the mount manually:
+
+ # Linux
+ fusermount -u /path/to/local/mount
+ # OS X
+ umount /path/to/local/mount
+
+The umount operation can fail, for example when the mountpoint is busy.
+When that happens, it is the user's responsibility to stop the mount manually.
+
+The size of the mounted file system will be set according to information retrieved
+from the remote, the same as returned by the [rclone about](https://rclone.org/commands/rclone_about/)
+command. Remotes with unlimited storage may report the used size only,
+then an additional 1 PiB of free space is assumed. If the remote does not
+[support](https://rclone.org/overview/#optional-features) the about feature
+at all, then 1 PiB is set as both the total and the free size.
+
+## Installing on Windows
+
+To run rclone nfsmount on Windows, you will need to
+download and install [WinFsp](http://www.secfs.net/winfsp/).
+
+[WinFsp](https://github.com/winfsp/winfsp) is an open-source
+Windows File System Proxy which makes it easy to write user space file
+systems for Windows. It provides a FUSE emulation layer which rclone
+uses combination with [cgofuse](https://github.com/winfsp/cgofuse).
+Both of these packages are by Bill Zissimopoulos who was very helpful
+during the implementation of rclone nfsmount for Windows.
+
+### Mounting modes on windows
+
+Unlike other operating systems, Microsoft Windows provides a different filesystem
+type for network and fixed drives. It optimises access on the assumption fixed
+disk drives are fast and reliable, while network drives have relatively high latency
+and less reliability. Some settings can also be differentiated between the two types,
+for example that Windows Explorer should just display icons and not create preview
+thumbnails for image and video files on network drives.
+
+In most cases, rclone will mount the remote as a normal, fixed disk drive by default.
+However, you can also choose to mount it as a remote network drive, often described
+as a network share. If you mount an rclone remote using the default, fixed drive mode
+and experience unexpected program errors, freezes or other issues, consider mounting
+as a network drive instead.
+
+When mounting as a fixed disk drive you can either mount to an unused drive letter,
+or to a path representing a **nonexistent** subdirectory of an **existing** parent
+directory or drive. Using the special value `*` will tell rclone to
+automatically assign the next available drive letter, starting with Z: and moving backward.
+Examples:
+
+ rclone nfsmount remote:path/to/files *
+ rclone nfsmount remote:path/to/files X:
+ rclone nfsmount remote:path/to/files C:\path\parent\mount
+ rclone nfsmount remote:path/to/files X:
+
+Option `--volname` can be used to set a custom volume name for the mounted
+file system. The default is to use the remote name and path.
+
+To mount as network drive, you can add option `--network-mode`
+to your nfsmount command. Mounting to a directory path is not supported in
+this mode, it is a limitation Windows imposes on junctions, so the remote must always
+be mounted to a drive letter.
+
+ rclone nfsmount remote:path/to/files X: --network-mode
+
+A volume name specified with `--volname` will be used to create the network share path.
+A complete UNC path, such as `\\cloud\remote`, optionally with path
+`\\cloud\remote\madeup\path`, will be used as is. Any other
+string will be used as the share part, after a default prefix `\\server\`.
+If no volume name is specified then `\\server\share` will be used.
+You must make sure the volume name is unique when you are mounting more than one drive,
+or else the mount command will fail. The share name will treated as the volume label for
+the mapped drive, shown in Windows Explorer etc, while the complete
+`\\server\share` will be reported as the remote UNC path by
+`net use` etc, just like a normal network drive mapping.
+
+If you specify a full network share UNC path with `--volname`, this will implicitly
+set the `--network-mode` option, so the following two examples have same result:
+
+ rclone nfsmount remote:path/to/files X: --network-mode
+ rclone nfsmount remote:path/to/files X: --volname \\server\share
+
+You may also specify the network share UNC path as the mountpoint itself. Then rclone
+will automatically assign a drive letter, same as with `*` and use that as
+mountpoint, and instead use the UNC path specified as the volume name, as if it were
+specified with the `--volname` option. This will also implicitly set
+the `--network-mode` option. This means the following two examples have same result:
+
+ rclone nfsmount remote:path/to/files \\cloud\remote
+ rclone nfsmount remote:path/to/files * --volname \\cloud\remote
+
+There is yet another way to enable network mode, and to set the share path,
+and that is to pass the "native" libfuse/WinFsp option directly:
+`--fuse-flag --VolumePrefix=\server\share`. Note that the path
+must be with just a single backslash prefix in this case.
+
+
+*Note:* In previous versions of rclone this was the only supported method.
+
+[Read more about drive mapping](https://en.wikipedia.org/wiki/Drive_mapping)
+
+See also [Limitations](#limitations) section below.
+
+### Windows filesystem permissions
+
+The FUSE emulation layer on Windows must convert between the POSIX-based
+permission model used in FUSE, and the permission model used in Windows,
+based on access-control lists (ACL).
+
+The mounted filesystem will normally get three entries in its access-control list (ACL),
+representing permissions for the POSIX permission scopes: Owner, group and others.
+By default, the owner and group will be taken from the current user, and the built-in
+group "Everyone" will be used to represent others. The user/group can be customized
+with FUSE options "UserName" and "GroupName",
+e.g. `-o UserName=user123 -o GroupName="Authenticated Users"`.
+The permissions on each entry will be set according to [options](#options)
+`--dir-perms` and `--file-perms`, which takes a value in traditional Unix
+[numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).
+
+The default permissions corresponds to `--file-perms 0666 --dir-perms 0777`,
+i.e. read and write permissions to everyone. This means you will not be able
+to start any programs from the mount. To be able to do that you must add
+execute permissions, e.g. `--file-perms 0777 --dir-perms 0777` to add it
+to everyone. If the program needs to write files, chances are you will
+have to enable [VFS File Caching](#vfs-file-caching) as well (see also
+[limitations](#limitations)). Note that the default write permission have
+some restrictions for accounts other than the owner, specifically it lacks
+the "write extended attributes", as explained next.
+
+The mapping of permissions is not always trivial, and the result you see in
+Windows Explorer may not be exactly like you expected. For example, when setting
+a value that includes write access for the group or others scope, this will be
+mapped to individual permissions "write attributes", "write data" and
+"append data", but not "write extended attributes". Windows will then show this
+as basic permission "Special" instead of "Write", because "Write" also covers
+the "write extended attributes" permission. When setting digit 0 for group or
+others, to indicate no permissions, they will still get individual permissions
+"read attributes", "read extended attributes" and "read permissions". This is
+done for compatibility reasons, e.g. to allow users without additional
+permissions to be able to read basic metadata about files like in Unix.
+
+WinFsp 2021 (version 1.9) introduced a new FUSE option "FileSecurity",
+that allows the complete specification of file security descriptors using
+[SDDL](https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format).
+With this you get detailed control of the resulting permissions, compared
+to use of the POSIX permissions described above, and no additional permissions
+will be added automatically for compatibility with Unix. Some example use
+cases will following.
+
+If you set POSIX permissions for only allowing access to the owner,
+using `--file-perms 0600 --dir-perms 0700`, the user group and the built-in
+"Everyone" group will still be given some special permissions, as described
+above. Some programs may then (incorrectly) interpret this as the file being
+accessible by everyone, for example an SSH client may warn about "unprotected
+private key file". You can work around this by specifying
+`-o FileSecurity="D:P(A;;FA;;;OW)"`, which sets file all access (FA) to the
+owner (OW), and nothing else.
+
+When setting write permissions then, except for the owner, this does not
+include the "write extended attributes" permission, as mentioned above.
+This may prevent applications from writing to files, giving permission denied
+error instead. To set working write permissions for the built-in "Everyone"
+group, similar to what it gets by default but with the addition of the
+"write extended attributes", you can specify
+`-o FileSecurity="D:P(A;;FRFW;;;WD)"`, which sets file read (FR) and file
+write (FW) to everyone (WD). If file execute (FX) is also needed, then change
+to `-o FileSecurity="D:P(A;;FRFWFX;;;WD)"`, or set file all access (FA) to
+get full access permissions, including delete, with
+`-o FileSecurity="D:P(A;;FA;;;WD)"`.
+
+### Windows caveats
+
+Drives created as Administrator are not visible to other accounts,
+not even an account that was elevated to Administrator with the
+User Account Control (UAC) feature. A result of this is that if you mount
+to a drive letter from a Command Prompt run as Administrator, and then try
+to access the same drive from Windows Explorer (which does not run as
+Administrator), you will not be able to see the mounted drive.
+
+If you don't need to access the drive from applications running with
+administrative privileges, the easiest way around this is to always
+create the mount from a non-elevated command prompt.
+
+To make mapped drives available to the user account that created them
+regardless if elevated or not, there is a special Windows setting called
+[linked connections](https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command#detail-to-configure-the-enablelinkedconnections-registry-entry)
+that can be enabled.
+
+It is also possible to make a drive mount available to everyone on the system,
+by running the process creating it as the built-in SYSTEM account.
+There are several ways to do this: One is to use the command-line
+utility [PsExec](https://docs.microsoft.com/en-us/sysinternals/downloads/psexec),
+from Microsoft's Sysinternals suite, which has option `-s` to start
+processes as the SYSTEM account. Another alternative is to run the mount
+command from a Windows Scheduled Task, or a Windows Service, configured
+to run as the SYSTEM account. A third alternative is to use the
+[WinFsp.Launcher infrastructure](https://github.com/winfsp/winfsp/wiki/WinFsp-Service-Architecture)).
+Read more in the [install documentation](https://rclone.org/install/).
+Note that when running rclone as another user, it will not use
+the configuration file from your profile unless you tell it to
+with the [`--config`](https://rclone.org/docs/#config-config-file) option.
+Note also that it is now the SYSTEM account that will have the owner
+permissions, and other accounts will have permissions according to the
+group or others scopes. As mentioned above, these will then not get the
+"write extended attributes" permission, and this may prevent writing to
+files. You can work around this with the FileSecurity option, see
+example above.
+
+Note that mapping to a directory path, instead of a drive letter,
+does not suffer from the same limitations.
+
+## Mounting on macOS
+
+Mounting on macOS can be done either via [built-in NFS server](https://rclone.org/commands/rclone_serve_nfs/), [macFUSE](https://osxfuse.github.io/)
+(also known as osxfuse) or [FUSE-T](https://www.fuse-t.org/). macFUSE is a traditional
+FUSE driver utilizing a macOS kernel extension (kext). FUSE-T is an alternative FUSE system
+which "mounts" via an NFSv4 local server.
+
+#### Unicode Normalization
+
+It is highly recommended to keep the default of `--no-unicode-normalization=false`
+for all `mount` and `serve` commands on macOS. For details, see [vfs-case-sensitivity](https://rclone.org/commands/rclone_mount/#vfs-case-sensitivity).
+
+### NFS mount
+
+This method spins up an NFS server using [serve nfs](https://rclone.org/commands/rclone_serve_nfs/) command and mounts
+it to the specified mountpoint. If you run this in background mode using |--daemon|, you will need to
+send SIGTERM signal to the rclone process using |kill| command to stop the mount.
+
+Note that `--nfs-cache-handle-limit` controls the maximum number of cached file handles stored by the `nfsmount` caching handler.
+This should not be set too low or you may experience errors when trying to access files. The default is 1000000,
+but consider lowering this limit if the server's system resource usage causes problems.
+
+### macFUSE Notes
+
+If installing macFUSE using [dmg packages](https://github.com/osxfuse/osxfuse/releases) from
+the website, rclone will locate the macFUSE libraries without any further intervention.
+If however, macFUSE is installed using the [macports](https://www.macports.org/) package manager,
+the following addition steps are required.
+
+ sudo mkdir /usr/local/lib
+ cd /usr/local/lib
+ sudo ln -s /opt/local/lib/libfuse.2.dylib
+
+### FUSE-T Limitations, Caveats, and Notes
+
+There are some limitations, caveats, and notes about how it works. These are current as
+of FUSE-T version 1.0.14.
+
+#### ModTime update on read
+
+As per the [FUSE-T wiki](https://github.com/macos-fuse-t/fuse-t/wiki#caveats):
+
+> File access and modification times cannot be set separately as it seems to be an
+> issue with the NFS client which always modifies both. Can be reproduced with
+> 'touch -m' and 'touch -a' commands
+
+This means that viewing files with various tools, notably macOS Finder, will cause rlcone
+to update the modification time of the file. This may make rclone upload a full new copy
+of the file.
+
+#### Read Only mounts
+
+When mounting with `--read-only`, attempts to write to files will fail *silently* as
+opposed to with a clear warning as in macFUSE.
+
+## Limitations
+
+Without the use of `--vfs-cache-mode` this can only write files
+sequentially, it can only seek when reading. This means that many
+applications won't work with their files on an rclone mount without
+`--vfs-cache-mode writes` or `--vfs-cache-mode full`.
+See the [VFS File Caching](#vfs-file-caching) section for more info.
+When using NFS mount on macOS, if you don't specify |--vfs-cache-mode|
+the mount point will be read-only.
+
+The bucket-based remotes (e.g. Swift, S3, Google Compute Storage, B2)
+do not support the concept of empty directories, so empty
+directories will have a tendency to disappear once they fall out of
+the directory cache.
+
+When `rclone mount` is invoked on Unix with `--daemon` flag, the main rclone
+program will wait for the background mount to become ready or until the timeout
+specified by the `--daemon-wait` flag. On Linux it can check mount status using
+ProcFS so the flag in fact sets **maximum** time to wait, while the real wait
+can be less. On macOS / BSD the time to wait is constant and the check is
+performed only at the end. We advise you to set wait time on macOS reasonably.
+
+Only supported on Linux, FreeBSD, OS X and Windows at the moment.
+
+## rclone nfsmount vs rclone sync/copy
+
+File systems expect things to be 100% reliable, whereas cloud storage
+systems are a long way from 100% reliable. The rclone sync/copy
+commands cope with this with lots of retries. However rclone nfsmount
+can't use retries in the same way without making local copies of the
+uploads. Look at the [VFS File Caching](#vfs-file-caching)
+for solutions to make nfsmount more reliable.
+
+## Attribute caching
+
+You can use the flag `--attr-timeout` to set the time the kernel caches
+the attributes (size, modification time, etc.) for directory entries.
+
+The default is `1s` which caches files just long enough to avoid
+too many callbacks to rclone from the kernel.
+
+In theory 0s should be the correct value for filesystems which can
+change outside the control of the kernel. However this causes quite a
+few problems such as
+[rclone using too much memory](https://github.com/rclone/rclone/issues/2157),
+[rclone not serving files to samba](https://forum.rclone.org/t/rclone-1-39-vs-1-40-mount-issue/5112)
+and [excessive time listing directories](https://github.com/rclone/rclone/issues/2095#issuecomment-371141147).
+
+The kernel can cache the info about a file for the time given by
+`--attr-timeout`. You may see corruption if the remote file changes
+length during this window. It will show up as either a truncated file
+or a file with garbage on the end. With `--attr-timeout 1s` this is
+very unlikely but not impossible. The higher you set `--attr-timeout`
+the more likely it is. The default setting of "1s" is the lowest
+setting which mitigates the problems above.
+
+If you set it higher (`10s` or `1m` say) then the kernel will call
+back to rclone less often making it more efficient, however there is
+more chance of the corruption issue above.
+
+If files don't change on the remote outside of the control of rclone
+then there is no chance of corruption.
+
+This is the same as setting the attr_timeout option in mount.fuse.
+
+## Filters
+
+Note that all the rclone filters can be used to select a subset of the
+files to be visible in the mount.
+
+## systemd
+
+When running rclone nfsmount as a systemd service, it is possible
+to use Type=notify. In this case the service will enter the started state
+after the mountpoint has been successfully set up.
+Units having the rclone nfsmount service specified as a requirement
+will see all files and folders immediately in this mode.
+
+Note that systemd runs mount units without any environment variables including
+`PATH` or `HOME`. This means that tilde (`~`) expansion will not work
+and you should provide `--config` and `--cache-dir` explicitly as absolute
+paths via rclone arguments.
+Since mounting requires the `fusermount` program, rclone will use the fallback
+PATH of `/bin:/usr/bin` in this scenario. Please ensure that `fusermount`
+is present on this PATH.
+
+## Rclone as Unix mount helper
+
+The core Unix program `/bin/mount` normally takes the `-t FSTYPE` argument
+then runs the `/sbin/mount.FSTYPE` helper program passing it mount options
+as `-o key=val,...` or `--opt=...`. Automount (classic or systemd) behaves
+in a similar way.
+
+rclone by default expects GNU-style flags `--key val`. To run it as a mount
+helper you should symlink rclone binary to `/sbin/mount.rclone` and optionally
+`/usr/bin/rclonefs`, e.g. `ln -s /usr/bin/rclone /sbin/mount.rclone`.
+rclone will detect it and translate command-line arguments appropriately.
+
+Now you can run classic mounts like this:
+```
+mount sftp1:subdir /mnt/data -t rclone -o vfs_cache_mode=writes,sftp_key_file=/path/to/pem
+```
+
+or create systemd mount units:
+```
+# /etc/systemd/system/mnt-data.mount
+[Unit]
+Description=Mount for /mnt/data
+[Mount]
+Type=rclone
+What=sftp1:subdir
+Where=/mnt/data
+Options=rw,_netdev,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone
+```
+
+optionally accompanied by systemd automount unit
+```
+# /etc/systemd/system/mnt-data.automount
+[Unit]
+Description=AutoMount for /mnt/data
+[Automount]
+Where=/mnt/data
+TimeoutIdleSec=600
+[Install]
+WantedBy=multi-user.target
+```
+
+or add in `/etc/fstab` a line like
+```
+sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0
+```
+
+or use classic Automountd.
+Remember to provide explicit `config=...,cache-dir=...` as a workaround for
+mount units being run without `HOME`.
+
+Rclone in the mount helper mode will split `-o` argument(s) by comma, replace `_`
+by `-` and prepend `--` to get the command-line flags. Options containing commas
+or spaces can be wrapped in single or double quotes. Any inner quotes inside outer
+quotes of the same type should be doubled.
+
+Mount option syntax includes a few extra options treated specially:
+
+- `env.NAME=VALUE` will set an environment variable for the mount process.
+ This helps with Automountd and Systemd.mount which don't allow setting
+ custom environment for mount helpers.
+ Typically you will use `env.HTTPS_PROXY=proxy.host:3128` or `env.HOME=/root`
+- `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
+
+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.
+
+## VFS Directory Cache
+
+Using the `--dir-cache-time` flag, you can control how long a
+directory should be considered up to date and not refreshed from the
+backend. Changes made through the VFS will appear immediately or
+invalidate the cache.
+
+ --dir-cache-time duration Time to cache directory entries for (default 5m0s)
+ --poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)
+
+However, changes made directly on the cloud storage by the web
+interface or a different copy of rclone will only be picked up once
+the directory cache expires if the backend configured does not support
+polling for changes. If the backend supports polling, changes will be
+picked up within the polling interval.
+
+You can send a `SIGHUP` signal to rclone for it to flush all
+directory caches, regardless of how old they are. Assuming only one
+rclone instance is running, you can reset the cache like this:
+
+ kill -SIGHUP $(pidof rclone)
+
+If you configure rclone with a [remote control](/rc) then you can use
+rclone rc to flush the whole directory cache:
+
+ rclone rc vfs/forget
+
+Or individual files or directories:
+
+ rclone rc vfs/forget file=path/to/file dir=path/to/dir
+
+## VFS File Buffering
+
+The `--buffer-size` flag determines the amount of memory,
+that will be used to buffer data in advance.
+
+Each open file will try to keep the specified amount of data in memory
+at all times. The buffered data is bound to one open file and won't be
+shared.
+
+This flag is a upper limit for the used memory per open file. The
+buffer will only use memory for data that is downloaded but not not
+yet read. If the buffer is empty, only a small amount of memory will
+be used.
+
+The maximum memory used by rclone for buffering can be up to
+`--buffer-size * open files`.
+
+## VFS File Caching
+
+These flags control the VFS file caching options. File caching is
+necessary to make the VFS layer appear compatible with a normal file
+system. It can be disabled at the cost of some compatibility.
+
+For example you'll need to enable VFS caching if you want to read and
+write simultaneously to a file. See below for more details.
+
+Note that the VFS cache is separate from the cache backend and you may
+find that you need one or the other or both.
+
+ --cache-dir string Directory rclone will use for caching.
+ --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+ --vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
+ --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+ --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+ --vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
+ --vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
+
+If run with `-vv` rclone will print the location of the file cache. The
+files are stored in the user cache file area which is OS dependent but
+can be controlled with `--cache-dir` or setting the appropriate
+environment variable.
+
+The cache has 4 different modes selected by `--vfs-cache-mode`.
+The higher the cache mode the more compatible rclone becomes at the
+cost of using disk space.
+
+Note that files are written back to the remote only when they are
+closed and if they haven't been accessed for `--vfs-write-back`
+seconds. If rclone is quit or dies with files that haven't been
+uploaded, these will be uploaded next time rclone is run with the same
+flags.
+
+If using `--vfs-cache-max-size` or `--vfs-cache-min-free-size` note
+that the cache may exceed these quotas for two reasons. Firstly
+because it is only checked every `--vfs-cache-poll-interval`. Secondly
+because open files cannot be evicted from the cache. When
+`--vfs-cache-max-size` or `--vfs-cache-min-free-size` is exceeded,
+rclone will attempt to evict the least accessed files from the cache
+first. rclone will start with files that haven't been accessed for the
+longest. This cache flushing strategy is efficient and more relevant
+files are likely to remain cached.
+
+The `--vfs-cache-max-age` will evict files from the cache
+after the set time since last access has passed. The default value of
+1 hour will start evicting files from cache that haven't been accessed
+for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0
+and will wait for 1 more hour before evicting. Specify the time with
+standard notation, s, m, h, d, w .
+
+You **should not** run two copies of rclone using the same VFS cache
+with the same or overlapping remotes if using `--vfs-cache-mode > off`.
+This can potentially cause data corruption if you do. You can work
+around this by giving each rclone its own cache hierarchy with
+`--cache-dir`. You don't need to worry about this if the remotes in
+use don't overlap.
+
+### --vfs-cache-mode off
+
+In this mode (the default) the cache will read directly from the remote and write
+directly to the remote without caching anything on disk.
+
+This will mean some operations are not possible
+
+ * Files can't be opened for both read AND write
+ * Files opened for write can't be seeked
+ * Existing files opened for write must have O_TRUNC set
+ * Files open for read with O_TRUNC will be opened write only
+ * Files open for write only will behave as if O_TRUNC was supplied
+ * Open modes O_APPEND, O_TRUNC are ignored
+ * If an upload fails it can't be retried
+
+### --vfs-cache-mode minimal
+
+This is very similar to "off" except that files opened for read AND
+write will be buffered to disk. This means that files opened for
+write will be a lot more compatible, but uses the minimal disk space.
+
+These operations are not possible
+
+ * Files opened for write only can't be seeked
+ * Existing files opened for write must have O_TRUNC set
+ * Files opened for write only will ignore O_APPEND, O_TRUNC
+ * If an upload fails it can't be retried
+
+### --vfs-cache-mode writes
+
+In this mode files opened for read only are still read directly from
+the remote, write only and read/write files are buffered to disk
+first.
+
+This mode should support all normal file system operations.
+
+If an upload fails it will be retried at exponentially increasing
+intervals up to 1 minute.
+
+### --vfs-cache-mode full
+
+In this mode all reads and writes are buffered to and from disk. When
+data is read from the remote this is buffered to disk as well.
+
+In this mode the files in the cache will be sparse files and rclone
+will keep track of which bits of the files it has downloaded.
+
+So if an application only reads the starts of each file, then rclone
+will only buffer the start of the file. These files will appear to be
+their full size in the cache, but they will be sparse files with only
+the data that has been downloaded present in them.
+
+This mode should support all normal file system operations and is
+otherwise identical to `--vfs-cache-mode` writes.
+
+When reading a file rclone will read `--buffer-size` plus
+`--vfs-read-ahead` bytes ahead. The `--buffer-size` is buffered in memory
+whereas the `--vfs-read-ahead` is buffered on disk.
+
+When using this mode it is recommended that `--buffer-size` is not set
+too large and `--vfs-read-ahead` is set large if required.
+
+**IMPORTANT** not all file systems support sparse files. In particular
+FAT/exFAT do not. Rclone will perform very badly if the cache
+directory is on a filesystem which doesn't support sparse files and it
+will log an ERROR message if one is detected.
+
+### Fingerprinting
+
+Various parts of the VFS use fingerprinting to see if a local file
+copy has changed relative to a remote file. Fingerprints are made
+from:
+
+- size
+- modification time
+- hash
+
+where available on an object.
+
+On some backends some of these attributes are slow to read (they take
+an extra API call per object, or extra work per object).
+
+For example `hash` is slow with the `local` and `sftp` backends as
+they have to read the entire file and hash it, and `modtime` is slow
+with the `s3`, `swift`, `ftp` and `qinqstor` backends because they
+need to do an extra API call to fetch it.
+
+If you use the `--vfs-fast-fingerprint` flag then rclone will not
+include the slow operations in the fingerprint. This makes the
+fingerprinting less accurate but much faster and will improve the
+opening time of cached files.
+
+If you are running a vfs cache over `local`, `s3` or `swift` backends
+then using this flag is recommended.
+
+Note that if you change the value of this flag, the fingerprints of
+the files in the cache may be invalidated and the files will need to
+be downloaded again.
+
+## VFS Chunked Reading
+
+When rclone reads files from a remote it reads them in chunks. This
+means that rather than requesting the whole file rclone reads the
+chunk specified. This can reduce the used download quota for some
+remotes by requesting only chunks from the remote that are actually
+read, at the cost of an increased number of requests.
+
+These flags control the chunking:
+
+ --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
+ --vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
+
+Rclone will start reading a chunk of size `--vfs-read-chunk-size`,
+and then double the size for each read. When `--vfs-read-chunk-size-limit` is
+specified, and greater than `--vfs-read-chunk-size`, the chunk size for each
+open file will get doubled only until the specified value is reached. If the
+value is "off", which is the default, the limit is disabled and the chunk size
+will grow indefinitely.
+
+With `--vfs-read-chunk-size 100M` and `--vfs-read-chunk-size-limit 0`
+the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
+When `--vfs-read-chunk-size-limit 500M` is specified, the result would be
+0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on.
+
+Setting `--vfs-read-chunk-size` to `0` or "off" disables chunked reading.
+
+## VFS Performance
+
+These flags may be used to enable/disable features of the VFS for
+performance or other reasons. See also the [chunked reading](#vfs-chunked-reading)
+feature.
+
+In particular S3 and Swift benefit hugely from the `--no-modtime` flag
+(or use `--use-server-modtime` for a slightly different effect) as each
+read of the modification time takes a transaction.
+
+ --no-checksum Don't compare checksums on up/download.
+ --no-modtime Don't read/write the modification time (can speed things up).
+ --no-seek Don't allow seeking in files.
+ --read-only Only allow read-only access.
+
+Sometimes rclone is delivered reads or writes out of order. Rather
+than seeking rclone will wait a short time for the in sequence read or
+write to come in. These flags only come into effect when not using an
+on disk cache file.
+
+ --vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
+ --vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
+
+When using VFS write caching (`--vfs-cache-mode` with value writes or full),
+the global flag `--transfers` can be set to adjust the number of parallel uploads of
+modified files from the cache (the related global flag `--checkers` has no effect on the VFS).
+
+ --transfers int Number of file transfers to run in parallel (default 4)
+
+## VFS Case Sensitivity
+
+Linux file systems are case-sensitive: two files can differ only
+by case, and the exact case must be used when opening a file.
+
+File systems in modern Windows are case-insensitive but case-preserving:
+although existing files can be opened using any case, the exact case used
+to create the file is preserved and available for programs to query.
+It is not allowed for two files in the same directory to differ only by case.
+
+Usually file systems on macOS are case-insensitive. It is possible to make macOS
+file systems case-sensitive but that is not the default.
+
+The `--vfs-case-insensitive` VFS flag controls how rclone handles these
+two cases. If its value is "false", rclone passes file names to the remote
+as-is. If the flag is "true" (or appears without a value on the
+command line), rclone may perform a "fixup" as explained below.
+
+The user may specify a file name to open/delete/rename/etc with a case
+different than what is stored on the remote. If an argument refers
+to an existing file with exactly the same name, then the case of the existing
+file on the disk will be used. However, if a file name with exactly the same
+name is not found but a name differing only by case exists, rclone will
+transparently fixup the name. This fixup happens only when an existing file
+is requested. Case sensitivity of file names created anew by rclone is
+controlled by the underlying remote.
+
+Note that case sensitivity of the operating system running rclone (the target)
+may differ from case sensitivity of a file system presented by rclone (the source).
+The flag controls whether "fixup" is performed to satisfy the target.
+
+If the flag is not provided on the command line, then its default value depends
+on the operating system where rclone runs: "true" on Windows and macOS, "false"
+otherwise. If the flag is provided without a value, then it is "true".
+
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
+## VFS Disk Options
+
+This flag allows you to manually set the statistics about the filing system.
+It can be useful when those statistics cannot be read correctly automatically.
+
+ --vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
+
+## Alternate report of used bytes
+
+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
+
+```
+ --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)
+ --allow-root Allow access to root user (not supported on Windows)
+ --async-read Use asynchronous reads (not supported on Windows) (default true)
+ --attr-timeout Duration Time for which file/directory attributes are cached (default 1s)
+ --daemon Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
+ --daemon-timeout Duration Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
+ --daemon-wait Duration Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
+ --debug-fuse Debug the FUSE internals - needs -v
+ --default-permissions Makes kernel enforce access control based on the file mode (not supported on Windows)
+ --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)
+ -h, --help help for nfsmount
+ --max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
+ --mount-case-insensitive Tristate Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
+ --network-mode Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
+ --nfs-cache-handle-limit int max file handles cached simultaneously (min 5) (default 1000000)
+ --no-checksum Don't compare checksums on up/download
+ --no-modtime Don't read/write the modification time (can speed things up)
+ --no-seek Don't allow seeking in files
+ --noappledouble Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
+ --noapplexattr Ignore all "com.apple.*" extended attributes (supported on OSX only)
+ -o, --option stringArray Option for libfuse/WinFsp (repeat if required)
+ --poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
+ --read-only Only allow read-only access
+ --sudo Use sudo to run the mount command as root.
+ --uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
+ --umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
+ --vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
+ --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+ --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+ --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+ --vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
+ --vfs-case-insensitive If a file name not found, find a case insensitive match
+ --vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
+ --vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
+ --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
+ --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
+ --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
+ --vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
+ --vfs-used-is-size rclone size Use the rclone size algorithm for Used size
+ --vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
+ --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
+ --volname string Set the volume name (supported on Windows and OSX only)
+ --write-back-cache Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)
+```
+
+
+## Filter Options
+
+Flags for filtering directory listings.
+
+```
+ --delete-excluded Delete files on dest excluded from sync
+ --exclude stringArray Exclude files matching pattern
+ --exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
+ --exclude-if-present stringArray Exclude directories if filename is present
+ --files-from stringArray Read list of source-file names from file (use - to read from stdin)
+ --files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
+ -f, --filter stringArray Add a file filtering rule
+ --filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
+ --ignore-case Ignore case in filters (case insensitive)
+ --include stringArray Include files matching pattern
+ --include-from stringArray Read file include patterns from file (use - to read from stdin)
+ --max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
+ --max-depth int If set limits the recursion depth to this (default -1)
+ --max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
+ --metadata-exclude stringArray Exclude metadatas matching pattern
+ --metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
+ --metadata-filter stringArray Add a metadata filtering rule
+ --metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
+ --metadata-include stringArray Include metadatas matching pattern
+ --metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
+ --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](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 obscure
Obscure password for use in the rclone config file.
@@ -6365,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.
@@ -6419,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").
@@ -6487,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]
```
@@ -6522,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
@@ -6729,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
@@ -6741,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
@@ -7052,6 +8255,28 @@ If the flag is not provided on the command line, then its default value depends
on the operating system where rclone runs: "true" on Windows and macOS, "false"
otherwise. If the flag is provided without a value, then it is "true".
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
## VFS Disk Options
This flag allows you to manually set the statistics about the filing system.
@@ -7073,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]
```
@@ -7097,6 +8323,7 @@ rclone serve dlna remote:path [flags]
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -7109,7 +8336,7 @@ rclone serve dlna remote:path [flags]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -7195,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
@@ -7506,6 +8734,28 @@ If the flag is not provided on the command line, then its default value depends
on the operating system where rclone runs: "true" on Windows and macOS, "false"
otherwise. If the flag is provided without a value, then it is "true".
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
## VFS Disk Options
This flag allows you to manually set the statistics about the filing system.
@@ -7527,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]
```
@@ -7548,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)
@@ -7569,6 +8821,7 @@ rclone serve docker [flags]
--socket-gid int GID for unix socket (default: current process GID) (default 1000)
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -7581,7 +8834,7 @@ rclone serve docker [flags]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -7631,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.
@@ -7651,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
@@ -7962,6 +9215,28 @@ If the flag is not provided on the command line, then its default value depends
on the operating system where rclone runs: "true" on Windows and macOS, "false"
otherwise. If the flag is provided without a value, then it is "true".
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
## VFS Disk Options
This flag allows you to manually set the statistics about the filing system.
@@ -7994,7 +9269,7 @@ together, if `--auth-proxy` is set the authorized keys option will be
ignored.
There is an example program
-[bin/test_proxy.py](https://github.com/rclone/rclone/blob/master/test_proxy.py)
+[bin/test_proxy.py](https://github.com/rclone/rclone/blob/master/bin/test_proxy.py)
in the rclone source code.
The program's job is to take a `user` and `pass` on the input and turn
@@ -8064,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]
```
@@ -8091,6 +9367,7 @@ rclone serve ftp remote:path [flags]
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication (default "anonymous")
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -8103,7 +9380,7 @@ rclone serve ftp remote:path [flags]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -8206,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").
@@ -8272,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
@@ -8583,6 +9861,28 @@ If the flag is not provided on the command line, then its default value depends
on the operating system where rclone runs: "true" on Windows and macOS, "false"
otherwise. If the flag is provided without a value, then it is "true".
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
## VFS Disk Options
This flag allows you to manually set the statistics about the filing system.
@@ -8615,7 +9915,7 @@ together, if `--auth-proxy` is set the authorized keys option will be
ignored.
There is an example program
-[bin/test_proxy.py](https://github.com/rclone/rclone/blob/master/test_proxy.py)
+[bin/test_proxy.py](https://github.com/rclone/rclone/blob/master/bin/test_proxy.py)
in the rclone source code.
The program's job is to take a `user` and `pass` on the input and turn
@@ -8685,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]
```
@@ -8721,6 +10022,7 @@ rclone serve http remote:path [flags]
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -8733,7 +10035,7 @@ rclone serve http remote:path [flags]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -8794,7 +10096,9 @@ NFS mount over local network, you need to specify the listening address and port
Modifying files through NFS protocol requires VFS caching. Usually you will need to specify `--vfs-cache-mode`
in order to be able to write to the mountpoint (full is recommended). If you don't specify VFS cache mode,
-the mount will be read-only.
+the mount will be read-only. Note also that `--nfs-cache-handle-limit` controls the maximum number of cached file handles stored by the caching handler.
+This should not be set too low or you may experience errors when trying to access files. The default is `1000000`, but consider lowering this limit if
+the server's system resource usage causes problems.
To serve NFS over the network use following command:
@@ -9121,6 +10425,28 @@ If the flag is not provided on the command line, then its default value depends
on the operating system where rclone runs: "true" on Windows and macOS, "false"
otherwise. If the flag is provided without a value, then it is "true".
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
## VFS Disk Options
This flag allows you to manually set the statistics about the filing system.
@@ -9142,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]
```
@@ -9155,6 +10482,7 @@ rclone serve nfs remote:path [flags]
--file-perms FileMode File permissions (default 0666)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
-h, --help help for nfs
+ --nfs-cache-handle-limit int max file handles cached simultaneously (min 5) (default 1000000)
--no-checksum Don't compare checksums on up/download
--no-modtime Don't read/write the modification time (can speed things up)
--no-seek Don't allow seeking in files
@@ -9162,6 +10490,7 @@ rclone serve nfs remote:path [flags]
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -9174,7 +10503,7 @@ rclone serve nfs remote:path [flags]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -9347,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").
@@ -9379,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]
```
@@ -9460,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]
@@ -9580,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
@@ -9894,6 +11245,28 @@ If the flag is not provided on the command line, then its default value depends
on the operating system where rclone runs: "true" on Windows and macOS, "false"
otherwise. If the flag is provided without a value, then it is "true".
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
## VFS Disk Options
This flag allows you to manually set the statistics about the filing system.
@@ -9915,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]
```
@@ -9948,6 +11322,7 @@ rclone serve s3 remote:path [flags]
--server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -9960,7 +11335,7 @@ rclone serve s3 remote:path [flags]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -10371,6 +11746,28 @@ If the flag is not provided on the command line, then its default value depends
on the operating system where rclone runs: "true" on Windows and macOS, "false"
otherwise. If the flag is provided without a value, then it is "true".
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
## VFS Disk Options
This flag allows you to manually set the statistics about the filing system.
@@ -10403,7 +11800,7 @@ together, if `--auth-proxy` is set the authorized keys option will be
ignored.
There is an example program
-[bin/test_proxy.py](https://github.com/rclone/rclone/blob/master/test_proxy.py)
+[bin/test_proxy.py](https://github.com/rclone/rclone/blob/master/bin/test_proxy.py)
in the rclone source code.
The program's job is to take a `user` and `pass` on the input and turn
@@ -10473,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]
```
@@ -10500,6 +11898,7 @@ rclone serve sftp remote:path [flags]
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -10512,7 +11911,7 @@ rclone serve sftp remote:path [flags]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -10577,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.
@@ -10592,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
@@ -10600,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
@@ -10644,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").
@@ -10710,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
@@ -11021,6 +12422,28 @@ If the flag is not provided on the command line, then its default value depends
on the operating system where rclone runs: "true" on Windows and macOS, "false"
otherwise. If the flag is provided without a value, then it is "true".
+The `--no-unicode-normalization` flag controls whether a similar "fixup" is
+performed for filenames that differ but are [canonically
+equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
+unicode. Unicode normalization can be particularly helpful for users of macOS,
+which prefers form NFD instead of the NFC used by most other platforms. It is
+therefore highly recommended to keep the default of `false` on macOS, to avoid
+encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
+flag allows hiding these duplicates. This comes with a performance tradeoff, as
+rclone will have to scan the entire directory for duplicates when listing a
+directory. For this reason, it is recommended to leave this disabled if not
+needed. However, macOS users may wish to consider using it, as otherwise, if a
+remote directory contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the mount,
+and both will appear to be editable, however, editing either version will
+actually result in only the NFD version getting edited under the hood. `--vfs-block-
+norm-dupes` prevents this confusion by detecting this scenario, hiding the
+duplicates, and logging an error, similar to how this is handled in `rclone
+sync`.
+
## VFS Disk Options
This flag allows you to manually set the statistics about the filing system.
@@ -11053,7 +12476,7 @@ together, if `--auth-proxy` is set the authorized keys option will be
ignored.
There is an example program
-[bin/test_proxy.py](https://github.com/rclone/rclone/blob/master/test_proxy.py)
+[bin/test_proxy.py](https://github.com/rclone/rclone/blob/master/bin/test_proxy.py)
in the rclone source code.
The program's job is to take a `user` and `pass` on the input and turn
@@ -11123,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]
```
@@ -11161,6 +12585,7 @@ rclone serve webdav remote:path [flags]
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -11173,7 +12598,7 @@ rclone serve webdav remote:path [flags]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -11379,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
```
@@ -11978,18 +13404,21 @@ This can be used when scripting to make aged backups efficiently, e.g.
## Metadata support {#metadata}
-Metadata is data about a file which isn't the contents of the file.
-Normally rclone only preserves the modification time and the content
-(MIME) type where possible.
+Metadata is data about a file (or directory) which isn't the contents
+of the file (or directory). Normally rclone only preserves the
+modification time and the content (MIME) type where possible.
-Rclone supports preserving all the available metadata on files (not
-directories) when using the `--metadata` or `-M` flag.
+Rclone supports preserving all the available metadata on files and
+directories when using the `--metadata` or `-M` flag.
Exactly what metadata is supported and what that support means depends
on the backend. Backends that support metadata have a metadata section
in their docs and are listed in the [features table](https://rclone.org/overview/#features)
(Eg [local](https://rclone.org/local/#metadata), [s3](/s3/#metadata))
+Some backends don't support metadata, some only support metadata on
+files and some support metadata on both files and directories.
+
Rclone only supports a one-time sync of metadata. This means that
metadata will be synced from the source object to the destination
object only when the source object has changed and needs to be
@@ -12010,6 +13439,14 @@ The [--metadata-mapper](#metadata-mapper) flag can be used to pass the
name of a program in which can transform metadata when it is being
copied from source to destination.
+Rclone supports `--metadata-set` and `--metadata-mapper` when doing
+sever side `Move` and server side `Copy`, but not when doing server
+side `DirMove` (renaming a directory) as this would involve recursing
+into the directory. Note that you can disable `DirMove` with
+`--disable DirMove` and rclone will revert back to using `Move` for
+each individual object where `--metadata-set` and `--metadata-mapper`
+are supported.
+
### Types of metadata
Metadata is divided into two type. System metadata and User metadata.
@@ -12639,6 +14076,26 @@ triggering follow-on actions if data was copied, or skipping if not.
NB: Enabling this option turns a usually non-fatal error into a potentially
fatal one - please check and adjust your scripts accordingly!
+### --fix-case ###
+
+Normally, a sync to a case insensitive dest (such as macOS / Windows) will
+not result in a matching filename if the source and dest filenames have
+casing differences but are otherwise identical. For example, syncing `hello.txt`
+to `HELLO.txt` will normally result in the dest filename remaining `HELLO.txt`.
+If `--fix-case` is set, then `HELLO.txt` will be renamed to `hello.txt`
+to match the source.
+
+NB:
+- directory names with incorrect casing will also be fixed
+- `--fix-case` will be ignored if `--immutable` is set
+- using `--local-case-sensitive` instead is not advisable;
+it will cause `HELLO.txt` to get deleted!
+- the old dest filename must not be excluded by filters.
+Be especially careful with [`--files-from`](https://rclone.org/filtering/#files-from-read-list-of-source-file-names),
+which does not respect [`--ignore-case`](https://rclone.org/filtering/#ignore-case-make-searches-case-insensitive)!
+- on remotes that do not support server-side move, `--fix-case` will require
+downloading the file and re-uploading it. To avoid this, do not use `--fix-case`.
+
### --fs-cache-expire-duration=TIME
When using rclone via the API rclone caches created remotes for 5
@@ -13072,10 +14529,10 @@ some context for the `Metadata` which may be important.
- `SrcFsType` is the name of the source backend.
- `DstFs` is the config string for the remote that the object is being copied to
- `DstFsType` is the name of the destination backend.
-- `Remote` is the path of the file relative to the root.
-- `Size`, `MimeType`, `ModTime` are attributes of the file.
+- `Remote` is the path of the object relative to the root.
+- `Size`, `MimeType`, `ModTime` are attributes of the object.
- `IsDir` is `true` if this is a directory (not yet implemented).
-- `ID` is the source `ID` of the file if known.
+- `ID` is the source `ID` of the object if known.
- `Metadata` is the backend specific metadata as described in the backend docs.
```json
@@ -13145,7 +14602,7 @@ 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](https://github.com/rclone/rclone/blob/master/test_metadata_mapper.py).
+[bin/test_metadata_mapper.py](https://github.com/rclone/rclone/blob/master/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`.
@@ -13205,7 +14662,7 @@ use multiple threads to transfer the file (default 256M).
Capable backends are marked in the
[overview](https://rclone.org/overview/#optional-features) as `MultithreadUpload`. (They
-need to implement either the `OpenWriterAt` or `OpenChunkedWriter`
+need to implement either the `OpenWriterAt` or `OpenChunkWriter`
internal interfaces). These include include, `local`, `s3`,
`azureblob`, `b2`, `oracleobjectstorage` and `smb` at the time of
writing.
@@ -13318,6 +14775,11 @@ files if they are incorrect as it would normally.
This can be used if the remote is being synced with another tool also
(e.g. the Google Drive client).
+### --no-update-dir-modtime ###
+
+When using this flag, rclone won't update modification times of remote
+directories if they are incorrect as it would normally.
+
### --order-by string ###
The `--order-by` flag controls the order in which files in the backlog
@@ -13421,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.
@@ -14259,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
@@ -14415,7 +15881,7 @@ For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
- rclone authorize "amazon cloud drive"
+ rclone authorize "dropbox"
Then paste the result below:
result>
@@ -14424,7 +15890,7 @@ result>
Then on your main desktop machine
```
-rclone authorize "amazon cloud drive"
+rclone authorize "dropbox"
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...
@@ -14853,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.
@@ -15024,7 +16490,7 @@ E.g. for an alternative `filter-file.txt`:
- *
Files `file1.jpg`, `file3.png` and `file2.avi` are listed whilst
-`secret17.jpg` and files without the suffix .jpg` or `.png` are excluded.
+`secret17.jpg` and files without the suffix `.jpg` or `.png` are excluded.
E.g. for an alternative `filter-file.txt`:
@@ -15471,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.
@@ -16001,6 +17473,26 @@ See the [config password](https://rclone.org/commands/rclone_config_password/) c
**Authentication is required for this call.**
+### config/paths: Reads the config file path and other important paths. {#config-paths}
+
+Returns a JSON object with the following keys:
+
+- config: path to config file
+- cache: path to root of cache directory
+- temp: path to root of temporary directory
+
+Eg
+
+ {
+ "cache": "/home/USER/.cache/rclone",
+ "config": "/home/USER/.rclone.conf",
+ "temp": "/tmp"
+ }
+
+See the [config paths](https://rclone.org/commands/rclone_config_paths/) command for more information on the above.
+
+**Authentication is required for this call.**
+
### config/providers: Shows how providers are configured in the config file. {#config-providers}
Returns a JSON object:
@@ -16786,6 +18278,50 @@ This command does not have a command line equivalent so use this instead:
rclone rc --loopback operations/fsinfo fs=remote:
+### operations/hashsum: Produces a hashsum file for all the objects in the path. {#operations-hashsum}
+
+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.
+
+This takes the following parameters:
+
+- fs - a remote name string e.g. "drive:" for the source, "/" for local filesystem
+ - this can point to a file and just that file will be returned in the listing.
+- hashType - type of hash to be used
+- download - check by downloading rather than with hash (boolean)
+- base64 - output the hashes in base64 rather than hex (boolean)
+
+If you supply the download flag, it will download the data from the
+remote and create the hash on the fly. This can be useful for remotes
+that don't support the given hash or if you really want to check all
+the data.
+
+Note that if you wish to supply a checkfile to check hashes against
+the current files then you should use operations/check instead of
+operations/hashsum.
+
+Returns:
+
+- hashsum - array of strings of the hashes
+- hashType - type of hash used
+
+Example:
+
+ $ rclone rc --loopback operations/hashsum fs=bin hashType=MD5 download=true base64=true
+ {
+ "hashType": "md5",
+ "hashsum": [
+ "WTSVLpuiXyJO_kGzJerRLg== backend-versions.sh",
+ "v1b_OlWCJO9LtNq3EIKkNQ== bisect-go-rclone.sh",
+ "VHbmHzHh4taXzgag8BAIKQ== bisect-rclone.sh",
+ ]
+ }
+
+See the [hashsum](https://rclone.org/commands/rclone_hashsum/) command for more information on the above.
+
+**Authentication is required for this call.**
+
### operations/list: List the given remote and path in JSON format {#operations-list}
This takes the following parameters:
@@ -17152,7 +18688,9 @@ This takes the following parameters
- ignoreListingChecksum - Do not use checksums for listings
- resilient - Allow future runs to retry after certain less-serious errors, instead of requiring resync.
Use at your own risk!
-- workdir - server directory for history files (default: /home/ncw/.cache/rclone/bisync)
+- workdir - server directory for history files (default: `~/.cache/rclone/bisync`)
+- backupdir1 - --backup-dir for Path1. Must be a non-overlapping path on the same remote.
+- backupdir2 - --backup-dir for Path2. Must be a non-overlapping path on the same remote.
- noCleanup - retain working files
See [bisync command help](https://rclone.org/commands/rclone_bisync/)
@@ -17552,7 +19090,6 @@ Here is an overview of the major features of each cloud storage system.
| ---------------------------- |:-----------------:|:-------:|:----------------:|:---------------:|:---------:|:--------:|
| 1Fichier | Whirlpool | - | No | Yes | R | - |
| Akamai Netstorage | MD5, SHA256 | R/W | No | No | R | - |
-| Amazon Drive | MD5 | - | Yes | No | R | - |
| Amazon S3 (or S3 compatible) | MD5 | R/W | No | No | R/W | RWU |
| Backblaze B2 | SHA1 | R/W | No | No | R/W | - |
| Box | SHA1 | R/W | Yes | No | - | - |
@@ -17561,7 +19098,7 @@ Here is an overview of the major features of each cloud storage system.
| Enterprise File Fabric | - | R/W | Yes | No | R/W | - |
| FTP | - | R/W ¹⁰ | No | No | - | - |
| Google Cloud Storage | MD5 | R/W | No | No | R/W | - |
-| Google Drive | MD5, SHA1, SHA256 | R/W | No | Yes | R/W | - |
+| Google Drive | MD5, SHA1, SHA256 | DR/W | No | Yes | R/W | DRWU |
| Google Photos | - | - | No | Yes | R | - |
| HDFS | - | R/W | No | No | - | - |
| HiDrive | HiDrive ¹² | R/W | No | No | - | - |
@@ -17575,7 +19112,7 @@ Here is an overview of the major features of each cloud storage system.
| Memory | MD5 | R/W | No | No | - | - |
| Microsoft Azure Blob Storage | MD5 | R/W | No | No | R/W | - |
| Microsoft Azure Files Storage | MD5 | R/W | Yes | No | R/W | - |
-| Microsoft OneDrive | QuickXorHash ⁵ | R/W | Yes | No | R | - |
+| Microsoft OneDrive | QuickXorHash ⁵ | DR/W | Yes | No | R | DRW |
| OpenDrive | MD5 | R/W | Yes | Partial ⁸ | - | - |
| OpenStack Swift | MD5 | R/W | No | No | R/W | - |
| Oracle Object Storage | MD5 | R/W | No | No | R/W | - |
@@ -17587,16 +19124,17 @@ Here is an overview of the major features of each cloud storage system.
| QingStor | MD5 | - ⁹ | No | No | R/W | - |
| Quatrix by Maytech | - | R/W | No | No | - | - |
| Seafile | - | - | No | No | - | - |
-| SFTP | MD5, SHA1 ² | R/W | Depends | No | - | - |
+| SFTP | MD5, SHA1 ² | DR/W | Depends | No | - | - |
| Sia | - | - | No | No | - | - |
| 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 | - |
| Zoho WorkDrive | - | - | No | No | - | - |
-| The local filesystem | All | R/W | Depends | No | - | RWU |
+| The local filesystem | All | DR/W | Depends | No | - | DRWU |
¹ Dropbox supports [its own custom
hash](https://www.dropbox.com/developers/reference/content-hash).
@@ -17635,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.
@@ -17650,13 +19191,21 @@ systems they must support a common hash type.
Almost all cloud storage systems store some sort of timestamp
on objects, but several of them not something that is appropriate
to use for syncing. E.g. some backends will only write a timestamp
-that represent the time of the upload. To be relevant for syncing
+that represents the time of the upload. To be relevant for syncing
it should be able to store the modification time of the source
object. If this is not the case, rclone will only check the file
size by default, though can be configured to check the file hash
(with the `--checksum` flag). Ideally it should also be possible to
change the timestamp of an existing file without having to re-upload it.
+| Key | Explanation |
+|-----|-------------|
+| `-` | ModTimes not supported - times likely the upload time |
+| `R` | ModTimes supported on files but can't be changed without re-upload |
+| `R/W` | Read and Write ModTimes fully supported on files |
+| `DR` | ModTimes supported on files and directories but can't be changed without re-upload |
+| `DR/W` | Read and Write ModTimes fully supported on files and directories |
+
Storage systems with a `-` in the ModTime column, means the
modification read on objects is not the modification time of the
file when uploaded. It is most likely the time the file was uploaded,
@@ -17678,6 +19227,9 @@ in a `mount` will be silently ignored.
Storage systems with `R/W` (for read/write) in the ModTime column,
means they do also support modtime-only operations.
+Storage systems with `D` in the ModTime column means that the
+following symbols apply to directories as well as files.
+
### Case Insensitive ###
If a cloud storage systems is case sensitive then it is possible to
@@ -17990,9 +19542,12 @@ The levels of metadata support are
| Key | Explanation |
|-----|-------------|
-| `R` | Read only System Metadata |
-| `RW` | Read and write System Metadata |
-| `RWU` | Read and write System Metadata and read and write User Metadata |
+| `R` | Read only System Metadata on files only|
+| `RW` | Read and write System Metadata on files only|
+| `RWU` | Read and write System Metadata and read and write User Metadata on files only|
+| `DR` | Read only System Metadata on files and directories |
+| `DRW` | Read and write System Metadata on files and directories|
+| `DRWU` | Read and write System Metadata and read and write User Metadata on files and directories |
See [the metadata docs](https://rclone.org/docs/#metadata) for more info.
@@ -18005,7 +19560,6 @@ upon backend-specific capabilities.
| ---------------------------- |:-----:|:----:|:----:|:-------:|:-------:|:-----:|:------------:|:------------------|:------------:|:-----:|:--------:|
| 1Fichier | No | Yes | Yes | No | No | No | No | No | Yes | No | Yes |
| Akamai Netstorage | Yes | No | No | No | No | Yes | Yes | No | No | No | Yes |
-| Amazon Drive | Yes | No | Yes | Yes | No | No | No | No | No | No | Yes |
| Amazon S3 (or S3 compatible) | No | Yes | No | No | Yes | Yes | Yes | Yes | Yes | No | No |
| Backblaze B2 | No | Yes | No | No | Yes | Yes | Yes | Yes | Yes | No | No |
| Box | Yes | Yes | Yes | Yes | Yes | No | Yes | No | Yes | Yes | Yes |
@@ -18019,6 +19573,7 @@ upon backend-specific capabilities.
| HDFS | Yes | No | Yes | Yes | No | No | Yes | No | No | Yes | Yes |
| HiDrive | Yes | Yes | Yes | Yes | No | No | Yes | No | No | No | Yes |
| HTTP | No | No | No | No | No | No | No | No | No | No | Yes |
+| ImageKit | Yes | Yes | Yes | No | No | No | No | No | No | No | Yes |
| Internet Archive | No | Yes | No | No | Yes | Yes | No | No | Yes | Yes | No |
| Jottacloud | Yes | Yes | Yes | Yes | Yes | Yes | No | No | Yes | Yes | Yes |
| Koofr | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | Yes | Yes |
@@ -18044,11 +19599,12 @@ 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 |
| Zoho WorkDrive | Yes | Yes | Yes | Yes | No | No | No | No | No | Yes | Yes |
-| The local filesystem | Yes | No | Yes | Yes | No | No | Yes | Yes | No | Yes | Yes |
+| The local filesystem | No | No | Yes | Yes | No | No | Yes | Yes | No | Yes | Yes |
¹ Note Swift implements this in order to delete directory markers but
it doesn't actually have a quicker way of deleting files other than
@@ -18167,7 +19723,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -18181,6 +19737,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -18201,6 +19758,7 @@ Flags just used for `rclone sync`.
--delete-after When synchronizing, delete files on destination after transferring (default)
--delete-before When synchronizing, delete files on destination before transferring
--delete-during When synchronizing, delete files during transfer
+ --fix-case Force rename of case insensitive dest to match source
--ignore-errors Delete even if there are I/O errors
--max-delete int When synchronizing, limit the number of deletes (default -1)
--max-delete-size SizeSuffix When synchronizing, limit the total size of deletes (default off)
@@ -18256,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.65.0")
+ --user-agent string Set the user-agent to a specified string (default "rclone/v1.67.0")
```
@@ -18423,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
@@ -18440,14 +19999,7 @@ Flags to control the Remote Control API.
Backend only flags. These can be set in the config file also.
```
- --acd-auth-url string Auth server URL
- --acd-client-id string OAuth Client Id
- --acd-client-secret string OAuth Client Secret
- --acd-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8,Dot)
- --acd-templink-threshold SizeSuffix Files >= this size will be downloaded via their tempLink (default 9Gi)
- --acd-token string OAuth Access Token as a JSON blob
- --acd-token-url string Token server url
- --acd-upload-wait-per-gb Duration Additional time per GiB to wait after a failed complete upload to see if it appears (default 3m0s)
+ --alias-description string Description of the remote
--alias-remote string Remote or path to alias
--azureblob-access-tier string Access tier of blob: hot, cool, cold or archive
--azureblob-account string Azure Storage Account Name
@@ -18458,6 +20010,8 @@ Backend only flags. These can be set in the config file also.
--azureblob-client-id string The ID of the client in use
--azureblob-client-secret string One of the service principal's client secrets
--azureblob-client-send-certificate-chain Send the certificate chain when using certificate auth
+ --azureblob-delete-snapshots string Set to specify how to deal with snapshots on blob deletion
+ --azureblob-description string Description of the remote
--azureblob-directory-markers Upload an empty object with a trailing slash when a new directory is created
--azureblob-disable-checksum Don't store MD5 checksum with object metadata
--azureblob-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8)
@@ -18488,6 +20042,7 @@ Backend only flags. These can be set in the config file also.
--azurefiles-client-secret string One of the service principal's client secrets
--azurefiles-client-send-certificate-chain Send the certificate chain when using certificate auth
--azurefiles-connection-string string Azure Files Connection String
+ --azurefiles-description string Description of the remote
--azurefiles-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8,Dot)
--azurefiles-endpoint string Endpoint for the service
--azurefiles-env-auth Read credentials from runtime (environment variables, CLI or MSI)
@@ -18507,8 +20062,9 @@ Backend only flags. These can be set in the config file also.
--b2-account string Account ID or Application Key ID
--b2-chunk-size SizeSuffix Upload chunk size (default 96Mi)
--b2-copy-cutoff SizeSuffix Cutoff for switching to multipart copy (default 4Gi)
+ --b2-description string Description of the remote
--b2-disable-checksum Disable checksums for large (> upload cutoff) files
- --b2-download-auth-duration Duration Time before the authorization token will expire in s or suffix ms|s|m|h|d (default 1w)
+ --b2-download-auth-duration Duration Time before the public link authorization token will expire in s or suffix ms|s|m|h|d (default 1w)
--b2-download-url string Custom endpoint for downloads
--b2-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--b2-endpoint string Endpoint for the service
@@ -18527,6 +20083,7 @@ Backend only flags. These can be set in the config file also.
--box-client-id string OAuth Client Id
--box-client-secret string OAuth Client Secret
--box-commit-retries int Max number of times to try committing a multipart file (default 100)
+ --box-description string Description of the remote
--box-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot)
--box-impersonate string Impersonate this user ID when using a service account
--box-list-chunk int Size of listing chunk 1-1000 (default 1000)
@@ -18543,6 +20100,7 @@ Backend only flags. These can be set in the config file also.
--cache-db-path string Directory to store file structure metadata DB (default "$HOME/.cache/rclone/cache-backend")
--cache-db-purge Clear all the cached data for this remote on start
--cache-db-wait-time Duration How long to wait for the DB to be available - 0 is unlimited (default 1s)
+ --cache-description string Description of the remote
--cache-info-age Duration How long to cache file structure information (directory listings, file size, times, etc.) (default 6h0m0s)
--cache-plex-insecure string Skip all certificate verification when connecting to the Plex server
--cache-plex-password string The password of the Plex user (obscured)
@@ -18556,15 +20114,19 @@ Backend only flags. These can be set in the config file also.
--cache-workers int How many workers should run in parallel to download chunks (default 4)
--cache-writes Cache file data on writes through the FS
--chunker-chunk-size SizeSuffix Files larger than chunk size will be split in chunks (default 2Gi)
+ --chunker-description string Description of the remote
--chunker-fail-hard Choose how chunker should handle files with missing or invalid chunks
--chunker-hash-type string Choose how chunker handles hash sums (default "md5")
--chunker-remote string Remote to chunk/unchunk
+ --combine-description string Description of the remote
--combine-upstreams SpaceSepList Upstreams for combining
+ --compress-description string Description of the remote
--compress-level int GZIP compression level (-2 to 9) (default -1)
--compress-mode string Compression mode (default "gzip")
--compress-ram-cache-limit SizeSuffix Some remotes don't allow the upload of files with unknown size (default 20Mi)
--compress-remote string Remote to compress
-L, --copy-links Follow symlinks and copy the pointed to item
+ --crypt-description string Description of the remote
--crypt-directory-name-encryption Option to either encrypt directory names or leave them intact (default true)
--crypt-filename-encoding string How to encode the encrypted filename to text string (default "base32")
--crypt-filename-encryption string How to encrypt the filenames (default "standard")
@@ -18575,6 +20137,7 @@ Backend only flags. These can be set in the config file also.
--crypt-remote string Remote to encrypt/decrypt
--crypt-server-side-across-configs Deprecated: use --server-side-across-configs instead
--crypt-show-mapping For all files listed show how the names encrypt
+ --crypt-strict-names If set, this will raise an error when crypt comes across a filename that can't be decrypted
--crypt-suffix string If this is set it will override the default suffix of ".bin" (default ".bin")
--drive-acknowledge-abuse Set to allow files which return cannotDownloadAbusiveFile to be downloaded
--drive-allow-import-name-change Allow the filetype to change when uploading Google docs
@@ -18584,6 +20147,7 @@ Backend only flags. These can be set in the config file also.
--drive-client-id string Google Application Client Id
--drive-client-secret string OAuth Client Secret
--drive-copy-shortcut-content Server side copy contents of shortcuts instead of the shortcut
+ --drive-description string Description of the remote
--drive-disable-http2 Disable drive using http2 (default true)
--drive-encoding Encoding The encoding for the backend (default InvalidUtf8)
--drive-env-auth Get IAM credentials from runtime (environment variables or instance meta data if no env vars)
@@ -18632,19 +20196,23 @@ Backend only flags. These can be set in the config file also.
--dropbox-chunk-size SizeSuffix Upload chunk size (< 150Mi) (default 48Mi)
--dropbox-client-id string OAuth Client Id
--dropbox-client-secret string OAuth Client Secret
+ --dropbox-description string Description of the remote
--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
--dropbox-token-url string Token server url
--fichier-api-key string Your API Key, get it from https://1fichier.com/console/params.pl
--fichier-cdn Set if you wish to use CDN download links
+ --fichier-description string Description of the remote
--fichier-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot)
--fichier-file-password string If you want to download a shared file that is password protected, add this parameter (obscured)
--fichier-folder-password string If you want to list the files in a shared folder that is password protected, add this parameter (obscured)
--fichier-shared-folder string If you want to download a shared folder, add this parameter
+ --filefabric-description string Description of the remote
--filefabric-encoding Encoding The encoding for the backend (default Slash,Del,Ctl,InvalidUtf8,Dot)
--filefabric-permanent-token string Permanent Authentication Token
--filefabric-root-folder-id string ID of the root folder
@@ -18655,6 +20223,7 @@ Backend only flags. These can be set in the config file also.
--ftp-ask-password Allow asking for FTP password when needed
--ftp-close-timeout Duration Maximum time to wait for a response to close (default 1m0s)
--ftp-concurrency int Maximum number of FTP simultaneous connections, 0 for unlimited
+ --ftp-description string Description of the remote
--ftp-disable-epsv Disable using EPSV even if server advertises support
--ftp-disable-mlsd Disable using MLSD even if server advertises support
--ftp-disable-tls13 Disable TLS 1.3 (workaround for FTP servers with buggy TLS)
@@ -18680,6 +20249,7 @@ Backend only flags. These can be set in the config file also.
--gcs-client-id string OAuth Client Id
--gcs-client-secret string OAuth Client Secret
--gcs-decompress If set this will decompress gzip encoded objects
+ --gcs-description string Description of the remote
--gcs-directory-markers Upload an empty object with a trailing slash when a new directory is created
--gcs-encoding Encoding The encoding for the backend (default Slash,CrLf,InvalidUtf8,Dot)
--gcs-endpoint string Endpoint for the service
@@ -18700,6 +20270,7 @@ Backend only flags. These can be set in the config file also.
--gphotos-batch-timeout Duration Max time to allow an idle upload batch before uploading (default 0s)
--gphotos-client-id string OAuth Client Id
--gphotos-client-secret string OAuth Client Secret
+ --gphotos-description string Description of the remote
--gphotos-encoding Encoding The encoding for the backend (default Slash,CrLf,InvalidUtf8,Dot)
--gphotos-include-archived Also view and download archived media
--gphotos-read-only Set to make the Google Photos backend read only
@@ -18708,10 +20279,12 @@ Backend only flags. These can be set in the config file also.
--gphotos-token string OAuth Access Token as a JSON blob
--gphotos-token-url string Token server url
--hasher-auto-size SizeSuffix Auto-update checksum for files smaller than this size (disabled by default)
+ --hasher-description string Description of the remote
--hasher-hashes CommaSepList Comma separated list of supported checksum types (default md5,sha1)
--hasher-max-age Duration Maximum time to keep checksums in cache (0 = no cache, off = cache forever) (default off)
--hasher-remote string Remote to cache checksums for (e.g. myRemote:path)
--hdfs-data-transfer-protection string Kerberos data transfer protection: authentication|integrity|privacy
+ --hdfs-description string Description of the remote
--hdfs-encoding Encoding The encoding for the backend (default Slash,Colon,Del,Ctl,InvalidUtf8,Dot)
--hdfs-namenode CommaSepList Hadoop name nodes and ports
--hdfs-service-principal-name string Kerberos service principal name for the namenode
@@ -18720,6 +20293,7 @@ Backend only flags. These can be set in the config file also.
--hidrive-chunk-size SizeSuffix Chunksize for chunked uploads (default 48Mi)
--hidrive-client-id string OAuth Client Id
--hidrive-client-secret string OAuth Client Secret
+ --hidrive-description string Description of the remote
--hidrive-disable-fetching-member-count Do not fetch number of objects in directories unless it is absolutely necessary
--hidrive-encoding Encoding The encoding for the backend (default Slash,Dot)
--hidrive-endpoint string Endpoint for the service (default "https://api.hidrive.strato.com/2.1")
@@ -18730,10 +20304,13 @@ Backend only flags. These can be set in the config file also.
--hidrive-token-url string Token server url
--hidrive-upload-concurrency int Concurrency for chunked uploads (default 4)
--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
+ --imagekit-description string Description of the remote
--imagekit-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket)
--imagekit-endpoint string You can find your ImageKit.io URL endpoint in your [dashboard](https://imagekit.io/dashboard/developer/api-keys)
--imagekit-only-signed Restrict unsigned image URLs If you have configured Restrict unsigned image URLs in your dashboard settings, set this to true
@@ -18742,6 +20319,7 @@ Backend only flags. These can be set in the config file also.
--imagekit-upload-tags string Tags to add to the uploaded files, e.g. "tag1,tag2"
--imagekit-versions Include old versions in directory listings
--internetarchive-access-key-id string IAS3 Access Key
+ --internetarchive-description string Description of the remote
--internetarchive-disable-checksum Don't ask the server to test against MD5 checksum calculated by rclone (default true)
--internetarchive-encoding Encoding The encoding for the backend (default Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot)
--internetarchive-endpoint string IAS3 Endpoint (default "https://s3.us.archive.org")
@@ -18751,6 +20329,7 @@ Backend only flags. These can be set in the config file also.
--jottacloud-auth-url string Auth server URL
--jottacloud-client-id string OAuth Client Id
--jottacloud-client-secret string OAuth Client Secret
+ --jottacloud-description string Description of the remote
--jottacloud-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot)
--jottacloud-hard-delete Delete files permanently rather than putting them into the trash
--jottacloud-md5-memory-limit SizeSuffix Files bigger than this will be cached on disk to calculate the MD5 if required (default 10Mi)
@@ -18759,29 +20338,34 @@ Backend only flags. These can be set in the config file also.
--jottacloud-token-url string Token server url
--jottacloud-trashed-only Only show files that are in the trash
--jottacloud-upload-resume-limit SizeSuffix Files bigger than this can be resumed if the upload fail's (default 10Mi)
+ --koofr-description string Description of the remote
--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
+ --linkbox-description string Description of the remote
--linkbox-token string Token from https://www.linkbox.to/admin/account
-l, --links Translate symlinks to/from regular files with a '.rclonelink' extension
--local-case-insensitive Force the filesystem to report itself as case insensitive
--local-case-sensitive Force the filesystem to report itself as case sensitive
+ --local-description string Description of the remote
--local-encoding Encoding The encoding for the backend (default Slash,Dot)
--local-no-check-updated Don't check to see if the files change during upload
--local-no-preallocate Disable preallocation of disk space for transferred files
--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
--mailru-check-hash What should copy do if file checksum is mismatched or invalid (default true)
--mailru-client-id string OAuth Client Id
--mailru-client-secret string OAuth Client Secret
+ --mailru-description string Description of the remote
--mailru-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--mailru-pass string Password (obscured)
--mailru-speedup-enable Skip full upload if there is another file with same data hash (default true)
@@ -18792,12 +20376,15 @@ Backend only flags. These can be set in the config file also.
--mailru-token-url string Token server url
--mailru-user string User name (usually email)
--mega-debug Output more debug from Mega
+ --mega-description string Description of the remote
--mega-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8,Dot)
--mega-hard-delete Delete files permanently rather than putting them into the trash
--mega-pass string Password (obscured)
--mega-use-https Use HTTPS for transfers
--mega-user string User name
+ --memory-description string Description of the remote
--netstorage-account string Set the NetStorage account name
+ --netstorage-description string Description of the remote
--netstorage-host string Domain+path of NetStorage host to connect to
--netstorage-protocol string Select between HTTP or HTTPS protocol (default "https")
--netstorage-secret string Set the NetStorage account secret/G2O key for authentication (obscured)
@@ -18809,15 +20396,18 @@ Backend only flags. These can be set in the config file also.
--onedrive-client-id string OAuth Client Id
--onedrive-client-secret string OAuth Client Secret
--onedrive-delta If set rclone will use delta listing to implement recursive listings
+ --onedrive-description string Description of the remote
--onedrive-drive-id string The ID of the drive to use
--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")
--onedrive-link-type string Set the type of the links created by the link command (default "view")
--onedrive-list-chunk int Size of listing chunk (default 1000)
+ --onedrive-metadata-permissions Bits Control whether permissions should be read or written in metadata (default off)
--onedrive-no-versions Remove all versions on modifying operations
--onedrive-region string Choose national cloud region for OneDrive (default "global")
--onedrive-root-folder-id string ID of the root folder
@@ -18831,6 +20421,7 @@ Backend only flags. These can be set in the config file also.
--oos-config-profile string Profile name inside the oci config file (default "Default")
--oos-copy-cutoff SizeSuffix Cutoff for switching to multipart copy (default 4.656Gi)
--oos-copy-timeout Duration Timeout for copy (default 1m0s)
+ --oos-description string Description of the remote
--oos-disable-checksum Don't store MD5 checksum with object metadata
--oos-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8,Dot)
--oos-endpoint string Endpoint for Object storage API
@@ -18849,12 +20440,14 @@ Backend only flags. These can be set in the config file also.
--oos-upload-concurrency int Concurrency for multipart uploads (default 10)
--oos-upload-cutoff SizeSuffix Cutoff for switching to chunked upload (default 200Mi)
--opendrive-chunk-size SizeSuffix Files will be uploaded in chunks this size (default 10Mi)
+ --opendrive-description string Description of the remote
--opendrive-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot)
--opendrive-password string Password (obscured)
--opendrive-username string Username
--pcloud-auth-url string Auth server URL
--pcloud-client-id string OAuth Client Id
--pcloud-client-secret string OAuth Client Secret
+ --pcloud-description string Description of the remote
--pcloud-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--pcloud-hostname string Hostname to connect to (default "api.pcloud.com")
--pcloud-password string Your pcloud password (obscured)
@@ -18863,8 +20456,10 @@ 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
--pikpak-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot)
--pikpak-hash-memory-limit SizeSuffix Files bigger than this will be cached on disk to calculate hash if required (default 10Mi)
--pikpak-pass string Pikpak password (obscured)
@@ -18872,16 +20467,19 @@ 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
--premiumizeme-client-id string OAuth Client Id
--premiumizeme-client-secret string OAuth Client Secret
+ --premiumizeme-description string Description of the remote
--premiumizeme-encoding Encoding The encoding for the backend (default Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--premiumizeme-token string OAuth Access Token as a JSON blob
--premiumizeme-token-url string Token server url
--protondrive-2fa string The 2FA code
--protondrive-app-version string The app version string (default "macos-drive@1.0.0-alpha.1+rclone")
+ --protondrive-description string Description of the remote
--protondrive-enable-caching Caches the files and folders metadata to reduce API calls (default true)
--protondrive-encoding Encoding The encoding for the backend (default Slash,LeftSpace,RightSpace,InvalidUtf8,Dot)
--protondrive-mailbox-password string The mailbox password of your two-password proton account (obscured)
@@ -18892,12 +20490,14 @@ Backend only flags. These can be set in the config file also.
--putio-auth-url string Auth server URL
--putio-client-id string OAuth Client Id
--putio-client-secret string OAuth Client Secret
+ --putio-description string Description of the remote
--putio-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--putio-token string OAuth Access Token as a JSON blob
--putio-token-url string Token server url
--qingstor-access-key-id string QingStor Access Key ID
--qingstor-chunk-size SizeSuffix Chunk size to use for uploading (default 4Mi)
--qingstor-connection-retries int Number of connection retries (default 3)
+ --qingstor-description string Description of the remote
--qingstor-encoding Encoding The encoding for the backend (default Slash,Ctl,InvalidUtf8)
--qingstor-endpoint string Enter an endpoint URL to connection QingStor API
--qingstor-env-auth Get QingStor credentials from runtime
@@ -18906,18 +20506,21 @@ Backend only flags. These can be set in the config file also.
--qingstor-upload-cutoff SizeSuffix Cutoff for switching to chunked upload (default 200Mi)
--qingstor-zone string Zone to connect to
--quatrix-api-key string API key for accessing Quatrix account
+ --quatrix-description string Description of the remote
--quatrix-effective-upload-time string Wanted upload time for one chunk (default "4s")
--quatrix-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--quatrix-hard-delete Delete files permanently rather than putting them into the trash
--quatrix-host string Host name of Quatrix account
--quatrix-maximal-summary-chunk-size SizeSuffix The maximal summary for all chunks. It should not be less than 'transfers'*'minimal_chunk_size' (default 95.367Mi)
--quatrix-minimal-chunk-size SizeSuffix The minimal size for one chunk (default 9.537Mi)
+ --quatrix-skip-project-folders Skip project folders in operations
--s3-access-key-id string AWS Access Key ID
--s3-acl string Canned ACL used when creating buckets and storing or copying objects
--s3-bucket-acl string Canned ACL used when creating buckets
--s3-chunk-size SizeSuffix Chunk size to use for uploading (default 5Mi)
--s3-copy-cutoff SizeSuffix Cutoff for switching to multipart copy (default 4.656Gi)
--s3-decompress If set this will decompress gzip encoded objects
+ --s3-description string Description of the remote
--s3-directory-markers Upload an empty object with a trailing slash when a new directory is created
--s3-disable-checksum Don't store MD5 checksum with object metadata
--s3-disable-http2 Disable usage of http2 for S3 backends
@@ -18952,19 +20555,22 @@ Backend only flags. These can be set in the config file also.
--s3-sse-kms-key-id string If using KMS ID you must provide the ARN of Key
--s3-storage-class string The storage class to use when storing new objects in S3
--s3-sts-endpoint string Endpoint for STS
- --s3-upload-concurrency int Concurrency for multipart uploads (default 4)
+ --s3-upload-concurrency int Concurrency for multipart uploads and copies (default 4)
--s3-upload-cutoff SizeSuffix Cutoff for switching to chunked upload (default 200Mi)
--s3-use-accelerate-endpoint If true use the AWS S3 accelerated endpoint
--s3-use-accept-encoding-gzip Accept-Encoding: gzip Whether to send Accept-Encoding: gzip header (default unset)
--s3-use-already-exists Tristate Set if rclone should report BucketAlreadyExists errors on bucket creation (default unset)
+ --s3-use-dual-stack If true use AWS S3 dual-stack endpoint (IPv6 support)
--s3-use-multipart-etag Tristate Whether to use ETag in multipart uploads for verification (default unset)
--s3-use-multipart-uploads Tristate Set if rclone should use multipart uploads (default unset)
--s3-use-presigned-request Whether to use a presigned request or PutObject for single part uploads
--s3-v2-auth If true use v2 authentication
--s3-version-at Time Show file versions as they were at the specified time (default off)
+ --s3-version-deleted Show deleted file markers when using versions
--s3-versions Include old versions in directory listings
--seafile-2fa Two-factor authentication ('true' if the account has 2FA enabled)
--seafile-create-library Should rclone create a library if it doesn't exist
+ --seafile-description string Description of the remote
--seafile-encoding Encoding The encoding for the backend (default Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8)
--seafile-library string Name of the library
--seafile-library-key string Library password (for encrypted libraries only) (obscured)
@@ -18975,7 +20581,9 @@ 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
--sftp-disable-concurrent-writes If set don't use concurrent writes
--sftp-disable-hashcheck Disable the execution of SSH commands to determine if remote file hashing is available
@@ -19010,6 +20618,7 @@ Backend only flags. These can be set in the config file also.
--sharefile-chunk-size SizeSuffix Upload chunk size (default 64Mi)
--sharefile-client-id string OAuth Client Id
--sharefile-client-secret string OAuth Client Secret
+ --sharefile-description string Description of the remote
--sharefile-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot)
--sharefile-endpoint string Endpoint for API calls
--sharefile-root-folder-id string ID of the root folder
@@ -19018,10 +20627,12 @@ Backend only flags. These can be set in the config file also.
--sharefile-upload-cutoff SizeSuffix Cutoff for switching to multipart upload (default 128Mi)
--sia-api-password string Sia Daemon API Password (obscured)
--sia-api-url string Sia daemon API URL, like http://sia.daemon.host:9980 (default "http://127.0.0.1:9980")
+ --sia-description string Description of the remote
--sia-encoding Encoding The encoding for the backend (default Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot)
--sia-user-agent string Siad User Agent (default "Sia-Agent")
--skip-links Don't warn about skipped symlinks
--smb-case-insensitive Whether the server is configured to be case-insensitive (default true)
+ --smb-description string Description of the remote
--smb-domain string Domain name for NTLM authentication (default "WORKGROUP")
--smb-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot)
--smb-hide-special-share Hide special shares (e.g. print$) which users aren't supposed to access (default true)
@@ -19033,6 +20644,7 @@ Backend only flags. These can be set in the config file also.
--smb-user string SMB username (default "$USER")
--storj-access-grant string Access grant
--storj-api-key string API key
+ --storj-description string Description of the remote
--storj-passphrase string Encryption passphrase
--storj-provider string Choose an authentication method (default "existing")
--storj-satellite-address string Satellite address (default "us1.storj.io")
@@ -19041,6 +20653,7 @@ Backend only flags. These can be set in the config file also.
--sugarsync-authorization string Sugarsync authorization
--sugarsync-authorization-expiry string Sugarsync authorization expiry
--sugarsync-deleted-id string Sugarsync deleted folder id
+ --sugarsync-description string Description of the remote
--sugarsync-encoding Encoding The encoding for the backend (default Slash,Ctl,InvalidUtf8,Dot)
--sugarsync-hard-delete Permanently delete files if true
--sugarsync-private-access-key string Sugarsync Private Access Key
@@ -19053,7 +20666,8 @@ 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)
--swift-endpoint-type string Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE) (default "public")
@@ -19068,22 +20682,35 @@ 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")
+ --union-description string Description of the remote
--union-min-free-space SizeSuffix Minimum viable free space for lfs/eplfs policies (default 1Gi)
--union-search-policy string Policy to choose upstream on SEARCH category (default "ff")
--union-upstreams string List of space separated upstreams
--uptobox-access-token string Your access token
+ --uptobox-description string Description of the remote
--uptobox-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot)
--uptobox-private Set to make uploaded files private
--webdav-bearer-token string Bearer token instead of user/pass (e.g. a Macaroon)
--webdav-bearer-token-command string Command to run to get a bearer token
+ --webdav-description string Description of the remote
--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)
--webdav-url string URL of http host to connect to
@@ -19092,6 +20719,7 @@ Backend only flags. These can be set in the config file also.
--yandex-auth-url string Auth server URL
--yandex-client-id string OAuth Client Id
--yandex-client-secret string OAuth Client Secret
+ --yandex-description string Description of the remote
--yandex-encoding Encoding The encoding for the backend (default Slash,Del,Ctl,InvalidUtf8,Dot)
--yandex-hard-delete Delete files permanently rather than putting them into the trash
--yandex-token string OAuth Access Token as a JSON blob
@@ -19099,6 +20727,7 @@ Backend only flags. These can be set in the config file also.
--zoho-auth-url string Auth server URL
--zoho-client-id string OAuth Client Id
--zoho-client-secret string OAuth Client Secret
+ --zoho-description string Description of the remote
--zoho-encoding Encoding The encoding for the backend (default Del,Ctl,InvalidUtf8)
--zoho-region string Zoho region to connect to
--zoho-token string OAuth Access Token as a JSON blob
@@ -19661,23 +21290,34 @@ docker volume inspect my_vol
If docker refuses to remove the volume, you should find containers
or swarm services that use it and stop them first.
+## Bisync
+`bisync` is **in beta** and is considered an **advanced command**, so use with care.
+Make sure you have read and understood the entire [manual](https://rclone.org/bisync) (especially the [Limitations](#limitations) section) before using, or data loss can result. Questions can be asked in the [Rclone Forum](https://forum.rclone.org/).
+
## Getting started {#getting-started}
- [Install rclone](https://rclone.org/install/) and setup your remotes.
- Bisync will create its working directory
- at `~/.cache/rclone/bisync` on Linux
+ at `~/.cache/rclone/bisync` on Linux, `/Users/yourusername/Library/Caches/rclone/bisync` on Mac,
or `C:\Users\MyLogin\AppData\Local\rclone\bisync` on Windows.
Make sure that this location is writable.
- Run bisync with the `--resync` flag, specifying the paths
to the local and remote sync directory roots.
-- For successive sync runs, leave off the `--resync` flag.
+- For successive sync runs, leave off the `--resync` flag. (**Important!**)
- Consider using a [filters file](#filtering) for excluding
unnecessary files and directories from the sync.
- Consider setting up the [--check-access](#check-access) feature
for safety.
-- On Linux, consider setting up a [crontab entry](#cron). bisync can
+- On Linux or Mac, consider setting up a [crontab entry](#cron). bisync can
safely run in concurrent cron jobs thanks to lock files it maintains.
+For example, your first command might look like this:
+
+```
+rclone bisync remote1:path1 remote2:path2 --create-empty-src-dirs --compare size,modtime,checksum --slow-hash-sync-only --resilient -MvP --drive-skip-gdocs --fix-case --resync --dry-run
+```
+If all looks good, run it again without `--dry-run`. After that, remove `--resync` as well.
+
Here is a typical run log (with timestamps removed for clarity):
```
@@ -19736,36 +21376,36 @@ Positional arguments:
Type 'rclone listremotes' for list of configured remotes.
Optional Flags:
- --check-access Ensure expected `RCLONE_TEST` files are found on
- both Path1 and Path2 filesystems, else abort.
- --check-filename FILENAME Filename for `--check-access` (default: `RCLONE_TEST`)
- --check-sync CHOICE Controls comparison of final listings:
- `true | false | only` (default: true)
- If set to `only`, bisync will only compare listings
- from the last run but skip actual sync.
- --filters-file PATH Read filtering patterns from a file
- --max-delete PERCENT Safety check on maximum percentage of deleted files allowed.
- If exceeded, the bisync run will abort. (default: 50%)
- --force Bypass `--max-delete` safety check and run the sync.
- Consider using with `--verbose`
- --create-empty-src-dirs Sync creation and deletion of empty directories.
- (Not compatible with --remove-empty-dirs)
- --remove-empty-dirs Remove empty directories at the final cleanup step.
- -1, --resync Performs the resync run.
- Warning: Path1 files may overwrite Path2 versions.
- Consider using `--verbose` or `--dry-run` first.
- --ignore-listing-checksum Do not use checksums for listings
- (add --ignore-checksum to additionally skip post-copy checksum checks)
- --resilient Allow future runs to retry after certain less-serious errors,
- instead of requiring --resync. Use at your own risk!
- --localtime Use local time in listings (default: UTC)
- --no-cleanup Retain working files (useful for troubleshooting and testing).
- --workdir PATH Use custom working directory (useful for testing).
- (default: `~/.cache/rclone/bisync`)
- -n, --dry-run Go through the motions - No files are copied/deleted.
- -v, --verbose Increases logging verbosity.
- May be specified more than once for more details.
- -h, --help help for bisync
+ --backup-dir1 string --backup-dir for Path1. Must be a non-overlapping path on the same remote.
+ --backup-dir2 string --backup-dir for Path2. Must be a non-overlapping path on the same remote.
+ --check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
+ --check-filename string Filename for --check-access (default: RCLONE_TEST)
+ --check-sync string Controls comparison of final listings: true|false|only (default: true) (default "true")
+ --compare string Comma-separated list of bisync-specific compare options ex. 'size,modtime,checksum' (default: 'size,modtime')
+ --conflict-loser ConflictLoserAction Action to take on the loser of a sync conflict (when there is a winner) or on both files (when there is no winner): , num, pathname, delete (default: num)
+ --conflict-resolve string Automatically resolve conflicts by preferring the version that is: none, path1, path2, newer, older, larger, smaller (default: none) (default "none")
+ --conflict-suffix string Suffix to use when renaming a --conflict-loser. Can be either one string or two comma-separated strings to assign different suffixes to Path1/Path2. (default: 'conflict')
+ --create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
+ --download-hash Compute hash by downloading when otherwise unavailable. (warning: may be slow and use lots of data!)
+ --filters-file string Read filtering patterns from a file
+ --force Bypass --max-delete safety check and run the sync. Consider using with --verbose
+ -h, --help help for bisync
+ --ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
+ --max-lock Duration Consider lock files older than this to be expired (default: 0 (never expire)) (minimum: 2m) (default 0s)
+ --no-cleanup Retain working files (useful for troubleshooting and testing).
+ --no-slow-hash Ignore listing checksums only on backends where they are slow
+ --recover Automatically recover from interruptions without requiring --resync.
+ --remove-empty-dirs Remove ALL empty directories at the final cleanup step.
+ --resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync. Use at your own risk!
+ -1, --resync Performs the resync run. Equivalent to --resync-mode path1. Consider using --verbose or --dry-run first.
+ --resync-mode string During resync, prefer the version that is: path1, path2, newer, older, larger, smaller (default: path1 if --resync, otherwise none for no resync.) (default "none")
+ --retries int Retry operations this many times if they fail (requires --resilient). (default 3)
+ --retries-sleep Duration Interval between retrying operations if they fail, e.g. 500ms, 60s, 5m (0 to disable) (default 0s)
+ --slow-hash-sync-only Ignore slow checksums for listings and deltas, but still consider them during sync calls.
+ --workdir string Use custom working dir - useful for testing. (default: {WORKDIR})
+ --max-delete PERCENT Safety check on maximum percentage of deleted files allowed. If exceeded, the bisync run will abort. (default: 50%)
+ -n, --dry-run Go through the motions - No files are copied/deleted.
+ -v, --verbose Increases logging verbosity. May be specified more than once for more details.
```
Arbitrary rclone flags may be specified on the
@@ -19799,22 +21439,16 @@ as the last step in the process.
## Command-line flags
-#### --resync
+### --resync
This will effectively make both Path1 and Path2 filesystems contain a
-matching superset of all files. Path2 files that do not exist in Path1 will
+matching superset of all files. By default, Path2 files that do not exist in Path1 will
be copied to Path1, and the process will then copy the Path1 tree to Path2.
-The `--resync` sequence is roughly equivalent to:
+The `--resync` sequence is roughly equivalent to the following (but see [`--resync-mode`](#resync-mode) for other options):
```
-rclone copy Path2 Path1 --ignore-existing
-rclone copy Path1 Path2
-```
-Or, if using `--create-empty-src-dirs`:
-```
-rclone copy Path2 Path1 --ignore-existing
-rclone copy Path1 Path2 --create-empty-src-dirs
-rclone copy Path2 Path1 --create-empty-src-dirs
+rclone copy Path2 Path1 --ignore-existing [--create-empty-src-dirs]
+rclone copy Path1 Path2 [--create-empty-src-dirs]
```
The base directories on both Path1 and Path2 filesystems must exist
@@ -19822,13 +21456,10 @@ or bisync will fail. This is required for safety - that bisync can verify
that both paths are valid.
When using `--resync`, a newer version of a file on the Path2 filesystem
-will be overwritten by the Path1 filesystem version.
-(Note that this is [NOT entirely symmetrical](https://github.com/rclone/rclone/issues/5681#issuecomment-938761815).)
+will (by default) be overwritten by the Path1 filesystem version.
+(Note that this is [NOT entirely symmetrical](https://github.com/rclone/rclone/issues/5681#issuecomment-938761815), and more symmetrical options can be specified with the [`--resync-mode`](#resync-mode) flag.)
Carefully evaluate deltas using [--dry-run](https://rclone.org/flags/#non-backend-flags).
-[//]: # (I reverted a recent change in the above paragraph, as it was incorrect.
-https://github.com/rclone/rclone/commit/dd72aff98a46c6e20848ac7ae5f7b19d45802493 )
-
For a resync run, one of the paths may be empty (no files in the path tree).
The resync run should result in files on both paths, else a normal non-resync
run will fail.
@@ -19838,7 +21469,100 @@ For a non-resync run, either path being empty (no files in the tree) fails with
This is a safety check that an unexpected empty path does not result in
deleting **everything** in the other path.
-#### --check-access
+Note that `--resync` implies `--resync-mode path1` unless a different
+[`--resync-mode`](#resync-mode) is explicitly specified.
+It is not necessary to use both the `--resync` and `--resync-mode` flags --
+either one is sufficient without the other.
+
+**Note:** `--resync` (including `--resync-mode`) should only be used under three specific (rare) circumstances:
+1. It is your _first_ bisync run (between these two paths)
+2. You've just made changes to your bisync settings (such as editing the contents of your `--filters-file`)
+3. There was an error on the prior run, and as a result, bisync now requires `--resync` to recover
+
+The rest of the time, you should _omit_ `--resync`. The reason is because `--resync` will only _copy_ (not _sync_) each side to the other.
+Therefore, if you included `--resync` for every bisync run, it would never be possible to delete a file --
+the deleted file would always keep reappearing at the end of every run (because it's being copied from the other side where it still exists).
+Similarly, renaming a file would always result in a duplicate copy (both old and new name) on both sides.
+
+If you find that frequent interruptions from #3 are an issue, rather than
+automatically running `--resync`, the recommended alternative is to use the
+[`--resilient`](#resilient), [`--recover`](#recover), and
+[`--conflict-resolve`](#conflict-resolve) flags, (along with [Graceful
+Shutdown](#graceful-shutdown) mode, when needed) for a very robust
+"set-it-and-forget-it" bisync setup that can automatically bounce back from
+almost any interruption it might encounter. Consider adding something like the
+following:
+
+```
+--resilient --recover --max-lock 2m --conflict-resolve newer
+```
+
+### --resync-mode CHOICE {#resync-mode}
+
+In the event that a file differs on both sides during a `--resync`,
+`--resync-mode` controls which version will overwrite the other. The supported
+options are similar to [`--conflict-resolve`](#conflict-resolve). For all of
+the following options, the version that is kept is referred to as the "winner",
+and the version that is overwritten (deleted) is referred to as the "loser".
+The options are named after the "winner":
+
+- `path1` - (the default) - the version from Path1 is unconditionally
+considered the winner (regardless of `modtime` and `size`, if any). This can be
+useful if one side is more trusted or up-to-date than the other, at the time of
+the `--resync`.
+- `path2` - same as `path1`, except the path2 version is considered the winner.
+- `newer` - the newer file (by `modtime`) is considered the winner, regardless
+of which side it came from. This may result in having a mix of some winners
+from Path1, and some winners from Path2. (The implementation is analogous to
+running `rclone copy --update` in both directions.)
+- `older` - same as `newer`, except the older file is considered the winner,
+and the newer file is considered the loser.
+- `larger` - the larger file (by `size`) is considered the winner (regardless
+of `modtime`, if any). This can be a useful option for remotes without
+`modtime` support, or with the kinds of files (such as logs) that tend to grow
+but not shrink, over time.
+- `smaller` - the smaller file (by `size`) is considered the winner (regardless
+of `modtime`, if any).
+
+For all of the above options, note the following:
+- If either of the underlying remotes lacks support for the chosen method, it
+will be ignored and will fall back to the default of `path1`. (For example, if
+`--resync-mode newer` is set, but one of the paths uses a remote that doesn't
+support `modtime`.)
+- If a winner can't be determined because the chosen method's attribute is
+missing or equal, it will be ignored, and bisync will instead try to determine
+whether the files differ by looking at the other `--compare` methods in effect.
+(For example, if `--resync-mode newer` is set, but the Path1 and Path2 modtimes
+are identical, bisync will compare the sizes.) If bisync concludes that they
+differ, preference is given to whichever is the "source" at that moment. (In
+practice, this gives a slight advantage to Path2, as the 2to1 copy comes before
+the 1to2 copy.) If the files _do not_ differ, nothing is copied (as both sides
+are already correct).
+- These options apply only to files that exist on both sides (with the same
+name and relative path). Files that exist *only* on one side and not the other
+are *always* copied to the other, during `--resync` (this is one of the main
+differences between resync and non-resync runs.).
+- `--conflict-resolve`, `--conflict-loser`, and `--conflict-suffix` do not
+apply during `--resync`, and unlike these flags, nothing is renamed during
+`--resync`. When a file differs on both sides during `--resync`, one version
+always overwrites the other (much like in `rclone copy`.) (Consider using
+[`--backup-dir`](#backup-dir1-and-backup-dir2) to retain a backup of the losing
+version.)
+- Unlike for `--conflict-resolve`, `--resync-mode none` is not a valid option
+(or rather, it will be interpreted as "no resync", unless `--resync` has also
+been specified, in which case it will be ignored.)
+- Winners and losers are decided at the individual file-level only (there is
+not currently an option to pick an entire winning directory atomically,
+although the `path1` and `path2` options typically produce a similar result.)
+- To maintain backward-compatibility, the `--resync` flag implies
+`--resync-mode path1` unless a different `--resync-mode` is explicitly
+specified. Similarly, all `--resync-mode` options (except `none`) imply
+`--resync`, so it is not necessary to use both the `--resync` and
+`--resync-mode` flags simultaneously -- either one is sufficient without the
+other.
+
+
+### --check-access
Access check files are an additional safety measure against data loss.
bisync will ensure it can find matching `RCLONE_TEST` files in the same places
@@ -19867,7 +21591,7 @@ bisync assuming a bunch of deleted files if the linked-to tree should not be
accessible.
See also the [--check-filename](--check-filename) flag.
-#### --check-filename
+### --check-filename
Name of the file(s) used in access health validation.
The default `--check-filename` is `RCLONE_TEST`.
@@ -19875,7 +21599,154 @@ One or more files having this filename must exist, synchronized between your
source and destination filesets, in order for `--check-access` to succeed.
See [--check-access](#check-access) for additional details.
-#### --max-delete
+### --compare
+
+As of `v1.66`, bisync fully supports comparing based on any combination of
+size, modtime, and checksum (lifting the prior restriction on backends without
+modtime support.)
+
+By default (without the `--compare` flag), bisync inherits the same comparison
+options as `sync`
+(that is: `size` and `modtime` by default, unless modified with flags such as
+[`--checksum`](https://rclone.org/docs/#c-checksum) or [`--size-only`](/docs/#size-only).)
+
+If the `--compare` flag is set, it will override these defaults. This can be
+useful if you wish to compare based on combinations not currently supported in
+`sync`, such as comparing all three of `size` AND `modtime` AND `checksum`
+simultaneously (or just `modtime` AND `checksum`).
+
+`--compare` takes a comma-separated list, with the currently supported values
+being `size`, `modtime`, and `checksum`. For example, if you want to compare
+size and checksum, but not modtime, you would do:
+```
+--compare size,checksum
+```
+
+Or if you want to compare all three:
+```
+--compare size,modtime,checksum
+```
+
+`--compare` overrides any conflicting flags. For example, if you set the
+conflicting flags `--compare checksum --size-only`, `--size-only` will be
+ignored, and bisync will compare checksum and not size. To avoid confusion, it
+is recommended to use _either_ `--compare` or the normal `sync` flags, but not
+both.
+
+If `--compare` includes `checksum` and both remotes support checksums but have
+no hash types in common with each other, checksums will be considered _only_
+for comparisons within the same side (to determine what has changed since the
+prior sync), but not for comparisons against the opposite side. If one side
+supports checksums and the other does not, checksums will only be considered on
+the side that supports them.
+
+When comparing with `checksum` and/or `size` without `modtime`, bisync cannot
+determine whether a file is `newer` or `older` -- only whether it is `changed`
+or `unchanged`. (If it is `changed` on both sides, bisync still does the
+standard equality-check to avoid declaring a sync conflict unless it absolutely
+has to.)
+
+It is recommended to do a `--resync` when changing `--compare` settings, as
+otherwise your prior listing files may not contain the attributes you wish to
+compare (for example, they will not have stored checksums if you were not
+previously comparing checksums.)
+
+### --ignore-listing-checksum
+
+When `--checksum` or `--compare checksum` is set, bisync will retrieve (or
+generate) checksums (for backends that support them) when creating the listings
+for both paths, and store the checksums in the listing files.
+`--ignore-listing-checksum` will disable this behavior, which may speed things
+up considerably, especially on backends (such as [local](https://rclone.org/local/)) where hashes
+must be computed on the fly instead of retrieved. Please note the following:
+
+* As of `v1.66`, `--ignore-listing-checksum` is now automatically set when
+neither `--checksum` nor `--compare checksum` are in use (as the checksums
+would not be used for anything.)
+* `--ignore-listing-checksum` is NOT the same as
+[`--ignore-checksum`](https://rclone.org/docs/#ignore-checksum),
+and you may wish to use one or the other, or both. In a nutshell:
+`--ignore-listing-checksum` controls whether checksums are considered when
+scanning for diffs,
+while `--ignore-checksum` controls whether checksums are considered during the
+copy/sync operations that follow,
+if there ARE diffs.
+* Unless `--ignore-listing-checksum` is passed, bisync currently computes
+hashes for one path
+*even when there's no common hash with the other path*
+(for example, a [crypt](https://rclone.org/crypt/#modification-times-and-hashes) remote.)
+This can still be beneficial, as the hashes will still be used to detect
+changes within the same side
+(if `--checksum` or `--compare checksum` is set), even if they can't be used to
+compare against the opposite side.
+* If you wish to ignore listing checksums _only_ on remotes where they are slow
+to compute, consider using
+[`--no-slow-hash`](#no-slow-hash) (or
+[`--slow-hash-sync-only`](#slow-hash-sync-only)) instead of
+`--ignore-listing-checksum`.
+* If `--ignore-listing-checksum` is used simultaneously with `--compare
+checksum` (or `--checksum`), checksums will be ignored for bisync deltas,
+but still considered during the sync operations that follow (if deltas are
+detected based on modtime and/or size.)
+
+### --no-slow-hash
+
+On some remotes (notably `local`), checksums can dramatically slow down a
+bisync run, because hashes cannot be stored and need to be computed in
+real-time when they are requested. On other remotes (such as `drive`), they add
+practically no time at all. The `--no-slow-hash` flag will automatically skip
+checksums on remotes where they are slow, while still comparing them on others
+(assuming [`--compare`](#compare) includes `checksum`.) This can be useful when one of your
+bisync paths is slow but you still want to check checksums on the other, for a more
+robust sync.
+
+### --slow-hash-sync-only
+
+Same as [`--no-slow-hash`](#no-slow-hash), except slow hashes are still
+considered during sync calls. They are still NOT considered for determining
+deltas, nor or they included in listings. They are also skipped during
+`--resync`. The main use case for this flag is when you have a large number of
+files, but relatively few of them change from run to run -- so you don't want
+to check your entire tree every time (it would take too long), but you still
+want to consider checksums for the smaller group of files for which a `modtime`
+or `size` change was detected. Keep in mind that this speed savings comes with
+a safety trade-off: if a file's content were to change without a change to its
+`modtime` or `size`, bisync would not detect it, and it would not be synced.
+
+`--slow-hash-sync-only` is only useful if both remotes share a common hash
+type (if they don't, bisync will automatically fall back to `--no-slow-hash`.)
+Both `--no-slow-hash` and `--slow-hash-sync-only` have no effect without
+`--compare checksum` (or `--checksum`).
+
+### --download-hash
+
+If `--download-hash` is set, bisync will use best efforts to obtain an MD5
+checksum by downloading and computing on-the-fly, when checksums are not
+otherwise available (for example, a remote that doesn't support them.) Note
+that since rclone has to download the entire file, this may dramatically slow
+down your bisync runs, and is also likely to use a lot of data, so it is
+probably not practical for bisync paths with a large total file size. However,
+it can be a good option for syncing small-but-important files with maximum
+accuracy (for example, a source code repo on a `crypt` remote.) An additional
+advantage over methods like [`cryptcheck`](https://rclone.org/commands/rclone_cryptcheck/) is
+that the original file is not required for comparison (for example,
+`--download-hash` can be used to bisync two different crypt remotes with
+different passwords.)
+
+When `--download-hash` is set, bisync still looks for more efficient checksums
+first, and falls back to downloading only when none are found. It takes
+priority over conflicting flags such as `--no-slow-hash`. `--download-hash` is
+not suitable for [Google Docs](#gdocs) and other files of unknown size, as
+their checksums would change from run to run (due to small variances in the
+internals of the generated export file.) Therefore, bisync automatically skips
+`--download-hash` for files with a size less than 0.
+
+See also: [`Hasher`](https://rclone.org/hasher/) backend,
+[`cryptcheck`](https://rclone.org/commands/rclone_cryptcheck/) command, [`rclone check
+--download`](https://rclone.org/commands/rclone_check/) option,
+[`md5sum`](https://rclone.org/commands/rclone_md5sum/) command
+
+### --max-delete
As a safety check, if greater than the `--max-delete` percent of files were
deleted on either the Path1 or Path2 filesystem, then bisync will abort with
@@ -19893,7 +21764,7 @@ to bypass the check.
Also see the [all files changed](#all-files-changed) check.
-#### --filters-file {#filters-file}
+### --filters-file {#filters-file}
By using rclone filter features you can exclude file types or directory
sub-trees from the sync.
@@ -19917,7 +21788,153 @@ of the current filters file and compares it to the hash stored in the `.md5` fil
If they don't match, the run aborts with a critical error and thus forces you
to do a `--resync`, likely avoiding a disaster.
-#### --check-sync
+### --conflict-resolve CHOICE {#conflict-resolve}
+
+In bisync, a "conflict" is a file that is *new* or *changed* on *both sides*
+(relative to the prior run) AND is *not currently identical* on both sides.
+`--conflict-resolve` controls how bisync handles such a scenario. The currently
+supported options are:
+
+- `none` - (the default) - do not attempt to pick a winner, keep and rename
+both files according to [`--conflict-loser`](#conflict-loser) and
+[`--conflict-suffix`](#conflict-suffix) settings. For example, with the default
+settings, `file.txt` on Path1 is renamed `file.txt.conflict1` and `file.txt` on
+Path2 is renamed `file.txt.conflict2`. Both are copied to the opposite path
+during the run, so both sides end up with a copy of both files. (As `none` is
+the default, it is not necessary to specify `--conflict-resolve none` -- you
+can just omit the flag.)
+- `newer` - the newer file (by `modtime`) is considered the winner and is
+copied without renaming. The older file (the "loser") is handled according to
+`--conflict-loser` and `--conflict-suffix` settings (either renamed or
+deleted.) For example, if `file.txt` on Path1 is newer than `file.txt` on
+Path2, the result on both sides (with other default settings) will be `file.txt`
+(winner from Path1) and `file.txt.conflict1` (loser from Path2).
+- `older` - same as `newer`, except the older file is considered the winner,
+and the newer file is considered the loser.
+- `larger` - the larger file (by `size`) is considered the winner (regardless
+of `modtime`, if any).
+- `smaller` - the smaller file (by `size`) is considered the winner (regardless
+of `modtime`, if any).
+- `path1` - the version from Path1 is unconditionally considered the winner
+(regardless of `modtime` and `size`, if any). This can be useful if one side is
+usually more trusted or up-to-date than the other.
+- `path2` - same as `path1`, except the path2 version is considered the
+winner.
+
+For all of the above options, note the following:
+- If either of the underlying remotes lacks support for the chosen method, it
+will be ignored and fall back to `none`. (For example, if `--conflict-resolve
+newer` is set, but one of the paths uses a remote that doesn't support
+`modtime`.)
+- If a winner can't be determined because the chosen method's attribute is
+missing or equal, it will be ignored and fall back to `none`. (For example, if
+`--conflict-resolve newer` is set, but the Path1 and Path2 modtimes are
+identical, even if the sizes may differ.)
+- If the file's content is currently identical on both sides, it is not
+considered a "conflict", even if new or changed on both sides since the prior
+sync. (For example, if you made a change on one side and then synced it to the
+other side by other means.) Therefore, none of the conflict resolution flags
+apply in this scenario.
+- The conflict resolution flags do not apply during a `--resync`, as there is
+no "prior run" to speak of (but see [`--resync-mode`](#resync-mode) for similar
+options.)
+
+### --conflict-loser CHOICE {#conflict-loser}
+
+`--conflict-loser` determines what happens to the "loser" of a sync conflict
+(when [`--conflict-resolve`](#conflict-resolve) determines a winner) or to both
+files (when there is no winner.) The currently supported options are:
+
+- `num` - (the default) - auto-number the conflicts by automatically appending
+the next available number to the `--conflict-suffix`, in chronological order.
+For example, with the default settings, the first conflict for `file.txt` will
+be renamed `file.txt.conflict1`. If `file.txt.conflict1` already exists,
+`file.txt.conflict2` will be used instead (etc., up to a maximum of
+9223372036854775807 conflicts.)
+- `pathname` - rename the conflicts according to which side they came from,
+which was the default behavior prior to `v1.66`. For example, with
+`--conflict-suffix path`, `file.txt` from Path1 will be renamed
+`file.txt.path1`, and `file.txt` from Path2 will be renamed `file.txt.path2`.
+If two non-identical suffixes are provided (ex. `--conflict-suffix
+cloud,local`), the trailing digit is omitted. Importantly, note that with
+`pathname`, there is no auto-numbering beyond `2`, so if `file.txt.path2`
+somehow already exists, it will be overwritten. Using a dynamic date variable
+in your `--conflict-suffix` (see below) is one possible way to avoid this. Note
+also that conflicts-of-conflicts are possible, if the original conflict is not
+manually resolved -- for example, if for some reason you edited
+`file.txt.path1` on both sides, and those edits were different, the result
+would be `file.txt.path1.path1` and `file.txt.path1.path2` (in addition to
+`file.txt.path2`.)
+- `delete` - keep the winner only and delete the loser, instead of renaming it.
+If a winner cannot be determined (see `--conflict-resolve` for details on how
+this could happen), `delete` is ignored and the default `num` is used instead
+(i.e. both versions are kept and renamed, and neither is deleted.) `delete` is
+inherently the most destructive option, so use it only with care.
+
+For all of the above options, note that if a winner cannot be determined (see
+`--conflict-resolve` for details on how this could happen), or if
+`--conflict-resolve` is not in use, *both* files will be renamed.
+
+### --conflict-suffix STRING[,STRING] {#conflict-suffix}
+
+`--conflict-suffix` controls the suffix that is appended when bisync renames a
+[`--conflict-loser`](#conflict-loser) (default: `conflict`).
+`--conflict-suffix` will accept either one string or two comma-separated
+strings to assign different suffixes to Path1 vs. Path2. This may be helpful
+later in identifying the source of the conflict. (For example,
+`--conflict-suffix dropboxconflict,laptopconflict`)
+
+With `--conflict-loser num`, a number is always appended to the suffix. With
+`--conflict-loser pathname`, a number is appended only when one suffix is
+specified (or when two identical suffixes are specified.) i.e. with
+`--conflict-loser pathname`, all of the following would produce exactly the
+same result:
+
+```
+--conflict-suffix path
+--conflict-suffix path,path
+--conflict-suffix path1,path2
+```
+
+Suffixes may be as short as 1 character. By default, the suffix is appended
+after any other extensions (ex. `file.jpg.conflict1`), however, this can be
+changed with the [`--suffix-keep-extension`](https://rclone.org/docs/#suffix-keep-extension) flag
+(i.e. to instead result in `file.conflict1.jpg`).
+
+`--conflict-suffix` supports several *dynamic date variables* when enclosed in
+curly braces as globs. This can be helpful to track the date and/or time that
+each conflict was handled by bisync. For example:
+
+```
+--conflict-suffix {DateOnly}-conflict
+// result: myfile.txt.2006-01-02-conflict1
+```
+
+All of the formats described [here](https://pkg.go.dev/time#pkg-constants) and
+[here](https://pkg.go.dev/time#example-Time.Format) are supported, but take
+care to ensure that your chosen format does not use any characters that are
+illegal on your remotes (for example, macOS does not allow colons in
+filenames, and slashes are also best avoided as they are often interpreted as
+directory separators.) To address this particular issue, an additional
+`{MacFriendlyTime}` (or just `{mac}`) option is supported, which results in
+`2006-01-02 0304PM`.
+
+Note that `--conflict-suffix` is entirely separate from rclone's main
+[`--sufix`](https://rclone.org/docs/#suffix-suffix) flag. This is intentional, as users may wish
+to use both flags simultaneously, if also using
+[`--backup-dir`](#backup-dir1-and-backup-dir2).
+
+Finally, note that the default in bisync prior to `v1.66` was to rename
+conflicts with `..path1` and `..path2` (with two periods, and `path` instead of
+`conflict`.) Bisync now defaults to a single dot instead of a double dot, but
+additional dots can be added by including them in the specified suffix string.
+For example, for behavior equivalent to the previous default, use:
+
+```
+[--conflict-resolve none] --conflict-loser pathname --conflict-suffix .path
+```
+
+### --check-sync
Enabled by default, the check-sync function checks that all of the same
files exist in both the Path1 and Path2 history listings. This _check-sync_
@@ -19934,59 +21951,183 @@ sync run times for very large numbers of files.
The check may be run manually with `--check-sync=only`. It runs only the
integrity check and terminates without actually synching.
-See also: [Concurrent modifications](#concurrent-modifications)
+Note that currently, `--check-sync` **only checks listing snapshots and NOT the
+actual files on the remotes.** Note also that the listing snapshots will not
+know about any changes that happened during or after the latest bisync run, as
+those will be discovered on the next run. Therefore, while listings should
+always match _each other_ at the end of a bisync run, it is _expected_ that
+they will not match the underlying remotes, nor will the remotes match each
+other, if there were changes during or after the run. This is normal, and any
+differences will be detected and synced on the next run.
+For a robust integrity check of the current state of the remotes (as opposed to just their listing snapshots), consider using [`check`](commands/rclone_check/)
+(or [`cryptcheck`](https://rclone.org/commands/rclone_cryptcheck/), if at least one path is a `crypt` remote) instead of `--check-sync`,
+keeping in mind that differences are expected if files changed during or after your last bisync run.
-#### --ignore-listing-checksum
+For example, a possible sequence could look like this:
-By default, bisync will retrieve (or generate) checksums (for backends that support them)
-when creating the listings for both paths, and store the checksums in the listing files.
-`--ignore-listing-checksum` will disable this behavior, which may speed things up considerably,
-especially on backends (such as [local](https://rclone.org/local/)) where hashes must be computed on the fly instead of retrieved.
-Please note the following:
+1. Normally scheduled bisync run:
-* While checksums are (by default) generated and stored in the listing files,
-they are NOT currently used for determining diffs (deltas).
-It is anticipated that full checksum support will be added in a future version.
-* `--ignore-listing-checksum` is NOT the same as [`--ignore-checksum`](https://rclone.org/docs/#ignore-checksum),
-and you may wish to use one or the other, or both. In a nutshell:
-`--ignore-listing-checksum` controls whether checksums are considered when scanning for diffs,
-while `--ignore-checksum` controls whether checksums are considered during the copy/sync operations that follow,
-if there ARE diffs.
-* Unless `--ignore-listing-checksum` is passed, bisync currently computes hashes for one path
-*even when there's no common hash with the other path*
-(for example, a [crypt](https://rclone.org/crypt/#modification-times-and-hashes) remote.)
-* If both paths support checksums and have a common hash,
-AND `--ignore-listing-checksum` was not specified when creating the listings,
-`--check-sync=only` can be used to compare Path1 vs. Path2 checksums (as of the time the previous listings were created.)
-However, `--check-sync=only` will NOT include checksums if the previous listings
-were generated on a run using `--ignore-listing-checksum`. For a more robust integrity check of the current state,
-consider using [`check`](commands/rclone_check/)
-(or [`cryptcheck`](https://rclone.org/commands/rclone_cryptcheck/), if at least one path is a `crypt` remote.)
+```
+rclone bisync Path1 Path2 -MPc --check-access --max-delete 10 --filters-file /path/to/filters.txt -v --no-cleanup --ignore-listing-checksum --disable ListR --checkers=16 --drive-pacer-min-sleep=10ms --create-empty-src-dirs --resilient
+```
-#### --resilient
+2. Periodic independent integrity check (perhaps scheduled nightly or weekly):
+
+```
+rclone check -MvPc Path1 Path2 --filter-from /path/to/filters.txt
+```
+
+3. If diffs are found, you have some choices to correct them.
+If one side is more up-to-date and you want to make the other side match it, you could run:
+
+```
+rclone sync Path1 Path2 --filter-from /path/to/filters.txt --create-empty-src-dirs -MPc -v
+```
+(or switch Path1 and Path2 to make Path2 the source-of-truth)
+
+Or, if neither side is totally up-to-date, you could run a `--resync` to bring them back into agreement
+(but remember that this could cause deleted files to re-appear.)
+
+*Note also that `rclone check` does not currently include empty directories,
+so if you want to know if any empty directories are out of sync,
+consider alternatively running the above `rclone sync` command with `--dry-run` added.
+
+See also: [Concurrent modifications](#concurrent-modifications), [`--resilient`](#resilient)
+
+### --resilient
***Caution: this is an experimental feature. Use at your own risk!***
-By default, most errors or interruptions will cause bisync to abort and
-require [`--resync`](#resync) to recover. This is a safety feature,
-to prevent bisync from running again until a user checks things out.
-However, in some cases, bisync can go too far and enforce a lockout when one isn't actually necessary,
-like for certain less-serious errors that might resolve themselves on the next run.
-When `--resilient` is specified, bisync tries its best to recover and self-correct,
-and only requires `--resync` as a last resort when a human's involvement is absolutely necessary.
-The intended use case is for running bisync as a background process (such as via scheduled [cron](#cron)).
+By default, most errors or interruptions will cause bisync to abort and
+require [`--resync`](#resync) to recover. This is a safety feature, to prevent
+bisync from running again until a user checks things out. However, in some
+cases, bisync can go too far and enforce a lockout when one isn't actually
+necessary, like for certain less-serious errors that might resolve themselves
+on the next run. When `--resilient` is specified, bisync tries its best to
+recover and self-correct, and only requires `--resync` as a last resort when a
+human's involvement is absolutely necessary. The intended use case is for
+running bisync as a background process (such as via scheduled [cron](#cron)).
-When using `--resilient` mode, bisync will still report the error and abort,
-however it will not lock out future runs -- allowing the possibility of retrying at the next normally scheduled time,
-without requiring a `--resync` first. Examples of such retryable errors include
-access test failures, missing listing files, and filter change detections.
-These safety features will still prevent the *current* run from proceeding --
-the difference is that if conditions have improved by the time of the *next* run,
-that next run will be allowed to proceed.
-Certain more serious errors will still enforce a `--resync` lockout, even in `--resilient` mode, to prevent data loss.
+When using `--resilient` mode, bisync will still report the error and abort,
+however it will not lock out future runs -- allowing the possibility of
+retrying at the next normally scheduled time, without requiring a `--resync`
+first. Examples of such retryable errors include access test failures, missing
+listing files, and filter change detections. These safety features will still
+prevent the *current* run from proceeding -- the difference is that if
+conditions have improved by the time of the *next* run, that next run will be
+allowed to proceed. Certain more serious errors will still enforce a
+`--resync` lockout, even in `--resilient` mode, to prevent data loss.
-Behavior of `--resilient` may change in a future version.
+Behavior of `--resilient` may change in a future version. (See also:
+[`--recover`](#recover), [`--max-lock`](#max-lock), [Graceful
+Shutdown](#graceful-shutdown))
+
+### --recover
+
+If `--recover` is set, in the event of a sudden interruption or other
+un-graceful shutdown, bisync will attempt to automatically recover on the next
+run, instead of requiring `--resync`. Bisync is able to recover robustly by
+keeping one "backup" listing at all times, representing the state of both paths
+after the last known successful sync. Bisync can then compare the current state
+with this snapshot to determine which changes it needs to retry. Changes that
+were synced after this snapshot (during the run that was later interrupted)
+will appear to bisync as if they are "new or changed on both sides", but in
+most cases this is not a problem, as bisync will simply do its usual "equality
+check" and learn that no action needs to be taken on these files, since they
+are already identical on both sides.
+
+In the rare event that a file is synced successfully during a run that later
+aborts, and then that same file changes AGAIN before the next run, bisync will
+think it is a sync conflict, and handle it accordingly. (From bisync's
+perspective, the file has changed on both sides since the last trusted sync,
+and the files on either side are not currently identical.) Therefore,
+`--recover` carries with it a slightly increased chance of having conflicts --
+though in practice this is pretty rare, as the conditions required to cause it
+are quite specific. This risk can be reduced by using bisync's ["Graceful
+Shutdown"](#graceful-shutdown) mode (triggered by sending `SIGINT` or
+`Ctrl+C`), when you have the choice, instead of forcing a sudden termination.
+
+`--recover` and `--resilient` are similar, but distinct -- the main difference
+is that `--resilient` is about _retrying_, while `--recover` is about
+_recovering_. Most users will probably want both. `--resilient` allows retrying
+when bisync has chosen to abort itself due to safety features such as failing
+`--check-access` or detecting a filter change. `--resilient` does not cover
+external interruptions such as a user shutting down their computer in the
+middle of a sync -- that is what `--recover` is for.
+
+### --max-lock
+
+Bisync uses [lock files](#lock-file) as a safety feature to prevent
+interference from other bisync runs while it is running. Bisync normally
+removes these lock files at the end of a run, but if bisync is abruptly
+interrupted, these files will be left behind. By default, they will lock out
+all future runs, until the user has a chance to manually check things out and
+remove the lock. As an alternative, `--max-lock` can be used to make them
+automatically expire after a certain period of time, so that future runs are
+not locked out forever, and auto-recovery is possible. `--max-lock` can be any
+duration `2m` or greater (or `0` to disable). If set, lock files older than
+this will be considered "expired", and future runs will be allowed to disregard
+them and proceed. (Note that the `--max-lock` duration must be set by the
+process that left the lock file -- not the later one interpreting it.)
+
+If set, bisync will also "renew" these lock files every `--max-lock minus one
+minute` throughout a run, for extra safety. (For example, with `--max-lock 5m`,
+bisync would renew the lock file (for another 5 minutes) every 4 minutes until
+the run has completed.) In other words, it should not be possible for a lock
+file to pass its expiration time while the process that created it is still
+running -- and you can therefore be reasonably sure that any _expired_ lock
+file you may find was left there by an interrupted run, not one that is still
+running and just taking awhile.
+
+If `--max-lock` is `0` or not set, the default is that lock files will never
+expire, and will block future runs (of these same two bisync paths)
+indefinitely.
+
+For maximum resilience from disruptions, consider setting a relatively short
+duration like `--max-lock 2m` along with [`--resilient`](#resilient) and
+[`--recover`](#recover), and a relatively frequent [cron schedule](#cron). The
+result will be a very robust "set-it-and-forget-it" bisync run that can
+automatically bounce back from almost any interruption it might encounter,
+without requiring the user to get involved and run a `--resync`. (See also:
+[Graceful Shutdown](#graceful-shutdown) mode)
+
+
+### --backup-dir1 and --backup-dir2
+
+As of `v1.66`, [`--backup-dir`](https://rclone.org/docs/#backup-dir-dir) is supported in bisync.
+Because `--backup-dir` must be a non-overlapping path on the same remote,
+Bisync has introduced new `--backup-dir1` and `--backup-dir2` flags to support
+separate backup-dirs for `Path1` and `Path2` (bisyncing between different
+remotes with `--backup-dir` would not otherwise be possible.) `--backup-dir1`
+and `--backup-dir2` can use different remotes from each other, but
+`--backup-dir1` must use the same remote as `Path1`, and `--backup-dir2` must
+use the same remote as `Path2`. Each backup directory must not overlap its
+respective bisync Path without being excluded by a filter rule.
+
+The standard `--backup-dir` will also work, if both paths use the same remote
+(but note that deleted files from both paths would be mixed together in the
+same dir). If either `--backup-dir1` and `--backup-dir2` are set, they will
+override `--backup-dir`.
+
+Example:
+```
+rclone bisync /Users/someuser/some/local/path/Bisync gdrive:Bisync --backup-dir1 /Users/someuser/some/local/path/BackupDir --backup-dir2 gdrive:BackupDir --suffix -2023-08-26 --suffix-keep-extension --check-access --max-delete 10 --filters-file /Users/someuser/some/local/path/bisync_filters.txt --no-cleanup --ignore-listing-checksum --checkers=16 --drive-pacer-min-sleep=10ms --create-empty-src-dirs --resilient -MvP --drive-skip-gdocs --fix-case
+```
+
+In this example, if the user deletes a file in
+`/Users/someuser/some/local/path/Bisync`, bisync will propagate the delete to
+the other side by moving the corresponding file from `gdrive:Bisync` to
+`gdrive:BackupDir`. If the user deletes a file from `gdrive:Bisync`, bisync
+moves it from `/Users/someuser/some/local/path/Bisync` to
+`/Users/someuser/some/local/path/BackupDir`.
+
+In the event of a [rename due to a sync conflict](#conflict-loser), the
+rename is not considered a delete, unless a previous conflict with the same
+name already exists and would get overwritten.
+
+See also: [`--suffix`](https://rclone.org/docs/#suffix-suffix),
+[`--suffix-keep-extension`](https://rclone.org/docs/#suffix-keep-extension)
## Operation
@@ -20005,7 +22146,8 @@ On each successive run it will:
- Lock file prevents multiple simultaneous runs when taking a while.
This can be particularly useful if bisync is run by cron scheduler.
- Handle change conflicts non-destructively by creating
- `..path1` and `..path2` file versions.
+ `.conflict1`, `.conflict2`, etc. file versions, according to
+ [`--conflict-resolve`](#conflict-resolve), [`--conflict-loser`](#conflict-loser), and [`--conflict-suffix`](#conflict-suffix) settings.
- File system access health check using `RCLONE_TEST` files
(see the `--check-access` flag).
- Abort on excessive deletes - protects against a failed listing
@@ -20032,8 +22174,8 @@ Path1 deleted | File no longer exists on Path1 | File is deleted
Type | Description | Result | Implementation
--------------------------------|---------------------------------------|------------------------------------|-----------------------
Path1 new/changed AND Path2 new/changed AND Path1 == Path2 | File is new/changed on Path1 AND new/changed on Path2 AND Path1 version is currently identical to Path2 | No change | None
-Path1 new AND Path2 new | File is new on Path1 AND new on Path2 (and Path1 version is NOT identical to Path2) | Files renamed to _Path1 and _Path2 | `rclone copy` _Path2 file to Path1, `rclone copy` _Path1 file to Path2
-Path2 newer AND Path1 changed | File is newer on Path2 AND also changed (newer/older/size) on Path1 (and Path1 version is NOT identical to Path2) | Files renamed to _Path1 and _Path2 | `rclone copy` _Path2 file to Path1, `rclone copy` _Path1 file to Path2
+Path1 new AND Path2 new | File is new on Path1 AND new on Path2 (and Path1 version is NOT identical to Path2) | Conflicts handled according to [`--conflict-resolve`](#conflict-resolve) & [`--conflict-loser`](#conflict-loser) settings | default: `rclone copy` renamed `Path2.conflict2` file to Path1, `rclone copy` renamed `Path1.conflict1` file to Path2
+Path2 newer AND Path1 changed | File is newer on Path2 AND also changed (newer/older/size) on Path1 (and Path1 version is NOT identical to Path2) | Conflicts handled according to [`--conflict-resolve`](#conflict-resolve) & [`--conflict-loser`](#conflict-loser) settings | default: `rclone copy` renamed `Path2.conflict2` file to Path1, `rclone copy` renamed `Path1.conflict1` file to Path2
Path2 newer AND Path1 deleted | File is newer on Path2 AND also deleted on Path1 | Path2 version survives | `rclone copy` Path2 to Path1
Path2 deleted AND Path1 changed | File is deleted on Path2 AND changed (newer/older/size) on Path1 | Path1 version survives |`rclone copy` Path1 to Path2
Path1 deleted AND Path2 changed | File is deleted on Path1 AND changed (newer/older/size) on Path2 | Path2 version survives | `rclone copy` Path2 to Path1
@@ -20044,7 +22186,7 @@ Now, when bisync comes to a file that it wants to rename (because it is new/chan
it first checks whether the Path1 and Path2 versions are currently *identical*
(using the same underlying function as [`check`](commands/rclone_check/).)
If bisync concludes that the files are identical, it will skip them and move on.
-Otherwise, it will create renamed `..Path1` and `..Path2` duplicates, as before.
+Otherwise, it will create renamed duplicates, as before.
This behavior also [improves the experience of renaming directories](https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=Renamed%20directories),
as a `--resync` is no longer required, so long as the same change has been made on both sides.
@@ -20061,19 +22203,12 @@ before you commit to the changes.
### Modification times
-Bisync relies on file timestamps to identify changed files and will
-_refuse_ to operate if backend lacks the modification time support.
-
+By default, bisync compares files by modification time and size.
If you or your application should change the content of a file
-without changing the modification time then bisync will _not_
+without changing the modification time and size, then bisync will _not_
notice the change, and thus will not copy it to the other side.
-
-Note that on some cloud storage systems it is not possible to have file
-timestamps that match _precisely_ between the local and other filesystems.
-
-Bisync's approach to this problem is by tracking the changes on each side
-_separately_ over time with a local database of files in that side then
-applying the resulting changes on the other side.
+As an alternative, consider comparing by checksum (if your remotes support it).
+See [`--compare`](#compare) for details.
### Error handling {#error-handling}
@@ -20097,7 +22232,8 @@ typically at `${HOME}/.cache/rclone/bisync/` on Linux.
Some errors are considered temporary and re-running the bisync is not blocked.
The _critical return_ blocks further bisync runs.
-See also: [`--resilient`](#resilient)
+See also: [`--resilient`](#resilient), [`--recover`](#recover),
+[`--max-lock`](#max-lock), [Graceful Shutdown](#graceful-shutdown)
### Lock file
@@ -20109,6 +22245,8 @@ Delete the lock file as part of debugging the situation.
The lock file effectively blocks follow-on (e.g., scheduled by _cron_) runs
when the prior invocation is taking a long time.
The lock file contains _PID_ of the blocking process, which may help in debug.
+Lock files can be set to automatically expire after a certain amount of time,
+using the [`--max-lock`](#max-lock) flag.
**Note**
that while concurrent bisync runs are allowed, _be very cautious_
@@ -20122,6 +22260,32 @@ lest there be replicated files, deleted files and general mayhem.
- `1` for a non-critical failing run (a rerun may be successful),
- `2` for a critically aborted run (requires a `--resync` to recover).
+### Graceful Shutdown
+
+Bisync has a "Graceful Shutdown" mode which is activated by sending `SIGINT` or
+pressing `Ctrl+C` during a run. Once triggered, bisync will use best efforts to
+exit cleanly before the timer runs out. If bisync is in the middle of
+transferring files, it will attempt to cleanly empty its queue by finishing
+what it has started but not taking more. If it cannot do so within 30 seconds,
+it will cancel the in-progress transfers at that point and then give itself a
+maximum of 60 seconds to wrap up, save its state for next time, and exit. With
+the `-vP` flags you will see constant status updates and a final confirmation
+of whether or not the graceful shutdown was successful.
+
+At any point during the "Graceful Shutdown" sequence, a second `SIGINT` or
+`Ctrl+C` will trigger an immediate, un-graceful exit, which will leave things
+in a messier state. Usually a robust recovery will still be possible if using
+[`--recover`](#recover) mode, otherwise you will need to do a `--resync`.
+
+If you plan to use Graceful Shutdown mode, it is recommended to use
+[`--resilient`](#resilient) and [`--recover`](#recover), and it is important to
+NOT use [`--inplace`](https://rclone.org/docs/#inplace), otherwise you risk leaving
+partially-written files on one side, which may be confused for real files on
+the next run. Note also that in the event of an abrupt interruption, a [lock
+file](#lock-file) will be left behind to block concurrent runs. You will need
+to delete it before you can proceed with the next run (or wait for it to
+expire on its own, if using `--max-lock`.)
+
## Limitations
### Supported backends
@@ -20134,62 +22298,39 @@ Bisync is considered _BETA_ and has been tested with the following backends:
- S3
- SFTP
- Yandex Disk
+- Crypt
It has not been fully tested with other services yet.
If it works, or sorta works, please let us know and we'll update the list.
Run the test suite to check for proper operation as described below.
-First release of `rclone bisync` requires that underlying backend supports
-the modification time feature and will refuse to run otherwise.
-This limitation will be lifted in a future `rclone bisync` release.
+The first release of `rclone bisync` required both underlying backends to support
+modification times, and refused to run otherwise.
+This limitation has been lifted as of `v1.66`, as bisync now supports comparing
+checksum and/or size instead of (or in addition to) modtime.
+See [`--compare`](#compare) for details.
### Concurrent modifications
-When using **Local, FTP or SFTP** remotes rclone does not create _temporary_
+When using **Local, FTP or SFTP** remotes with [`--inplace`](https://rclone.org/docs/#inplace), rclone does not create _temporary_
files at the destination when copying, and thus if the connection is lost
the created file may be corrupt, which will likely propagate back to the
original path on the next sync, resulting in data loss.
-This will be solved in a future release, there is no workaround at the moment.
+It is therefore recommended to _omit_ `--inplace`.
Files that **change during** a bisync run may result in data loss.
-This has been seen in a highly dynamic environment, where the filesystem
-is getting hammered by running processes during the sync.
-The currently recommended solution is to sync at quiet times or [filter out](#filtering)
-unnecessary directories and files.
-
-As an [alternative approach](https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=scans%2C%20to%20avoid-,errors%20if%20files%20changed%20during%20sync,-Given%20the%20number),
-consider using `--check-sync=false` (and possibly `--resilient`) to make bisync more forgiving
-of filesystems that change during the sync.
-Be advised that this may cause bisync to miss events that occur during a bisync run,
-so it is a good idea to supplement this with a periodic independent integrity check,
-and corrective sync if diffs are found. For example, a possible sequence could look like this:
-
-1. Normally scheduled bisync run:
-
-```
-rclone bisync Path1 Path2 -MPc --check-access --max-delete 10 --filters-file /path/to/filters.txt -v --check-sync=false --no-cleanup --ignore-listing-checksum --disable ListR --checkers=16 --drive-pacer-min-sleep=10ms --create-empty-src-dirs --resilient
-```
-
-2. Periodic independent integrity check (perhaps scheduled nightly or weekly):
-
-```
-rclone check -MvPc Path1 Path2 --filter-from /path/to/filters.txt
-```
-
-3. If diffs are found, you have some choices to correct them.
-If one side is more up-to-date and you want to make the other side match it, you could run:
-
-```
-rclone sync Path1 Path2 --filter-from /path/to/filters.txt --create-empty-src-dirs -MPc -v
-```
-(or switch Path1 and Path2 to make Path2 the source-of-truth)
-
-Or, if neither side is totally up-to-date, you could run a `--resync` to bring them back into agreement
-(but remember that this could cause deleted files to re-appear.)
-
-*Note also that `rclone check` does not currently include empty directories,
-so if you want to know if any empty directories are out of sync,
-consider alternatively running the above `rclone sync` command with `--dry-run` added.
+Prior to `rclone v1.66`, this was commonly seen in highly dynamic environments, where the filesystem
+was getting hammered by running processes during the sync.
+As of `rclone v1.66`, bisync was redesigned to use a "snapshot" model,
+greatly reducing the risks from changes during a sync.
+Changes that are not detected during the current sync will now be detected during the following sync,
+and will no longer cause the entire run to throw a critical error.
+There is additionally a mechanism to mark files as needing to be internally rechecked next time, for added safety.
+It should therefore no longer be necessary to sync only at quiet times --
+however, note that an error can still occur if a file happens to change at the exact moment it's
+being read/written by bisync (same as would happen in `rclone sync`.)
+(See also: [`--ignore-checksum`](https://rclone.org/docs/#ignore-checksum),
+[`--local-no-check-updated`](https://rclone.org/local/#local-no-check-updated))
### Empty directories
@@ -20209,11 +22350,17 @@ and use `--resync` when you need to switch.
### Renamed directories
-Renaming a folder on the Path1 side results in deleting all files on
+By default, renaming a folder on the Path1 side results in deleting all files on
the Path2 side and then copying all files again from Path1 to Path2.
Bisync sees this as all files in the old directory name as deleted and all
files in the new directory name as new.
-Currently, the most effective and efficient method of renaming a directory
+
+A recommended solution is to use [`--track-renames`](https://rclone.org/docs/#track-renames),
+which is now supported in bisync as of `rclone v1.66`.
+Note that `--track-renames` is not available during `--resync`,
+as `--resync` does not delete anything (`--track-renames` only supports `sync`, not `copy`.)
+
+Otherwise, the most effective and efficient method of renaming a directory
is to rename it to the same name on both sides. (As of `rclone v1.64`,
a `--resync` is no longer required after doing so, as bisync will automatically
detect that Path1 and Path2 are in agreement.)
@@ -20227,25 +22374,20 @@ and there is also a [known issue concerning Google Drive users with many empty d
For now, the recommended way to avoid using `--fast-list` is to add `--disable ListR`
to all bisync commands. The default behavior may change in a future version.
-### Overridden Configs
+### Case (and unicode) sensitivity {#case-sensitivity}
-When rclone detects an overridden config, it adds a suffix like `{ABCDE}` on the fly
-to the internal name of the remote. Bisync follows suit by including this suffix in its listing filenames.
-However, this suffix does not necessarily persist from run to run, especially if different flags are provided.
-So if next time the suffix assigned is `{FGHIJ}`, bisync will get confused,
-because it's looking for a listing file with `{FGHIJ}`, when the file it wants has `{ABCDE}`.
-As a result, it throws
-`Bisync critical error: cannot find prior Path1 or Path2 listings, likely due to critical error on prior run`
-and refuses to run again until the user runs a `--resync` (unless using `--resilient`).
-The best workaround at the moment is to set any backend-specific flags in the [config file](https://rclone.org/commands/rclone_config/)
-instead of specifying them with command flags. (You can still override them as needed for other rclone commands.)
+As of `v1.66`, case and unicode form differences no longer cause critical errors,
+and normalization (when comparing between filesystems) is handled according to the same flags and defaults as `rclone sync`.
+See the following options (all of which are supported by bisync) to control this behavior more granularly:
+- [`--fix-case`](https://rclone.org/docs/#fix-case)
+- [`--ignore-case-sync`](https://rclone.org/docs/#ignore-case-sync)
+- [`--no-unicode-normalization`](https://rclone.org/docs/#no-unicode-normalization)
+- [`--local-unicode-normalization`](https://rclone.org/local/#local-unicode-normalization) and
+[`--local-case-sensitive`](https://rclone.org/local/#local-case-sensitive) (caution: these are normally not what you want.)
-### Case sensitivity
-
-Synching with **case-insensitive** filesystems, such as Windows or `Box`,
-can result in file name conflicts. This will be fixed in a future release.
-The near-term workaround is to make sure that files on both sides
-don't have spelling case differences (`Smile.jpg` vs. `smile.jpg`).
+Note that in the (probably rare) event that `--fix-case` is used AND a file is new/changed on both sides
+AND the checksums match AND the filename case does not match, the Path1 filename is considered the winner,
+for the purposes of `--fix-case` (Path2 will be renamed to match it).
## Windows support {#windows}
@@ -20526,23 +22668,58 @@ files are generating complaints. If the error is
consider using the flag
[--drive-acknowledge-abuse](https://rclone.org/drive/#drive-acknowledge-abuse).
-### Google Doc files
+### Google Docs (and other files of unknown size) {#gdocs}
-Google docs exist as virtual files on Google Drive and cannot be transferred
-to other filesystems natively. While it is possible to export a Google doc to
-a normal file (with `.xlsx` extension, for example), it is not possible
-to import a normal file back into a Google document.
+As of `v1.66`, [Google Docs](https://rclone.org/drive/#import-export-of-google-documents)
+(including Google Sheets, Slides, etc.) are now supported in bisync, subject to
+the same options, defaults, and limitations as in `rclone sync`. When bisyncing
+drive with non-drive backends, the drive -> non-drive direction is controlled
+by [`--drive-export-formats`](https://rclone.org/drive/#drive-export-formats) (default
+`"docx,xlsx,pptx,svg"`) and the non-drive -> drive direction is controlled by
+[`--drive-import-formats`](https://rclone.org/drive/#drive-import-formats) (default none.)
-Bisync's handling of Google Doc files is to flag them in the run log output
-for user's attention and ignore them for any file transfers, deletes, or syncs.
-They will show up with a length of `-1` in the listings.
-This bisync run is otherwise successful:
+For example, with the default export/import formats, a Google Sheet on the
+drive side will be synced to an `.xlsx` file on the non-drive side. In the
+reverse direction, `.xlsx` files with filenames that match an existing Google
+Sheet will be synced to that Google Sheet, while `.xlsx` files that do NOT
+match an existing Google Sheet will be copied to drive as normal `.xlsx` files
+(without conversion to Sheets, although the Google Drive web browser UI may
+still give you the option to open it as one.)
-```
-2021/05/11 08:23:15 INFO : Synching Path1 "/path/to/local/tree/base/" with Path2 "GDrive:"
-2021/05/11 08:23:15 INFO : ...path2.lst-new: Ignoring incorrect line: "- -1 - - 2018-07-29T08:49:30.136000000+0000 GoogleDoc.docx"
-2021/05/11 08:23:15 INFO : Bisync successful
-```
+If `--drive-import-formats` is set (it's not, by default), then all of the
+specified formats will be converted to Google Docs, if there is no existing
+Google Doc with a matching name. Caution: such conversion can be quite lossy,
+and in most cases it's probably not what you want!
+
+To bisync Google Docs as URL shortcut links (in a manner similar to "Drive for
+Desktop"), use: `--drive-export-formats url` (or
+[alternatives](https://rclone.org/drive/#exportformats:~:text=available%20Google%20Documents.-,Extension,macOS,-Standard%20options).)
+
+Note that these link files cannot be edited on the non-drive side -- you will
+get errors if you try to sync an edited link file back to drive. They CAN be
+deleted (it will result in deleting the corresponding Google Doc.) If you
+create a `.url` file on the non-drive side that does not match an existing
+Google Doc, bisyncing it will just result in copying the literal `.url` file
+over to drive (no Google Doc will be created.) So, as a general rule of thumb,
+think of them as read-only placeholders on the non-drive side, and make all
+your changes on the drive side.
+
+Likewise, even with other export-formats, it is best to only move/rename Google
+Docs on the drive side. This is because otherwise, bisync will interpret this
+as a file deleted and another created, and accordingly, it will delete the
+Google Doc and create a new file at the new path. (Whether or not that new file
+is a Google Doc depends on `--drive-import-formats`.)
+
+Lastly, take note that all Google Docs on the drive side have a size of `-1`
+and no checksum. Therefore, they cannot be reliably synced with the
+`--checksum` or `--size-only` flags. (To be exact: they will still get
+created/deleted, and bisync's delta engine will notice changes and queue them
+for syncing, but the underlying sync function will consider them identical and
+skip them.) To work around this, use the default (modtime and size) instead of
+`--checksum` or `--size-only`.
+
+To ignore Google Docs entirely, use
+[`--drive-skip-gdocs`](https://rclone.org/drive/#drive-skip-gdocs).
## Usage examples
@@ -20920,6 +23097,30 @@ about _Unison_ and synchronization in general.
## Changelog
+### `v1.66`
+* Copies and deletes are now handled in one operation instead of two
+* `--track-renames` and `--backup-dir` are now supported
+* Partial uploads known issue on `local`/`ftp`/`sftp` has been resolved (unless using `--inplace`)
+* Final listings are now generated from sync results, to avoid needing to re-list
+* Bisync is now much more resilient to changes that happen during a bisync run, and far less prone to critical errors / undetected changes
+* Bisync is now capable of rolling a file listing back in cases of uncertainty, essentially marking the file as needing to be rechecked next time.
+* A few basic terminal colors are now supported, controllable with [`--color`](https://rclone.org/docs/#color-when) (`AUTO`|`NEVER`|`ALWAYS`)
+* Initial listing snapshots of Path1 and Path2 are now generated concurrently, using the same "march" infrastructure as `check` and `sync`,
+for performance improvements and less [risk of error](https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=4.%20Listings%20should%20alternate%20between%20paths%20to%20minimize%20errors).
+* Fixed handling of unicode normalization and case insensitivity, support for [`--fix-case`](https://rclone.org/docs/#fix-case), [`--ignore-case-sync`](/docs/#ignore-case-sync), [`--no-unicode-normalization`](/docs/#no-unicode-normalization)
+* `--resync` is now much more efficient (especially for users of `--create-empty-src-dirs`)
+* Google Docs (and other files of unknown size) are now supported (with the same options as in `sync`)
+* Equality checks before a sync conflict rename now fall back to `cryptcheck` (when possible) or `--download`,
+instead of of `--size-only`, when `check` is not available.
+* Bisync no longer fails to find the correct listing file when configs are overridden with backend-specific flags.
+* Bisync now fully supports comparing based on any combination of size, modtime, and checksum, lifting the prior restriction on backends without modtime support.
+* Bisync now supports a "Graceful Shutdown" mode to cleanly cancel a run early without requiring `--resync`.
+* New `--recover` flag allows robust recovery in the event of interruptions, without requiring `--resync`.
+* A new `--max-lock` setting allows lock files to automatically renew and expire, for better automatic recovery when a run is interrupted.
+* Bisync now supports auto-resolving sync conflicts and customizing rename behavior with new [`--conflict-resolve`](#conflict-resolve), [`--conflict-loser`](#conflict-loser), and [`--conflict-suffix`](#conflict-suffix) flags.
+* A new [`--resync-mode`](#resync-mode) flag allows more control over which version of a file gets kept during a `--resync`.
+* Bisync now supports [`--retries`](https://rclone.org/docs/#retries-int) and [`--retries-sleep`](/docs/#retries-sleep-time) (when [`--resilient`](#resilient) is set.)
+
### `v1.64`
* Fixed an [issue](https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=1.%20Dry%20runs%20are%20not%20completely%20dry)
causing dry runs to inadvertently commit filter changes
@@ -21282,6 +23483,17 @@ Properties:
- Type: Encoding
- Default: Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot
+#### --fichier-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_FICHIER_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -21401,341 +23613,22 @@ Properties:
- Type: string
- Required: true
-
-
-# Amazon Drive
-
-Amazon Drive, formerly known as Amazon Cloud Drive, is a cloud storage
-service run by Amazon for consumers.
-
-## Status
-
-**Important:** rclone supports Amazon Drive only if you have your own
-set of API keys. Unfortunately the [Amazon Drive developer
-program](https://developer.amazon.com/amazon-drive) is now closed to
-new entries so if you don't already have your own set of keys you will
-not be able to use rclone with Amazon Drive.
-
-For the history on why rclone no longer has a set of Amazon Drive API
-keys see [the forum](https://forum.rclone.org/t/rclone-has-been-banned-from-amazon-drive/2314).
-
-If you happen to know anyone who works at Amazon then please ask them
-to re-instate rclone into the Amazon Drive developer program - thanks!
-
-## Configuration
-
-The initial setup for Amazon Drive involves getting a token from
-Amazon which you need to do in your browser. `rclone config` walks
-you through it.
-
-The configuration process for Amazon Drive may involve using an [oauth
-proxy](https://github.com/ncw/oauthproxy). This is used to keep the
-Amazon credentials out of the source code. The proxy runs in Google's
-very secure App Engine environment and doesn't store any credentials
-which pass through it.
-
-Since rclone doesn't currently have its own Amazon Drive credentials
-so you will either need to have your own `client_id` and
-`client_secret` with Amazon Drive, or use a third-party oauth proxy
-in which case you will need to enter `client_id`, `client_secret`,
-`auth_url` and `token_url`.
-
-Note also if you are not using Amazon's `auth_url` and `token_url`,
-(ie you filled in something for those) then if setting up on a remote
-machine you can only use the [copying the config method of
-configuration](https://rclone.org/remote_setup/#configuring-by-copying-the-config-file)
-- `rclone authorize` will not work.
-
-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
-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 / Amazon Drive
- \ "amazon cloud drive"
-[snip]
-Storage> amazon cloud drive
-Amazon Application Client Id - required.
-client_id> your client ID goes here
-Amazon Application Client Secret - required.
-client_secret> your client secret goes here
-Auth server URL - leave blank to use Amazon's.
-auth_url> Optional auth URL
-Token server url - leave blank to use Amazon's.
-token_url> Optional token URL
-Remote config
-Make sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom 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 = your client ID goes here
-client_secret = your client secret goes here
-auth_url = Optional auth URL
-token_url = Optional token URL
-token = {"access_token":"xxxxxxxxxxxxxxxxxxxxxxx","token_type":"bearer","refresh_token":"xxxxxxxxxxxxxxxxxx","expiry":"2015-09-06T16:07:39.658438471+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 Amazon. 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 Amazon Drive
-
- rclone lsd remote:
-
-List all the files in your Amazon Drive
-
- rclone ls remote:
-
-To copy a local directory to an Amazon Drive directory called backup
-
- rclone copy /home/source remote:backup
-
-### Modification times and hashes
-
-Amazon Drive doesn't allow modification times to be changed via
-the API so these won't be accurate or used for syncing.
-
-It does support the MD5 hash algorithm, so for a more accurate sync,
-you can use the `--checksum` flag.
-
-### Restricted filename characters
-
-| Character | Value | Replacement |
-| --------- |:-----:|:-----------:|
-| NUL | 0x00 | ␀ |
-| / | 0x2F | / |
-
-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. Amazon
-don't provide an API to permanently delete files, nor to empty the
-trash, so you will have to do that with one of Amazon's apps or via
-the Amazon Drive website. As of November 17, 2016, files are
-automatically deleted by Amazon from the trash after 30 days.
-
-### Using with non `.com` Amazon accounts
-
-Let's say you usually use `amazon.co.uk`. When you authenticate with
-rclone it will take you to an `amazon.com` page to log in. Your
-`amazon.co.uk` email and password should work here just fine.
-
-
-### Standard options
-
-Here are the Standard options specific to amazon cloud drive (Amazon Drive).
-
-#### --acd-client-id
-
-OAuth Client Id.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_id
-- Env Var: RCLONE_ACD_CLIENT_ID
-- Type: string
-- Required: false
-
-#### --acd-client-secret
-
-OAuth Client Secret.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_secret
-- Env Var: RCLONE_ACD_CLIENT_SECRET
-- Type: string
-- Required: false
-
### Advanced options
-Here are the Advanced options specific to amazon cloud drive (Amazon Drive).
+Here are the Advanced options specific to alias (Alias for an existing remote).
-#### --acd-token
+#### --alias-description
-OAuth Access Token as a JSON blob.
+Description of the remote.
Properties:
-- Config: token
-- Env Var: RCLONE_ACD_TOKEN
+- Config: description
+- Env Var: RCLONE_ALIAS_DESCRIPTION
- Type: string
- Required: false
-#### --acd-auth-url
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_ACD_AUTH_URL
-- Type: string
-- Required: false
-
-#### --acd-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_ACD_TOKEN_URL
-- Type: string
-- Required: false
-
-#### --acd-checkpoint
-
-Checkpoint for internal polling (debug).
-
-Properties:
-
-- Config: checkpoint
-- Env Var: RCLONE_ACD_CHECKPOINT
-- Type: string
-- Required: false
-
-#### --acd-upload-wait-per-gb
-
-Additional time per GiB to wait after a failed complete upload to see if it appears.
-
-Sometimes Amazon Drive gives an error when a file has been fully
-uploaded but the file appears anyway after a little while. This
-happens sometimes for files over 1 GiB in size and nearly every time for
-files bigger than 10 GiB. This parameter controls the time rclone waits
-for the file to appear.
-
-The default value for this parameter is 3 minutes per GiB, so by
-default it will wait 3 minutes for every GiB uploaded to see if the
-file appears.
-
-You can disable this feature by setting it to 0. This may cause
-conflict errors as rclone retries the failed upload but the file will
-most likely appear correctly eventually.
-
-These values were determined empirically by observing lots of uploads
-of big files for a range of file sizes.
-
-Upload with the "-v" flag to see more info about what rclone is doing
-in this situation.
-
-Properties:
-
-- Config: upload_wait_per_gb
-- Env Var: RCLONE_ACD_UPLOAD_WAIT_PER_GB
-- Type: Duration
-- Default: 3m0s
-
-#### --acd-templink-threshold
-
-Files >= this size will be downloaded via their tempLink.
-
-Files this size or more will be downloaded via their "tempLink". This
-is to work around a problem with Amazon Drive which blocks downloads
-of files bigger than about 10 GiB. The default for this is 9 GiB which
-shouldn't need to be changed.
-
-To download files above this threshold, rclone requests a "tempLink"
-which downloads the file through a temporary URL directly from the
-underlying S3 storage.
-
-Properties:
-
-- Config: templink_threshold
-- Env Var: RCLONE_ACD_TEMPLINK_THRESHOLD
-- Type: SizeSuffix
-- Default: 9Gi
-
-#### --acd-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_ACD_ENCODING
-- Type: Encoding
-- Default: Slash,InvalidUtf8,Dot
-
-
-
-## Limitations
-
-Note that Amazon Drive is case insensitive so you can't have a
-file called "Hello.doc" and one called "hello.doc".
-
-Amazon Drive has rate limiting so you may notice errors in the
-sync (429 errors). rclone will automatically retry the sync up to 3
-times by default (see `--retries` flag) which should hopefully work
-around this problem.
-
-Amazon Drive has an internal limit of file sizes that can be uploaded
-to the service. This limit is not officially published, but all files
-larger than this will fail.
-
-At the time of writing (Jan 2016) is in the area of 50 GiB per file.
-This means that larger files are likely to fail.
-
-Unfortunately there is no way for rclone to see that this failure is
-because of file size, so it will retry the operation, as any other
-failure. To avoid this problem, use `--max-size 50000M` option to limit
-the maximum size of uploaded files. Note that `--max-size` does not split
-files into segments, it only ignores files over this size.
-
-`rclone about` is not supported by the Amazon Drive 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/)
# Amazon S3 Storage Providers
@@ -21758,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)
@@ -21817,7 +23711,7 @@ name> remote
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, Ceph, ChinaMobile, ArvanCloud, Dreamhost, IBM COS, Liara, Minio, and Tencent COS
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
[snip]
Storage> s3
@@ -22323,6 +24217,7 @@ permissions are required to be available on the bucket being written to:
* `GetObject`
* `PutObject`
* `PutObjectACL`
+* `CreateBucket` (unless using [s3-no-check-bucket](#s3-no-check-bucket))
When using the `lsd` subcommand, the `ListAllMyBuckets` permission is required.
@@ -22364,6 +24259,7 @@ Notes on above:
that `USER_NAME` has been created.
2. The Resource entry must include both resource ARNs, as one implies
the bucket and the other implies the bucket's objects.
+3. When using [s3-no-check-bucket](#s3-no-check-bucket) and the bucket already exsits, the `"arn:aws:s3:::BUCKET_NAME"` doesn't have to be included.
For reference, [here's an Ansible script](https://gist.github.com/ebridges/ebfc9042dd7c756cd101cfa807b7ae2b)
that will generate one or more buckets that will work with `rclone sync`.
@@ -22402,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
@@ -22449,6 +24345,8 @@ Properties:
- Liara Object Storage
- "Linode"
- Linode Object Storage
+ - "Magalu"
+ - Magalu Object Storage
- "Minio"
- Minio Object Storage
- "Netease"
@@ -22592,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.
@@ -22677,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"
@@ -22823,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
@@ -23097,10 +25000,10 @@ Properties:
#### --s3-upload-concurrency
-Concurrency for multipart uploads.
+Concurrency for multipart uploads and copies.
This is the number of chunks of the same file that are uploaded
-concurrently.
+concurrently for multipart uploads and copies.
If you are uploading small numbers of large files over high-speed links
and these uploads do not fully utilize your bandwidth, then increasing
@@ -23149,6 +25052,19 @@ Properties:
- Type: bool
- Default: false
+#### --s3-use-dual-stack
+
+If true use AWS S3 dual-stack endpoint (IPv6 support).
+
+See [AWS Docs on Dualstack Endpoints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/dual-stack-endpoints.html)
+
+Properties:
+
+- Config: use_dual_stack
+- Env Var: RCLONE_S3_USE_DUAL_STACK
+- Type: bool
+- Default: false
+
#### --s3-use-accelerate-endpoint
If true use the AWS S3 accelerated endpoint.
@@ -23453,6 +25369,25 @@ Properties:
- Type: Time
- Default: off
+#### --s3-version-deleted
+
+Show deleted file markers when using versions.
+
+This shows deleted file markers in the listing when using versions. These will appear
+as 0 size files. The only operation which can be performed on them is deletion.
+
+Deleting a delete marker will reveal the previous version.
+
+Deleted files will always show with a timestamp.
+
+
+Properties:
+
+- Config: version_deleted
+- Env Var: RCLONE_S3_VERSION_DELETED
+- Type: bool
+- Default: false
+
#### --s3-decompress
If set this will decompress gzip encoded objects.
@@ -23603,6 +25538,17 @@ Properties:
- Type: Tristate
- Default: unset
+#### --s3-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_S3_DESCRIPTION
+- Type: string
+- Required: false
+
### Metadata
User metadata is stored as x-amz-meta- keys. S3 metadata keys are case insensitive and are always returned in lower case.
@@ -23993,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
@@ -24065,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
@@ -24155,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.
@@ -24183,10 +26132,10 @@ Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
- 5 / 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, ...
\ (s3)
[snip]
-Storage> 5
+Storage> s3
Option provider.
Choose your S3 provider.
Choose a number from below, or type in your own value.
@@ -24307,18 +26256,11 @@ To configure access to IBM COS S3, follow the steps below:
3. Select "s3" storage.
```
Choose a number from below, or type in your own value
- 1 / Alias for an existing remote
- \ "alias"
- 2 / Amazon Drive
- \ "amazon cloud drive"
- 3 / Amazon S3 Complaint Storage Providers (Dreamhost, Ceph, ChinaMobile, Liara, ArvanCloud, Minio, IBM COS)
- \ "s3"
- 4 / Backblaze B2
- \ "b2"
[snip]
- 23 / HTTP
- \ "http"
-Storage> 3
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
+ \ "s3"
+[snip]
+Storage> s3
```
4. Select IBM COS as the S3 Storage Provider.
@@ -24478,7 +26420,7 @@ 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, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -24584,7 +26526,7 @@ 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, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -24822,15 +26764,8 @@ name> qiniu
```
Choose a number from below, or type in your own value
- 1 / 1Fichier
- \ (fichier)
- 2 / Akamai NetStorage
- \ (netstorage)
- 3 / Alias for an existing remote
- \ (alias)
- 4 / Amazon Drive
- \ (amazon cloud drive)
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Liara, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
+[snip]
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -25061,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`.
@@ -25095,7 +27031,7 @@ Choose `s3` backend
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, Alibaba, Ceph, ChinaMobile, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Liara, Lyve Cloud, Minio, RackCorp, SeaweedFS, and Tencent COS
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -25396,7 +27332,7 @@ 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]
- 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, ChinaMobile, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Liara, Minio, and Tencent COS
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
[snip]
Storage> s3
@@ -25506,7 +27442,7 @@ Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
...
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, ChinaMobile, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Lyve Cloud, Minio, RackCorp, SeaweedFS, and Tencent COS
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
...
Storage> s3
@@ -25735,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..
@@ -25762,15 +27699,8 @@ name> leviia
```
Choose a number from below, or type in your own value
- 1 / 1Fichier
- \ (fichier)
- 2 / Akamai NetStorage
- \ (netstorage)
- 3 / Alias for an existing remote
- \ (alias)
- 4 / Amazon Drive
- \ (amazon cloud drive)
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Liara, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
+[snip]
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -25983,7 +27913,7 @@ Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
- X / Amazon S3 Compliant Storage Providers including AWS, ...Linode, ...and others
+XX / Amazon S3 Compliant Storage Providers including AWS, ...Linode, ...and others
\ (s3)
[snip]
Storage> s3
@@ -26093,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.
@@ -26228,13 +28275,8 @@ name> cos
```
Choose a number from below, or type in your own value
-1 / 1Fichier
- \ "fichier"
- 2 / Alias for an existing remote
- \ "alias"
- 3 / Amazon Drive
- \ "amazon cloud drive"
- 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, ChinaMobile, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Liara, Minio, and Tencent COS
+[snip]
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
[snip]
Storage> s3
@@ -26642,7 +28684,7 @@ 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
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, GCS, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Liara, Lyve Cloud, Minio, Netease, Petabox, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
+XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
Storage> s3
@@ -26742,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`.
@@ -26816,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.
@@ -26904,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
@@ -26918,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.
@@ -27145,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:
@@ -27293,9 +29346,12 @@ Properties:
#### --b2-download-auth-duration
-Time before the authorization token will expire in s or suffix ms|s|m|h|d.
+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 duration before the download authorization token will expire.
The minimum value is 1 second. The maximum value is one week.
Properties:
@@ -27371,6 +29427,17 @@ Properties:
- 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.
@@ -27438,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
@@ -27918,6 +30021,17 @@ Properties:
- Type: Encoding
- Default: Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot
+#### --box-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_BOX_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -28624,6 +30738,17 @@ Properties:
- 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.
@@ -29120,6 +31245,17 @@ Properties:
- 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
@@ -29421,6 +31557,17 @@ Properties:
- Type: Encoding
- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot
+#### --sharefile-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SHAREFILE_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -29614,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
@@ -29802,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.
@@ -30011,6 +32158,22 @@ Properties:
- 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.
+
+Properties:
+
+- Config: strict_names
+- Env Var: RCLONE_CRYPT_STRICT_NAMES
+- Type: bool
+- Default: false
+
#### --crypt-filename-encoding
How to encode the encrypted filename to text string.
@@ -30048,6 +32211,17 @@ Properties:
- Type: string
- Default: ".bin"
+#### --crypt-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_CRYPT_DESCRIPTION
+- Type: string
+- Required: false
+
### Metadata
Any metadata supported by the underlying remote is read and written.
@@ -30216,7 +32390,7 @@ encoding is modified in two ways:
* 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, Amazon Drive).
+used on case insensitive remotes (e.g. Windows, Box, Dropbox, Onedrive etc).
### Key derivation
@@ -30386,6 +32560,17 @@ Properties:
- Type: SizeSuffix
- Default: 20Mi
+#### --compress-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_COMPRESS_DESCRIPTION
+- Type: string
+- Required: false
+
### Metadata
Any metadata supported by the underlying remote is read and written.
@@ -30544,6 +32729,21 @@ Properties:
- 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.
@@ -30884,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
@@ -30915,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.
@@ -31001,6 +33215,17 @@ Properties:
- Type: Duration
- Default: 10m0s
+#### --dropbox-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_DROPBOX_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -31324,6 +33549,17 @@ Properties:
- 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
@@ -31775,6 +34011,17 @@ Properties:
- "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
@@ -32523,6 +34770,17 @@ Properties:
- 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
@@ -32966,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:`
@@ -33819,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.
@@ -33847,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.
@@ -33882,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.
@@ -33916,10 +36182,23 @@ Properties:
- "true"
- Get GCP IAM credentials from the environment (env vars or IAM).
+#### --drive-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_DRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
### Metadata
User metadata is stored in the properties field of the drive object.
+Metadata is supported on files and directories.
+
Here are the possible system metadata items for the drive backend.
| Name | Help | Type | Example | Read Only |
@@ -33935,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.
@@ -34138,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
@@ -34239,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
@@ -34252,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"
@@ -34746,6 +37074,17 @@ Properties:
- Type: Duration
- Default: 10m0s
+#### --gphotos-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_GPHOTOS_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -35061,6 +37400,17 @@ Properties:
- 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.
@@ -35410,6 +37760,17 @@ Properties:
- Type: Encoding
- Default: Slash,Colon,Del,Ctl,InvalidUtf8,Dot
+#### --hdfs-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_HDFS_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -35831,6 +38192,17 @@ Properties:
- Type: Encoding
- Default: Slash,Dot
+#### --hidrive-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_HIDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -35996,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).
@@ -36066,6 +38449,17 @@ Properties:
- 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.
@@ -36304,6 +38698,17 @@ Properties:
- Type: Encoding
- Default: Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket
+#### --imagekit-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_IMAGEKIT_DESCRIPTION
+- Type: string
+- Required: false
+
### Metadata
Any metadata supported by the underlying remote is read and written.
@@ -36587,6 +38992,17 @@ Properties:
- 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
Metadata fields provided by Internet Archive.
@@ -37061,6 +39477,17 @@ Properties:
- 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.
@@ -37248,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/).
@@ -37303,6 +39730,17 @@ Properties:
- 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
@@ -37520,6 +39958,21 @@ Properties:
- 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
@@ -37935,6 +40388,17 @@ Properties:
- Type: Encoding
- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot
+#### --mailru-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_MAILRU_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -38224,6 +40688,17 @@ Properties:
- Type: Encoding
- Default: Slash,InvalidUtf8,Dot
+#### --mega-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_MEGA_DESCRIPTION
+- Type: string
+- Required: false
+
### Process `killed`
@@ -38299,6 +40774,21 @@ 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
@@ -38539,6 +41029,17 @@ Properties:
- "https"
- 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.
@@ -39404,6 +41905,35 @@ Properties:
- 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
@@ -40130,6 +42660,17 @@ Properties:
- 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
@@ -40603,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:
@@ -40648,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.
@@ -40712,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.
@@ -40769,7 +43330,7 @@ Properties:
If set rclone will use delta listing to implement recursive listings.
-If this flag is set the the onedrive backend will advertise `ListR`
+If this flag is set the onedrive backend will advertise `ListR`
support for recursive listings.
Setting this flag speeds up these things greatly:
@@ -40802,6 +43363,32 @@ Properties:
- 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.
@@ -40815,6 +43402,175 @@ Properties:
- 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](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/permission?view=odsp-graph-online),
+which differs slightly between OneDrive Personal and Business.
+
+Example for OneDrive Personal:
+```json
+[
+ {
+ "id": "1234567890ABC!123",
+ "grantedTo": {
+ "user": {
+ "id": "ryan@contoso.com"
+ },
+ "application": {},
+ "device": {}
+ },
+ "invitation": {
+ "email": "ryan@contoso.com"
+ },
+ "link": {
+ "webUrl": "https://1drv.ms/t/s!1234567890ABC"
+ },
+ "roles": [
+ "read"
+ ],
+ "shareId": "s!1234567890ABC"
+ }
+]
+```
+
+Example for OneDrive Business:
+```json
+[
+ {
+ "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
+ "grantedToIdentities": [
+ {
+ "user": {
+ "displayName": "ryan@contoso.com"
+ },
+ "application": {},
+ "device": {}
+ }
+ ],
+ "link": {
+ "type": "view",
+ "scope": "users",
+ "webUrl": "https://contoso.sharepoint.com/:w:/t/design/a577ghg9hgh737613bmbjf839026561fmzhsr85ng9f3hjck2t5s"
+ },
+ "roles": [
+ "read"
+ ],
+ "shareId": "u!LKj1lkdlals90j1nlkascl"
+ },
+ {
+ "id": "5D33DD65C6932946",
+ "grantedTo": {
+ "user": {
+ "displayName": "John Doe",
+ "id": "efee1b77-fb3b-4f65-99d6-274c11914d12"
+ },
+ "application": {},
+ "device": {}
+ },
+ "roles": [
+ "owner"
+ ],
+ "shareId": "FWxc1lasfdbEAGM5fI7B67aB5ZMPDMmQ11U"
+ }
+]
+```
+
+To write permissions, pass in a "permissions" metadata key using this same
+format. The [`--metadata-mapper`](https://rclone.org/docs/#metadata-mapper) tool can
+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`. 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 with `--metadata-mapper`:
+
+```json
+{
+ "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.
+
+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.) 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
+`--onedrive-metadata-permissions`.
+
+Metadata and permissions are supported for Folders (directories) as well as
+Files. Note that setting the `mtime` or `btime` on a Folder requires one extra
+API call on OneDrive Business only.
+
+OneDrive does not currently support User Metadata. When writing metadata, only
+writeable system properties will be written -- any read-only or unrecognized keys
+passed in will be ignored.
+
+TIP: to see the metadata and permissions for any file or folder, run:
+
+```
+rclone lsjson remote:path --stat -M --onedrive-metadata-permissions read
+```
+
+Here are the possible system metadata items for the onedrive backend.
+
+| Name | Help | Type | Example | Read Only |
+|------|------|------|---------|-----------|
+| btime | Time of file birth (creation) with S accuracy (mS for OneDrive Personal). | RFC 3339 | 2006-01-02T15:04:05Z | N |
+| content-type | The MIME type of the file. | string | text/plain | **Y** |
+| created-by-display-name | Display name of the user that created the item. | string | John Doe | **Y** |
+| created-by-id | ID of the user that created the item. | string | 48d31887-5fad-4d73-a9f5-3c356e68a038 | **Y** |
+| description | A short description of the file. Max 1024 characters. Only supported for OneDrive Personal. | string | Contract for signing | N |
+| id | The unique identifier of the item within OneDrive. | string | 01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K | **Y** |
+| last-modified-by-display-name | Display name of the user that last modified the item. | string | John Doe | **Y** |
+| last-modified-by-id | ID of the user that last modified the item. | string | 48d31887-5fad-4d73-a9f5-3c356e68a038 | **Y** |
+| malware-detected | Whether OneDrive has detected that the item contains malware. | boolean | true | **Y** |
+| mtime | Time of last modification with S accuracy (mS for OneDrive Personal). | RFC 3339 | 2006-01-02T15:04:05Z | N |
+| package-type | If present, indicates that this item is a package instead of a folder or file. Packages are treated like files in some contexts and folders in others. | string | oneNote | **Y** |
+| permissions | Permissions in a JSON dump of OneDrive format. Enable with --onedrive-metadata-permissions. Properties: id, grantedTo, grantedToIdentities, invitation, inheritedFrom, link, roles, shareId | JSON | {} | N |
+| shared-by-id | ID of the user that shared the item (if shared). | string | 48d31887-5fad-4d73-a9f5-3c356e68a038 | **Y** |
+| shared-owner-id | ID of the owner of the shared item (if shared). | string | 48d31887-5fad-4d73-a9f5-3c356e68a038 | **Y** |
+| shared-scope | If shared, indicates the scope of how the item is shared: anonymous, organization, or users. | string | users | **Y** |
+| shared-time | Time when the item was shared, with S accuracy (mS for OneDrive Personal). | RFC 3339 | 2006-01-02T15:04:05Z | **Y** |
+| utime | Time of upload with S accuracy (mS for OneDrive Personal). | RFC 3339 | 2006-01-02T15:04:05Z | **Y** |
+
+See the [metadata](https://rclone.org/docs/#metadata) docs for more info.
+
## Limitations
@@ -41204,6 +43960,17 @@ Properties:
- Type: SizeSuffix
- Default: 10Mi
+#### --opendrive-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_OPENDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -41278,13 +44045,17 @@ Press Enter for the default (env_auth).
2 | you’ll need to put in a config file your tenancy OCID, user OCID, region, the path, fingerprint to an API key.
| https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
\ (user_principal_auth)
- / use instance principals to authorize an instance to make API calls.
- 3 | each instance has its own identity, and authenticates using the certificates that are read from instance metadata.
+ / use instance principals to authorize an instance to make API calls.
+ 3 | each instance has its own identity, and authenticates using the certificates that are read from instance metadata.
| https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
\ (instance_principal_auth)
- 4 / use resource principals to make API calls
+ / use workload identity to grant Kubernetes pods policy-driven access to Oracle Cloud
+ 4 | Infrastructure (OCI) resources using OCI Identity and Access Management (IAM).
+ | https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contenggrantingworkloadaccesstoresources.htm
+ \ (workload_identity_auth)
+ 5 / use resource principals to make API calls
\ (resource_principal_auth)
- 5 / no credentials needed, this is typically for reading public buckets
+ 6 / no credentials needed, this is typically for reading public buckets
\ (no_auth)
provider> 2
@@ -41370,6 +44141,7 @@ Rclone supports the following OCI authentication provider.
User Principal
Instance Principal
Resource Principal
+ Workload Identity
No authentication
### User Principal
@@ -41443,6 +44215,14 @@ Sample rclone configuration file for Authentication Provider Resource Principal:
region = us-ashburn-1
provider = resource_principal_auth
+### Workload Identity
+Workload Identity auth may be used when running Rclone from Kubernetes pod on a Container Engine for Kubernetes (OKE) cluster.
+For more details on configuring Workload Identity, see [Granting Workloads Access to OCI Resources](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contenggrantingworkloadaccesstoresources.htm).
+To use workload identity, ensure Rclone is started with these environment variables set in its process.
+
+ export OCI_RESOURCE_PRINCIPAL_VERSION=2.2
+ export OCI_RESOURCE_PRINCIPAL_REGION=us-ashburn-1
+
### No authentication
Public buckets do not require any authentication mechanism to read objects.
@@ -41525,6 +44305,9 @@ Properties:
- use instance principals to authorize an instance to make API calls.
- each instance has its own identity, and authenticates using the certificates that are read from instance metadata.
- https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
+ - "workload_identity_auth"
+ - use workload identity to grant OCI Container Engine for Kubernetes workloads policy-driven access to OCI resources using OCI Identity and Access Management (IAM).
+ - https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contenggrantingworkloadaccesstoresources.htm
- "resource_principal_auth"
- use resource principals to make API calls
- "no_auth"
@@ -41910,6 +44693,17 @@ Properties:
- "AES256"
- AES256
+#### --oos-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_OOS_DESCRIPTION
+- Type: string
+- Required: false
+
## Backend commands
Here are the commands specific to the oracleobjectstorage backend.
@@ -41990,6 +44784,47 @@ Options:
- "max-age": Max age of upload to delete
+### restore
+
+Restore objects from Archive to Standard storage
+
+ rclone backend restore remote: [options] [+]
+
+This command can be used to restore one or more objects from Archive to Standard storage.
+
+ Usage Examples:
+
+ rclone backend restore oos:bucket/path/to/directory -o hours=HOURS
+ rclone backend restore oos:bucket -o hours=HOURS
+
+This flag also obeys the filters. Test first with --interactive/-i or --dry-run flags
+
+ rclone --interactive backend restore --include "*.txt" oos:bucket/path -o hours=72
+
+All the objects shown will be marked for restore, then
+
+ rclone backend restore --include "*.txt" oos:bucket/path -o hours=72
+
+ It returns a list of status dictionaries with Object Name and Status
+ keys. The Status will be "RESTORED"" if it was successful or an error message
+ if not.
+
+ [
+ {
+ "Object": "test.txt"
+ "Status": "RESTORED",
+ },
+ {
+ "Object": "test/file4.txt"
+ "Status": "RESTORED",
+ }
+ ]
+
+
+Options:
+
+- "hours": The number of hours for which this object will be restored. Default is 24 hrs.
+
## Tutorials
@@ -42301,6 +45136,17 @@ Properties:
- Type: Encoding
- Default: Slash,Ctl,InvalidUtf8
+#### --qingstor-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_QINGSTOR_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -42535,7 +45381,7 @@ Properties:
#### --quatrix-hard-delete
-Delete files permanently rather than putting them into the trash.
+Delete files permanently rather than putting them into the trash
Properties:
@@ -42544,6 +45390,28 @@ Properties:
- Type: bool
- Default: false
+#### --quatrix-skip-project-folders
+
+Skip project folders in operations
+
+Properties:
+
+- Config: skip_project_folders
+- Env Var: RCLONE_QUATRIX_SKIP_PROJECT_FOLDERS
+- Type: bool
+- Default: false
+
+#### --quatrix-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_QUATRIX_DESCRIPTION
+- Type: string
+- Required: false
+
## Storage usage
@@ -42745,6 +45613,17 @@ Properties:
- Type: Encoding
- Default: Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot
+#### --sia-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SIA_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -43264,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:
@@ -43280,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:
@@ -43301,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
@@ -43316,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.
@@ -43328,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.
@@ -43341,6 +46262,17 @@ Properties:
- Type: Encoding
- Default: Slash,InvalidUtf8
+#### --swift-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SWIFT_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -43668,6 +46600,17 @@ Properties:
- Type: string
- Required: false
+#### --pcloud-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PCLOUD_DESCRIPTION
+- Type: string
+- Required: false
+
# PikPak
@@ -43893,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.
@@ -43906,6 +46897,17 @@ Properties:
- Type: Encoding
- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot
+#### --pikpak-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PIKPAK_DESCRIPTION
+- Type: string
+- Required: false
+
## Backend commands
Here are the commands specific to the pikpak backend.
@@ -44176,6 +47178,17 @@ Properties:
- Type: Encoding
- Default: Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot
+#### --premiumizeme-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PREMIUMIZEME_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -44230,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
@@ -44515,6 +47528,17 @@ Properties:
- Type: bool
- Default: true
+#### --protondrive-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PROTONDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -44737,6 +47761,17 @@ Properties:
- Type: Encoding
- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
+#### --putio-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PUTIO_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -44789,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
@@ -45074,6 +48109,17 @@ Properties:
- Type: bool
- Default: true
+#### --protondrive-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PROTONDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -45486,6 +48532,17 @@ Properties:
- Type: Encoding
- Default: Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8
+#### --seafile-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SEAFILE_DESCRIPTION
+- Type: string
+- Required: false
+
# SFTP
@@ -45763,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
@@ -46377,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
@@ -46526,6 +49610,17 @@ Properties:
- Type: bool
- Default: false
+#### --sftp-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SFTP_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -46807,13 +49902,30 @@ Properties:
- Type: Encoding
- Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot
+#### --smb-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SMB_DESCRIPTION
+- Type: string
+- Required: false
+
# 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
@@ -47098,6 +50210,21 @@ Properties:
- Type: string
- Required: false
+### Advanced options
+
+Here are the Advanced options specific to storj (Storj Decentralized Cloud Storage).
+
+#### --storj-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_STORJ_DESCRIPTION
+- Type: string
+- Required: false
+
## Usage
@@ -47497,6 +50624,17 @@ Properties:
- Type: Encoding
- Default: Slash,Ctl,InvalidUtf8,Dot
+#### --sugarsync-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SUGARSYNC_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -47513,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
@@ -47655,6 +51060,17 @@ Properties:
- Type: Encoding
- Default: Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot
+#### --uptobox-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_UPTOBOX_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -47947,6 +51363,17 @@ Properties:
- Type: SizeSuffix
- Default: 1Gi
+#### --union-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_UNION_DESCRIPTION
+- Type: string
+- Required: false
+
### Metadata
Any metadata supported by the underlying remote is read and written.
@@ -48223,13 +51650,46 @@ Properties:
- Type: SizeSuffix
- Default: 10Mi
+#### --webdav-owncloud-exclude-shares
+
+Exclude ownCloud shares
+
+Properties:
+
+- Config: owncloud_exclude_shares
+- Env Var: RCLONE_WEBDAV_OWNCLOUD_EXCLUDE_SHARES
+- 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.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_WEBDAV_DESCRIPTION
+- Type: string
+- Required: false
+
## Provider notes
See below for notes on specific providers.
-## Fastmail Files
+### Fastmail Files
Use `https://webdav.fastmail.com/` or a subdirectory as the URL,
and your Fastmail email `username@domain.tld` as the username.
@@ -48624,6 +52084,17 @@ Properties:
- Type: Encoding
- Default: Slash,Del,Ctl,InvalidUtf8,Dot
+#### --yandex-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_YANDEX_DESCRIPTION
+- Type: string
+- Required: false
+
## Limitations
@@ -48878,6 +52349,17 @@ Properties:
- Type: Encoding
- Default: Del,Ctl,InvalidUtf8
+#### --zoho-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_ZOHO_DESCRIPTION
+- Type: string
+- Required: false
+
## Setting up your own client_id
@@ -49125,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
@@ -49149,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
@@ -49168,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
@@ -49444,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.
@@ -49457,6 +52987,17 @@ Properties:
- Type: Encoding
- Default: Slash,Dot
+#### --local-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_LOCAL_DESCRIPTION
+- Type: string
+- Required: false
+
### Metadata
Depending on which OS is in use the local backend may return only some
@@ -49468,6 +53009,8 @@ netbsd, macOS and Solaris. It is **not** supported on Windows yet
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.
+
Here are the possible system metadata items for the local backend.
| Name | Help | Type | Example | Read Only |
@@ -49516,6 +53059,391 @@ 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)
+
+* Major features
+ * Rclone will now sync directory modification times if the backend supports it.
+ * This can be disabled with [--no-update-dir-modtime](https://rclone.org/docs/#no-update-dir-modtime)
+ * See [the overview](https://rclone.org/overview/#features) and look for the `D` flags in the `ModTime` column to see which backends support it.
+ * Rclone will now sync directory metadata if the backend supports it when `-M`/`--metadata` is in use.
+ * See [the overview](https://rclone.org/overview/#features) and look for the `D` flags in the `Metadata` column to see which backends support it.
+ * Bisync has received many updates see below for more details or [bisync's changelog](https://rclone.org/bisync/#changelog)
+* Removed backends
+ * amazonclouddrive: Remove Amazon Drive backend code and docs (Nick Craig-Wood)
+* New Features
+ * backend
+ * Add description field for all backends (Paul Stern)
+ * build
+ * Update to go1.22 and make go1.20 the minimum required version (Nick Craig-Wood)
+ * Fix `CVE-2024-24786` by upgrading `google.golang.org/protobuf` (Nick Craig-Wood)
+ * check: Respect `--no-unicode-normalization` and `--ignore-case-sync` for `--checkfile` (nielash)
+ * cmd: Much improved shell auto completion which reduces the size of the completion file and works faster (Nick Craig-Wood)
+ * doc updates (albertony, ben-ba, Eli, emyarod, huajin tong, Jack Provance, kapitainsky, keongalvin, Nick Craig-Wood, nielash, rarspace01, rzitzer, Tera, Vincent Murphy)
+ * fs: Add more detailed logging for file includes/excludes (Kyle Reynolds)
+ * lsf
+ * Add `--time-format` flag (nielash)
+ * Make metadata appear for directories (Nick Craig-Wood)
+ * lsjson: Make metadata appear for directories (Nick Craig-Wood)
+ * rc
+ * Add `srcFs` and `dstFs` to `core/stats` and `core/transferred` stats (Nick Craig-Wood)
+ * Add `operations/hashsum` to the rc as `rclone hashsum` equivalent (Nick Craig-Wood)
+ * Add `config/paths` to the rc as `rclone config paths` equivalent (Nick Craig-Wood)
+ * sync
+ * Optionally report list of synced paths to file (nielash)
+ * Implement directory sync for mod times and metadata (Nick Craig-Wood)
+ * Don't set directory modtimes if already set (nielash)
+ * Don't sync directory modtimes from backends which don't have directories (Nick Craig-Wood)
+* Bug Fixes
+ * backend
+ * Make backends which use oauth implement the `Shutdown` and shutdown the oauth properly (rkonfj)
+ * bisync
+ * Handle unicode and case normalization consistently (nielash)
+ * Partial uploads known issue on `local`/`ftp`/`sftp` has been resolved (unless using `--inplace`) (nielash)
+ * Fixed handling of unicode normalization and case insensitivity, support for [`--fix-case`](https://rclone.org/docs/#fix-case), [`--ignore-case-sync`](/docs/#ignore-case-sync), [`--no-unicode-normalization`](/docs/#no-unicode-normalization) (nielash)
+ * Bisync no longer fails to find the correct listing file when configs are overridden with backend-specific flags. (nielash)
+ * nfsmount
+ * Fix exit after external unmount (nielash)
+ * Fix `--volname` being ignored (nielash)
+ * operations
+ * Fix renaming a file on macOS (nielash)
+ * Fix case-insensitive moves in operations.Move (nielash)
+ * Fix TestCaseInsensitiveMoveFileDryRun on chunker integration tests (nielash)
+ * Fix TestMkdirModTime test (Nick Craig-Wood)
+ * Fix TestSetDirModTime for backends with SetDirModTime but not Metadata (Nick Craig-Wood)
+ * Fix typo in log messages (nielash)
+ * serve nfs: Fix writing files via Finder on macOS (nielash)
+ * serve restic: Fix error handling (Michael Eischer)
+ * serve webdav: Fix `--baseurl` without leading / (Nick Craig-Wood)
+ * stats: Fix race between ResetCounters and stopAverageLoop called from time.AfterFunc (Nick Craig-Wood)
+ * sync
+ * `--fix-case` flag to rename case insensitive dest (nielash)
+ * Use operations.DirMove instead of sync.MoveDir for `--fix-case` (nielash)
+ * systemd: Fix detection and switch to the coreos package everywhere rather than having 2 separate libraries (Anagh Kumar Baranwal)
+* Mount
+ * Fix macOS not noticing errors with `--daemon` (Nick Craig-Wood)
+ * Notice daemon dying much quicker (Nick Craig-Wood)
+* VFS
+ * Fix unicode normalization on macOS (nielash)
+* Bisync
+ * Copies and deletes are now handled in one operation instead of two (nielash)
+ * `--track-renames` and `--backup-dir` are now supported (nielash)
+ * Final listings are now generated from sync results, to avoid needing to re-list (nielash)
+ * Bisync is now much more resilient to changes that happen during a bisync run, and far less prone to critical errors / undetected changes (nielash)
+ * Bisync is now capable of rolling a file listing back in cases of uncertainty, essentially marking the file as needing to be rechecked next time. (nielash)
+ * A few basic terminal colors are now supported, controllable with [`--color`](https://rclone.org/docs/#color-when) (`AUTO`|`NEVER`|`ALWAYS`) (nielash)
+ * Initial listing snapshots of Path1 and Path2 are now generated concurrently, using the same "march" infrastructure as `check` and `sync`, for performance improvements and less risk of error. (nielash)
+ * `--resync` is now much more efficient (especially for users of `--create-empty-src-dirs`) (nielash)
+ * Google Docs (and other files of unknown size) are now supported (with the same options as in `sync`) (nielash)
+ * Equality checks before a sync conflict rename now fall back to `cryptcheck` (when possible) or `--download`, (nielash)
+instead of of `--size-only`, when `check` is not available.
+ * Bisync now fully supports comparing based on any combination of size, modtime, and checksum, lifting the prior restriction on backends without modtime support. (nielash)
+ * Bisync now supports a "Graceful Shutdown" mode to cleanly cancel a run early without requiring `--resync`. (nielash)
+ * New `--recover` flag allows robust recovery in the event of interruptions, without requiring `--resync`. (nielash)
+ * A new `--max-lock` setting allows lock files to automatically renew and expire, for better automatic recovery when a run is interrupted. (nielash)
+ * Bisync now supports auto-resolving sync conflicts and customizing rename behavior with new [`--conflict-resolve`](#conflict-resolve), [`--conflict-loser`](#conflict-loser), and [`--conflict-suffix`](#conflict-suffix) flags. (nielash)
+ * A new [`--resync-mode`](#resync-mode) flag allows more control over which version of a file gets kept during a `--resync`. (nielash)
+ * Bisync now supports [`--retries`](https://rclone.org/docs/#retries-int) and [`--retries-sleep`](/docs/#retries-sleep-time) (when [`--resilient`](#resilient) is set.) (nielash)
+ * Clarify file operation directions in dry-run logs (Kyle Reynolds)
+* Local
+ * Fix cleanRootPath on Windows after go1.21.4 stdlib update (nielash)
+ * Implement setting modification time on directories (nielash)
+ * Implement modtime and metadata for directories (Nick Craig-Wood)
+ * Fix setting of btime on directories on Windows (Nick Craig-Wood)
+ * Delete backend implementation of Purge to speed up and make stats (Nick Craig-Wood)
+ * Support metadata setting and mapping on server side Move (Nick Craig-Wood)
+* Cache
+ * Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+ * Implement setting metadata on directories (Nick Craig-Wood)
+* Crypt
+ * Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+ * Implement setting metadata on directories (Nick Craig-Wood)
+ * Improve handling of undecryptable file names (nielash)
+ * Add missing error check spotted by linter (Nick Craig-Wood)
+* Azure Blob
+ * Implement `--azureblob-delete-snapshots` (Nick Craig-Wood)
+* B2
+ * Clarify exactly what `--b2-download-auth-duration` does in the docs (Nick Craig-Wood)
+* Chunker
+ * Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+ * Implement setting metadata on directories (Nick Craig-Wood)
+* Combine
+ * Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+ * Implement setting metadata on directories (Nick Craig-Wood)
+ * Fix directory metadata error on upstream root (nielash)
+ * Fix directory move across upstreams (nielash)
+* Compress
+ * Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+ * Implement setting metadata on directories (Nick Craig-Wood)
+* Drive
+ * Implement setting modification time on directories (nielash)
+ * Implement modtime and metadata setting for directories (Nick Craig-Wood)
+ * Support metadata setting and mapping on server side Move,Copy (Nick Craig-Wood)
+* FTP
+ * Fix mkdir with rsftp which is returning the wrong code (Nick Craig-Wood)
+* Hasher
+ * Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+ * Implement setting metadata on directories (Nick Craig-Wood)
+ * Fix error from trying to stop an already-stopped db (nielash)
+ * Look for cached hash if passed hash unexpectedly blank (nielash)
+* Imagekit
+ * Updated docs and web content (Harshit Budhraja)
+ * Updated overview - supported operations (Harshit Budhraja)
+* Mega
+ * Fix panic with go1.22 (Nick Craig-Wood)
+* Netstorage
+ * Fix Root to return correct directory when pointing to a file (Nick Craig-Wood)
+* Onedrive
+ * Add metadata support (nielash)
+* Opendrive
+ * Fix moving file/folder within the same parent dir (nielash)
+* Oracle Object Storage
+ * Support `backend restore` command (Nikhil Ahuja)
+ * Support workload identity authentication for OKE (Anders Swanson)
+* Protondrive
+ * Fix encoding of Root method (Nick Craig-Wood)
+* Quatrix
+ * Fix `Content-Range` header (Volodymyr)
+ * Add option to skip project folders (Oksana Zhykina)
+ * Fix Root to return correct directory when pointing to a file (Nick Craig-Wood)
+* S3
+ * Add `--s3-version-deleted` to show delete markers in listings when using versions. (Nick Craig-Wood)
+ * Add IPv6 support with option `--s3-use-dual-stack` (Anthony Metzidis)
+ * Copy parts in parallel when doing chunked server side copy (Nick Craig-Wood)
+ * GCS provider: fix server side copy of files bigger than 5G (Nick Craig-Wood)
+ * Support metadata setting and mapping on server side Copy (Nick Craig-Wood)
+* Seafile
+ * Fix download/upload error when `FILE_SERVER_ROOT` is relative (DanielEgbers)
+ * Fix Root to return correct directory when pointing to a file (Nick Craig-Wood)
+* SFTP
+ * Implement setting modification time on directories (nielash)
+ * Set directory modtimes update on write flag (Nick Craig-Wood)
+ * Shorten wait delay for external ssh binaries now that we are using go1.20 (Nick Craig-Wood)
+* Swift
+ * Avoid unnecessary container versioning check (Joe Cai)
+* Union
+ * Implement setting modification time on directories (if supported by wrapped remote) (nielash)
+ * Implement setting metadata on directories (Nick Craig-Wood)
+* WebDAV
+ * Reduce priority of chunks upload log (Gabriel Ramos)
+ * owncloud: Add config `owncloud_exclude_shares` which allows to exclude shared files and folders when listing remote resources (Thomas Müller)
+
+## v1.65.2 - 2024-01-24
+
+[See commits](https://github.com/rclone/rclone/compare/v1.65.1...v1.65.2)
+
+* Bug Fixes
+ * build: bump github.com/cloudflare/circl from 1.3.6 to 1.3.7 (dependabot)
+ * docs updates (Nick Craig-Wood, kapitainsky, nielash, Tera, Harshit Budhraja)
+* VFS
+ * Fix stale data when using `--vfs-cache-mode` full (Nick Craig-Wood)
+* Azure Blob
+ * **IMPORTANT** Fix data corruption bug - see [#7590](https://github.com/rclone/rclone/issues/7590) (Nick Craig-Wood)
+
+## v1.65.1 - 2024-01-08
+
+[See commits](https://github.com/rclone/rclone/compare/v1.65.0...v1.65.1)
+
+* Bug Fixes
+ * build
+ * Bump golang.org/x/crypto to fix ssh terrapin CVE-2023-48795 (dependabot)
+ * Update to go1.21.5 to fix Windows path problems (Nick Craig-Wood)
+ * Fix docker build on arm/v6 (Nick Craig-Wood)
+ * install.sh: fix harmless error message on install (Nick Craig-Wood)
+ * accounting: fix stats to show server side transfers (Nick Craig-Wood)
+ * doc fixes (albertony, ben-ba, Eli Orzitzer, emyarod, keongalvin, rarspace01)
+ * nfsmount: Compile for all unix oses, add `--sudo` and fix error/option handling (Nick Craig-Wood)
+ * operations: Fix files moved by rclone move not being counted as transfers (Nick Craig-Wood)
+ * oauthutil: Avoid panic when `*token` and `*ts.token` are the same (rkonfj)
+ * serve s3: Fix listing oddities (Nick Craig-Wood)
+* VFS
+ * Note that `--vfs-refresh` runs in the background (Nick Craig-Wood)
+* Azurefiles
+ * Fix storage base url (Oksana)
+* Crypt
+ * Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+* Chunker
+ * Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+* Compress
+ * Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+* Dropbox
+ * Fix used space on dropbox team accounts (Nick Craig-Wood)
+* FTP
+ * Fix multi-thread copy (WeidiDeng)
+* Googlephotos
+ * Fix nil pointer exception when batch failed (Nick Craig-Wood)
+* Hasher
+ * Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+ * Fix invalid memory address error when MaxAge == 0 (nielash)
+* Onedrive
+ * Fix error listing: unknown object type `` (Nick Craig-Wood)
+ * Fix "unauthenticated: Unauthenticated" errors when uploading (Nick Craig-Wood)
+* Oracleobjectstorage
+ * Fix object storage endpoint for custom endpoints (Manoj Ghosh)
+ * Multipart copy create bucket if it doesn't exist. (Manoj Ghosh)
+* Protondrive
+ * Fix CVE-2023-45286 / GHSA-xwh9-gc39-5298 (Nick Craig-Wood)
+* S3
+ * Fix crash if no UploadId in multipart upload (Nick Craig-Wood)
+* Smb
+ * Fix shares not listed by updating go-smb2 (halms)
+* Union
+ * Fix rclone move a file over itself deleting the file (Nick Craig-Wood)
+
## v1.65.0 - 2023-11-26
[See commits](https://github.com/rclone/rclone/compare/v1.64.0...v1.65.0)
@@ -54432,10 +58360,13 @@ Point release to fix hubic and azureblob backends.
## Limitations
-### Directory timestamps aren't preserved
+### Directory timestamps aren't preserved on some backends
-Rclone doesn't currently preserve the timestamps of directories. This
-is because rclone only really considers objects when syncing.
+As of `v1.66`, rclone supports syncing directory modtimes, if the backend
+supports it. Some backends do not support it -- see
+[overview](https://rclone.org/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
@@ -54534,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.
@@ -54799,7 +58730,7 @@ put them back in again.` >}}
* Scott McGillivray
* Bjørn Erik Pedersen
* Lukas Loesche
- * emyarod
+ * emyarod
* T.C. Ferguson
* Brandur
* Dario Giovannetti
@@ -55128,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
@@ -55547,6 +59478,66 @@ put them back in again.` >}}
* Alen Šiljak
* 你知道未来吗
* Abhinav Dhiman <8640877+ahnv@users.noreply.github.com>
+ * halms <7513146+halms@users.noreply.github.com>
+ * ben-ba
+ * Eli Orzitzer
+ * Anthony Metzidis
+ * emyarod
+ * keongalvin
+ * rarspace01
+ * Paul Stern
+ * Nikhil Ahuja
+ * Harshit Budhraja <52413945+harshit-budhraja@users.noreply.github.com>
+ * Tera <24725862+teraa@users.noreply.github.com>
+ * Kyle Reynolds
+ * Michael Eischer
+ * Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
+ * DanielEgbers <27849724+DanielEgbers@users.noreply.github.com>
+ * Jack Provance <49460795+njprov@users.noreply.github.com>
+ * Gabriel Ramos <109390599+gabrielramos02@users.noreply.github.com>
+ * Dan McArdle
+ * 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 11a38590b..a401417af 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1,6 +1,6 @@
rclone(1) User Manual
Nick Craig-Wood
-Nov 26, 2023
+Jun 14, 2024
Rclone syncs your files to cloud storage
@@ -79,6 +79,7 @@ Features
- Can use multi-threaded downloads to local disk
- Copy new or changed files to cloud storage
- Sync (one way) to make a directory identical
+- Bisync (two way) to keep two directories in sync bidirectionally
- Move files to cloud storage deleting the local after verification
- Check hashes and for missing/extra files
- Mount your cloud storage as a network disk
@@ -93,7 +94,6 @@ S3, that work out of the box.)
- 1Fichier
- Akamai Netstorage
- Alibaba Cloud (Aliyun) Object Storage System (OSS)
-- Amazon Drive
- Amazon S3
- Backblaze B2
- Box
@@ -116,6 +116,7 @@ S3, that work out of the box.)
- Hetzner Storage Box
- HiDrive
- HTTP
+- ImageKit
- Internet Archive
- Jottacloud
- IBM COS S3
@@ -126,6 +127,7 @@ S3, that work out of the box.)
- Liara Object Storage
- Linkbox
- Linode Object Storage
+- Magalu
- Mail.ru Cloud
- Memset Memstore
- Mega
@@ -165,6 +167,7 @@ S3, that work out of the box.)
- Synology
- SugarSync
- Tencent Cloud Object Storage (COS)
+- Uloz.to
- Uptobox
- Wasabi
- WebDAV
@@ -268,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:
@@ -820,7 +823,6 @@ See the following for detailed instructions for
- 1Fichier
- Akamai Netstorage
- Alias
-- Amazon Drive
- Amazon S3
- Backblaze B2
- Box
@@ -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.
@@ -998,6 +1017,14 @@ recently very efficiently like this:
rclone copy --max-age 24h --no-traverse /path/to/src remote:
+Rclone will sync the modification times of files and directories if the
+backend supports it. If metadata syncing is required then use the
+--metadata flag.
+
+Note that the modification time and metadata for the root directory will
+not be synced. See https://github.com/rclone/rclone/issues/7652 for more
+info.
+
Note: Use the -P/--progress flag to view real-time transfer statistics.
Note: Use the --dry-run or the --interactive/-i flag to test without
@@ -1023,7 +1050,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -1037,6 +1064,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -1129,18 +1157,85 @@ the destination from the sync with a filter rule or by putting an
exclude-if-present file inside the destination directory and sync to a
destination that is inside the source directory.
+Rclone will sync the modification times of files and directories if the
+backend supports it. If metadata syncing is required then use the
+--metadata flag.
+
+Note that the modification time and metadata for the root directory will
+not be synced. See https://github.com/rclone/rclone/issues/7652 for more
+info.
+
Note: Use the -P/--progress flag to view real-time transfer statistics
Note: Use the rclone dedupe command to deal with "Duplicate
object/directory found in source/destination - ignoring" errors. See
this forum post for more info.
+Logger Flags
+
+The --differ, --missing-on-dst, --missing-on-src, --match and --error
+flags write paths, one per line, to the file name (or stdout if it is -)
+supplied. What they write is described in the help below. For example
+--differ will write all paths which are present on both the source and
+destination but different.
+
+The --combined flag will write a file (or stdout) which contains all
+file paths with a symbol and then a space and then the path to tell you
+what happened to it. These are reminiscent of diff files.
+
+- = path means path was found in source and destination and was
+ identical
+- `- path` means path was missing on the source, so only in the
+ destination
+- `+ path` means path was missing on the destination, so only in the
+ source
+- `* path` means path was present in source and destination but
+ different.
+- ! path means there was an error reading or hashing the source or
+ dest.
+
+The --dest-after flag writes a list file using the same format flags as
+lsf (including customizable options for hash, modtime, etc.)
+Conceptually it is similar to rsync's --itemize-changes, but not
+identical -- it should output an accurate list of what will be on the
+destination after the sync.
+
+Note that these logger flags have a few limitations, and certain
+scenarios are not currently supported:
+
+- --max-duration / CutoffModeHard
+- --compare-dest / --copy-dest
+- server-side moves of an entire dir at once
+- High-level retries, because there would be duplicates (use
+ --retries 1 to disable)
+- Possibly some unusual error scenarios
+
+Note also that each file is logged during the sync, as opposed to after,
+so it is most useful as a predictor of what SHOULD happen to each file
+(which may or may not match what actually DID.)
+
rclone sync source:path dest:path [flags]
Options
+ --absolute Put a leading / in front of path names
+ --combined string Make a combined report of changes to this file
--create-empty-src-dirs Create empty source dirs on destination after sync
+ --csv Output in CSV format
+ --dest-after string Report all files that exist on the dest post-sync
+ --differ string Report all non-matching files to this file
+ -d, --dir-slash Append a slash to directory names (default true)
+ --dirs-only Only list directories
+ --error string Report all files with errors (hashing or reading) to this file
+ --files-only Only list files (default true)
+ -F, --format string Output format - see lsf help for details (default "p")
+ --hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "md5")
-h, --help help for sync
+ --match string Report all matching files to this file
+ --missing-on-dst string Report all files missing from the destination to this file
+ --missing-on-src string Report all files missing from the source to this file
+ -s, --separator string Separator for the items in the format (default ";")
+ -t, --timeformat string Specify a custom time format, or 'max' for max precision supported by remote (default: 2006-01-02 15:04:05)
Copy Options
@@ -1155,7 +1250,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -1169,6 +1264,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -1186,6 +1282,7 @@ Flags just used for rclone sync.
--delete-after When synchronizing, delete files on destination after transferring (default)
--delete-before When synchronizing, delete files on destination before transferring
--delete-during When synchronizing, delete files during transfer
+ --fix-case Force rename of case insensitive dest to match source
--ignore-errors Delete even if there are I/O errors
--max-delete int When synchronizing, limit the number of deletes (default -1)
--max-delete-size SizeSuffix When synchronizing, limit the total size of deletes (default off)
@@ -1269,6 +1366,14 @@ See the --no-traverse option for controlling whether rclone lists the
destination directory or not. Supplying this option when moving a small
number of files into a large destination can speed transfers up greatly.
+Rclone will sync the modification times of files and directories if the
+backend supports it. If metadata syncing is required then use the
+--metadata flag.
+
+Note that the modification time and metadata for the root directory will
+not be synced. See https://github.com/rclone/rclone/issues/7652 for more
+info.
+
Important: Since this can cause data loss, test first with the --dry-run
or the --interactive/-i flag.
@@ -1295,7 +1400,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -1309,6 +1414,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -2537,26 +2643,42 @@ each successive run it will: - list files on Path1 and Path2, and check
for changes on each side. Changes include New, Newer, Older, and Deleted
files. - Propagate changes on Path1 to Path2, and vice-versa.
+Bisync is in beta and is considered an advanced command, so use with
+care. Make sure you have read and understood the entire manual
+(especially the Limitations section) before using, or data loss can
+result. Questions can be asked in the Rclone Forum.
+
See full bisync description for details.
rclone bisync remote1:path1 remote2:path2 [flags]
Options
- --check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
- --check-filename string Filename for --check-access (default: RCLONE_TEST)
- --check-sync string Controls comparison of final listings: true|false|only (default: true) (default "true")
- --create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
- --filters-file string Read filtering patterns from a file
- --force Bypass --max-delete safety check and run the sync. Consider using with --verbose
- -h, --help help for bisync
- --ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
- --localtime Use local time in listings (default: UTC)
- --no-cleanup Retain working files (useful for troubleshooting and testing).
- --remove-empty-dirs Remove ALL empty directories at the final cleanup step.
- --resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync. Use at your own risk!
- -1, --resync Performs the resync run. Path1 files may overwrite Path2 versions. Consider using --verbose or --dry-run first.
- --workdir string Use custom working dir - useful for testing. (default: $HOME/.cache/rclone/bisync)
+ --backup-dir1 string --backup-dir for Path1. Must be a non-overlapping path on the same remote.
+ --backup-dir2 string --backup-dir for Path2. Must be a non-overlapping path on the same remote.
+ --check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
+ --check-filename string Filename for --check-access (default: RCLONE_TEST)
+ --check-sync string Controls comparison of final listings: true|false|only (default: true) (default "true")
+ --compare string Comma-separated list of bisync-specific compare options ex. 'size,modtime,checksum' (default: 'size,modtime')
+ --conflict-loser ConflictLoserAction Action to take on the loser of a sync conflict (when there is a winner) or on both files (when there is no winner): , num, pathname, delete (default: num)
+ --conflict-resolve string Automatically resolve conflicts by preferring the version that is: none, path1, path2, newer, older, larger, smaller (default: none) (default "none")
+ --conflict-suffix string Suffix to use when renaming a --conflict-loser. Can be either one string or two comma-separated strings to assign different suffixes to Path1/Path2. (default: 'conflict')
+ --create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
+ --download-hash Compute hash by downloading when otherwise unavailable. (warning: may be slow and use lots of data!)
+ --filters-file string Read filtering patterns from a file
+ --force Bypass --max-delete safety check and run the sync. Consider using with --verbose
+ -h, --help help for bisync
+ --ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
+ --max-lock Duration Consider lock files older than this to be expired (default: 0 (never expire)) (minimum: 2m) (default 0s)
+ --no-cleanup Retain working files (useful for troubleshooting and testing).
+ --no-slow-hash Ignore listing checksums only on backends where they are slow
+ --recover Automatically recover from interruptions without requiring --resync.
+ --remove-empty-dirs Remove ALL empty directories at the final cleanup step.
+ --resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync. Use at your own risk!
+ -1, --resync Performs the resync run. Equivalent to --resync-mode path1. Consider using --verbose or --dry-run first.
+ --resync-mode string During resync, prefer the version that is: path1, path2, newer, older, larger, smaller (default: path1 if --resync, otherwise none for no resync.) (default "none")
+ --slow-hash-sync-only Ignore slow checksums for listings and deltas, but still consider them during sync calls.
+ --workdir string Use custom working dir - useful for testing. (default: {WORKDIR})
Copy Options
@@ -2571,7 +2693,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -2585,6 +2707,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -2859,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
@@ -3550,7 +3685,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -3564,6 +3699,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -3623,7 +3759,7 @@ SEE ALSO
rclone copyurl
-Copy url content to dest.
+Copy the contents of the URL supplied content to dest:path.
Synopsis
@@ -3632,10 +3768,11 @@ it in temporary storage.
Setting --auto-filename will attempt to automatically determine the
filename from the URL (after any redirections) and used in the
-destination path. With --auto-filename-header in addition, if a specific
-filename is set in HTTP headers, it will be used instead of the name
-from the URL. With --print-filename in addition, the resulting file name
-will be printed.
+destination path.
+
+With --auto-filename-header in addition, if a specific filename is set
+in HTTP headers, it will be used instead of the name from the URL. With
+--print-filename in addition, the resulting file name will be printed.
Setting --no-clobber will prevent overwriting file on the destination if
there is one with the same name.
@@ -3643,6 +3780,19 @@ there is one with the same name.
Setting --stdout or making the output file name - will cause the output
to be written to standard output.
+Troublshooting
+
+If you can't get rclone copyurl to work then here are some things you
+can try:
+
+- --disable-http2 rclone will use HTTP2 if available - try disabling
+ it
+- --bind 0.0.0.0 rclone will use IPv6 if available - try disabling it
+- --bind ::0 to disable IPv4
+- --user agent curl - some sites have whitelists for curl's
+ user-agent - try that
+- Make sure the site works with curl directly
+
rclone copyurl https://example.com dest:path [flags]
Options
@@ -3998,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.
@@ -4139,14 +4362,15 @@ Synopsis
rclone listremotes lists all the available remotes from the config file.
-When used with the --long flag it lists the types too.
+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 as well as names
+ --long Show the type and the description as well as names
See the global flags page for global options not listed here.
@@ -4253,6 +4477,20 @@ those only (without traversing the whole directory structure):
rclone lsf --absolute --files-only --max-age 1d /path/to/local > new_files
rclone copy --files-from-raw new_files /path/to/local remote:path
+The default time format is '2006-01-02 15:04:05'. Other formats can be
+specified with the --time-format flag. Examples:
+
+ rclone lsf remote:path --format pt --time-format 'Jan 2, 2006 at 3:04pm (MST)'
+ rclone lsf remote:path --format pt --time-format '2006-01-02 15:04:05.000000000'
+ rclone lsf remote:path --format pt --time-format '2006-01-02T15:04:05.999999999Z07:00'
+ rclone lsf remote:path --format pt --time-format RFC3339
+ rclone lsf remote:path --format pt --time-format DateOnly
+ rclone lsf remote:path --format pt --time-format max
+
+--time-format max will automatically truncate
+'2006-01-02 15:04:05.000000000' to the maximum precision supported by
+the remote.
+
Any of the filtering options can be applied to this command.
There are several related list commands
@@ -4280,16 +4518,17 @@ bucket-based remotes).
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)
- --dirs-only Only list directories
- --files-only Only list files
- -F, --format string Output format - see help for details (default "p")
- --hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "md5")
- -h, --help help for lsf
- -R, --recursive Recurse into the listing
- -s, --separator string Separator for the items in the format (default ";")
+ --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)
+ --dirs-only Only list directories
+ --files-only Only list files
+ -F, --format string Output format - see help for details (default "p")
+ --hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default "md5")
+ -h, --help help for lsf
+ -R, --recursive Recurse into the listing
+ -s, --separator string Separator for the items in the format (default ";")
+ -t, --time-format string Specify a custom time format, or 'max' for max precision supported by remote (default: 2006-01-02 15:04:05)
Filter Options
@@ -4361,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.
@@ -4373,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
@@ -4496,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
@@ -4759,6 +4998,12 @@ Mounting on macOS can be done either via built-in NFS server, macFUSE
utilizing a macOS kernel extension (kext). FUSE-T is an alternative FUSE
system which "mounts" via an NFSv4 local server.
+Unicode Normalization
+
+It is highly recommended to keep the default of
+--no-unicode-normalization=false for all mount and serve commands on
+macOS. For details, see vfs-case-sensitivity.
+
NFS mount
This method spins up an NFS server using serve nfs command and mounts it
@@ -4766,6 +5011,12 @@ to the specified mountpoint. If you run this in background mode using
|--daemon|, you will need to send SIGTERM signal to the rclone process
using |kill| command to stop the mount.
+Note that --nfs-cache-handle-limit controls the maximum number of cached
+file handles stored by the nfsmount caching handler. This should not be
+set too low or you may experience errors when trying to access files.
+The default is 1000000, but consider lowering this limit if the server's
+system resource usage causes problems.
+
macFUSE Notes
If installing macFUSE using dmg packages from the website, rclone will
@@ -4794,14 +5045,6 @@ This means that viewing files with various tools, notably macOS Finder,
will cause rlcone to update the modification time of the file. This may
make rclone upload a full new copy of the file.
-Unicode Normalization
-
-Rclone includes flags for unicode normalization with macFUSE that should
-be updated for FUSE-T. See this forum post and FUSE-T issue #16. The
-following flag should be added to the rclone mount command.
-
- -o modules=iconv,from_code=UTF-8,to_code=UTF-8
-
Read Only mounts
When mounting with --read-only, attempts to write to files will fail
@@ -4954,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
@@ -5264,6 +5508,28 @@ depends on the operating system where rclone runs: "true" on Windows and
macOS, "false" otherwise. If the flag is provided without a value, then
it is "true".
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
VFS Disk Options
This flag allows you to manually set the statistics about the filing
@@ -5303,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)
@@ -5320,6 +5587,7 @@ Options
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -5332,7 +5600,7 @@ Options
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -5428,7 +5696,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -5442,6 +5710,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -5535,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
@@ -5608,6 +5878,920 @@ 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.
+
+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).
+
+On Linux/macOS/FreeBSD start the mount like this, where
+/path/to/local/mount is an empty existing directory:
+
+ rclone nfsmount remote:path/to/files /path/to/local/mount
+
+On Windows you can start a mount in different ways. See below for
+details. If foreground mount is used interactively from a console
+window, rclone will serve the mount and occupy the console so another
+window should be used to work with the mount until rclone is interrupted
+e.g. by pressing Ctrl-C.
+
+The following examples will mount to an automatically assigned drive, to
+specific drive letter X:, to path C:\path\parent\mount (where parent
+directory or drive must exist, and mount must not exist, and is not
+supported when mounting as a network drive), and the last example will
+mount as network share \\cloud\remote and map it to an automatically
+assigned drive:
+
+ rclone nfsmount remote:path/to/files *
+ rclone nfsmount remote:path/to/files X:
+ rclone nfsmount remote:path/to/files C:\path\parent\mount
+ rclone nfsmount remote:path/to/files \\cloud\remote
+
+When the program ends while in foreground mode, either via Ctrl+C or
+receiving a SIGINT or SIGTERM signal, the mount should be automatically
+stopped.
+
+When running in background mode the user will have to stop the mount
+manually:
+
+ # Linux
+ fusermount -u /path/to/local/mount
+ # OS X
+ umount /path/to/local/mount
+
+The umount operation can fail, for example when the mountpoint is busy.
+When that happens, it is the user's responsibility to stop the mount
+manually.
+
+The size of the mounted file system will be set according to information
+retrieved from the remote, the same as returned by the rclone about
+command. Remotes with unlimited storage may report the used size only,
+then an additional 1 PiB of free space is assumed. If the remote does
+not support the about feature at all, then 1 PiB is set as both the
+total and the free size.
+
+Installing on Windows
+
+To run rclone nfsmount on Windows, you will need to download and install
+WinFsp.
+
+WinFsp is an open-source Windows File System Proxy which makes it easy
+to write user space file systems for Windows. It provides a FUSE
+emulation layer which rclone uses combination with cgofuse. Both of
+these packages are by Bill Zissimopoulos who was very helpful during the
+implementation of rclone nfsmount for Windows.
+
+Mounting modes on windows
+
+Unlike other operating systems, Microsoft Windows provides a different
+filesystem type for network and fixed drives. It optimises access on the
+assumption fixed disk drives are fast and reliable, while network drives
+have relatively high latency and less reliability. Some settings can
+also be differentiated between the two types, for example that Windows
+Explorer should just display icons and not create preview thumbnails for
+image and video files on network drives.
+
+In most cases, rclone will mount the remote as a normal, fixed disk
+drive by default. However, you can also choose to mount it as a remote
+network drive, often described as a network share. If you mount an
+rclone remote using the default, fixed drive mode and experience
+unexpected program errors, freezes or other issues, consider mounting as
+a network drive instead.
+
+When mounting as a fixed disk drive you can either mount to an unused
+drive letter, or to a path representing a nonexistent subdirectory of an
+existing parent directory or drive. Using the special value * will tell
+rclone to automatically assign the next available drive letter, starting
+with Z: and moving backward. Examples:
+
+ rclone nfsmount remote:path/to/files *
+ rclone nfsmount remote:path/to/files X:
+ rclone nfsmount remote:path/to/files C:\path\parent\mount
+ rclone nfsmount remote:path/to/files X:
+
+Option --volname can be used to set a custom volume name for the mounted
+file system. The default is to use the remote name and path.
+
+To mount as network drive, you can add option --network-mode to your
+nfsmount command. Mounting to a directory path is not supported in this
+mode, it is a limitation Windows imposes on junctions, so the remote
+must always be mounted to a drive letter.
+
+ rclone nfsmount remote:path/to/files X: --network-mode
+
+A volume name specified with --volname will be used to create the
+network share path. A complete UNC path, such as \\cloud\remote,
+optionally with path \\cloud\remote\madeup\path, will be used as is. Any
+other string will be used as the share part, after a default prefix
+\\server\. If no volume name is specified then \\server\share will be
+used. You must make sure the volume name is unique when you are mounting
+more than one drive, or else the mount command will fail. The share name
+will treated as the volume label for the mapped drive, shown in Windows
+Explorer etc, while the complete \\server\share will be reported as the
+remote UNC path by net use etc, just like a normal network drive
+mapping.
+
+If you specify a full network share UNC path with --volname, this will
+implicitly set the --network-mode option, so the following two examples
+have same result:
+
+ rclone nfsmount remote:path/to/files X: --network-mode
+ rclone nfsmount remote:path/to/files X: --volname \\server\share
+
+You may also specify the network share UNC path as the mountpoint
+itself. Then rclone will automatically assign a drive letter, same as
+with * and use that as mountpoint, and instead use the UNC path
+specified as the volume name, as if it were specified with the --volname
+option. This will also implicitly set the --network-mode option. This
+means the following two examples have same result:
+
+ rclone nfsmount remote:path/to/files \\cloud\remote
+ rclone nfsmount remote:path/to/files * --volname \\cloud\remote
+
+There is yet another way to enable network mode, and to set the share
+path, and that is to pass the "native" libfuse/WinFsp option directly:
+--fuse-flag --VolumePrefix=\server\share. Note that the path must be
+with just a single backslash prefix in this case.
+
+Note: In previous versions of rclone this was the only supported method.
+
+Read more about drive mapping
+
+See also Limitations section below.
+
+Windows filesystem permissions
+
+The FUSE emulation layer on Windows must convert between the POSIX-based
+permission model used in FUSE, and the permission model used in Windows,
+based on access-control lists (ACL).
+
+The mounted filesystem will normally get three entries in its
+access-control list (ACL), representing permissions for the POSIX
+permission scopes: Owner, group and others. By default, the owner and
+group will be taken from the current user, and the built-in group
+"Everyone" will be used to represent others. The user/group can be
+customized with FUSE options "UserName" and "GroupName", e.g.
+-o UserName=user123 -o GroupName="Authenticated Users". The permissions
+on each entry will be set according to options --dir-perms and
+--file-perms, which takes a value in traditional Unix numeric notation.
+
+The default permissions corresponds to
+--file-perms 0666 --dir-perms 0777, i.e. read and write permissions to
+everyone. This means you will not be able to start any programs from the
+mount. To be able to do that you must add execute permissions, e.g.
+--file-perms 0777 --dir-perms 0777 to add it to everyone. If the program
+needs to write files, chances are you will have to enable VFS File
+Caching as well (see also limitations). Note that the default write
+permission have some restrictions for accounts other than the owner,
+specifically it lacks the "write extended attributes", as explained
+next.
+
+The mapping of permissions is not always trivial, and the result you see
+in Windows Explorer may not be exactly like you expected. For example,
+when setting a value that includes write access for the group or others
+scope, this will be mapped to individual permissions "write attributes",
+"write data" and "append data", but not "write extended attributes".
+Windows will then show this as basic permission "Special" instead of
+"Write", because "Write" also covers the "write extended attributes"
+permission. When setting digit 0 for group or others, to indicate no
+permissions, they will still get individual permissions "read
+attributes", "read extended attributes" and "read permissions". This is
+done for compatibility reasons, e.g. to allow users without additional
+permissions to be able to read basic metadata about files like in Unix.
+
+WinFsp 2021 (version 1.9) introduced a new FUSE option "FileSecurity",
+that allows the complete specification of file security descriptors
+using SDDL. With this you get detailed control of the resulting
+permissions, compared to use of the POSIX permissions described above,
+and no additional permissions will be added automatically for
+compatibility with Unix. Some example use cases will following.
+
+If you set POSIX permissions for only allowing access to the owner,
+using --file-perms 0600 --dir-perms 0700, the user group and the
+built-in "Everyone" group will still be given some special permissions,
+as described above. Some programs may then (incorrectly) interpret this
+as the file being accessible by everyone, for example an SSH client may
+warn about "unprotected private key file". You can work around this by
+specifying -o FileSecurity="D:P(A;;FA;;;OW)", which sets file all access
+(FA) to the owner (OW), and nothing else.
+
+When setting write permissions then, except for the owner, this does not
+include the "write extended attributes" permission, as mentioned above.
+This may prevent applications from writing to files, giving permission
+denied error instead. To set working write permissions for the built-in
+"Everyone" group, similar to what it gets by default but with the
+addition of the "write extended attributes", you can specify
+-o FileSecurity="D:P(A;;FRFW;;;WD)", which sets file read (FR) and file
+write (FW) to everyone (WD). If file execute (FX) is also needed, then
+change to -o FileSecurity="D:P(A;;FRFWFX;;;WD)", or set file all access
+(FA) to get full access permissions, including delete, with
+-o FileSecurity="D:P(A;;FA;;;WD)".
+
+Windows caveats
+
+Drives created as Administrator are not visible to other accounts, not
+even an account that was elevated to Administrator with the User Account
+Control (UAC) feature. A result of this is that if you mount to a drive
+letter from a Command Prompt run as Administrator, and then try to
+access the same drive from Windows Explorer (which does not run as
+Administrator), you will not be able to see the mounted drive.
+
+If you don't need to access the drive from applications running with
+administrative privileges, the easiest way around this is to always
+create the mount from a non-elevated command prompt.
+
+To make mapped drives available to the user account that created them
+regardless if elevated or not, there is a special Windows setting called
+linked connections that can be enabled.
+
+It is also possible to make a drive mount available to everyone on the
+system, by running the process creating it as the built-in SYSTEM
+account. There are several ways to do this: One is to use the
+command-line utility PsExec, from Microsoft's Sysinternals suite, which
+has option -s to start processes as the SYSTEM account. Another
+alternative is to run the mount command from a Windows Scheduled Task,
+or a Windows Service, configured to run as the SYSTEM account. A third
+alternative is to use the WinFsp.Launcher infrastructure). Read more in
+the install documentation. Note that when running rclone as another
+user, it will not use the configuration file from your profile unless
+you tell it to with the --config option. Note also that it is now the
+SYSTEM account that will have the owner permissions, and other accounts
+will have permissions according to the group or others scopes. As
+mentioned above, these will then not get the "write extended attributes"
+permission, and this may prevent writing to files. You can work around
+this with the FileSecurity option, see example above.
+
+Note that mapping to a directory path, instead of a drive letter, does
+not suffer from the same limitations.
+
+Mounting on macOS
+
+Mounting on macOS can be done either via built-in NFS server, macFUSE
+(also known as osxfuse) or FUSE-T. macFUSE is a traditional FUSE driver
+utilizing a macOS kernel extension (kext). FUSE-T is an alternative FUSE
+system which "mounts" via an NFSv4 local server.
+
+Unicode Normalization
+
+It is highly recommended to keep the default of
+--no-unicode-normalization=false for all mount and serve commands on
+macOS. For details, see vfs-case-sensitivity.
+
+NFS mount
+
+This method spins up an NFS server using serve nfs command and mounts it
+to the specified mountpoint. If you run this in background mode using
+|--daemon|, you will need to send SIGTERM signal to the rclone process
+using |kill| command to stop the mount.
+
+Note that --nfs-cache-handle-limit controls the maximum number of cached
+file handles stored by the nfsmount caching handler. This should not be
+set too low or you may experience errors when trying to access files.
+The default is 1000000, but consider lowering this limit if the server's
+system resource usage causes problems.
+
+macFUSE Notes
+
+If installing macFUSE using dmg packages from the website, rclone will
+locate the macFUSE libraries without any further intervention. If
+however, macFUSE is installed using the macports package manager, the
+following addition steps are required.
+
+ sudo mkdir /usr/local/lib
+ cd /usr/local/lib
+ sudo ln -s /opt/local/lib/libfuse.2.dylib
+
+FUSE-T Limitations, Caveats, and Notes
+
+There are some limitations, caveats, and notes about how it works. These
+are current as of FUSE-T version 1.0.14.
+
+ModTime update on read
+
+As per the FUSE-T wiki:
+
+ File access and modification times cannot be set separately as it
+ seems to be an issue with the NFS client which always modifies both.
+ Can be reproduced with 'touch -m' and 'touch -a' commands
+
+This means that viewing files with various tools, notably macOS Finder,
+will cause rlcone to update the modification time of the file. This may
+make rclone upload a full new copy of the file.
+
+Read Only mounts
+
+When mounting with --read-only, attempts to write to files will fail
+silently as opposed to with a clear warning as in macFUSE.
+
+Limitations
+
+Without the use of --vfs-cache-mode this can only write files
+sequentially, it can only seek when reading. This means that many
+applications won't work with their files on an rclone mount without
+--vfs-cache-mode writes or --vfs-cache-mode full. See the VFS File
+Caching section for more info. When using NFS mount on macOS, if you
+don't specify |--vfs-cache-mode| the mount point will be read-only.
+
+The bucket-based remotes (e.g. Swift, S3, Google Compute Storage, B2) do
+not support the concept of empty directories, so empty directories will
+have a tendency to disappear once they fall out of the directory cache.
+
+When rclone mount is invoked on Unix with --daemon flag, the main rclone
+program will wait for the background mount to become ready or until the
+timeout specified by the --daemon-wait flag. On Linux it can check mount
+status using ProcFS so the flag in fact sets maximum time to wait, while
+the real wait can be less. On macOS / BSD the time to wait is constant
+and the check is performed only at the end. We advise you to set wait
+time on macOS reasonably.
+
+Only supported on Linux, FreeBSD, OS X and Windows at the moment.
+
+rclone nfsmount vs rclone sync/copy
+
+File systems expect things to be 100% reliable, whereas cloud storage
+systems are a long way from 100% reliable. The rclone sync/copy commands
+cope with this with lots of retries. However rclone nfsmount can't use
+retries in the same way without making local copies of the uploads. Look
+at the VFS File Caching for solutions to make nfsmount more reliable.
+
+Attribute caching
+
+You can use the flag --attr-timeout to set the time the kernel caches
+the attributes (size, modification time, etc.) for directory entries.
+
+The default is 1s which caches files just long enough to avoid too many
+callbacks to rclone from the kernel.
+
+In theory 0s should be the correct value for filesystems which can
+change outside the control of the kernel. However this causes quite a
+few problems such as rclone using too much memory, rclone not serving
+files to samba and excessive time listing directories.
+
+The kernel can cache the info about a file for the time given by
+--attr-timeout. You may see corruption if the remote file changes length
+during this window. It will show up as either a truncated file or a file
+with garbage on the end. With --attr-timeout 1s this is very unlikely
+but not impossible. The higher you set --attr-timeout the more likely it
+is. The default setting of "1s" is the lowest setting which mitigates
+the problems above.
+
+If you set it higher (10s or 1m say) then the kernel will call back to
+rclone less often making it more efficient, however there is more chance
+of the corruption issue above.
+
+If files don't change on the remote outside of the control of rclone
+then there is no chance of corruption.
+
+This is the same as setting the attr_timeout option in mount.fuse.
+
+Filters
+
+Note that all the rclone filters can be used to select a subset of the
+files to be visible in the mount.
+
+systemd
+
+When running rclone nfsmount as a systemd service, it is possible to use
+Type=notify. In this case the service will enter the started state after
+the mountpoint has been successfully set up. Units having the rclone
+nfsmount service specified as a requirement will see all files and
+folders immediately in this mode.
+
+Note that systemd runs mount units without any environment variables
+including PATH or HOME. This means that tilde (~) expansion will not
+work and you should provide --config and --cache-dir explicitly as
+absolute paths via rclone arguments. Since mounting requires the
+fusermount program, rclone will use the fallback PATH of /bin:/usr/bin
+in this scenario. Please ensure that fusermount is present on this PATH.
+
+Rclone as Unix mount helper
+
+The core Unix program /bin/mount normally takes the -t FSTYPE argument
+then runs the /sbin/mount.FSTYPE helper program passing it mount options
+as -o key=val,... or --opt=.... Automount (classic or systemd) behaves
+in a similar way.
+
+rclone by default expects GNU-style flags --key val. To run it as a
+mount helper you should symlink rclone binary to /sbin/mount.rclone and
+optionally /usr/bin/rclonefs, e.g.
+ln -s /usr/bin/rclone /sbin/mount.rclone. rclone will detect it and
+translate command-line arguments appropriately.
+
+Now you can run classic mounts like this:
+
+ mount sftp1:subdir /mnt/data -t rclone -o vfs_cache_mode=writes,sftp_key_file=/path/to/pem
+
+or create systemd mount units:
+
+ # /etc/systemd/system/mnt-data.mount
+ [Unit]
+ Description=Mount for /mnt/data
+ [Mount]
+ Type=rclone
+ What=sftp1:subdir
+ Where=/mnt/data
+ Options=rw,_netdev,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone
+
+optionally accompanied by systemd automount unit
+
+ # /etc/systemd/system/mnt-data.automount
+ [Unit]
+ Description=AutoMount for /mnt/data
+ [Automount]
+ Where=/mnt/data
+ TimeoutIdleSec=600
+ [Install]
+ WantedBy=multi-user.target
+
+or add in /etc/fstab a line like
+
+ sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0
+
+or use classic Automountd. Remember to provide explicit
+config=...,cache-dir=... as a workaround for mount units being run
+without HOME.
+
+Rclone in the mount helper mode will split -o argument(s) by comma,
+replace _ by - and prepend -- to get the command-line flags. Options
+containing commas or spaces can be wrapped in single or double quotes.
+Any inner quotes inside outer quotes of the same type should be doubled.
+
+Mount option syntax includes a few extra options treated specially:
+
+- env.NAME=VALUE will set an environment variable for the mount
+ process. This helps with Automountd and Systemd.mount which don't
+ allow setting custom environment for mount helpers. Typically you
+ will use env.HTTPS_PROXY=proxy.host:3128 or env.HOME=/root
+- 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
+
+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.
+
+VFS Directory Cache
+
+Using the --dir-cache-time flag, you can control how long a directory
+should be considered up to date and not refreshed from the backend.
+Changes made through the VFS will appear immediately or invalidate the
+cache.
+
+ --dir-cache-time duration Time to cache directory entries for (default 5m0s)
+ --poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)
+
+However, changes made directly on the cloud storage by the web interface
+or a different copy of rclone will only be picked up once the directory
+cache expires if the backend configured does not support polling for
+changes. If the backend supports polling, changes will be picked up
+within the polling interval.
+
+You can send a SIGHUP signal to rclone for it to flush all directory
+caches, regardless of how old they are. Assuming only one rclone
+instance is running, you can reset the cache like this:
+
+ kill -SIGHUP $(pidof rclone)
+
+If you configure rclone with a remote control then you can use rclone rc
+to flush the whole directory cache:
+
+ rclone rc vfs/forget
+
+Or individual files or directories:
+
+ rclone rc vfs/forget file=path/to/file dir=path/to/dir
+
+VFS File Buffering
+
+The --buffer-size flag determines the amount of memory, that will be
+used to buffer data in advance.
+
+Each open file will try to keep the specified amount of data in memory
+at all times. The buffered data is bound to one open file and won't be
+shared.
+
+This flag is a upper limit for the used memory per open file. The buffer
+will only use memory for data that is downloaded but not not yet read.
+If the buffer is empty, only a small amount of memory will be used.
+
+The maximum memory used by rclone for buffering can be up to
+--buffer-size * open files.
+
+VFS File Caching
+
+These flags control the VFS file caching options. File caching is
+necessary to make the VFS layer appear compatible with a normal file
+system. It can be disabled at the cost of some compatibility.
+
+For example you'll need to enable VFS caching if you want to read and
+write simultaneously to a file. See below for more details.
+
+Note that the VFS cache is separate from the cache backend and you may
+find that you need one or the other or both.
+
+ --cache-dir string Directory rclone will use for caching.
+ --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+ --vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
+ --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+ --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+ --vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
+ --vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
+
+If run with -vv rclone will print the location of the file cache. The
+files are stored in the user cache file area which is OS dependent but
+can be controlled with --cache-dir or setting the appropriate
+environment variable.
+
+The cache has 4 different modes selected by --vfs-cache-mode. The higher
+the cache mode the more compatible rclone becomes at the cost of using
+disk space.
+
+Note that files are written back to the remote only when they are closed
+and if they haven't been accessed for --vfs-write-back seconds. If
+rclone is quit or dies with files that haven't been uploaded, these will
+be uploaded next time rclone is run with the same flags.
+
+If using --vfs-cache-max-size or --vfs-cache-min-free-size note that the
+cache may exceed these quotas for two reasons. Firstly because it is
+only checked every --vfs-cache-poll-interval. Secondly because open
+files cannot be evicted from the cache. When --vfs-cache-max-size or
+--vfs-cache-min-free-size is exceeded, rclone will attempt to evict the
+least accessed files from the cache first. rclone will start with files
+that haven't been accessed for the longest. This cache flushing strategy
+is efficient and more relevant files are likely to remain cached.
+
+The --vfs-cache-max-age will evict files from the cache after the set
+time since last access has passed. The default value of 1 hour will
+start evicting files from cache that haven't been accessed for 1 hour.
+When a cached file is accessed the 1 hour timer is reset to 0 and will
+wait for 1 more hour before evicting. Specify the time with standard
+notation, s, m, h, d, w .
+
+You should not run two copies of rclone using the same VFS cache with
+the same or overlapping remotes if using --vfs-cache-mode > off. This
+can potentially cause data corruption if you do. You can work around
+this by giving each rclone its own cache hierarchy with --cache-dir. You
+don't need to worry about this if the remotes in use don't overlap.
+
+--vfs-cache-mode off
+
+In this mode (the default) the cache will read directly from the remote
+and write directly to the remote without caching anything on disk.
+
+This will mean some operations are not possible
+
+- Files can't be opened for both read AND write
+- Files opened for write can't be seeked
+- Existing files opened for write must have O_TRUNC set
+- Files open for read with O_TRUNC will be opened write only
+- Files open for write only will behave as if O_TRUNC was supplied
+- Open modes O_APPEND, O_TRUNC are ignored
+- If an upload fails it can't be retried
+
+--vfs-cache-mode minimal
+
+This is very similar to "off" except that files opened for read AND
+write will be buffered to disk. This means that files opened for write
+will be a lot more compatible, but uses the minimal disk space.
+
+These operations are not possible
+
+- Files opened for write only can't be seeked
+- Existing files opened for write must have O_TRUNC set
+- Files opened for write only will ignore O_APPEND, O_TRUNC
+- If an upload fails it can't be retried
+
+--vfs-cache-mode writes
+
+In this mode files opened for read only are still read directly from the
+remote, write only and read/write files are buffered to disk first.
+
+This mode should support all normal file system operations.
+
+If an upload fails it will be retried at exponentially increasing
+intervals up to 1 minute.
+
+--vfs-cache-mode full
+
+In this mode all reads and writes are buffered to and from disk. When
+data is read from the remote this is buffered to disk as well.
+
+In this mode the files in the cache will be sparse files and rclone will
+keep track of which bits of the files it has downloaded.
+
+So if an application only reads the starts of each file, then rclone
+will only buffer the start of the file. These files will appear to be
+their full size in the cache, but they will be sparse files with only
+the data that has been downloaded present in them.
+
+This mode should support all normal file system operations and is
+otherwise identical to --vfs-cache-mode writes.
+
+When reading a file rclone will read --buffer-size plus --vfs-read-ahead
+bytes ahead. The --buffer-size is buffered in memory whereas the
+--vfs-read-ahead is buffered on disk.
+
+When using this mode it is recommended that --buffer-size is not set too
+large and --vfs-read-ahead is set large if required.
+
+IMPORTANT not all file systems support sparse files. In particular
+FAT/exFAT do not. Rclone will perform very badly if the cache directory
+is on a filesystem which doesn't support sparse files and it will log an
+ERROR message if one is detected.
+
+Fingerprinting
+
+Various parts of the VFS use fingerprinting to see if a local file copy
+has changed relative to a remote file. Fingerprints are made from:
+
+- size
+- modification time
+- hash
+
+where available on an object.
+
+On some backends some of these attributes are slow to read (they take an
+extra API call per object, or extra work per object).
+
+For example hash is slow with the local and sftp backends as they have
+to read the entire file and hash it, and modtime is slow with the s3,
+swift, ftp and qinqstor backends because they need to do an extra API
+call to fetch it.
+
+If you use the --vfs-fast-fingerprint flag then rclone will not include
+the slow operations in the fingerprint. This makes the fingerprinting
+less accurate but much faster and will improve the opening time of
+cached files.
+
+If you are running a vfs cache over local, s3 or swift backends then
+using this flag is recommended.
+
+Note that if you change the value of this flag, the fingerprints of the
+files in the cache may be invalidated and the files will need to be
+downloaded again.
+
+VFS Chunked Reading
+
+When rclone reads files from a remote it reads them in chunks. This
+means that rather than requesting the whole file rclone reads the chunk
+specified. This can reduce the used download quota for some remotes by
+requesting only chunks from the remote that are actually read, at the
+cost of an increased number of requests.
+
+These flags control the chunking:
+
+ --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
+ --vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
+
+Rclone will start reading a chunk of size --vfs-read-chunk-size, and
+then double the size for each read. When --vfs-read-chunk-size-limit is
+specified, and greater than --vfs-read-chunk-size, the chunk size for
+each open file will get doubled only until the specified value is
+reached. If the value is "off", which is the default, the limit is
+disabled and the chunk size will grow indefinitely.
+
+With --vfs-read-chunk-size 100M and --vfs-read-chunk-size-limit 0 the
+following parts will be downloaded: 0-100M, 100M-200M, 200M-300M,
+300M-400M and so on. When --vfs-read-chunk-size-limit 500M is specified,
+the result would be 0-100M, 100M-300M, 300M-700M, 700M-1200M,
+1200M-1700M and so on.
+
+Setting --vfs-read-chunk-size to 0 or "off" disables chunked reading.
+
+VFS Performance
+
+These flags may be used to enable/disable features of the VFS for
+performance or other reasons. See also the chunked reading feature.
+
+In particular S3 and Swift benefit hugely from the --no-modtime flag (or
+use --use-server-modtime for a slightly different effect) as each read
+of the modification time takes a transaction.
+
+ --no-checksum Don't compare checksums on up/download.
+ --no-modtime Don't read/write the modification time (can speed things up).
+ --no-seek Don't allow seeking in files.
+ --read-only Only allow read-only access.
+
+Sometimes rclone is delivered reads or writes out of order. Rather than
+seeking rclone will wait a short time for the in sequence read or write
+to come in. These flags only come into effect when not using an on disk
+cache file.
+
+ --vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
+ --vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
+
+When using VFS write caching (--vfs-cache-mode with value writes or
+full), the global flag --transfers can be set to adjust the number of
+parallel uploads of modified files from the cache (the related global
+flag --checkers has no effect on the VFS).
+
+ --transfers int Number of file transfers to run in parallel (default 4)
+
+VFS Case Sensitivity
+
+Linux file systems are case-sensitive: two files can differ only by
+case, and the exact case must be used when opening a file.
+
+File systems in modern Windows are case-insensitive but case-preserving:
+although existing files can be opened using any case, the exact case
+used to create the file is preserved and available for programs to
+query. It is not allowed for two files in the same directory to differ
+only by case.
+
+Usually file systems on macOS are case-insensitive. It is possible to
+make macOS file systems case-sensitive but that is not the default.
+
+The --vfs-case-insensitive VFS flag controls how rclone handles these
+two cases. If its value is "false", rclone passes file names to the
+remote as-is. If the flag is "true" (or appears without a value on the
+command line), rclone may perform a "fixup" as explained below.
+
+The user may specify a file name to open/delete/rename/etc with a case
+different than what is stored on the remote. If an argument refers to an
+existing file with exactly the same name, then the case of the existing
+file on the disk will be used. However, if a file name with exactly the
+same name is not found but a name differing only by case exists, rclone
+will transparently fixup the name. This fixup happens only when an
+existing file is requested. Case sensitivity of file names created anew
+by rclone is controlled by the underlying remote.
+
+Note that case sensitivity of the operating system running rclone (the
+target) may differ from case sensitivity of a file system presented by
+rclone (the source). The flag controls whether "fixup" is performed to
+satisfy the target.
+
+If the flag is not provided on the command line, then its default value
+depends on the operating system where rclone runs: "true" on Windows and
+macOS, "false" otherwise. If the flag is provided without a value, then
+it is "true".
+
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
+VFS Disk Options
+
+This flag allows you to manually set the statistics about the filing
+system. It can be useful when those statistics cannot be read correctly
+automatically.
+
+ --vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
+
+Alternate report of used bytes
+
+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
+
+ --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)
+ --allow-root Allow access to root user (not supported on Windows)
+ --async-read Use asynchronous reads (not supported on Windows) (default true)
+ --attr-timeout Duration Time for which file/directory attributes are cached (default 1s)
+ --daemon Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
+ --daemon-timeout Duration Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
+ --daemon-wait Duration Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
+ --debug-fuse Debug the FUSE internals - needs -v
+ --default-permissions Makes kernel enforce access control based on the file mode (not supported on Windows)
+ --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)
+ -h, --help help for nfsmount
+ --max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
+ --mount-case-insensitive Tristate Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
+ --network-mode Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
+ --nfs-cache-handle-limit int max file handles cached simultaneously (min 5) (default 1000000)
+ --no-checksum Don't compare checksums on up/download
+ --no-modtime Don't read/write the modification time (can speed things up)
+ --no-seek Don't allow seeking in files
+ --noappledouble Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
+ --noapplexattr Ignore all "com.apple.*" extended attributes (supported on OSX only)
+ -o, --option stringArray Option for libfuse/WinFsp (repeat if required)
+ --poll-interval Duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
+ --read-only Only allow read-only access
+ --sudo Use sudo to run the mount command as root.
+ --uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
+ --umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
+ --vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
+ --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
+ --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
+ --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
+ --vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
+ --vfs-case-insensitive If a file name not found, find a case insensitive match
+ --vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
+ --vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
+ --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
+ --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
+ --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
+ --vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
+ --vfs-used-is-size rclone size Use the rclone size algorithm for Used size
+ --vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
+ --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
+ --volname string Set the volume name (supported on Windows and OSX only)
+ --write-back-cache Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)
+
+Filter Options
+
+Flags for filtering directory listings.
+
+ --delete-excluded Delete files on dest excluded from sync
+ --exclude stringArray Exclude files matching pattern
+ --exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
+ --exclude-if-present stringArray Exclude directories if filename is present
+ --files-from stringArray Read list of source-file names from file (use - to read from stdin)
+ --files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
+ -f, --filter stringArray Add a file filtering rule
+ --filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
+ --ignore-case Ignore case in filters (case insensitive)
+ --include stringArray Include files matching pattern
+ --include-from stringArray Read file include patterns from file (use - to read from stdin)
+ --max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
+ --max-depth int If set limits the recursion depth to this (default -1)
+ --max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
+ --metadata-exclude stringArray Exclude metadatas matching pattern
+ --metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
+ --metadata-filter stringArray Add a metadata filtering rule
+ --metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
+ --metadata-include stringArray Include metadatas matching pattern
+ --metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
+ --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
+
+- rclone - Show help for rclone commands, flags and backends.
+
rclone obscure
Obscure password for use in the rclone config file.
@@ -5973,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
@@ -6167,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
@@ -6476,6 +7663,28 @@ depends on the operating system where rclone runs: "true" on Windows and
macOS, "false" otherwise. If the flag is provided without a value, then
it is "true".
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
VFS Disk Options
This flag allows you to manually set the statistics about the filing
@@ -6519,6 +7728,7 @@ Options
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -6531,7 +7741,7 @@ Options
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -6612,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
@@ -6921,6 +8132,28 @@ depends on the operating system where rclone runs: "true" on Windows and
macOS, "false" otherwise. If the flag is provided without a value, then
it is "true".
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
VFS Disk Options
This flag allows you to manually set the statistics about the filing
@@ -6961,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)
@@ -6982,6 +8216,7 @@ Options
--socket-gid int GID for unix socket (default: current process GID) (default 1000)
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -6994,7 +8229,7 @@ Options
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -7059,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
@@ -7368,6 +8605,28 @@ depends on the operating system where rclone runs: "true" on Windows and
macOS, "false" otherwise. If the flag is provided without a value, then
it is "true".
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
VFS Disk Options
This flag allows you to manually set the statistics about the filing
@@ -7485,6 +8744,7 @@ Options
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication (default "anonymous")
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -7497,7 +8757,7 @@ Options
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -7698,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
@@ -8008,6 +9269,28 @@ depends on the operating system where rclone runs: "true" on Windows and
macOS, "false" otherwise. If the flag is provided without a value, then
it is "true".
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
VFS Disk Options
This flag allows you to manually set the statistics about the filing
@@ -8134,6 +9417,7 @@ Options
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -8146,7 +9430,7 @@ Options
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -8207,7 +9491,12 @@ and port using --addr flag.
Modifying files through NFS protocol requires VFS caching. Usually you
will need to specify --vfs-cache-mode in order to be able to write to
the mountpoint (full is recommended). If you don't specify VFS cache
-mode, the mount will be read-only.
+mode, the mount will be read-only. Note also that
+--nfs-cache-handle-limit controls the maximum number of cached file
+handles stored by the caching handler. This should not be set too low or
+you may experience errors when trying to access files. The default is
+1000000, but consider lowering this limit if the server's system
+resource usage causes problems.
To serve NFS over the network use following command:
@@ -8532,6 +9821,28 @@ depends on the operating system where rclone runs: "true" on Windows and
macOS, "false" otherwise. If the flag is provided without a value, then
it is "true".
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
VFS Disk Options
This flag allows you to manually set the statistics about the filing
@@ -8564,6 +9875,7 @@ Options
--file-perms FileMode File permissions (default 0666)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
-h, --help help for nfs
+ --nfs-cache-handle-limit int max file handles cached simultaneously (min 5) (default 1000000)
--no-checksum Don't compare checksums on up/download
--no-modtime Don't read/write the modification time (can speed things up)
--no-seek Don't allow seeking in files
@@ -8571,6 +9883,7 @@ Options
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -8583,7 +9896,7 @@ Options
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -8852,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
@@ -8970,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
@@ -9279,6 +10609,28 @@ depends on the operating system where rclone runs: "true" on Windows and
macOS, "false" otherwise. If the flag is provided without a value, then
it is "true".
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
VFS Disk Options
This flag allows you to manually set the statistics about the filing
@@ -9331,6 +10683,7 @@ Options
--server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -9343,7 +10696,7 @@ Options
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -9748,6 +11101,28 @@ depends on the operating system where rclone runs: "true" on Windows and
macOS, "false" otherwise. If the flag is provided without a value, then
it is "true".
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
VFS Disk Options
This flag allows you to manually set the statistics about the filing
@@ -9865,6 +11240,7 @@ Options
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -9877,7 +11253,7 @@ Options
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -10108,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
@@ -10418,6 +11795,28 @@ depends on the operating system where rclone runs: "true" on Windows and
macOS, "false" otherwise. If the flag is provided without a value, then
it is "true".
+The --no-unicode-normalization flag controls whether a similar "fixup"
+is performed for filenames that differ but are canonically equivalent
+with respect to unicode. Unicode normalization can be particularly
+helpful for users of macOS, which prefers form NFD instead of the NFC
+used by most other platforms. It is therefore highly recommended to keep
+the default of false on macOS, to avoid encoding compatibility issues.
+
+In the (probably unlikely) event that a directory has multiple duplicate
+filenames after applying case and unicode normalization, the
+--vfs-block-norm-dupes flag allows hiding these duplicates. This comes
+with a performance tradeoff, as rclone will have to scan the entire
+directory for duplicates when listing a directory. For this reason, it
+is recommended to leave this disabled if not needed. However, macOS
+users may wish to consider using it, as otherwise, if a remote directory
+contains both NFC and NFD versions of the same filename, an odd
+situation will occur: both versions of the file will be visible in the
+mount, and both will appear to be editable, however, editing either
+version will actually result in only the NFD version getting edited
+under the hood. --vfs-block- norm-dupes prevents this confusion by
+detecting this scenario, hiding the duplicates, and logging an error,
+similar to how this is handled in rclone sync.
+
VFS Disk Options
This flag allows you to manually set the statistics about the filing
@@ -10546,6 +11945,7 @@ Options
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2)
--user string User name for authentication
+ --vfs-block-norm-dupes If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
@@ -10558,7 +11958,7 @@ Options
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
- --vfs-refresh Refreshes the directory cache recursively on start
+ --vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
@@ -10739,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
@@ -11290,17 +12691,20 @@ This can be used when scripting to make aged backups efficiently, e.g.
Metadata support
-Metadata is data about a file which isn't the contents of the file.
-Normally rclone only preserves the modification time and the content
-(MIME) type where possible.
+Metadata is data about a file (or directory) which isn't the contents of
+the file (or directory). Normally rclone only preserves the modification
+time and the content (MIME) type where possible.
-Rclone supports preserving all the available metadata on files (not
-directories) when using the --metadata or -M flag.
+Rclone supports preserving all the available metadata on files and
+directories when using the --metadata or -M flag.
Exactly what metadata is supported and what that support means depends
on the backend. Backends that support metadata have a metadata section
in their docs and are listed in the features table (Eg local, s3)
+Some backends don't support metadata, some only support metadata on
+files and some support metadata on both files and directories.
+
Rclone only supports a one-time sync of metadata. This means that
metadata will be synced from the source object to the destination object
only when the source object has changed and needs to be re-uploaded. If
@@ -11320,6 +12724,13 @@ The --metadata-mapper flag can be used to pass the name of a program in
which can transform metadata when it is being copied from source to
destination.
+Rclone supports --metadata-set and --metadata-mapper when doing sever
+side Move and server side Copy, but not when doing server side DirMove
+(renaming a directory) as this would involve recursing into the
+directory. Note that you can disable DirMove with --disable DirMove and
+rclone will revert back to using Move for each individual object where
+--metadata-set and --metadata-mapper are supported.
+
Types of metadata
Metadata is divided into two type. System metadata and User metadata.
@@ -11977,6 +13388,24 @@ NB: Enabling this option turns a usually non-fatal error into a
potentially fatal one - please check and adjust your scripts
accordingly!
+--fix-case
+
+Normally, a sync to a case insensitive dest (such as macOS / Windows)
+will not result in a matching filename if the source and dest filenames
+have casing differences but are otherwise identical. For example,
+syncing hello.txt to HELLO.txt will normally result in the dest filename
+remaining HELLO.txt. If --fix-case is set, then HELLO.txt will be
+renamed to hello.txt to match the source.
+
+NB: - directory names with incorrect casing will also be fixed -
+--fix-case will be ignored if --immutable is set - using
+--local-case-sensitive instead is not advisable; it will cause HELLO.txt
+to get deleted! - the old dest filename must not be excluded by filters.
+Be especially careful with --files-from, which does not respect
+--ignore-case! - on remotes that do not support server-side move,
+--fix-case will require downloading the file and re-uploading it. To
+avoid this, do not use --fix-case.
+
--fs-cache-expire-duration=TIME
When using rclone via the API rclone caches created remotes for 5
@@ -12396,10 +13825,10 @@ some context for the Metadata which may be important.
- DstFs is the config string for the remote that the object is being
copied to
- DstFsType is the name of the destination backend.
-- Remote is the path of the file relative to the root.
-- Size, MimeType, ModTime are attributes of the file.
+- Remote is the path of the object relative to the root.
+- Size, MimeType, ModTime are attributes of the object.
- IsDir is true if this is a directory (not yet implemented).
-- ID is the source ID of the file if known.
+- ID is the source ID of the object if known.
- Metadata is the backend specific metadata as described in the
backend docs.
@@ -12521,7 +13950,7 @@ When transferring files above SIZE to capable backends, rclone will use
multiple threads to transfer the file (default 256M).
Capable backends are marked in the overview as MultithreadUpload. (They
-need to implement either the OpenWriterAt or OpenChunkedWriter internal
+need to implement either the OpenWriterAt or OpenChunkWriter internal
interfaces). These include include, local, s3, azureblob, b2,
oracleobjectstorage and smb at the time of writing.
@@ -12631,6 +14060,11 @@ files if they are incorrect as it would normally.
This can be used if the remote is being synced with another tool also
(e.g. the Google Drive client).
+--no-update-dir-modtime
+
+When using this flag, rclone won't update modification times of remote
+directories if they are incorrect as it would normally.
+
--order-by string
The --order-by flag controls the order in which files in the backlog are
@@ -12735,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.
@@ -13560,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
@@ -13719,14 +15158,14 @@ Use web browser to automatically authenticate? question.
Execute the following on the machine with the web browser (same rclone
version recommended):
- rclone authorize "amazon cloud drive"
+ rclone authorize "dropbox"
Then paste the result below:
result>
Then on your main desktop machine
- rclone authorize "amazon cloud drive"
+ rclone authorize "dropbox"
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...
@@ -14151,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.
@@ -14319,7 +15758,7 @@ E.g. for an alternative filter-file.txt:
- *
Files file1.jpg, file3.png and file2.avi are listed whilst secret17.jpg
-and files without the suffix .jpgor.png` are excluded.
+and files without the suffix .jpg or .png are excluded.
E.g. for an alternative filter-file.txt:
@@ -14770,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.
@@ -15273,6 +16719,26 @@ See the config password command for more information on the above.
Authentication is required for this call.
+config/paths: Reads the config file path and other important paths.
+
+Returns a JSON object with the following keys:
+
+- config: path to config file
+- cache: path to root of cache directory
+- temp: path to root of temporary directory
+
+Eg
+
+ {
+ "cache": "/home/USER/.cache/rclone",
+ "config": "/home/USER/.rclone.conf",
+ "temp": "/tmp"
+ }
+
+See the config paths command for more information on the above.
+
+Authentication is required for this call.
+
config/providers: Shows how providers are configured in the config file.
Returns a JSON object: - providers - array of objects
@@ -16082,6 +17548,52 @@ instead:
rclone rc --loopback operations/fsinfo fs=remote:
+operations/hashsum: Produces a hashsum file for all the objects in the path.
+
+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.
+
+This takes the following parameters:
+
+- fs - a remote name string e.g. "drive:" for the source, "/" for
+ local filesystem
+ - this can point to a file and just that file will be returned in
+ the listing.
+- hashType - type of hash to be used
+- download - check by downloading rather than with hash (boolean)
+- base64 - output the hashes in base64 rather than hex (boolean)
+
+If you supply the download flag, it will download the data from the
+remote and create the hash on the fly. This can be useful for remotes
+that don't support the given hash or if you really want to check all the
+data.
+
+Note that if you wish to supply a checkfile to check hashes against the
+current files then you should use operations/check instead of
+operations/hashsum.
+
+Returns:
+
+- hashsum - array of strings of the hashes
+- hashType - type of hash used
+
+Example:
+
+ $ rclone rc --loopback operations/hashsum fs=bin hashType=MD5 download=true base64=true
+ {
+ "hashType": "md5",
+ "hashsum": [
+ "WTSVLpuiXyJO_kGzJerRLg== backend-versions.sh",
+ "v1b_OlWCJO9LtNq3EIKkNQ== bisect-go-rclone.sh",
+ "VHbmHzHh4taXzgag8BAIKQ== bisect-rclone.sh",
+ ]
+ }
+
+See the hashsum command for more information on the above.
+
+Authentication is required for this call.
+
operations/list: List the given remote and path in JSON format
This takes the following parameters:
@@ -16463,7 +17975,11 @@ This takes the following parameters
- resilient - Allow future runs to retry after certain less-serious
errors, instead of requiring resync. Use at your own risk!
- workdir - server directory for history files (default:
- /home/ncw/.cache/rclone/bisync)
+ ~/.cache/rclone/bisync)
+- backupdir1 - --backup-dir for Path1. Must be a non-overlapping path
+ on the same remote.
+- backupdir2 - --backup-dir for Path2. Must be a non-overlapping path
+ on the same remote.
- noCleanup - retain working files
See bisync command help and full bisync description for more
@@ -16829,7 +18345,6 @@ Here is an overview of the major features of each cloud storage system.
------------------------------- ------------------- --------- ------------------ ----------------- ----------- ----------
1Fichier Whirlpool - No Yes R -
Akamai Netstorage MD5, SHA256 R/W No No R -
- Amazon Drive MD5 - Yes No R -
Amazon S3 (or S3 compatible) MD5 R/W No No R/W RWU
Backblaze B2 SHA1 R/W No No R/W -
Box SHA1 R/W Yes No - -
@@ -16838,7 +18353,7 @@ Here is an overview of the major features of each cloud storage system.
Enterprise File Fabric - R/W Yes No R/W -
FTP - R/W ¹⁰ No No - -
Google Cloud Storage MD5 R/W No No R/W -
- Google Drive MD5, SHA1, SHA256 R/W No Yes R/W -
+ Google Drive MD5, SHA1, SHA256 DR/W No Yes R/W DRWU
Google Photos - - No Yes R -
HDFS - R/W No No - -
HiDrive HiDrive ¹² R/W No No - -
@@ -16852,7 +18367,7 @@ Here is an overview of the major features of each cloud storage system.
Memory MD5 R/W No No - -
Microsoft Azure Blob Storage MD5 R/W No No R/W -
Microsoft Azure Files Storage MD5 R/W Yes No R/W -
- Microsoft OneDrive QuickXorHash ⁵ R/W Yes No R -
+ Microsoft OneDrive QuickXorHash ⁵ DR/W Yes No R DRW
OpenDrive MD5 R/W Yes Partial ⁸ - -
OpenStack Swift MD5 R/W No No R/W -
Oracle Object Storage MD5 R/W No No R/W -
@@ -16864,16 +18379,17 @@ Here is an overview of the major features of each cloud storage system.
QingStor MD5 - ⁹ No No R/W -
Quatrix by Maytech - R/W No No - -
Seafile - - No No - -
- SFTP MD5, SHA1 ² R/W Depends No - -
+ SFTP MD5, SHA1 ² DR/W Depends No - -
Sia - - No No - -
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 -
Zoho WorkDrive - - No No - -
- The local filesystem All R/W Depends No - RWU
+ The local filesystem All DR/W Depends No - DRWU
¹ Dropbox supports its own custom hash. This is an SHA256 sum of all the
4 MiB block SHA256s.
@@ -16910,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
@@ -16925,13 +18444,31 @@ ModTime
Almost all cloud storage systems store some sort of timestamp on
objects, but several of them not something that is appropriate to use
for syncing. E.g. some backends will only write a timestamp that
-represent the time of the upload. To be relevant for syncing it should
+represents the time of the upload. To be relevant for syncing it should
be able to store the modification time of the source object. If this is
not the case, rclone will only check the file size by default, though
can be configured to check the file hash (with the --checksum flag).
Ideally it should also be possible to change the timestamp of an
existing file without having to re-upload it.
+ -----------------------------------------------------------------------
+ Key Explanation
+ ------------------- ---------------------------------------------------
+ - ModTimes not supported - times likely the upload
+ time
+
+ R ModTimes supported on files but can't be changed
+ without re-upload
+
+ R/W Read and Write ModTimes fully supported on files
+
+ DR ModTimes supported on files and directories but
+ can't be changed without re-upload
+
+ DR/W Read and Write ModTimes fully supported on files
+ and directories
+ -----------------------------------------------------------------------
+
Storage systems with a - in the ModTime column, means the modification
read on objects is not the modification time of the file when uploaded.
It is most likely the time the file was uploaded, or possibly something
@@ -16951,6 +18488,9 @@ time only on a files in a mount will be silently ignored.
Storage systems with R/W (for read/write) in the ModTime column, means
they do also support modtime-only operations.
+Storage systems with D in the ModTime column means that the following
+symbols apply to directories as well as files.
+
Case Insensitive
If a cloud storage systems is case sensitive then it is possible to have
@@ -17298,11 +18838,24 @@ backend) and/or user metadata (general purpose metadata).
The levels of metadata support are
- Key Explanation
- ----- -----------------------------------------------------------------
- R Read only System Metadata
- RW Read and write System Metadata
- RWU Read and write System Metadata and read and write User Metadata
+ -----------------------------------------------------------------------
+ Key Explanation
+ ------------------- ---------------------------------------------------
+ R Read only System Metadata on files only
+
+ RW Read and write System Metadata on files only
+
+ RWU Read and write System Metadata and read and write
+ User Metadata on files only
+
+ DR Read only System Metadata on files and directories
+
+ DRW Read and write System Metadata on files and
+ directories
+
+ DRWU Read and write System Metadata and read and write
+ User Metadata on files and directories
+ -----------------------------------------------------------------------
See the metadata docs for more info.
@@ -17319,8 +18872,6 @@ upon backend-specific capabilities.
Akamai Yes No No No No Yes Yes No No No Yes
Netstorage
- Amazon Drive Yes No Yes Yes No No No No No No Yes
-
Amazon S3 (or No Yes No No Yes Yes Yes Yes Yes No No
S3 compatible)
@@ -17351,6 +18902,8 @@ upon backend-specific capabilities.
HTTP No No No No No No No No No No Yes
+ ImageKit Yes Yes Yes No No No No No No No Yes
+
Internet No Yes No No Yes Yes No No Yes Yes No
Archive
@@ -17407,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
@@ -17415,7 +18970,7 @@ upon backend-specific capabilities.
Zoho WorkDrive Yes Yes Yes Yes No No No No No Yes Yes
- The local Yes No Yes Yes No No Yes Yes No Yes Yes
+ The local No No Yes Yes No No Yes Yes No Yes Yes
filesystem
-------------------------------------------------------------------------------------------------------------------------------------
@@ -17532,7 +19087,7 @@ Flags for anything which can Copy a file.
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
- -I, --ignore-times Don't skip files that match size and time - transfer all files
+ -I, --ignore-times Don't skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
@@ -17546,6 +19101,7 @@ Flags for anything which can Copy a file.
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--no-check-dest Don't check the destination, copy regardless
--no-traverse Don't traverse destination file system on copy
+ --no-update-dir-modtime Don't update directory modification times
--no-update-modtime Don't update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. 'size,descending'
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
@@ -17563,6 +19119,7 @@ Flags just used for rclone sync.
--delete-after When synchronizing, delete files on destination after transferring (default)
--delete-before When synchronizing, delete files on destination before transferring
--delete-during When synchronizing, delete files during transfer
+ --fix-case Force rename of case insensitive dest to match source
--ignore-errors Delete even if there are I/O errors
--max-delete int When synchronizing, limit the number of deletes (default -1)
--max-delete-size SizeSuffix When synchronizing, limit the total size of deletes (default off)
@@ -17609,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.65.0")
+ --user-agent string Set the user-agent to a specified string (default "rclone/v1.67.0")
Performance
@@ -17752,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
@@ -17766,14 +19324,7 @@ Backend
Backend only flags. These can be set in the config file also.
- --acd-auth-url string Auth server URL
- --acd-client-id string OAuth Client Id
- --acd-client-secret string OAuth Client Secret
- --acd-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8,Dot)
- --acd-templink-threshold SizeSuffix Files >= this size will be downloaded via their tempLink (default 9Gi)
- --acd-token string OAuth Access Token as a JSON blob
- --acd-token-url string Token server url
- --acd-upload-wait-per-gb Duration Additional time per GiB to wait after a failed complete upload to see if it appears (default 3m0s)
+ --alias-description string Description of the remote
--alias-remote string Remote or path to alias
--azureblob-access-tier string Access tier of blob: hot, cool, cold or archive
--azureblob-account string Azure Storage Account Name
@@ -17784,6 +19335,8 @@ Backend only flags. These can be set in the config file also.
--azureblob-client-id string The ID of the client in use
--azureblob-client-secret string One of the service principal's client secrets
--azureblob-client-send-certificate-chain Send the certificate chain when using certificate auth
+ --azureblob-delete-snapshots string Set to specify how to deal with snapshots on blob deletion
+ --azureblob-description string Description of the remote
--azureblob-directory-markers Upload an empty object with a trailing slash when a new directory is created
--azureblob-disable-checksum Don't store MD5 checksum with object metadata
--azureblob-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8)
@@ -17814,6 +19367,7 @@ Backend only flags. These can be set in the config file also.
--azurefiles-client-secret string One of the service principal's client secrets
--azurefiles-client-send-certificate-chain Send the certificate chain when using certificate auth
--azurefiles-connection-string string Azure Files Connection String
+ --azurefiles-description string Description of the remote
--azurefiles-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,RightPeriod,InvalidUtf8,Dot)
--azurefiles-endpoint string Endpoint for the service
--azurefiles-env-auth Read credentials from runtime (environment variables, CLI or MSI)
@@ -17833,8 +19387,9 @@ Backend only flags. These can be set in the config file also.
--b2-account string Account ID or Application Key ID
--b2-chunk-size SizeSuffix Upload chunk size (default 96Mi)
--b2-copy-cutoff SizeSuffix Cutoff for switching to multipart copy (default 4Gi)
+ --b2-description string Description of the remote
--b2-disable-checksum Disable checksums for large (> upload cutoff) files
- --b2-download-auth-duration Duration Time before the authorization token will expire in s or suffix ms|s|m|h|d (default 1w)
+ --b2-download-auth-duration Duration Time before the public link authorization token will expire in s or suffix ms|s|m|h|d (default 1w)
--b2-download-url string Custom endpoint for downloads
--b2-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--b2-endpoint string Endpoint for the service
@@ -17853,6 +19408,7 @@ Backend only flags. These can be set in the config file also.
--box-client-id string OAuth Client Id
--box-client-secret string OAuth Client Secret
--box-commit-retries int Max number of times to try committing a multipart file (default 100)
+ --box-description string Description of the remote
--box-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot)
--box-impersonate string Impersonate this user ID when using a service account
--box-list-chunk int Size of listing chunk 1-1000 (default 1000)
@@ -17869,6 +19425,7 @@ Backend only flags. These can be set in the config file also.
--cache-db-path string Directory to store file structure metadata DB (default "$HOME/.cache/rclone/cache-backend")
--cache-db-purge Clear all the cached data for this remote on start
--cache-db-wait-time Duration How long to wait for the DB to be available - 0 is unlimited (default 1s)
+ --cache-description string Description of the remote
--cache-info-age Duration How long to cache file structure information (directory listings, file size, times, etc.) (default 6h0m0s)
--cache-plex-insecure string Skip all certificate verification when connecting to the Plex server
--cache-plex-password string The password of the Plex user (obscured)
@@ -17882,15 +19439,19 @@ Backend only flags. These can be set in the config file also.
--cache-workers int How many workers should run in parallel to download chunks (default 4)
--cache-writes Cache file data on writes through the FS
--chunker-chunk-size SizeSuffix Files larger than chunk size will be split in chunks (default 2Gi)
+ --chunker-description string Description of the remote
--chunker-fail-hard Choose how chunker should handle files with missing or invalid chunks
--chunker-hash-type string Choose how chunker handles hash sums (default "md5")
--chunker-remote string Remote to chunk/unchunk
+ --combine-description string Description of the remote
--combine-upstreams SpaceSepList Upstreams for combining
+ --compress-description string Description of the remote
--compress-level int GZIP compression level (-2 to 9) (default -1)
--compress-mode string Compression mode (default "gzip")
--compress-ram-cache-limit SizeSuffix Some remotes don't allow the upload of files with unknown size (default 20Mi)
--compress-remote string Remote to compress
-L, --copy-links Follow symlinks and copy the pointed to item
+ --crypt-description string Description of the remote
--crypt-directory-name-encryption Option to either encrypt directory names or leave them intact (default true)
--crypt-filename-encoding string How to encode the encrypted filename to text string (default "base32")
--crypt-filename-encryption string How to encrypt the filenames (default "standard")
@@ -17901,6 +19462,7 @@ Backend only flags. These can be set in the config file also.
--crypt-remote string Remote to encrypt/decrypt
--crypt-server-side-across-configs Deprecated: use --server-side-across-configs instead
--crypt-show-mapping For all files listed show how the names encrypt
+ --crypt-strict-names If set, this will raise an error when crypt comes across a filename that can't be decrypted
--crypt-suffix string If this is set it will override the default suffix of ".bin" (default ".bin")
--drive-acknowledge-abuse Set to allow files which return cannotDownloadAbusiveFile to be downloaded
--drive-allow-import-name-change Allow the filetype to change when uploading Google docs
@@ -17910,6 +19472,7 @@ Backend only flags. These can be set in the config file also.
--drive-client-id string Google Application Client Id
--drive-client-secret string OAuth Client Secret
--drive-copy-shortcut-content Server side copy contents of shortcuts instead of the shortcut
+ --drive-description string Description of the remote
--drive-disable-http2 Disable drive using http2 (default true)
--drive-encoding Encoding The encoding for the backend (default InvalidUtf8)
--drive-env-auth Get IAM credentials from runtime (environment variables or instance meta data if no env vars)
@@ -17958,19 +19521,23 @@ Backend only flags. These can be set in the config file also.
--dropbox-chunk-size SizeSuffix Upload chunk size (< 150Mi) (default 48Mi)
--dropbox-client-id string OAuth Client Id
--dropbox-client-secret string OAuth Client Secret
+ --dropbox-description string Description of the remote
--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
--dropbox-token-url string Token server url
--fichier-api-key string Your API Key, get it from https://1fichier.com/console/params.pl
--fichier-cdn Set if you wish to use CDN download links
+ --fichier-description string Description of the remote
--fichier-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot)
--fichier-file-password string If you want to download a shared file that is password protected, add this parameter (obscured)
--fichier-folder-password string If you want to list the files in a shared folder that is password protected, add this parameter (obscured)
--fichier-shared-folder string If you want to download a shared folder, add this parameter
+ --filefabric-description string Description of the remote
--filefabric-encoding Encoding The encoding for the backend (default Slash,Del,Ctl,InvalidUtf8,Dot)
--filefabric-permanent-token string Permanent Authentication Token
--filefabric-root-folder-id string ID of the root folder
@@ -17981,6 +19548,7 @@ Backend only flags. These can be set in the config file also.
--ftp-ask-password Allow asking for FTP password when needed
--ftp-close-timeout Duration Maximum time to wait for a response to close (default 1m0s)
--ftp-concurrency int Maximum number of FTP simultaneous connections, 0 for unlimited
+ --ftp-description string Description of the remote
--ftp-disable-epsv Disable using EPSV even if server advertises support
--ftp-disable-mlsd Disable using MLSD even if server advertises support
--ftp-disable-tls13 Disable TLS 1.3 (workaround for FTP servers with buggy TLS)
@@ -18006,6 +19574,7 @@ Backend only flags. These can be set in the config file also.
--gcs-client-id string OAuth Client Id
--gcs-client-secret string OAuth Client Secret
--gcs-decompress If set this will decompress gzip encoded objects
+ --gcs-description string Description of the remote
--gcs-directory-markers Upload an empty object with a trailing slash when a new directory is created
--gcs-encoding Encoding The encoding for the backend (default Slash,CrLf,InvalidUtf8,Dot)
--gcs-endpoint string Endpoint for the service
@@ -18026,6 +19595,7 @@ Backend only flags. These can be set in the config file also.
--gphotos-batch-timeout Duration Max time to allow an idle upload batch before uploading (default 0s)
--gphotos-client-id string OAuth Client Id
--gphotos-client-secret string OAuth Client Secret
+ --gphotos-description string Description of the remote
--gphotos-encoding Encoding The encoding for the backend (default Slash,CrLf,InvalidUtf8,Dot)
--gphotos-include-archived Also view and download archived media
--gphotos-read-only Set to make the Google Photos backend read only
@@ -18034,10 +19604,12 @@ Backend only flags. These can be set in the config file also.
--gphotos-token string OAuth Access Token as a JSON blob
--gphotos-token-url string Token server url
--hasher-auto-size SizeSuffix Auto-update checksum for files smaller than this size (disabled by default)
+ --hasher-description string Description of the remote
--hasher-hashes CommaSepList Comma separated list of supported checksum types (default md5,sha1)
--hasher-max-age Duration Maximum time to keep checksums in cache (0 = no cache, off = cache forever) (default off)
--hasher-remote string Remote to cache checksums for (e.g. myRemote:path)
--hdfs-data-transfer-protection string Kerberos data transfer protection: authentication|integrity|privacy
+ --hdfs-description string Description of the remote
--hdfs-encoding Encoding The encoding for the backend (default Slash,Colon,Del,Ctl,InvalidUtf8,Dot)
--hdfs-namenode CommaSepList Hadoop name nodes and ports
--hdfs-service-principal-name string Kerberos service principal name for the namenode
@@ -18046,6 +19618,7 @@ Backend only flags. These can be set in the config file also.
--hidrive-chunk-size SizeSuffix Chunksize for chunked uploads (default 48Mi)
--hidrive-client-id string OAuth Client Id
--hidrive-client-secret string OAuth Client Secret
+ --hidrive-description string Description of the remote
--hidrive-disable-fetching-member-count Do not fetch number of objects in directories unless it is absolutely necessary
--hidrive-encoding Encoding The encoding for the backend (default Slash,Dot)
--hidrive-endpoint string Endpoint for the service (default "https://api.hidrive.strato.com/2.1")
@@ -18056,10 +19629,13 @@ Backend only flags. These can be set in the config file also.
--hidrive-token-url string Token server url
--hidrive-upload-concurrency int Concurrency for chunked uploads (default 4)
--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
+ --imagekit-description string Description of the remote
--imagekit-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket)
--imagekit-endpoint string You can find your ImageKit.io URL endpoint in your [dashboard](https://imagekit.io/dashboard/developer/api-keys)
--imagekit-only-signed Restrict unsigned image URLs If you have configured Restrict unsigned image URLs in your dashboard settings, set this to true
@@ -18068,6 +19644,7 @@ Backend only flags. These can be set in the config file also.
--imagekit-upload-tags string Tags to add to the uploaded files, e.g. "tag1,tag2"
--imagekit-versions Include old versions in directory listings
--internetarchive-access-key-id string IAS3 Access Key
+ --internetarchive-description string Description of the remote
--internetarchive-disable-checksum Don't ask the server to test against MD5 checksum calculated by rclone (default true)
--internetarchive-encoding Encoding The encoding for the backend (default Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot)
--internetarchive-endpoint string IAS3 Endpoint (default "https://s3.us.archive.org")
@@ -18077,6 +19654,7 @@ Backend only flags. These can be set in the config file also.
--jottacloud-auth-url string Auth server URL
--jottacloud-client-id string OAuth Client Id
--jottacloud-client-secret string OAuth Client Secret
+ --jottacloud-description string Description of the remote
--jottacloud-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot)
--jottacloud-hard-delete Delete files permanently rather than putting them into the trash
--jottacloud-md5-memory-limit SizeSuffix Files bigger than this will be cached on disk to calculate the MD5 if required (default 10Mi)
@@ -18085,29 +19663,34 @@ Backend only flags. These can be set in the config file also.
--jottacloud-token-url string Token server url
--jottacloud-trashed-only Only show files that are in the trash
--jottacloud-upload-resume-limit SizeSuffix Files bigger than this can be resumed if the upload fail's (default 10Mi)
+ --koofr-description string Description of the remote
--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
+ --linkbox-description string Description of the remote
--linkbox-token string Token from https://www.linkbox.to/admin/account
-l, --links Translate symlinks to/from regular files with a '.rclonelink' extension
--local-case-insensitive Force the filesystem to report itself as case insensitive
--local-case-sensitive Force the filesystem to report itself as case sensitive
+ --local-description string Description of the remote
--local-encoding Encoding The encoding for the backend (default Slash,Dot)
--local-no-check-updated Don't check to see if the files change during upload
--local-no-preallocate Disable preallocation of disk space for transferred files
--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
--mailru-check-hash What should copy do if file checksum is mismatched or invalid (default true)
--mailru-client-id string OAuth Client Id
--mailru-client-secret string OAuth Client Secret
+ --mailru-description string Description of the remote
--mailru-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--mailru-pass string Password (obscured)
--mailru-speedup-enable Skip full upload if there is another file with same data hash (default true)
@@ -18118,12 +19701,15 @@ Backend only flags. These can be set in the config file also.
--mailru-token-url string Token server url
--mailru-user string User name (usually email)
--mega-debug Output more debug from Mega
+ --mega-description string Description of the remote
--mega-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8,Dot)
--mega-hard-delete Delete files permanently rather than putting them into the trash
--mega-pass string Password (obscured)
--mega-use-https Use HTTPS for transfers
--mega-user string User name
+ --memory-description string Description of the remote
--netstorage-account string Set the NetStorage account name
+ --netstorage-description string Description of the remote
--netstorage-host string Domain+path of NetStorage host to connect to
--netstorage-protocol string Select between HTTP or HTTPS protocol (default "https")
--netstorage-secret string Set the NetStorage account secret/G2O key for authentication (obscured)
@@ -18135,15 +19721,18 @@ Backend only flags. These can be set in the config file also.
--onedrive-client-id string OAuth Client Id
--onedrive-client-secret string OAuth Client Secret
--onedrive-delta If set rclone will use delta listing to implement recursive listings
+ --onedrive-description string Description of the remote
--onedrive-drive-id string The ID of the drive to use
--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")
--onedrive-link-type string Set the type of the links created by the link command (default "view")
--onedrive-list-chunk int Size of listing chunk (default 1000)
+ --onedrive-metadata-permissions Bits Control whether permissions should be read or written in metadata (default off)
--onedrive-no-versions Remove all versions on modifying operations
--onedrive-region string Choose national cloud region for OneDrive (default "global")
--onedrive-root-folder-id string ID of the root folder
@@ -18157,6 +19746,7 @@ Backend only flags. These can be set in the config file also.
--oos-config-profile string Profile name inside the oci config file (default "Default")
--oos-copy-cutoff SizeSuffix Cutoff for switching to multipart copy (default 4.656Gi)
--oos-copy-timeout Duration Timeout for copy (default 1m0s)
+ --oos-description string Description of the remote
--oos-disable-checksum Don't store MD5 checksum with object metadata
--oos-encoding Encoding The encoding for the backend (default Slash,InvalidUtf8,Dot)
--oos-endpoint string Endpoint for Object storage API
@@ -18175,12 +19765,14 @@ Backend only flags. These can be set in the config file also.
--oos-upload-concurrency int Concurrency for multipart uploads (default 10)
--oos-upload-cutoff SizeSuffix Cutoff for switching to chunked upload (default 200Mi)
--opendrive-chunk-size SizeSuffix Files will be uploaded in chunks this size (default 10Mi)
+ --opendrive-description string Description of the remote
--opendrive-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot)
--opendrive-password string Password (obscured)
--opendrive-username string Username
--pcloud-auth-url string Auth server URL
--pcloud-client-id string OAuth Client Id
--pcloud-client-secret string OAuth Client Secret
+ --pcloud-description string Description of the remote
--pcloud-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--pcloud-hostname string Hostname to connect to (default "api.pcloud.com")
--pcloud-password string Your pcloud password (obscured)
@@ -18189,8 +19781,10 @@ 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
--pikpak-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot)
--pikpak-hash-memory-limit SizeSuffix Files bigger than this will be cached on disk to calculate hash if required (default 10Mi)
--pikpak-pass string Pikpak password (obscured)
@@ -18198,16 +19792,19 @@ 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
--premiumizeme-client-id string OAuth Client Id
--premiumizeme-client-secret string OAuth Client Secret
+ --premiumizeme-description string Description of the remote
--premiumizeme-encoding Encoding The encoding for the backend (default Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--premiumizeme-token string OAuth Access Token as a JSON blob
--premiumizeme-token-url string Token server url
--protondrive-2fa string The 2FA code
--protondrive-app-version string The app version string (default "macos-drive@1.0.0-alpha.1+rclone")
+ --protondrive-description string Description of the remote
--protondrive-enable-caching Caches the files and folders metadata to reduce API calls (default true)
--protondrive-encoding Encoding The encoding for the backend (default Slash,LeftSpace,RightSpace,InvalidUtf8,Dot)
--protondrive-mailbox-password string The mailbox password of your two-password proton account (obscured)
@@ -18218,12 +19815,14 @@ Backend only flags. These can be set in the config file also.
--putio-auth-url string Auth server URL
--putio-client-id string OAuth Client Id
--putio-client-secret string OAuth Client Secret
+ --putio-description string Description of the remote
--putio-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--putio-token string OAuth Access Token as a JSON blob
--putio-token-url string Token server url
--qingstor-access-key-id string QingStor Access Key ID
--qingstor-chunk-size SizeSuffix Chunk size to use for uploading (default 4Mi)
--qingstor-connection-retries int Number of connection retries (default 3)
+ --qingstor-description string Description of the remote
--qingstor-encoding Encoding The encoding for the backend (default Slash,Ctl,InvalidUtf8)
--qingstor-endpoint string Enter an endpoint URL to connection QingStor API
--qingstor-env-auth Get QingStor credentials from runtime
@@ -18232,18 +19831,21 @@ Backend only flags. These can be set in the config file also.
--qingstor-upload-cutoff SizeSuffix Cutoff for switching to chunked upload (default 200Mi)
--qingstor-zone string Zone to connect to
--quatrix-api-key string API key for accessing Quatrix account
+ --quatrix-description string Description of the remote
--quatrix-effective-upload-time string Wanted upload time for one chunk (default "4s")
--quatrix-encoding Encoding The encoding for the backend (default Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot)
--quatrix-hard-delete Delete files permanently rather than putting them into the trash
--quatrix-host string Host name of Quatrix account
--quatrix-maximal-summary-chunk-size SizeSuffix The maximal summary for all chunks. It should not be less than 'transfers'*'minimal_chunk_size' (default 95.367Mi)
--quatrix-minimal-chunk-size SizeSuffix The minimal size for one chunk (default 9.537Mi)
+ --quatrix-skip-project-folders Skip project folders in operations
--s3-access-key-id string AWS Access Key ID
--s3-acl string Canned ACL used when creating buckets and storing or copying objects
--s3-bucket-acl string Canned ACL used when creating buckets
--s3-chunk-size SizeSuffix Chunk size to use for uploading (default 5Mi)
--s3-copy-cutoff SizeSuffix Cutoff for switching to multipart copy (default 4.656Gi)
--s3-decompress If set this will decompress gzip encoded objects
+ --s3-description string Description of the remote
--s3-directory-markers Upload an empty object with a trailing slash when a new directory is created
--s3-disable-checksum Don't store MD5 checksum with object metadata
--s3-disable-http2 Disable usage of http2 for S3 backends
@@ -18278,19 +19880,22 @@ Backend only flags. These can be set in the config file also.
--s3-sse-kms-key-id string If using KMS ID you must provide the ARN of Key
--s3-storage-class string The storage class to use when storing new objects in S3
--s3-sts-endpoint string Endpoint for STS
- --s3-upload-concurrency int Concurrency for multipart uploads (default 4)
+ --s3-upload-concurrency int Concurrency for multipart uploads and copies (default 4)
--s3-upload-cutoff SizeSuffix Cutoff for switching to chunked upload (default 200Mi)
--s3-use-accelerate-endpoint If true use the AWS S3 accelerated endpoint
--s3-use-accept-encoding-gzip Accept-Encoding: gzip Whether to send Accept-Encoding: gzip header (default unset)
--s3-use-already-exists Tristate Set if rclone should report BucketAlreadyExists errors on bucket creation (default unset)
+ --s3-use-dual-stack If true use AWS S3 dual-stack endpoint (IPv6 support)
--s3-use-multipart-etag Tristate Whether to use ETag in multipart uploads for verification (default unset)
--s3-use-multipart-uploads Tristate Set if rclone should use multipart uploads (default unset)
--s3-use-presigned-request Whether to use a presigned request or PutObject for single part uploads
--s3-v2-auth If true use v2 authentication
--s3-version-at Time Show file versions as they were at the specified time (default off)
+ --s3-version-deleted Show deleted file markers when using versions
--s3-versions Include old versions in directory listings
--seafile-2fa Two-factor authentication ('true' if the account has 2FA enabled)
--seafile-create-library Should rclone create a library if it doesn't exist
+ --seafile-description string Description of the remote
--seafile-encoding Encoding The encoding for the backend (default Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8)
--seafile-library string Name of the library
--seafile-library-key string Library password (for encrypted libraries only) (obscured)
@@ -18301,7 +19906,9 @@ 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
--sftp-disable-concurrent-writes If set don't use concurrent writes
--sftp-disable-hashcheck Disable the execution of SSH commands to determine if remote file hashing is available
@@ -18336,6 +19943,7 @@ Backend only flags. These can be set in the config file also.
--sharefile-chunk-size SizeSuffix Upload chunk size (default 64Mi)
--sharefile-client-id string OAuth Client Id
--sharefile-client-secret string OAuth Client Secret
+ --sharefile-description string Description of the remote
--sharefile-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,LeftPeriod,RightSpace,RightPeriod,InvalidUtf8,Dot)
--sharefile-endpoint string Endpoint for API calls
--sharefile-root-folder-id string ID of the root folder
@@ -18344,10 +19952,12 @@ Backend only flags. These can be set in the config file also.
--sharefile-upload-cutoff SizeSuffix Cutoff for switching to multipart upload (default 128Mi)
--sia-api-password string Sia Daemon API Password (obscured)
--sia-api-url string Sia daemon API URL, like http://sia.daemon.host:9980 (default "http://127.0.0.1:9980")
+ --sia-description string Description of the remote
--sia-encoding Encoding The encoding for the backend (default Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot)
--sia-user-agent string Siad User Agent (default "Sia-Agent")
--skip-links Don't warn about skipped symlinks
--smb-case-insensitive Whether the server is configured to be case-insensitive (default true)
+ --smb-description string Description of the remote
--smb-domain string Domain name for NTLM authentication (default "WORKGROUP")
--smb-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot)
--smb-hide-special-share Hide special shares (e.g. print$) which users aren't supposed to access (default true)
@@ -18359,6 +19969,7 @@ Backend only flags. These can be set in the config file also.
--smb-user string SMB username (default "$USER")
--storj-access-grant string Access grant
--storj-api-key string API key
+ --storj-description string Description of the remote
--storj-passphrase string Encryption passphrase
--storj-provider string Choose an authentication method (default "existing")
--storj-satellite-address string Satellite address (default "us1.storj.io")
@@ -18367,6 +19978,7 @@ Backend only flags. These can be set in the config file also.
--sugarsync-authorization string Sugarsync authorization
--sugarsync-authorization-expiry string Sugarsync authorization expiry
--sugarsync-deleted-id string Sugarsync deleted folder id
+ --sugarsync-description string Description of the remote
--sugarsync-encoding Encoding The encoding for the backend (default Slash,Ctl,InvalidUtf8,Dot)
--sugarsync-hard-delete Permanently delete files if true
--sugarsync-private-access-key string Sugarsync Private Access Key
@@ -18379,7 +19991,8 @@ 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)
--swift-endpoint-type string Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE) (default "public")
@@ -18394,22 +20007,35 @@ 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")
+ --union-description string Description of the remote
--union-min-free-space SizeSuffix Minimum viable free space for lfs/eplfs policies (default 1Gi)
--union-search-policy string Policy to choose upstream on SEARCH category (default "ff")
--union-upstreams string List of space separated upstreams
--uptobox-access-token string Your access token
+ --uptobox-description string Description of the remote
--uptobox-encoding Encoding The encoding for the backend (default Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot)
--uptobox-private Set to make uploaded files private
--webdav-bearer-token string Bearer token instead of user/pass (e.g. a Macaroon)
--webdav-bearer-token-command string Command to run to get a bearer token
+ --webdav-description string Description of the remote
--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)
--webdav-url string URL of http host to connect to
@@ -18418,6 +20044,7 @@ Backend only flags. These can be set in the config file also.
--yandex-auth-url string Auth server URL
--yandex-client-id string OAuth Client Id
--yandex-client-secret string OAuth Client Secret
+ --yandex-description string Description of the remote
--yandex-encoding Encoding The encoding for the backend (default Slash,Del,Ctl,InvalidUtf8,Dot)
--yandex-hard-delete Delete files permanently rather than putting them into the trash
--yandex-token string OAuth Access Token as a JSON blob
@@ -18425,6 +20052,7 @@ Backend only flags. These can be set in the config file also.
--zoho-auth-url string Auth server URL
--zoho-client-id string OAuth Client Id
--zoho-client-secret string OAuth Client Secret
+ --zoho-description string Description of the remote
--zoho-encoding Encoding The encoding for the backend (default Del,Ctl,InvalidUtf8)
--zoho-region string Zoho region to connect to
--zoho-token string OAuth Access Token as a JSON blob
@@ -18934,20 +20562,36 @@ and verify that settings did update:
If docker refuses to remove the volume, you should find containers or
swarm services that use it and stop them first.
+Bisync
+
+bisync is in beta and is considered an advanced command, so use with
+care. Make sure you have read and understood the entire manual
+(especially the Limitations section) before using, or data loss can
+result. Questions can be asked in the Rclone Forum.
+
Getting started
- Install rclone and setup your remotes.
- Bisync will create its working directory at ~/.cache/rclone/bisync
- on Linux or C:\Users\MyLogin\AppData\Local\rclone\bisync on Windows.
- Make sure that this location is writable.
+ on Linux, /Users/yourusername/Library/Caches/rclone/bisync on Mac,
+ or C:\Users\MyLogin\AppData\Local\rclone\bisync on Windows. Make
+ sure that this location is writable.
- Run bisync with the --resync flag, specifying the paths to the local
and remote sync directory roots.
-- For successive sync runs, leave off the --resync flag.
+- For successive sync runs, leave off the --resync flag. (Important!)
- Consider using a filters file for excluding unnecessary files and
directories from the sync.
- Consider setting up the --check-access feature for safety.
-- On Linux, consider setting up a crontab entry. bisync can safely run
- in concurrent cron jobs thanks to lock files it maintains.
+- On Linux or Mac, consider setting up a crontab entry. bisync can
+ safely run in concurrent cron jobs thanks to lock files it
+ maintains.
+
+For example, your first command might look like this:
+
+ rclone bisync remote1:path1 remote2:path2 --create-empty-src-dirs --compare size,modtime,checksum --slow-hash-sync-only --resilient -MvP --drive-skip-gdocs --fix-case --resync --dry-run
+
+If all looks good, run it again without --dry-run. After that, remove
+--resync as well.
Here is a typical run log (with timestamps removed for clarity):
@@ -19004,36 +20648,36 @@ Command line syntax
Type 'rclone listremotes' for list of configured remotes.
Optional Flags:
- --check-access Ensure expected `RCLONE_TEST` files are found on
- both Path1 and Path2 filesystems, else abort.
- --check-filename FILENAME Filename for `--check-access` (default: `RCLONE_TEST`)
- --check-sync CHOICE Controls comparison of final listings:
- `true | false | only` (default: true)
- If set to `only`, bisync will only compare listings
- from the last run but skip actual sync.
- --filters-file PATH Read filtering patterns from a file
- --max-delete PERCENT Safety check on maximum percentage of deleted files allowed.
- If exceeded, the bisync run will abort. (default: 50%)
- --force Bypass `--max-delete` safety check and run the sync.
- Consider using with `--verbose`
- --create-empty-src-dirs Sync creation and deletion of empty directories.
- (Not compatible with --remove-empty-dirs)
- --remove-empty-dirs Remove empty directories at the final cleanup step.
- -1, --resync Performs the resync run.
- Warning: Path1 files may overwrite Path2 versions.
- Consider using `--verbose` or `--dry-run` first.
- --ignore-listing-checksum Do not use checksums for listings
- (add --ignore-checksum to additionally skip post-copy checksum checks)
- --resilient Allow future runs to retry after certain less-serious errors,
- instead of requiring --resync. Use at your own risk!
- --localtime Use local time in listings (default: UTC)
- --no-cleanup Retain working files (useful for troubleshooting and testing).
- --workdir PATH Use custom working directory (useful for testing).
- (default: `~/.cache/rclone/bisync`)
- -n, --dry-run Go through the motions - No files are copied/deleted.
- -v, --verbose Increases logging verbosity.
- May be specified more than once for more details.
- -h, --help help for bisync
+ --backup-dir1 string --backup-dir for Path1. Must be a non-overlapping path on the same remote.
+ --backup-dir2 string --backup-dir for Path2. Must be a non-overlapping path on the same remote.
+ --check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
+ --check-filename string Filename for --check-access (default: RCLONE_TEST)
+ --check-sync string Controls comparison of final listings: true|false|only (default: true) (default "true")
+ --compare string Comma-separated list of bisync-specific compare options ex. 'size,modtime,checksum' (default: 'size,modtime')
+ --conflict-loser ConflictLoserAction Action to take on the loser of a sync conflict (when there is a winner) or on both files (when there is no winner): , num, pathname, delete (default: num)
+ --conflict-resolve string Automatically resolve conflicts by preferring the version that is: none, path1, path2, newer, older, larger, smaller (default: none) (default "none")
+ --conflict-suffix string Suffix to use when renaming a --conflict-loser. Can be either one string or two comma-separated strings to assign different suffixes to Path1/Path2. (default: 'conflict')
+ --create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
+ --download-hash Compute hash by downloading when otherwise unavailable. (warning: may be slow and use lots of data!)
+ --filters-file string Read filtering patterns from a file
+ --force Bypass --max-delete safety check and run the sync. Consider using with --verbose
+ -h, --help help for bisync
+ --ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
+ --max-lock Duration Consider lock files older than this to be expired (default: 0 (never expire)) (minimum: 2m) (default 0s)
+ --no-cleanup Retain working files (useful for troubleshooting and testing).
+ --no-slow-hash Ignore listing checksums only on backends where they are slow
+ --recover Automatically recover from interruptions without requiring --resync.
+ --remove-empty-dirs Remove ALL empty directories at the final cleanup step.
+ --resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync. Use at your own risk!
+ -1, --resync Performs the resync run. Equivalent to --resync-mode path1. Consider using --verbose or --dry-run first.
+ --resync-mode string During resync, prefer the version that is: path1, path2, newer, older, larger, smaller (default: path1 if --resync, otherwise none for no resync.) (default "none")
+ --retries int Retry operations this many times if they fail (requires --resilient). (default 3)
+ --retries-sleep Duration Interval between retrying operations if they fail, e.g. 500ms, 60s, 5m (0 to disable) (default 0s)
+ --slow-hash-sync-only Ignore slow checksums for listings and deltas, but still consider them during sync calls.
+ --workdir string Use custom working dir - useful for testing. (default: {WORKDIR})
+ --max-delete PERCENT Safety check on maximum percentage of deleted files allowed. If exceeded, the bisync run will abort. (default: 50%)
+ -n, --dry-run Go through the motions - No files are copied/deleted.
+ -v, --verbose Increases logging verbosity. May be specified more than once for more details.
Arbitrary rclone flags may be specified on the bisync command line, for
example
@@ -19069,28 +20713,25 @@ Command-line flags
--resync
This will effectively make both Path1 and Path2 filesystems contain a
-matching superset of all files. Path2 files that do not exist in Path1
-will be copied to Path1, and the process will then copy the Path1 tree
-to Path2.
+matching superset of all files. By default, Path2 files that do not
+exist in Path1 will be copied to Path1, and the process will then copy
+the Path1 tree to Path2.
-The --resync sequence is roughly equivalent to:
+The --resync sequence is roughly equivalent to the following (but see
+--resync-mode for other options):
- rclone copy Path2 Path1 --ignore-existing
- rclone copy Path1 Path2
-
-Or, if using --create-empty-src-dirs:
-
- rclone copy Path2 Path1 --ignore-existing
- rclone copy Path1 Path2 --create-empty-src-dirs
- rclone copy Path2 Path1 --create-empty-src-dirs
+ rclone copy Path2 Path1 --ignore-existing [--create-empty-src-dirs]
+ rclone copy Path1 Path2 [--create-empty-src-dirs]
The base directories on both Path1 and Path2 filesystems must exist or
bisync will fail. This is required for safety - that bisync can verify
that both paths are valid.
When using --resync, a newer version of a file on the Path2 filesystem
-will be overwritten by the Path1 filesystem version. (Note that this is
-NOT entirely symmetrical.) Carefully evaluate deltas using --dry-run.
+will (by default) be overwritten by the Path1 filesystem version. (Note
+that this is NOT entirely symmetrical, and more symmetrical options can
+be specified with the --resync-mode flag.) Carefully evaluate deltas
+using --dry-run.
For a resync run, one of the paths may be empty (no files in the path
tree). The resync run should result in files on both paths, else a
@@ -19102,6 +20743,100 @@ Empty current PathN listing. Cannot sync to an empty directory: X.pathN.lst
This is a safety check that an unexpected empty path does not result in
deleting everything in the other path.
+Note that --resync implies --resync-mode path1 unless a different
+--resync-mode is explicitly specified. It is not necessary to use both
+the --resync and --resync-mode flags -- either one is sufficient without
+the other.
+
+Note: --resync (including --resync-mode) should only be used under three
+specific (rare) circumstances: 1. It is your first bisync run (between
+these two paths) 2. You've just made changes to your bisync settings
+(such as editing the contents of your --filters-file) 3. There was an
+error on the prior run, and as a result, bisync now requires --resync to
+recover
+
+The rest of the time, you should omit --resync. The reason is because
+--resync will only copy (not sync) each side to the other. Therefore, if
+you included --resync for every bisync run, it would never be possible
+to delete a file -- the deleted file would always keep reappearing at
+the end of every run (because it's being copied from the other side
+where it still exists). Similarly, renaming a file would always result
+in a duplicate copy (both old and new name) on both sides.
+
+If you find that frequent interruptions from #3 are an issue, rather
+than automatically running --resync, the recommended alternative is to
+use the --resilient, --recover, and --conflict-resolve flags, (along
+with Graceful Shutdown mode, when needed) for a very robust
+"set-it-and-forget-it" bisync setup that can automatically bounce back
+from almost any interruption it might encounter. Consider adding
+something like the following:
+
+ --resilient --recover --max-lock 2m --conflict-resolve newer
+
+--resync-mode CHOICE
+
+In the event that a file differs on both sides during a --resync,
+--resync-mode controls which version will overwrite the other. The
+supported options are similar to --conflict-resolve. For all of the
+following options, the version that is kept is referred to as the
+"winner", and the version that is overwritten (deleted) is referred to
+as the "loser". The options are named after the "winner":
+
+- path1 - (the default) - the version from Path1 is unconditionally
+ considered the winner (regardless of modtime and size, if any). This
+ can be useful if one side is more trusted or up-to-date than the
+ other, at the time of the --resync.
+- path2 - same as path1, except the path2 version is considered the
+ winner.
+- newer - the newer file (by modtime) is considered the winner,
+ regardless of which side it came from. This may result in having a
+ mix of some winners from Path1, and some winners from Path2. (The
+ implementation is analogous to running rclone copy --update in both
+ directions.)
+- older - same as newer, except the older file is considered the
+ winner, and the newer file is considered the loser.
+- larger - the larger file (by size) is considered the winner
+ (regardless of modtime, if any). This can be a useful option for
+ remotes without modtime support, or with the kinds of files (such as
+ logs) that tend to grow but not shrink, over time.
+- smaller - the smaller file (by size) is considered the winner
+ (regardless of modtime, if any).
+
+For all of the above options, note the following: - If either of the
+underlying remotes lacks support for the chosen method, it will be
+ignored and will fall back to the default of path1. (For example, if
+--resync-mode newer is set, but one of the paths uses a remote that
+doesn't support modtime.) - If a winner can't be determined because the
+chosen method's attribute is missing or equal, it will be ignored, and
+bisync will instead try to determine whether the files differ by looking
+at the other --compare methods in effect. (For example, if
+--resync-mode newer is set, but the Path1 and Path2 modtimes are
+identical, bisync will compare the sizes.) If bisync concludes that they
+differ, preference is given to whichever is the "source" at that moment.
+(In practice, this gives a slight advantage to Path2, as the 2to1 copy
+comes before the 1to2 copy.) If the files do not differ, nothing is
+copied (as both sides are already correct). - These options apply only
+to files that exist on both sides (with the same name and relative
+path). Files that exist only on one side and not the other are always
+copied to the other, during --resync (this is one of the main
+differences between resync and non-resync runs.). - --conflict-resolve,
+--conflict-loser, and --conflict-suffix do not apply during --resync,
+and unlike these flags, nothing is renamed during --resync. When a file
+differs on both sides during --resync, one version always overwrites the
+other (much like in rclone copy.) (Consider using --backup-dir to retain
+a backup of the losing version.) - Unlike for --conflict-resolve,
+--resync-mode none is not a valid option (or rather, it will be
+interpreted as "no resync", unless --resync has also been specified, in
+which case it will be ignored.) - Winners and losers are decided at the
+individual file-level only (there is not currently an option to pick an
+entire winning directory atomically, although the path1 and path2
+options typically produce a similar result.) - To maintain
+backward-compatibility, the --resync flag implies --resync-mode path1
+unless a different --resync-mode is explicitly specified. Similarly, all
+--resync-mode options (except none) imply --resync, so it is not
+necessary to use both the --resync and --resync-mode flags
+simultaneously -- either one is sufficient without the other.
+
--check-access
Access check files are an additional safety measure against data loss.
@@ -19141,6 +20876,145 @@ must exist, synchronized between your source and destination filesets,
in order for --check-access to succeed. See --check-access for
additional details.
+--compare
+
+As of v1.66, bisync fully supports comparing based on any combination of
+size, modtime, and checksum (lifting the prior restriction on backends
+without modtime support.)
+
+By default (without the --compare flag), bisync inherits the same
+comparison options as sync (that is: size and modtime by default, unless
+modified with flags such as --checksum or --size-only.)
+
+If the --compare flag is set, it will override these defaults. This can
+be useful if you wish to compare based on combinations not currently
+supported in sync, such as comparing all three of size AND modtime AND
+checksum simultaneously (or just modtime AND checksum).
+
+--compare takes a comma-separated list, with the currently supported
+values being size, modtime, and checksum. For example, if you want to
+compare size and checksum, but not modtime, you would do:
+
+ --compare size,checksum
+
+Or if you want to compare all three:
+
+ --compare size,modtime,checksum
+
+--compare overrides any conflicting flags. For example, if you set the
+conflicting flags --compare checksum --size-only, --size-only will be
+ignored, and bisync will compare checksum and not size. To avoid
+confusion, it is recommended to use either --compare or the normal sync
+flags, but not both.
+
+If --compare includes checksum and both remotes support checksums but
+have no hash types in common with each other, checksums will be
+considered only for comparisons within the same side (to determine what
+has changed since the prior sync), but not for comparisons against the
+opposite side. If one side supports checksums and the other does not,
+checksums will only be considered on the side that supports them.
+
+When comparing with checksum and/or size without modtime, bisync cannot
+determine whether a file is newer or older -- only whether it is changed
+or unchanged. (If it is changed on both sides, bisync still does the
+standard equality-check to avoid declaring a sync conflict unless it
+absolutely has to.)
+
+It is recommended to do a --resync when changing --compare settings, as
+otherwise your prior listing files may not contain the attributes you
+wish to compare (for example, they will not have stored checksums if you
+were not previously comparing checksums.)
+
+--ignore-listing-checksum
+
+When --checksum or --compare checksum is set, bisync will retrieve (or
+generate) checksums (for backends that support them) when creating the
+listings for both paths, and store the checksums in the listing files.
+--ignore-listing-checksum will disable this behavior, which may speed
+things up considerably, especially on backends (such as local) where
+hashes must be computed on the fly instead of retrieved. Please note the
+following:
+
+- As of v1.66, --ignore-listing-checksum is now automatically set when
+ neither --checksum nor --compare checksum are in use (as the
+ checksums would not be used for anything.)
+- --ignore-listing-checksum is NOT the same as --ignore-checksum, and
+ you may wish to use one or the other, or both. In a nutshell:
+ --ignore-listing-checksum controls whether checksums are considered
+ when scanning for diffs, while --ignore-checksum controls whether
+ checksums are considered during the copy/sync operations that
+ follow, if there ARE diffs.
+- Unless --ignore-listing-checksum is passed, bisync currently
+ computes hashes for one path even when there's no common hash with
+ the other path (for example, a crypt remote.) This can still be
+ beneficial, as the hashes will still be used to detect changes
+ within the same side (if --checksum or --compare checksum is set),
+ even if they can't be used to compare against the opposite side.
+- If you wish to ignore listing checksums only on remotes where they
+ are slow to compute, consider using --no-slow-hash (or
+ --slow-hash-sync-only) instead of --ignore-listing-checksum.
+- If --ignore-listing-checksum is used simultaneously with
+ --compare checksum (or --checksum), checksums will be ignored for
+ bisync deltas, but still considered during the sync operations that
+ follow (if deltas are detected based on modtime and/or size.)
+
+--no-slow-hash
+
+On some remotes (notably local), checksums can dramatically slow down a
+bisync run, because hashes cannot be stored and need to be computed in
+real-time when they are requested. On other remotes (such as drive),
+they add practically no time at all. The --no-slow-hash flag will
+automatically skip checksums on remotes where they are slow, while still
+comparing them on others (assuming --compare includes checksum.) This
+can be useful when one of your bisync paths is slow but you still want
+to check checksums on the other, for a more robust sync.
+
+--slow-hash-sync-only
+
+Same as --no-slow-hash, except slow hashes are still considered during
+sync calls. They are still NOT considered for determining deltas, nor or
+they included in listings. They are also skipped during --resync. The
+main use case for this flag is when you have a large number of files,
+but relatively few of them change from run to run -- so you don't want
+to check your entire tree every time (it would take too long), but you
+still want to consider checksums for the smaller group of files for
+which a modtime or size change was detected. Keep in mind that this
+speed savings comes with a safety trade-off: if a file's content were to
+change without a change to its modtime or size, bisync would not detect
+it, and it would not be synced.
+
+--slow-hash-sync-only is only useful if both remotes share a common hash
+type (if they don't, bisync will automatically fall back to
+--no-slow-hash.) Both --no-slow-hash and --slow-hash-sync-only have no
+effect without --compare checksum (or --checksum).
+
+--download-hash
+
+If --download-hash is set, bisync will use best efforts to obtain an MD5
+checksum by downloading and computing on-the-fly, when checksums are not
+otherwise available (for example, a remote that doesn't support them.)
+Note that since rclone has to download the entire file, this may
+dramatically slow down your bisync runs, and is also likely to use a lot
+of data, so it is probably not practical for bisync paths with a large
+total file size. However, it can be a good option for syncing
+small-but-important files with maximum accuracy (for example, a source
+code repo on a crypt remote.) An additional advantage over methods like
+cryptcheck is that the original file is not required for comparison (for
+example, --download-hash can be used to bisync two different crypt
+remotes with different passwords.)
+
+When --download-hash is set, bisync still looks for more efficient
+checksums first, and falls back to downloading only when none are found.
+It takes priority over conflicting flags such as --no-slow-hash.
+--download-hash is not suitable for Google Docs and other files of
+unknown size, as their checksums would change from run to run (due to
+small variances in the internals of the generated export file.)
+Therefore, bisync automatically skips --download-hash for files with a
+size less than 0.
+
+See also: Hasher backend, cryptcheck command, rclone check --download
+option, md5sum command
+
--max-delete
As a safety check, if greater than the --max-delete percent of files
@@ -19180,6 +21054,146 @@ to the hash stored in the .md5 file. If they don't match, the run aborts
with a critical error and thus forces you to do a --resync, likely
avoiding a disaster.
+--conflict-resolve CHOICE
+
+In bisync, a "conflict" is a file that is new or changed on both sides
+(relative to the prior run) AND is not currently identical on both
+sides. --conflict-resolve controls how bisync handles such a scenario.
+The currently supported options are:
+
+- none - (the default) - do not attempt to pick a winner, keep and
+ rename both files according to --conflict-loser and
+ --conflict-suffix settings. For example, with the default settings,
+ file.txt on Path1 is renamed file.txt.conflict1 and file.txt on
+ Path2 is renamed file.txt.conflict2. Both are copied to the opposite
+ path during the run, so both sides end up with a copy of both files.
+ (As none is the default, it is not necessary to specify
+ --conflict-resolve none -- you can just omit the flag.)
+- newer - the newer file (by modtime) is considered the winner and is
+ copied without renaming. The older file (the "loser") is handled
+ according to --conflict-loser and --conflict-suffix settings (either
+ renamed or deleted.) For example, if file.txt on Path1 is newer than
+ file.txt on Path2, the result on both sides (with other default
+ settings) will be file.txt (winner from Path1) and
+ file.txt.conflict1 (loser from Path2).
+- older - same as newer, except the older file is considered the
+ winner, and the newer file is considered the loser.
+- larger - the larger file (by size) is considered the winner
+ (regardless of modtime, if any).
+- smaller - the smaller file (by size) is considered the winner
+ (regardless of modtime, if any).
+- path1 - the version from Path1 is unconditionally considered the
+ winner (regardless of modtime and size, if any). This can be useful
+ if one side is usually more trusted or up-to-date than the other.
+- path2 - same as path1, except the path2 version is considered the
+ winner.
+
+For all of the above options, note the following: - If either of the
+underlying remotes lacks support for the chosen method, it will be
+ignored and fall back to none. (For example, if --conflict-resolve newer
+is set, but one of the paths uses a remote that doesn't support
+modtime.) - If a winner can't be determined because the chosen method's
+attribute is missing or equal, it will be ignored and fall back to none.
+(For example, if --conflict-resolve newer is set, but the Path1 and
+Path2 modtimes are identical, even if the sizes may differ.) - If the
+file's content is currently identical on both sides, it is not
+considered a "conflict", even if new or changed on both sides since the
+prior sync. (For example, if you made a change on one side and then
+synced it to the other side by other means.) Therefore, none of the
+conflict resolution flags apply in this scenario. - The conflict
+resolution flags do not apply during a --resync, as there is no "prior
+run" to speak of (but see --resync-mode for similar options.)
+
+--conflict-loser CHOICE
+
+--conflict-loser determines what happens to the "loser" of a sync
+conflict (when --conflict-resolve determines a winner) or to both files
+(when there is no winner.) The currently supported options are:
+
+- num - (the default) - auto-number the conflicts by automatically
+ appending the next available number to the --conflict-suffix, in
+ chronological order. For example, with the default settings, the
+ first conflict for file.txt will be renamed file.txt.conflict1. If
+ file.txt.conflict1 already exists, file.txt.conflict2 will be used
+ instead (etc., up to a maximum of 9223372036854775807 conflicts.)
+- pathname - rename the conflicts according to which side they came
+ from, which was the default behavior prior to v1.66. For example,
+ with --conflict-suffix path, file.txt from Path1 will be renamed
+ file.txt.path1, and file.txt from Path2 will be renamed
+ file.txt.path2. If two non-identical suffixes are provided (ex.
+ --conflict-suffix cloud,local), the trailing digit is omitted.
+ Importantly, note that with pathname, there is no auto-numbering
+ beyond 2, so if file.txt.path2 somehow already exists, it will be
+ overwritten. Using a dynamic date variable in your --conflict-suffix
+ (see below) is one possible way to avoid this. Note also that
+ conflicts-of-conflicts are possible, if the original conflict is not
+ manually resolved -- for example, if for some reason you edited
+ file.txt.path1 on both sides, and those edits were different, the
+ result would be file.txt.path1.path1 and file.txt.path1.path2 (in
+ addition to file.txt.path2.)
+- delete - keep the winner only and delete the loser, instead of
+ renaming it. If a winner cannot be determined (see
+ --conflict-resolve for details on how this could happen), delete is
+ ignored and the default num is used instead (i.e. both versions are
+ kept and renamed, and neither is deleted.) delete is inherently the
+ most destructive option, so use it only with care.
+
+For all of the above options, note that if a winner cannot be determined
+(see --conflict-resolve for details on how this could happen), or if
+--conflict-resolve is not in use, both files will be renamed.
+
+--conflict-suffix STRING[,STRING]
+
+--conflict-suffix controls the suffix that is appended when bisync
+renames a --conflict-loser (default: conflict). --conflict-suffix will
+accept either one string or two comma-separated strings to assign
+different suffixes to Path1 vs. Path2. This may be helpful later in
+identifying the source of the conflict. (For example,
+--conflict-suffix dropboxconflict,laptopconflict)
+
+With --conflict-loser num, a number is always appended to the suffix.
+With --conflict-loser pathname, a number is appended only when one
+suffix is specified (or when two identical suffixes are specified.) i.e.
+with --conflict-loser pathname, all of the following would produce
+exactly the same result:
+
+ --conflict-suffix path
+ --conflict-suffix path,path
+ --conflict-suffix path1,path2
+
+Suffixes may be as short as 1 character. By default, the suffix is
+appended after any other extensions (ex. file.jpg.conflict1), however,
+this can be changed with the --suffix-keep-extension flag (i.e. to
+instead result in file.conflict1.jpg).
+
+--conflict-suffix supports several dynamic date variables when enclosed
+in curly braces as globs. This can be helpful to track the date and/or
+time that each conflict was handled by bisync. For example:
+
+ --conflict-suffix {DateOnly}-conflict
+ // result: myfile.txt.2006-01-02-conflict1
+
+All of the formats described here and here are supported, but take care
+to ensure that your chosen format does not use any characters that are
+illegal on your remotes (for example, macOS does not allow colons in
+filenames, and slashes are also best avoided as they are often
+interpreted as directory separators.) To address this particular issue,
+an additional {MacFriendlyTime} (or just {mac}) option is supported,
+which results in 2006-01-02 0304PM.
+
+Note that --conflict-suffix is entirely separate from rclone's main
+--sufix flag. This is intentional, as users may wish to use both flags
+simultaneously, if also using --backup-dir.
+
+Finally, note that the default in bisync prior to v1.66 was to rename
+conflicts with ..path1 and ..path2 (with two periods, and path instead
+of conflict.) Bisync now defaults to a single dot instead of a double
+dot, but additional dots can be added by including them in the specified
+suffix string. For example, for behavior equivalent to the previous
+default, use:
+
+ [--conflict-resolve none] --conflict-loser pathname --conflict-suffix .path
+
--check-sync
Enabled by default, the check-sync function checks that all of the same
@@ -19198,39 +21212,51 @@ significantly reduce the sync run times for very large numbers of files.
The check may be run manually with --check-sync=only. It runs only the
integrity check and terminates without actually synching.
-See also: Concurrent modifications
+Note that currently, --check-sync only checks listing snapshots and NOT
+the actual files on the remotes. Note also that the listing snapshots
+will not know about any changes that happened during or after the latest
+bisync run, as those will be discovered on the next run. Therefore,
+while listings should always match each other at the end of a bisync
+run, it is expected that they will not match the underlying remotes, nor
+will the remotes match each other, if there were changes during or after
+the run. This is normal, and any differences will be detected and synced
+on the next run.
---ignore-listing-checksum
+For a robust integrity check of the current state of the remotes (as
+opposed to just their listing snapshots), consider using check (or
+cryptcheck, if at least one path is a crypt remote) instead of
+--check-sync, keeping in mind that differences are expected if files
+changed during or after your last bisync run.
-By default, bisync will retrieve (or generate) checksums (for backends
-that support them) when creating the listings for both paths, and store
-the checksums in the listing files. --ignore-listing-checksum will
-disable this behavior, which may speed things up considerably,
-especially on backends (such as local) where hashes must be computed on
-the fly instead of retrieved. Please note the following:
+For example, a possible sequence could look like this:
-- While checksums are (by default) generated and stored in the listing
- files, they are NOT currently used for determining diffs (deltas).
- It is anticipated that full checksum support will be added in a
- future version.
-- --ignore-listing-checksum is NOT the same as --ignore-checksum, and
- you may wish to use one or the other, or both. In a nutshell:
- --ignore-listing-checksum controls whether checksums are considered
- when scanning for diffs, while --ignore-checksum controls whether
- checksums are considered during the copy/sync operations that
- follow, if there ARE diffs.
-- Unless --ignore-listing-checksum is passed, bisync currently
- computes hashes for one path even when there's no common hash with
- the other path (for example, a crypt remote.)
-- If both paths support checksums and have a common hash, AND
- --ignore-listing-checksum was not specified when creating the
- listings, --check-sync=only can be used to compare Path1 vs. Path2
- checksums (as of the time the previous listings were created.)
- However, --check-sync=only will NOT include checksums if the
- previous listings were generated on a run using
- --ignore-listing-checksum. For a more robust integrity check of the
- current state, consider using check (or cryptcheck, if at least one
- path is a crypt remote.)
+1. Normally scheduled bisync run:
+
+ rclone bisync Path1 Path2 -MPc --check-access --max-delete 10 --filters-file /path/to/filters.txt -v --no-cleanup --ignore-listing-checksum --disable ListR --checkers=16 --drive-pacer-min-sleep=10ms --create-empty-src-dirs --resilient
+
+2. Periodic independent integrity check (perhaps scheduled nightly or
+ weekly):
+
+ rclone check -MvPc Path1 Path2 --filter-from /path/to/filters.txt
+
+3. If diffs are found, you have some choices to correct them. If one
+ side is more up-to-date and you want to make the other side match
+ it, you could run:
+
+ rclone sync Path1 Path2 --filter-from /path/to/filters.txt --create-empty-src-dirs -MPc -v
+
+(or switch Path1 and Path2 to make Path2 the source-of-truth)
+
+Or, if neither side is totally up-to-date, you could run a --resync to
+bring them back into agreement (but remember that this could cause
+deleted files to re-appear.)
+
+*Note also that rclone check does not currently include empty
+directories, so if you want to know if any empty directories are out of
+sync, consider alternatively running the above rclone sync command with
+--dry-run added.
+
+See also: Concurrent modifications, --resilient
--resilient
@@ -19258,7 +21284,115 @@ the time of the next run, that next run will be allowed to proceed.
Certain more serious errors will still enforce a --resync lockout, even
in --resilient mode, to prevent data loss.
-Behavior of --resilient may change in a future version.
+Behavior of --resilient may change in a future version. (See also:
+--recover, --max-lock, Graceful Shutdown)
+
+--recover
+
+If --recover is set, in the event of a sudden interruption or other
+un-graceful shutdown, bisync will attempt to automatically recover on
+the next run, instead of requiring --resync. Bisync is able to recover
+robustly by keeping one "backup" listing at all times, representing the
+state of both paths after the last known successful sync. Bisync can
+then compare the current state with this snapshot to determine which
+changes it needs to retry. Changes that were synced after this snapshot
+(during the run that was later interrupted) will appear to bisync as if
+they are "new or changed on both sides", but in most cases this is not a
+problem, as bisync will simply do its usual "equality check" and learn
+that no action needs to be taken on these files, since they are already
+identical on both sides.
+
+In the rare event that a file is synced successfully during a run that
+later aborts, and then that same file changes AGAIN before the next run,
+bisync will think it is a sync conflict, and handle it accordingly.
+(From bisync's perspective, the file has changed on both sides since the
+last trusted sync, and the files on either side are not currently
+identical.) Therefore, --recover carries with it a slightly increased
+chance of having conflicts -- though in practice this is pretty rare, as
+the conditions required to cause it are quite specific. This risk can be
+reduced by using bisync's "Graceful Shutdown" mode (triggered by sending
+SIGINT or Ctrl+C), when you have the choice, instead of forcing a sudden
+termination.
+
+--recover and --resilient are similar, but distinct -- the main
+difference is that --resilient is about retrying, while --recover is
+about recovering. Most users will probably want both. --resilient allows
+retrying when bisync has chosen to abort itself due to safety features
+such as failing --check-access or detecting a filter change. --resilient
+does not cover external interruptions such as a user shutting down their
+computer in the middle of a sync -- that is what --recover is for.
+
+--max-lock
+
+Bisync uses lock files as a safety feature to prevent interference from
+other bisync runs while it is running. Bisync normally removes these
+lock files at the end of a run, but if bisync is abruptly interrupted,
+these files will be left behind. By default, they will lock out all
+future runs, until the user has a chance to manually check things out
+and remove the lock. As an alternative, --max-lock can be used to make
+them automatically expire after a certain period of time, so that future
+runs are not locked out forever, and auto-recovery is possible.
+--max-lock can be any duration 2m or greater (or 0 to disable). If set,
+lock files older than this will be considered "expired", and future runs
+will be allowed to disregard them and proceed. (Note that the --max-lock
+duration must be set by the process that left the lock file -- not the
+later one interpreting it.)
+
+If set, bisync will also "renew" these lock files every
+--max-lock minus one minute throughout a run, for extra safety. (For
+example, with --max-lock 5m, bisync would renew the lock file (for
+another 5 minutes) every 4 minutes until the run has completed.) In
+other words, it should not be possible for a lock file to pass its
+expiration time while the process that created it is still running --
+and you can therefore be reasonably sure that any expired lock file you
+may find was left there by an interrupted run, not one that is still
+running and just taking awhile.
+
+If --max-lock is 0 or not set, the default is that lock files will never
+expire, and will block future runs (of these same two bisync paths)
+indefinitely.
+
+For maximum resilience from disruptions, consider setting a relatively
+short duration like --max-lock 2m along with --resilient and --recover,
+and a relatively frequent cron schedule. The result will be a very
+robust "set-it-and-forget-it" bisync run that can automatically bounce
+back from almost any interruption it might encounter, without requiring
+the user to get involved and run a --resync. (See also: Graceful
+Shutdown mode)
+
+--backup-dir1 and --backup-dir2
+
+As of v1.66, --backup-dir is supported in bisync. Because --backup-dir
+must be a non-overlapping path on the same remote, Bisync has introduced
+new --backup-dir1 and --backup-dir2 flags to support separate
+backup-dirs for Path1 and Path2 (bisyncing between different remotes
+with --backup-dir would not otherwise be possible.) --backup-dir1 and
+--backup-dir2 can use different remotes from each other, but
+--backup-dir1 must use the same remote as Path1, and --backup-dir2 must
+use the same remote as Path2. Each backup directory must not overlap its
+respective bisync Path without being excluded by a filter rule.
+
+The standard --backup-dir will also work, if both paths use the same
+remote (but note that deleted files from both paths would be mixed
+together in the same dir). If either --backup-dir1 and --backup-dir2 are
+set, they will override --backup-dir.
+
+Example:
+
+ rclone bisync /Users/someuser/some/local/path/Bisync gdrive:Bisync --backup-dir1 /Users/someuser/some/local/path/BackupDir --backup-dir2 gdrive:BackupDir --suffix -2023-08-26 --suffix-keep-extension --check-access --max-delete 10 --filters-file /Users/someuser/some/local/path/bisync_filters.txt --no-cleanup --ignore-listing-checksum --checkers=16 --drive-pacer-min-sleep=10ms --create-empty-src-dirs --resilient -MvP --drive-skip-gdocs --fix-case
+
+In this example, if the user deletes a file in
+/Users/someuser/some/local/path/Bisync, bisync will propagate the delete
+to the other side by moving the corresponding file from gdrive:Bisync to
+gdrive:BackupDir. If the user deletes a file from gdrive:Bisync, bisync
+moves it from /Users/someuser/some/local/path/Bisync to
+/Users/someuser/some/local/path/BackupDir.
+
+In the event of a rename due to a sync conflict, the rename is not
+considered a delete, unless a previous conflict with the same name
+already exists and would get overwritten.
+
+See also: --suffix, --suffix-keep-extension
Operation
@@ -19275,8 +21409,9 @@ Safety measures
- Lock file prevents multiple simultaneous runs when taking a while.
This can be particularly useful if bisync is run by cron scheduler.
-- Handle change conflicts non-destructively by creating ..path1 and
- ..path2 file versions.
+- Handle change conflicts non-destructively by creating .conflict1,
+ .conflict2, etc. file versions, according to --conflict-resolve,
+ --conflict-loser, and --conflict-suffix settings.
- File system access health check using RCLONE_TEST files (see the
--check-access flag).
- Abort on excessive deletes - protects against a failed listing being
@@ -19317,45 +21452,50 @@ Normal sync checks
Unusual sync checks
- ----------------------------------------------------------------------------
- Type Description Result Implementation
- ----------------- --------------------- ------------------- ----------------
- Path1 new/changed File is new/changed No change None
- AND Path2 on Path1 AND
- new/changed AND new/changed on Path2
- Path1 == Path2 AND Path1 version is
- currently identical
- to Path2
+ ------------------------------------------------------------------------------
+ Type Description Result Implementation
+ ----------------- --------------------- -------------------- -----------------
+ Path1 new/changed File is new/changed No change None
+ AND Path2 on Path1 AND
+ new/changed AND new/changed on Path2
+ Path1 == Path2 AND Path1 version is
+ currently identical
+ to Path2
- Path1 new AND File is new on Path1 Files renamed to rclone copy
- Path2 new AND new on Path2 (and _Path1 and _Path2 _Path2 file to
- Path1 version is NOT Path1,
- identical to Path2) rclone copy
- _Path1 file to
- Path2
+ Path1 new AND File is new on Path1 Conflicts handled default:
+ Path2 new AND new on Path2 (and according to rclone copy
+ Path1 version is NOT --conflict-resolve & renamed
+ identical to Path2) --conflict-loser Path2.conflict2
+ settings file to Path1,
+ rclone copy
+ renamed
+ Path1.conflict1
+ file to Path2
- Path2 newer AND File is newer on Files renamed to rclone copy
- Path1 changed Path2 AND also _Path1 and _Path2 _Path2 file to
- changed Path1,
- (newer/older/size) on rclone copy
- Path1 (and Path1 _Path1 file to
- version is NOT Path2
- identical to Path2)
+ Path2 newer AND File is newer on Conflicts handled default:
+ Path1 changed Path2 AND also according to rclone copy
+ changed --conflict-resolve & renamed
+ (newer/older/size) on --conflict-loser Path2.conflict2
+ Path1 (and Path1 settings file to Path1,
+ version is NOT rclone copy
+ identical to Path2) renamed
+ Path1.conflict1
+ file to Path2
- Path2 newer AND File is newer on Path2 version rclone copy
- Path1 deleted Path2 AND also survives Path2 to Path1
- deleted on Path1
+ Path2 newer AND File is newer on Path2 version rclone copy Path2
+ Path1 deleted Path2 AND also survives to Path1
+ deleted on Path1
- Path2 deleted AND File is deleted on Path1 version rclone copy
- Path1 changed Path2 AND changed survives Path1 to Path2
- (newer/older/size) on
- Path1
+ Path2 deleted AND File is deleted on Path1 version rclone copy Path1
+ Path1 changed Path2 AND changed survives to Path2
+ (newer/older/size) on
+ Path1
- Path1 deleted AND File is deleted on Path2 version rclone copy
- Path2 changed Path1 AND changed survives Path2 to Path1
- (newer/older/size) on
- Path2
- ----------------------------------------------------------------------------
+ Path1 deleted AND File is deleted on Path2 version rclone copy Path2
+ Path2 changed Path1 AND changed survives to Path1
+ (newer/older/size) on
+ Path2
+ ------------------------------------------------------------------------------
As of rclone v1.64, bisync is now better at detecting false positive
sync conflicts, which would previously have resulted in unnecessary
@@ -19364,9 +21504,9 @@ to rename (because it is new/changed on both sides), it first checks
whether the Path1 and Path2 versions are currently identical (using the
same underlying function as check.) If bisync concludes that the files
are identical, it will skip them and move on. Otherwise, it will create
-renamed ..Path1 and ..Path2 duplicates, as before. This behavior also
-improves the experience of renaming directories, as a --resync is no
-longer required, so long as the same change has been made on both sides.
+renamed duplicates, as before. This behavior also improves the
+experience of renaming directories, as a --resync is no longer required,
+so long as the same change has been made on both sides.
All files changed check
@@ -19381,19 +21521,12 @@ the changes.
Modification times
-Bisync relies on file timestamps to identify changed files and will
-refuse to operate if backend lacks the modification time support.
-
-If you or your application should change the content of a file without
-changing the modification time then bisync will not notice the change,
-and thus will not copy it to the other side.
-
-Note that on some cloud storage systems it is not possible to have file
-timestamps that match precisely between the local and other filesystems.
-
-Bisync's approach to this problem is by tracking the changes on each
-side separately over time with a local database of files in that side
-then applying the resulting changes on the other side.
+By default, bisync compares files by modification time and size. If you
+or your application should change the content of a file without changing
+the modification time and size, then bisync will not notice the change,
+and thus will not copy it to the other side. As an alternative, consider
+comparing by checksum (if your remotes support it). See --compare for
+details.
Error handling
@@ -19417,7 +21550,7 @@ at ${HOME}/.cache/rclone/bisync/ on Linux.
Some errors are considered temporary and re-running the bisync is not
blocked. The critical return blocks further bisync runs.
-See also: --resilient
+See also: --resilient, --recover, --max-lock, Graceful Shutdown
Lock file
@@ -19428,7 +21561,9 @@ place and block any further runs of bisync for the same paths. Delete
the lock file as part of debugging the situation. The lock file
effectively blocks follow-on (e.g., scheduled by cron) runs when the
prior invocation is taking a long time. The lock file contains PID of
-the blocking process, which may help in debug.
+the blocking process, which may help in debug. Lock files can be set to
+automatically expire after a certain amount of time, using the
+--max-lock flag.
Note that while concurrent bisync runs are allowed, be very cautious
that there is no overlap in the trees being synched between concurrent
@@ -19441,69 +21576,74 @@ successful run, - 1 for a non-critical failing run (a rerun may be
successful), - 2 for a critically aborted run (requires a --resync to
recover).
+Graceful Shutdown
+
+Bisync has a "Graceful Shutdown" mode which is activated by sending
+SIGINT or pressing Ctrl+C during a run. Once triggered, bisync will use
+best efforts to exit cleanly before the timer runs out. If bisync is in
+the middle of transferring files, it will attempt to cleanly empty its
+queue by finishing what it has started but not taking more. If it cannot
+do so within 30 seconds, it will cancel the in-progress transfers at
+that point and then give itself a maximum of 60 seconds to wrap up, save
+its state for next time, and exit. With the -vP flags you will see
+constant status updates and a final confirmation of whether or not the
+graceful shutdown was successful.
+
+At any point during the "Graceful Shutdown" sequence, a second SIGINT or
+Ctrl+C will trigger an immediate, un-graceful exit, which will leave
+things in a messier state. Usually a robust recovery will still be
+possible if using --recover mode, otherwise you will need to do a
+--resync.
+
+If you plan to use Graceful Shutdown mode, it is recommended to use
+--resilient and --recover, and it is important to NOT use --inplace,
+otherwise you risk leaving partially-written files on one side, which
+may be confused for real files on the next run. Note also that in the
+event of an abrupt interruption, a lock file will be left behind to
+block concurrent runs. You will need to delete it before you can proceed
+with the next run (or wait for it to expire on its own, if using
+--max-lock.)
+
Limitations
Supported backends
Bisync is considered BETA and has been tested with the following
backends: - Local filesystem - Google Drive - Dropbox - OneDrive - S3 -
-SFTP - Yandex Disk
+SFTP - Yandex Disk - Crypt
It has not been fully tested with other services yet. If it works, or
sorta works, please let us know and we'll update the list. Run the test
suite to check for proper operation as described below.
-First release of rclone bisync requires that underlying backend supports
-the modification time feature and will refuse to run otherwise. This
-limitation will be lifted in a future rclone bisync release.
+The first release of rclone bisync required both underlying backends to
+support modification times, and refused to run otherwise. This
+limitation has been lifted as of v1.66, as bisync now supports comparing
+checksum and/or size instead of (or in addition to) modtime. See
+--compare for details.
Concurrent modifications
-When using Local, FTP or SFTP remotes rclone does not create temporary
-files at the destination when copying, and thus if the connection is
-lost the created file may be corrupt, which will likely propagate back
-to the original path on the next sync, resulting in data loss. This will
-be solved in a future release, there is no workaround at the moment.
+When using Local, FTP or SFTP remotes with --inplace, rclone does not
+create temporary files at the destination when copying, and thus if the
+connection is lost the created file may be corrupt, which will likely
+propagate back to the original path on the next sync, resulting in data
+loss. It is therefore recommended to omit --inplace.
-Files that change during a bisync run may result in data loss. This has
-been seen in a highly dynamic environment, where the filesystem is
-getting hammered by running processes during the sync. The currently
-recommended solution is to sync at quiet times or filter out unnecessary
-directories and files.
-
-As an alternative approach, consider using --check-sync=false (and
-possibly --resilient) to make bisync more forgiving of filesystems that
-change during the sync. Be advised that this may cause bisync to miss
-events that occur during a bisync run, so it is a good idea to
-supplement this with a periodic independent integrity check, and
-corrective sync if diffs are found. For example, a possible sequence
-could look like this:
-
-1. Normally scheduled bisync run:
-
- rclone bisync Path1 Path2 -MPc --check-access --max-delete 10 --filters-file /path/to/filters.txt -v --check-sync=false --no-cleanup --ignore-listing-checksum --disable ListR --checkers=16 --drive-pacer-min-sleep=10ms --create-empty-src-dirs --resilient
-
-2. Periodic independent integrity check (perhaps scheduled nightly or
- weekly):
-
- rclone check -MvPc Path1 Path2 --filter-from /path/to/filters.txt
-
-3. If diffs are found, you have some choices to correct them. If one
- side is more up-to-date and you want to make the other side match
- it, you could run:
-
- rclone sync Path1 Path2 --filter-from /path/to/filters.txt --create-empty-src-dirs -MPc -v
-
-(or switch Path1 and Path2 to make Path2 the source-of-truth)
-
-Or, if neither side is totally up-to-date, you could run a --resync to
-bring them back into agreement (but remember that this could cause
-deleted files to re-appear.)
-
-*Note also that rclone check does not currently include empty
-directories, so if you want to know if any empty directories are out of
-sync, consider alternatively running the above rclone sync command with
---dry-run added.
+Files that change during a bisync run may result in data loss. Prior to
+rclone v1.66, this was commonly seen in highly dynamic environments,
+where the filesystem was getting hammered by running processes during
+the sync. As of rclone v1.66, bisync was redesigned to use a "snapshot"
+model, greatly reducing the risks from changes during a sync. Changes
+that are not detected during the current sync will now be detected
+during the following sync, and will no longer cause the entire run to
+throw a critical error. There is additionally a mechanism to mark files
+as needing to be internally rechecked next time, for added safety. It
+should therefore no longer be necessary to sync only at quiet times --
+however, note that an error can still occur if a file happens to change
+at the exact moment it's being read/written by bisync (same as would
+happen in rclone sync.) (See also: --ignore-checksum,
+--local-no-check-updated)
Empty directories
@@ -19525,14 +21665,20 @@ but it's still probably best to stick to one or the other, and use
Renamed directories
-Renaming a folder on the Path1 side results in deleting all files on the
-Path2 side and then copying all files again from Path1 to Path2. Bisync
-sees this as all files in the old directory name as deleted and all
-files in the new directory name as new. Currently, the most effective
-and efficient method of renaming a directory is to rename it to the same
-name on both sides. (As of rclone v1.64, a --resync is no longer
-required after doing so, as bisync will automatically detect that Path1
-and Path2 are in agreement.)
+By default, renaming a folder on the Path1 side results in deleting all
+files on the Path2 side and then copying all files again from Path1 to
+Path2. Bisync sees this as all files in the old directory name as
+deleted and all files in the new directory name as new.
+
+A recommended solution is to use --track-renames, which is now supported
+in bisync as of rclone v1.66. Note that --track-renames is not available
+during --resync, as --resync does not delete anything (--track-renames
+only supports sync, not copy.)
+
+Otherwise, the most effective and efficient method of renaming a
+directory is to rename it to the same name on both sides. (As of
+rclone v1.64, a --resync is no longer required after doing so, as bisync
+will automatically detect that Path1 and Path2 are in agreement.)
--fast-list used by default
@@ -19544,28 +21690,21 @@ users with many empty directories. For now, the recommended way to avoid
using --fast-list is to add --disable ListR to all bisync commands. The
default behavior may change in a future version.
-Overridden Configs
+Case (and unicode) sensitivity
-When rclone detects an overridden config, it adds a suffix like {ABCDE}
-on the fly to the internal name of the remote. Bisync follows suit by
-including this suffix in its listing filenames. However, this suffix
-does not necessarily persist from run to run, especially if different
-flags are provided. So if next time the suffix assigned is {FGHIJ},
-bisync will get confused, because it's looking for a listing file with
-{FGHIJ}, when the file it wants has {ABCDE}. As a result, it throws
-Bisync critical error: cannot find prior Path1 or Path2 listings, likely due to critical error on prior run
-and refuses to run again until the user runs a --resync (unless using
---resilient). The best workaround at the moment is to set any
-backend-specific flags in the config file instead of specifying them
-with command flags. (You can still override them as needed for other
-rclone commands.)
+As of v1.66, case and unicode form differences no longer cause critical
+errors, and normalization (when comparing between filesystems) is
+handled according to the same flags and defaults as rclone sync. See the
+following options (all of which are supported by bisync) to control this
+behavior more granularly: - --fix-case - --ignore-case-sync -
+--no-unicode-normalization - --local-unicode-normalization and
+--local-case-sensitive (caution: these are normally not what you want.)
-Case sensitivity
-
-Synching with case-insensitive filesystems, such as Windows or Box, can
-result in file name conflicts. This will be fixed in a future release.
-The near-term workaround is to make sure that files on both sides don't
-have spelling case differences (Smile.jpg vs. smile.jpg).
+Note that in the (probably rare) event that --fix-case is used AND a
+file is new/changed on both sides AND the checksums match AND the
+filename case does not match, the Path1 filename is considered the
+winner, for the purposes of --fix-case (Path2 will be renamed to match
+it).
Windows support
@@ -19844,22 +21983,57 @@ specifically which files are generating complaints. If the error is
This file has been identified as malware or spam and cannot be downloaded,
consider using the flag --drive-acknowledge-abuse.
-Google Doc files
+Google Docs (and other files of unknown size)
-Google docs exist as virtual files on Google Drive and cannot be
-transferred to other filesystems natively. While it is possible to
-export a Google doc to a normal file (with .xlsx extension, for
-example), it is not possible to import a normal file back into a Google
-document.
+As of v1.66, Google Docs (including Google Sheets, Slides, etc.) are now
+supported in bisync, subject to the same options, defaults, and
+limitations as in rclone sync. When bisyncing drive with non-drive
+backends, the drive -> non-drive direction is controlled by
+--drive-export-formats (default "docx,xlsx,pptx,svg") and the non-drive
+-> drive direction is controlled by --drive-import-formats (default
+none.)
-Bisync's handling of Google Doc files is to flag them in the run log
-output for user's attention and ignore them for any file transfers,
-deletes, or syncs. They will show up with a length of -1 in the
-listings. This bisync run is otherwise successful:
+For example, with the default export/import formats, a Google Sheet on
+the drive side will be synced to an .xlsx file on the non-drive side. In
+the reverse direction, .xlsx files with filenames that match an existing
+Google Sheet will be synced to that Google Sheet, while .xlsx files that
+do NOT match an existing Google Sheet will be copied to drive as normal
+.xlsx files (without conversion to Sheets, although the Google Drive web
+browser UI may still give you the option to open it as one.)
- 2021/05/11 08:23:15 INFO : Synching Path1 "/path/to/local/tree/base/" with Path2 "GDrive:"
- 2021/05/11 08:23:15 INFO : ...path2.lst-new: Ignoring incorrect line: "- -1 - - 2018-07-29T08:49:30.136000000+0000 GoogleDoc.docx"
- 2021/05/11 08:23:15 INFO : Bisync successful
+If --drive-import-formats is set (it's not, by default), then all of the
+specified formats will be converted to Google Docs, if there is no
+existing Google Doc with a matching name. Caution: such conversion can
+be quite lossy, and in most cases it's probably not what you want!
+
+To bisync Google Docs as URL shortcut links (in a manner similar to
+"Drive for Desktop"), use: --drive-export-formats url (or alternatives.)
+
+Note that these link files cannot be edited on the non-drive side -- you
+will get errors if you try to sync an edited link file back to drive.
+They CAN be deleted (it will result in deleting the corresponding Google
+Doc.) If you create a .url file on the non-drive side that does not
+match an existing Google Doc, bisyncing it will just result in copying
+the literal .url file over to drive (no Google Doc will be created.) So,
+as a general rule of thumb, think of them as read-only placeholders on
+the non-drive side, and make all your changes on the drive side.
+
+Likewise, even with other export-formats, it is best to only move/rename
+Google Docs on the drive side. This is because otherwise, bisync will
+interpret this as a file deleted and another created, and accordingly,
+it will delete the Google Doc and create a new file at the new path.
+(Whether or not that new file is a Google Doc depends on
+--drive-import-formats.)
+
+Lastly, take note that all Google Docs on the drive side have a size of
+-1 and no checksum. Therefore, they cannot be reliably synced with the
+--checksum or --size-only flags. (To be exact: they will still get
+created/deleted, and bisync's delta engine will notice changes and queue
+them for syncing, but the underlying sync function will consider them
+identical and skip them.) To work around this, use the default (modtime
+and size) instead of --checksum or --size-only.
+
+To ignore Google Docs entirely, use --drive-skip-gdocs.
Usage examples
@@ -20231,6 +22405,54 @@ Unison and synchronization in general.
Changelog
+v1.66
+
+- Copies and deletes are now handled in one operation instead of two
+- --track-renames and --backup-dir are now supported
+- Partial uploads known issue on local/ftp/sftp has been resolved
+ (unless using --inplace)
+- Final listings are now generated from sync results, to avoid needing
+ to re-list
+- Bisync is now much more resilient to changes that happen during a
+ bisync run, and far less prone to critical errors / undetected
+ changes
+- Bisync is now capable of rolling a file listing back in cases of
+ uncertainty, essentially marking the file as needing to be rechecked
+ next time.
+- A few basic terminal colors are now supported, controllable with
+ --color (AUTO|NEVER|ALWAYS)
+- Initial listing snapshots of Path1 and Path2 are now generated
+ concurrently, using the same "march" infrastructure as check and
+ sync, for performance improvements and less risk of error.
+- Fixed handling of unicode normalization and case insensitivity,
+ support for --fix-case, --ignore-case-sync,
+ --no-unicode-normalization
+- --resync is now much more efficient (especially for users of
+ --create-empty-src-dirs)
+- Google Docs (and other files of unknown size) are now supported
+ (with the same options as in sync)
+- Equality checks before a sync conflict rename now fall back to
+ cryptcheck (when possible) or --download, instead of of --size-only,
+ when check is not available.
+- Bisync no longer fails to find the correct listing file when configs
+ are overridden with backend-specific flags.
+- Bisync now fully supports comparing based on any combination of
+ size, modtime, and checksum, lifting the prior restriction on
+ backends without modtime support.
+- Bisync now supports a "Graceful Shutdown" mode to cleanly cancel a
+ run early without requiring --resync.
+- New --recover flag allows robust recovery in the event of
+ interruptions, without requiring --resync.
+- A new --max-lock setting allows lock files to automatically renew
+ and expire, for better automatic recovery when a run is interrupted.
+- Bisync now supports auto-resolving sync conflicts and customizing
+ rename behavior with new --conflict-resolve, --conflict-loser, and
+ --conflict-suffix flags.
+- A new --resync-mode flag allows more control over which version of a
+ file gets kept during a --resync.
+- Bisync now supports --retries and --retries-sleep (when --resilient
+ is set.)
+
v1.64
- Fixed an issue causing dry runs to inadvertently commit filter
@@ -20582,6 +22804,17 @@ Properties:
- Default:
Slash,LtGt,DoubleQuote,SingleQuote,BackQuote,Dollar,BackSlash,Del,Ctl,LeftSpace,RightSpace,InvalidUtf8,Dot
+--fichier-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_FICHIER_DESCRIPTION
+- Type: string
+- Required: false
+
Limitations
rclone about is not supported by the 1Fichier backend. Backends without
@@ -20697,334 +22930,22 @@ Properties:
- Type: string
- Required: true
-Amazon Drive
-
-Amazon Drive, formerly known as Amazon Cloud Drive, is a cloud storage
-service run by Amazon for consumers.
-
-Status
-
-Important: rclone supports Amazon Drive only if you have your own set of
-API keys. Unfortunately the Amazon Drive developer program is now closed
-to new entries so if you don't already have your own set of keys you
-will not be able to use rclone with Amazon Drive.
-
-For the history on why rclone no longer has a set of Amazon Drive API
-keys see the forum.
-
-If you happen to know anyone who works at Amazon then please ask them to
-re-instate rclone into the Amazon Drive developer program - thanks!
-
-Configuration
-
-The initial setup for Amazon Drive involves getting a token from Amazon
-which you need to do in your browser. rclone config walks you through
-it.
-
-The configuration process for Amazon Drive may involve using an oauth
-proxy. This is used to keep the Amazon credentials out of the source
-code. The proxy runs in Google's very secure App Engine environment and
-doesn't store any credentials which pass through it.
-
-Since rclone doesn't currently have its own Amazon Drive credentials so
-you will either need to have your own client_id and client_secret with
-Amazon Drive, or use a third-party oauth proxy in which case you will
-need to enter client_id, client_secret, auth_url and token_url.
-
-Note also if you are not using Amazon's auth_url and token_url, (ie you
-filled in something for those) then if setting up on a remote machine
-you can only use the copying the config method of configuration -
-rclone authorize will not work.
-
-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
- 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 / Amazon Drive
- \ "amazon cloud drive"
- [snip]
- Storage> amazon cloud drive
- Amazon Application Client Id - required.
- client_id> your client ID goes here
- Amazon Application Client Secret - required.
- client_secret> your client secret goes here
- Auth server URL - leave blank to use Amazon's.
- auth_url> Optional auth URL
- Token server url - leave blank to use Amazon's.
- token_url> Optional token URL
- Remote config
- Make sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom 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 = your client ID goes here
- client_secret = your client secret goes here
- auth_url = Optional auth URL
- token_url = Optional token URL
- token = {"access_token":"xxxxxxxxxxxxxxxxxxxxxxx","token_type":"bearer","refresh_token":"xxxxxxxxxxxxxxxxxx","expiry":"2015-09-06T16:07:39.658438471+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 Amazon. 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 Amazon Drive
-
- rclone lsd remote:
-
-List all the files in your Amazon Drive
-
- rclone ls remote:
-
-To copy a local directory to an Amazon Drive directory called backup
-
- rclone copy /home/source remote:backup
-
-Modification times and hashes
-
-Amazon Drive doesn't allow modification times to be changed via the API
-so these won't be accurate or used for syncing.
-
-It does support the MD5 hash algorithm, so for a more accurate sync, you
-can use the --checksum flag.
-
-Restricted filename characters
-
- Character Value Replacement
- ----------- ------- -------------
- NUL 0x00 ␀
- / 0x2F /
-
-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. Amazon don't
-provide an API to permanently delete files, nor to empty the trash, so
-you will have to do that with one of Amazon's apps or via the Amazon
-Drive website. As of November 17, 2016, files are automatically deleted
-by Amazon from the trash after 30 days.
-
-Using with non .com Amazon accounts
-
-Let's say you usually use amazon.co.uk. When you authenticate with
-rclone it will take you to an amazon.com page to log in. Your
-amazon.co.uk email and password should work here just fine.
-
-Standard options
-
-Here are the Standard options specific to amazon cloud drive (Amazon
-Drive).
-
---acd-client-id
-
-OAuth Client Id.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_id
-- Env Var: RCLONE_ACD_CLIENT_ID
-- Type: string
-- Required: false
-
---acd-client-secret
-
-OAuth Client Secret.
-
-Leave blank normally.
-
-Properties:
-
-- Config: client_secret
-- Env Var: RCLONE_ACD_CLIENT_SECRET
-- Type: string
-- Required: false
-
Advanced options
-Here are the Advanced options specific to amazon cloud drive (Amazon
-Drive).
+Here are the Advanced options specific to alias (Alias for an existing
+remote).
---acd-token
+--alias-description
-OAuth Access Token as a JSON blob.
+Description of the remote.
Properties:
-- Config: token
-- Env Var: RCLONE_ACD_TOKEN
+- Config: description
+- Env Var: RCLONE_ALIAS_DESCRIPTION
- Type: string
- Required: false
---acd-auth-url
-
-Auth server URL.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: auth_url
-- Env Var: RCLONE_ACD_AUTH_URL
-- Type: string
-- Required: false
-
---acd-token-url
-
-Token server url.
-
-Leave blank to use the provider defaults.
-
-Properties:
-
-- Config: token_url
-- Env Var: RCLONE_ACD_TOKEN_URL
-- Type: string
-- Required: false
-
---acd-checkpoint
-
-Checkpoint for internal polling (debug).
-
-Properties:
-
-- Config: checkpoint
-- Env Var: RCLONE_ACD_CHECKPOINT
-- Type: string
-- Required: false
-
---acd-upload-wait-per-gb
-
-Additional time per GiB to wait after a failed complete upload to see if
-it appears.
-
-Sometimes Amazon Drive gives an error when a file has been fully
-uploaded but the file appears anyway after a little while. This happens
-sometimes for files over 1 GiB in size and nearly every time for files
-bigger than 10 GiB. This parameter controls the time rclone waits for
-the file to appear.
-
-The default value for this parameter is 3 minutes per GiB, so by default
-it will wait 3 minutes for every GiB uploaded to see if the file
-appears.
-
-You can disable this feature by setting it to 0. This may cause conflict
-errors as rclone retries the failed upload but the file will most likely
-appear correctly eventually.
-
-These values were determined empirically by observing lots of uploads of
-big files for a range of file sizes.
-
-Upload with the "-v" flag to see more info about what rclone is doing in
-this situation.
-
-Properties:
-
-- Config: upload_wait_per_gb
-- Env Var: RCLONE_ACD_UPLOAD_WAIT_PER_GB
-- Type: Duration
-- Default: 3m0s
-
---acd-templink-threshold
-
-Files >= this size will be downloaded via their tempLink.
-
-Files this size or more will be downloaded via their "tempLink". This is
-to work around a problem with Amazon Drive which blocks downloads of
-files bigger than about 10 GiB. The default for this is 9 GiB which
-shouldn't need to be changed.
-
-To download files above this threshold, rclone requests a "tempLink"
-which downloads the file through a temporary URL directly from the
-underlying S3 storage.
-
-Properties:
-
-- Config: templink_threshold
-- Env Var: RCLONE_ACD_TEMPLINK_THRESHOLD
-- Type: SizeSuffix
-- Default: 9Gi
-
---acd-encoding
-
-The encoding for the backend.
-
-See the encoding section in the overview for more info.
-
-Properties:
-
-- Config: encoding
-- Env Var: RCLONE_ACD_ENCODING
-- Type: Encoding
-- Default: Slash,InvalidUtf8,Dot
-
-Limitations
-
-Note that Amazon Drive is case insensitive so you can't have a file
-called "Hello.doc" and one called "hello.doc".
-
-Amazon Drive has rate limiting so you may notice errors in the sync (429
-errors). rclone will automatically retry the sync up to 3 times by
-default (see --retries flag) which should hopefully work around this
-problem.
-
-Amazon Drive has an internal limit of file sizes that can be uploaded to
-the service. This limit is not officially published, but all files
-larger than this will fail.
-
-At the time of writing (Jan 2016) is in the area of 50 GiB per file.
-This means that larger files are likely to fail.
-
-Unfortunately there is no way for rclone to see that this failure is
-because of file size, so it will retry the operation, as any other
-failure. To avoid this problem, use --max-size 50000M option to limit
-the maximum size of uploaded files. Note that --max-size does not split
-files into segments, it only ignores files over this size.
-
-rclone about is not supported by the Amazon Drive 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
-
Amazon S3 Storage Providers
The S3 backend can be used with a number of different providers:
@@ -21045,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)
@@ -21103,7 +23025,7 @@ This will guide you through an interactive setup process.
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, Ceph, ChinaMobile, ArvanCloud, Dreamhost, IBM COS, Liara, Minio, and Tencent COS
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
[snip]
Storage> s3
@@ -21602,6 +23524,7 @@ permissions are required to be available on the bucket being written to:
- GetObject
- PutObject
- PutObjectACL
+- CreateBucket (unless using s3-no-check-bucket)
When using the lsd subcommand, the ListAllMyBuckets permission is
required.
@@ -21642,6 +23565,8 @@ Notes on above:
that USER_NAME has been created.
2. The Resource entry must include both resource ARNs, as one implies
the bucket and the other implies the bucket's objects.
+3. When using s3-no-check-bucket and the bucket already exsits, the
+ "arn:aws:s3:::BUCKET_NAME" doesn't have to be included.
For reference, here's an Ansible script that will generate one or more
buckets that will work with rclone sync.
@@ -21685,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
@@ -21734,6 +23659,8 @@ Properties:
- Liara Object Storage
- "Linode"
- Linode Object Storage
+ - "Magalu"
+ - Magalu Object Storage
- "Minio"
- Minio Object Storage
- "Netease"
@@ -21878,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.
@@ -21963,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"
@@ -22121,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
@@ -22397,10 +24329,10 @@ Properties:
--s3-upload-concurrency
-Concurrency for multipart uploads.
+Concurrency for multipart uploads and copies.
This is the number of chunks of the same file that are uploaded
-concurrently.
+concurrently for multipart uploads and copies.
If you are uploading small numbers of large files over high-speed links
and these uploads do not fully utilize your bandwidth, then increasing
@@ -22448,6 +24380,19 @@ Properties:
- Type: bool
- Default: false
+--s3-use-dual-stack
+
+If true use AWS S3 dual-stack endpoint (IPv6 support).
+
+See AWS Docs on Dualstack Endpoints
+
+Properties:
+
+- Config: use_dual_stack
+- Env Var: RCLONE_S3_USE_DUAL_STACK
+- Type: bool
+- Default: false
+
--s3-use-accelerate-endpoint
If true use the AWS S3 accelerated endpoint.
@@ -22748,6 +24693,25 @@ Properties:
- Type: Time
- Default: off
+--s3-version-deleted
+
+Show deleted file markers when using versions.
+
+This shows deleted file markers in the listing when using versions.
+These will appear as 0 size files. The only operation which can be
+performed on them is deletion.
+
+Deleting a delete marker will reveal the previous version.
+
+Deleted files will always show with a timestamp.
+
+Properties:
+
+- Config: version_deleted
+- Env Var: RCLONE_S3_VERSION_DELETED
+- Type: bool
+- Default: false
+
--s3-decompress
If set this will decompress gzip encoded objects.
@@ -22894,6 +24858,17 @@ Properties:
- Type: Tristate
- Default: unset
+--s3-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_S3_DESCRIPTION
+- Type: string
+- Required: false
+
Metadata
User metadata is stored as x-amz-meta- keys. S3 metadata keys are case
@@ -23282,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
@@ -23351,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.
@@ -23473,10 +25451,10 @@ Or you can also configure via the interactive command line:
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
- 5 / 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, ...
\ (s3)
[snip]
- Storage> 5
+ Storage> s3
Option provider.
Choose your S3 provider.
Choose a number from below, or type in your own value.
@@ -23599,18 +25577,11 @@ To configure access to IBM COS S3, follow the steps below:
3. Select "s3" storage.
Choose a number from below, or type in your own value
- 1 / Alias for an existing remote
- \ "alias"
- 2 / Amazon Drive
- \ "amazon cloud drive"
- 3 / Amazon S3 Complaint Storage Providers (Dreamhost, Ceph, ChinaMobile, Liara, ArvanCloud, Minio, IBM COS)
- \ "s3"
- 4 / Backblaze B2
- \ "b2"
[snip]
- 23 / HTTP
- \ "http"
- Storage> 3
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
+ \ "s3"
+ [snip]
+ Storage> s3
4. Select IBM COS as the S3 Storage Provider.
@@ -23764,7 +25735,7 @@ This will guide you through an interactive setup process.
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, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -23870,7 +25841,7 @@ Type s3 to choose the connection type:
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, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS and Wasabi
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -24096,15 +26067,8 @@ To configure access to Qiniu Kodo, follow the steps below:
3. Select s3 storage.
Choose a number from below, or type in your own value
- 1 / 1Fichier
- \ (fichier)
- 2 / Akamai NetStorage
- \ (netstorage)
- 3 / Alias for an existing remote
- \ (alias)
- 4 / Amazon Drive
- \ (amazon cloud drive)
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Liara, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
+ [snip]
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -24329,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"
@@ -24364,7 +26329,7 @@ Choose s3 backend
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, Alibaba, Ceph, ChinaMobile, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Liara, Lyve Cloud, Minio, RackCorp, SeaweedFS, and Tencent COS
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -24638,7 +26603,7 @@ This will guide you through an interactive setup process.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
[snip]
- 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, ChinaMobile, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Liara, Minio, and Tencent COS
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
[snip]
Storage> s3
@@ -24746,7 +26711,7 @@ This will guide you through an interactive setup process.
Type of storage to configure.
Choose a number from below, or type in your own value.
...
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, ChinaMobile, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Lyve Cloud, Minio, RackCorp, SeaweedFS, and Tencent COS
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
...
Storage> s3
@@ -24998,15 +26963,8 @@ To configure access to Leviia, follow the steps below:
3. Select s3 storage.
Choose a number from below, or type in your own value
- 1 / 1Fichier
- \ (fichier)
- 2 / Akamai NetStorage
- \ (netstorage)
- 3 / Alias for an existing remote
- \ (alias)
- 4 / Amazon Drive
- \ (amazon cloud drive)
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Liara, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
+ [snip]
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ (s3)
[snip]
Storage> s3
@@ -25207,7 +27165,7 @@ This will guide you through an interactive setup process.
Type of storage to configure.
Choose a number from below, or type in your own value.
[snip]
- X / Amazon S3 Compliant Storage Providers including AWS, ...Linode, ...and others
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...Linode, ...and others
\ (s3)
[snip]
Storage> s3
@@ -25314,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
@@ -25444,13 +27515,8 @@ To configure access to Tencent COS, follow the steps below:
3. Select s3 storage.
Choose a number from below, or type in your own value
- 1 / 1Fichier
- \ "fichier"
- 2 / Alias for an existing remote
- \ "alias"
- 3 / Amazon Drive
- \ "amazon cloud drive"
- 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, ChinaMobile, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, Liara, Minio, and Tencent COS
+ [snip]
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
[snip]
Storage> s3
@@ -25839,7 +27905,7 @@ This will guide you through an interactive setup process.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
- 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, GCS, ArvanCloud, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Liara, Lyve Cloud, Minio, Netease, Petabox, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi
+ XX / Amazon S3 Compliant Storage Providers including AWS, ...
\ "s3"
Storage> s3
@@ -25940,4000 +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 authorization token will expire in s or suffix ms|s|m|h|d.
-
- 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
-
- ## 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:
+- Config: auth_url
+- Env Var: RCLONE_BOX_AUTH_URL
+- Type: string
+- Required: false
+--box-token-url
- ## Limitations
+Token server url.
- Note that Box is case insensitive so you can't have a file called
- "Hello.doc" and one called "hello.doc".
+Leave blank to use the provider defaults.
- 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: token_url
+- Env Var: RCLONE_BOX_TOKEN_URL
+- Type: string
+- Required: false
- 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-root-folder-id
- `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.
+Fill in for rclone to use a non root folder as its starting point.
- 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: root_folder_id
+- Env Var: RCLONE_BOX_ROOT_FOLDER_ID
+- Type: string
+- Default: "0"
- Here is how to create your own Box App ID for rclone:
+--box-upload-cutoff
- 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`.
+Cutoff for switching to multipart upload (>= 50 MiB).
- 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: upload_cutoff
+- Env Var: RCLONE_BOX_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 50Mi
- 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-commit-retries
- 5. Under "OAuth 2.0 Redirect URI", add `http://127.0.0.1:53682/`
+Max number of times to try committing a multipart file.
- 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: commit_retries
+- Env Var: RCLONE_BOX_COMMIT_RETRIES
+- Type: int
+- Default: 100
- The `cache` remote wraps another existing remote and stores file structure
- and its data for long running tasks like `rclone mount`.
+--box-list-chunk
- ## Status
+Size of listing chunk 1-1000.
- 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: list_chunk
+- Env Var: RCLONE_BOX_LIST_CHUNK
+- Type: int
+- Default: 1000
- 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-owned-by
- ## Configuration
+Only show items owned by the login (email address) passed in.
- To get started you just need to have an existing remote which can be configured
- with `cache`.
+Properties:
- Here is an example of how to make a remote called `test-cache`. First run:
+- Config: owned_by
+- Env Var: RCLONE_BOX_OWNED_BY
+- Type: string
+- Required: false
- rclone config
+--box-impersonate
- This will guide you through an interactive setup process:
+Impersonate this user ID when using a service account.
-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
+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.
- You can then use it like this,
+See: https://developer.box.com/guides/authentication/jwt/as-user/
- List directories in top level of your drive
+Properties:
- rclone lsd test-cache:
+- Config: impersonate
+- Env Var: RCLONE_BOX_IMPERSONATE
+- Type: string
+- Required: false
- List all the files in your drive
+--box-encoding
- rclone ls test-cache:
+The encoding for the backend.
- To start a cached mount
+See the encoding section in the overview for more info.
- rclone mount --allow-other test-cache: /var/tmp/test-cache
+Properties:
- ### Write Features ###
+- Config: encoding
+- Env Var: RCLONE_BOX_ENCODING
+- Type: Encoding
+- Default: Slash,BackSlash,Del,Ctl,RightSpace,InvalidUtf8,Dot
- ### Offline uploading ###
+--box-description
- 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`.
+Description of the remote.
- A files goes through these states when using this feature:
+Properties:
- 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)
+- Config: description
+- Env Var: RCLONE_BOX_DESCRIPTION
+- Type: string
+- Required: false
- 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.
+Limitations
- ### Write Support ###
+Note that Box is case insensitive so you can't have a file called
+"Hello.doc" and one called "hello.doc".
- 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.
+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).
- 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.
+Box only supports filenames up to 255 characters in length.
- ### Read Features ###
+Box has API rate limits that sometimes reduce the speed of rclone.
- #### Multiple connections ####
+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.
- 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.
+See List of backends that do not support rclone about and rclone about
- 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.
+Get your own Box App ID
- #### Plex Integration ####
+Here is how to create your own Box App ID 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.
+1. Go to the Box Developer Console and login, then click My Apps on the
+ sidebar. Click Create New App and select Custom App.
- Scans will have a minimum amount of workers (1) while in a confirmed playback cache
- will deploy the configured number of workers.
+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 integration opens the doorway to additional performance improvements
- which will be explored in the near future.
+3. In the second screen of the creation screen, select
+ User Authentication (OAuth 2.0). Then click Create App.
- **Note:** If Plex options are not configured, `cache` will function with its
- configured options without adapting any of its settings.
+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.
- 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.
+5. Under "OAuth 2.0 Redirect URI", add http://127.0.0.1:53682/
- Affected settings:
- - `cache-workers`: _Configured value_ during confirmed playback or _1_ all the other times
+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.
- ##### Certificate Validation #####
+Cache
- 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.
+The cache remote wraps another existing remote and stores file structure
+and its data for long running tasks like rclone mount.
- The format for these URLs is the following:
+Status
- `https://ip-with-dots-replaced.server-hash.plex.direct:32400/`
+The cache backend code is working but it currently doesn't have a
+maintainer so there are outstanding bugs which aren't getting fixed.
- 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`.
+The cache backend is due to be phased out in favour of the VFS caching
+layer eventually which is more tightly integrated into rclone.
- To get the `server-hash` part, the easiest way is to visit
+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.
- https://plex.tv/api/resources?includeHttps=1&X-Plex-Token=your-plex-token
+Configuration
- 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.
+To get started you just need to have an existing remote which can be
+configured with cache.
- ### Known issues ###
+Here is an example of how to make a remote called test-cache. First run:
- #### Mount and --dir-cache-time ####
+ rclone config
- --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.
- ## Backend commands
+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.
- Here are the commands specific to the cache backend.
+For really slow connections, increase this to a point where the stream
+is able to provide data but your experience will be very stuttering.
- Run them with
+Properties:
- rclone backend COMMAND remote:
+- Config: read_retries
+- Env Var: RCLONE_CACHE_READ_RETRIES
+- Type: int
+- Default: 10
- The help below will explain what arguments each command takes.
+--cache-workers
- See the [backend](https://rclone.org/commands/rclone_backend/) command for more
- info on how to pass options and arguments.
+How many workers should run in parallel to download chunks.
- These can be run on a running backend using the rc command
- [backend/command](https://rclone.org/rc/#backend-command).
+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.
- ### stats
+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.
- Print stats on the cache backend in JSON format.
+Properties:
- rclone backend stats remote: [options] [+]
+- Config: workers
+- Env Var: RCLONE_CACHE_WORKERS
+- Type: int
+- Default: 4
+--cache-chunk-no-memory
+Disable the in-memory cache for storing chunks during streaming.
- # Chunker
+By default, cache will keep file data during streaming in RAM as well to
+provide it to readers as fast as possible.
- 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.
+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).
- ## Configuration
+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.
- 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.
+Properties:
- 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`.
+- Config: chunk_no_memory
+- Env Var: RCLONE_CACHE_CHUNK_NO_MEMORY
+- Type: bool
+- Default: false
- Now configure `chunker` using `rclone config`. We will call this one `overlay`
- to separate it from the `remote` itself.
+--cache-rps
-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
+Limits the number of requests per second to the source FS (-1 to
+disable).
+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.
- ### Specifying the remote
+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.
- 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.
+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 still pass.
- ### Chunking
+Properties:
- 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.
+- Config: rps
+- Env Var: RCLONE_CACHE_RPS
+- Type: int
+- Default: -1
- 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
+--cache-writes
+Cache file data on writes through the FS.
+
+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.
+
+Properties:
+
+- 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.
-
-
-
- # 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.
+Leave blank to use the provider defaults.
- ## Limitations
+Properties:
- Note that ShareFile is case insensitive so you can't have a file called
- "Hello.doc" and one called "hello.doc".
+- Config: auth_url
+- Env Var: RCLONE_SHAREFILE_AUTH_URL
+- Type: string
+- Required: false
- ShareFile only supports filenames up to 256 characters in length.
+--sharefile-token-url
- `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.
+Token server 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/)
+Leave blank to use the provider defaults.
- # Crypt
+Properties:
- Rclone `crypt` remotes encrypt and decrypt other remotes.
+- Config: token_url
+- Env Var: RCLONE_SHAREFILE_TOKEN_URL
+- Type: string
+- Required: false
- 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-upload-cutoff
- ### Example
+Cutoff for switching to multipart upload.
- Create the following file structure using "standard" file name
- encryption.
+Properties:
-plaintext/ ├── file0.txt ├── file1.txt └── subdir ├── file2.txt ├──
-file3.txt └── subsubdir └── file4.txt
+- Config: upload_cutoff
+- Env Var: RCLONE_SHAREFILE_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 128Mi
+--sharefile-chunk-size
- Copy these to the remote, and list them
+Upload chunk size.
-$ 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
+Must a power of 2 >= 256k.
+Making this larger will improve performance, but note that each chunk is
+buffered in memory one per transfer.
- The crypt remote looks like
+Reducing this will reduce memory usage but decrease performance.
-$ rclone -q ls remote:path 55 hagjclgavj2mbiqm6u6cnjjqcg 54
-v05749mltvv1tf4onltun46gls 57
-86vhrsv86mpbtd3a0akjuqslj8/dlj7fkq4kdq72emafg7a7s41uo 58
-86vhrsv86mpbtd3a0akjuqslj8/7uu829995du6o42n32otfhjqp4/b9pausrfansjth5ob3jkdqd4lc
-56 86vhrsv86mpbtd3a0akjuqslj8/8njh1sk437gttmep3p70g81aps
+Properties:
+- Config: chunk_size
+- Env Var: RCLONE_SHAREFILE_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 64Mi
- The directory structure is preserved
+--sharefile-endpoint
-$ rclone -q ls secret:subdir 8 file2.txt 9 file3.txt 10
-subsubdir/file4.txt
+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
- Without file name encryption `.bin` extensions are added to underlying
- names. This prevents the cloud provider attempting to interpret file
- content.
+Properties:
-$ 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
+- Config: endpoint
+- Env Var: RCLONE_SHAREFILE_ENDPOINT
+- Type: string
+- Required: false
+--sharefile-encoding
- ### File name encryption modes
+The encoding for the backend.
- Off
+See the encoding section in the overview for more info.
- * 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: 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 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
+--sharefile-description
- Obfuscation
+Description of the remote.
- 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".
+Properties:
- 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: description
+- Env Var: RCLONE_SHAREFILE_DESCRIPTION
+- 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.
+Limitations
- Obfuscation cannot be relied upon for strong protection.
+Note that ShareFile is case insensitive so you can't have a file called
+"Hello.doc" and one called "hello.doc".
- * 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
+ShareFile only supports filenames up to 256 characters in length.
- 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.
+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.
- 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.
+See List of backends that do not support rclone about and rclone about
- An alternative, future rclone file name encryption mode may tolerate
- backend provider path length limits.
+Crypt
- ### Directory name encryption
+Rclone crypt remotes encrypt and decrypt other remotes.
- Crypt offers the option of encrypting dir names or leaving them intact.
- There are two options:
+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.
- 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-filename-encoding
+Properties:
- How to encode the encrypted filename to text string.
+- 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.
- 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-directory-name-encryption
- Properties:
+Option to either encrypt directory names or leave them intact.
- - 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 If filename_encryption is "off" then this option will do nothing.
- #### --crypt-suffix
+Properties:
- If this is set it will override the default suffix of ".bin".
+- 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.
- Setting suffix to "none" will result in an empty suffix. This may be useful
- when the path length is critical.
+--crypt-password
- Properties:
+Password or pass phrase for encryption.
- - Config: suffix
- - Env Var: RCLONE_CRYPT_SUFFIX
- - Type: string
- - Default: ".bin"
+NB Input to this must be obscured - see rclone obscure.
- ### Metadata
+Properties:
- Any metadata supported by the underlying remote is read and written.
+- Config: password
+- Env Var: RCLONE_CRYPT_PASSWORD
+- Type: string
+- Required: true
- See the [metadata](https://rclone.org/docs/#metadata) docs for more info.
+--crypt-password2
- ## Backend commands
+Password or pass phrase for salt.
- Here are the commands specific to the crypt backend.
+Optional but recommended. Should be different to the previous password.
- Run them with
+NB Input to this must be obscured - see rclone obscure.
- rclone backend COMMAND remote:
+Properties:
- The help below will explain what arguments each command takes.
+- Config: password2
+- Env Var: RCLONE_CRYPT_PASSWORD2
+- Type: string
+- Required: false
- See the [backend](https://rclone.org/commands/rclone_backend/) command for more
- info on how to pass options and arguments.
+Advanced options
- These can be run on a running backend using the rc command
- [backend/command](https://rclone.org/rc/#backend-command).
+Here are the Advanced options specific to crypt (Encrypt/Decrypt a
+remote).
- ### encode
+--crypt-server-side-across-configs
- Encode the given filename(s)
+Deprecated: use --server-side-across-configs instead.
- rclone backend encode remote: [options] [+]
+Allow server-side operations (e.g. copy) to work across different crypt
+configs.
- This encodes the filenames given as arguments returning a list of
- strings of the encoded results.
+Normally this option is not what you want, but if you have two crypts
+pointing to the same backend you can use it.
- Usage Example:
+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 encode crypt: file1 [file2...]
- rclone rc backend/command command=encode fs=crypt: file1 [file2...]
+Properties:
+- Config: server_side_across_configs
+- Env Var: RCLONE_CRYPT_SERVER_SIDE_ACROSS_CONFIGS
+- Type: bool
+- Default: false
- ### decode
+--crypt-show-mapping
- Decode the given filename(s)
+For all files listed show how the names encrypt.
- rclone backend decode remote: [options] [+]
+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.
- 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 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.
- Usage Example:
+Properties:
- rclone backend decode crypt: encryptedfile1 [encryptedfile2...]
- rclone rc backend/command command=decode fs=crypt: encryptedfile1 [encryptedfile2...]
+- Config: show_mapping
+- Env Var: RCLONE_CRYPT_SHOW_MAPPING
+- Type: bool
+- Default: false
+--crypt-no-data-encryption
+Option to either encrypt file data or leave it unencrypted.
+Properties:
- ## Backing up an encrypted 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.
- 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.
+--crypt-pass-bad-blocks
- This will have the following advantages
+If set this will pass bad blocks through as all 0.
- * `rclone sync` will check the checksums while copying
- * you can use `rclone check` between the encrypted remotes
- * you don't decrypt and encrypt unnecessarily
+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.
- 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:`.
+Properties:
- To sync the two remotes you would do
+- Config: pass_bad_blocks
+- Env Var: RCLONE_CRYPT_PASS_BAD_BLOCKS
+- Type: bool
+- Default: false
- rclone sync --interactive remote:crypt remote2:crypt
+--crypt-strict-names
- And to check the integrity you would do
+If set, this will raise an error when crypt comes across a filename that
+can't be decrypted.
- rclone check remote:crypt remote2:crypt
+(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.
- ## File formats
+Properties:
- ### File encryption
+- Config: strict_names
+- Env Var: RCLONE_CRYPT_STRICT_NAMES
+- Type: bool
+- Default: false
- Files are encrypted 1:1 source file to destination object. The file
- has a header and is divided into chunks.
+--crypt-filename-encoding
- #### Header
+How to encode the encrypted filename to text string.
- * 8 bytes magic string `RCLONE\x00\x00`
- * 24 bytes Nonce (IV)
+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.
- 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: 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)
- 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.
+--crypt-suffix
- Each chunk contains:
+If this is set it will override the default suffix of ".bin".
- * 16 Bytes of Poly1305 authenticator
- * 1 - 65536 bytes XSalsa20 encrypted data
+Setting suffix to "none" will result in an empty suffix. This may be
+useful when the path length is critical.
- 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.
+Properties:
- This uses a 32 byte (256 bit key) key derived from the user password.
+- Config: suffix
+- Env Var: RCLONE_CRYPT_SUFFIX
+- Type: string
+- Default: ".bin"
- #### Examples
+--crypt-description
- 1 byte file will encrypt to
+Description of the remote.
- * 32 bytes header
- * 17 bytes data chunk
+Properties:
- 49 bytes total
+- Config: description
+- Env Var: RCLONE_CRYPT_DESCRIPTION
+- Type: string
+- Required: false
- 1 MiB (1048576 bytes) file will encrypt to
+Metadata
- * 32 bytes header
- * 16 chunks of 65568 bytes
+Any metadata supported by the underlying remote is read and written.
- 1049120 bytes total (a 0.05% overhead). This is the overhead for big
- files.
+See the metadata docs for more info.
- ### Name encryption
+Backend commands
- File names are encrypted segment by segment - the path is broken up
- into `/` separated strings and these are encrypted individually.
+Here are the commands specific to the crypt backend.
- File segments are padded using PKCS#7 to a multiple of 16 bytes
- before encryption.
+Run them with
- 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 COMMAND remote:
- 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.
+The help below will explain what arguments each command takes.
- This means that
+See the backend command for more info on how to pass options and
+arguments.
- * filenames with the same name will encrypt the same
- * filenames which start the same won't have a common prefix
+These can be run on a running backend using the rc command
+backend/command.
- This uses a 32 byte key (256 bits) and a 16 byte (128 bits) IV both of
- which are derived from the user password.
+encode
- 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:
+Encode the given filename(s)
- * it becomes lower case (no-one likes upper case filenames!)
- * we strip the padding character `=`
+ rclone backend encode remote: [options] [+]
- `base32` is used rather than the more efficient `base64` so rclone can be
- used on case insensitive remotes (e.g. Windows, Amazon Drive).
+This encodes the filenames given as arguments returning a list of
+strings of the encoded results.
- ### Key derivation
+Usage Example:
- 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.
+ rclone backend encode crypt: file1 [file2...]
+ rclone rc backend/command command=encode fs=crypt: file1 [file2...]
- `scrypt` makes it impractical to mount a dictionary attack on rclone
- encrypted data. For full protection against this you should always use
- a salt.
+decode
- ## SEE ALSO
+Decode the given filename(s)
- * [rclone cryptdecode](https://rclone.org/commands/rclone_cryptdecode/) - Show forward/reverse mapping of encrypted filenames
+ rclone backend decode remote: [options] [+]
- # Compress
+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.
- ## Warning
+Usage Example:
- 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 backend decode crypt: encryptedfile1 [encryptedfile2...]
+ rclone rc backend/command command=decode fs=crypt: encryptedfile1 [encryptedfile2...]
- The `Compress` remote adds compression to another remote. It is best used with remotes containing
- many large compressible files.
+Backing up an encrypted remote
- ## Configuration
+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.
- To use this remote, all you need to do is specify another remote and a compression mode to use:
+This will have the following advantages
-Current remotes:
+- rclone sync will check the checksums while copying
+- you can use rclone check between the encrypted remotes
+- you don't decrypt and encrypt unnecessarily
-Name Type ==== ==== remote_to_press sometype
+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:.
-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/ **
+To sync the two remotes you would do
-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
+ rclone sync --interactive remote:crypt remote2:crypt
+And to check the integrity you would do
- ### Compression Modes
+ rclone check remote:crypt remote2:crypt
- 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.
+File formats
- ### File types
+File encryption
- 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.
+Files are encrypted 1:1 source file to destination object. The file has
+a header and is divided into chunks.
- ### File names
+Header
- 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.
+- 8 bytes magic string RCLONE\x00\x00
+- 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¹⁸
+bytes) you would have a probability of approximately 2×10⁻³² of re-using
+a nonce.
- ### Standard options
+Chunk
- Here are the Standard options specific to compress (Compress a remote).
+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.
- #### --compress-remote
+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'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
+/ 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:
- ### Metadata
+- Config: mode
+- Env Var: RCLONE_COMPRESS_MODE
+- Type: string
+- Default: "gzip"
+- Examples:
+ - "gzip"
+ - Standard gzip compression with fastest parameters.
- Any metadata supported by the underlying remote is read and written.
+Advanced options
- See the [metadata](https://rclone.org/docs/#metadata) docs for more info.
+Here are the Advanced options specific to compress (Compress a remote).
+--compress-level
+GZIP compression level (-2 to 9).
- # Combine
+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.
- The `combine` backend joins remotes together into a single directory
- tree.
+Level -2 uses Huffman encoding only. Only use if you know what you are
+doing. Level 0 turns off compression.
- For example you might have a remote for images on one provider:
+Properties:
-$ rclone tree s3:imagesbucket / ├── image1.jpg └── image2.jpg
+- Config: level
+- Env Var: RCLONE_COMPRESS_LEVEL
+- Type: int
+- Default: -1
+--compress-ram-cache-limit
- And a remote for files on another:
+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.
-$ rclone tree drive:important/files / ├── file1.txt └── file2.txt
+Files smaller than this limit will be cached in RAM, files larger than
+this limit will be cached on disk.
+Properties:
- The `combine` backend can join these together into a synthetic
- directory structure like this:
+- Config: ram_cache_limit
+- Env Var: RCLONE_COMPRESS_RAM_CACHE_LIMIT
+- Type: SizeSuffix
+- Default: 20Mi
-$ rclone tree combined: / ├── files │ ├── file1.txt │ └── file2.txt └──
-images ├── image1.jpg └── image2.jpg
+--compress-description
+Description of the remote.
- You'd do this by specifying an `upstreams` parameter in the config
- like this
+Properties:
- upstreams = images=s3:imagesbucket files=drive:important/files
+- Config: description
+- Env Var: RCLONE_COMPRESS_DESCRIPTION
+- Type: string
+- Required: false
- 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.
+Metadata
- ## Configuration
+Any metadata supported by the underlying remote is read and written.
- Here is an example of how to make a combine called `remote` for the
- example above. First run:
+See the metadata docs for more info.
- rclone config
+Combine
- This will guide you through an interactive setup process:
+The combine backend joins remotes together into a single directory tree.
-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
+For example you might have a remote for images on one provider:
+ $ rclone tree s3:imagesbucket
+ /
+ ├── image1.jpg
+ └── image2.jpg
- ### Configuring for Google Drive Shared Drives
+And a remote for files on another:
- Rclone has a convenience feature for making a combine backend for all
- the shared drives you have access to.
+ $ rclone tree drive:important/files
+ /
+ ├── file1.txt
+ └── file2.txt
- Assuming your main (non shared drive) Google drive remote is called
- `drive:` you would run
+The combine backend can join these together into a synthetic directory
+structure like this:
- rclone backend -o config drives drive:
+ $ rclone tree combined:
+ /
+ ├── files
+ │ ├── file1.txt
+ │ └── file2.txt
+ └── images
+ ├── image1.jpg
+ └── image2.jpg
- This would produce something like this:
+You'd do this by specifying an upstreams parameter in the config like
+this
- [My Drive]
- type = alias
- remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=:
+ upstreams = images=s3:imagesbucket files=drive:important/files
- [Test Drive]
- type = alias
- remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=:
+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.
- [AllDrives]
- type = combine
- upstreams = "My Drive=My Drive:" "Test Drive=Test Drive:"
+Configuration
- 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.
+Here is an example of how to make a combine called remote for the
+example above. First run:
- See [the Google Drive docs](https://rclone.org/drive/#drives) for full info.
+ rclone config
+This will guide you through an interactive setup process:
- ### Standard options
-
- Here are the Standard options specific to combine (Combine several remotes into one).
-
- #### --combine-upstreams
-
+ 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:
- ### Metadata
+This would produce something like this:
- Any metadata supported by the underlying remote is read and written.
+ [My Drive]
+ type = alias
+ remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=:
- See the [metadata](https://rclone.org/docs/#metadata) docs for more info.
+ [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.
- # Dropbox
+See the Google Drive docs for full info.
- Paths are specified as `remote:path`
+Standard options
- Dropbox paths may be as deep as required, e.g.
- `remote:directory/subdirectory`.
+Here are the Standard options specific to combine (Combine several
+remotes into one).
- ## Configuration
+--combine-upstreams
- 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.
+Upstreams for combining
- Here is an example of how to make a remote called `remote`. First run:
+These should be in the form
- rclone config
+ dir=remote:path dir2=remote2:path
- This will guide you through an interactive setup process:
+Where before the = is specified the root directory and after is the
+remote to put there.
-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:
+Embedded spaces can be added using quotes
+
+ "dir=remote:path with space" "dir2=remote2:path with space"
+
+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 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
-
-
-
- ## 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
@@ -29945,13223 +32625,15523 @@ 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
-
-
-
- # 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
-
-
-
- ## 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:
+- Config: anonymous
+- Env Var: RCLONE_GCS_ANONYMOUS
+- Type: bool
+- Default: false
+--gcs-object-acl
- ## Limitations
+Access Control List for new objects.
- `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.
+Properties:
- 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/)
+- 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.
- # Google Drive
+Properties:
- Paths are specified as `drive:path`
+- Config: token
+- Env Var: RCLONE_GCS_TOKEN
+- Type: string
+- Required: false
- Drive paths may be as deep as required, e.g. `drive:directory/subdirectory`.
+--gcs-auth-url
- ## Configuration
+Auth server 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.
+Leave blank to use the provider defaults.
- Here is an example of how to make a remote called `remote`. First run:
+Properties:
- rclone config
+- Config: auth_url
+- Env Var: RCLONE_GCS_AUTH_URL
+- Type: string
+- Required: false
- This will guide you through an interactive setup process:
+--gcs-token-url
-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
+Token server url.
+Leave blank to use the provider defaults.
- See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a
- machine with no Internet browser available.
+Properties:
- 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.
+- Config: token_url
+- Env Var: RCLONE_GCS_TOKEN_URL
+- Type: string
+- Required: false
- You can then use it like this,
+--gcs-directory-markers
- List directories in top level of your drive
+Upload an empty object with a trailing slash when a new directory is
+created
- rclone lsd remote:
+Empty folders are unsupported for bucket based remotes, this option
+creates an empty object ending with "/", to persist the folder.
- List all the files in your drive
+Properties:
- rclone ls remote:
+- Config: directory_markers
+- Env Var: RCLONE_GCS_DIRECTORY_MARKERS
+- Type: bool
+- Default: false
- To copy a local directory to a drive directory called backup
+--gcs-no-check-bucket
- rclone copy /home/source remote:backup
+If set, don't attempt to check the bucket exists or create it.
- ### Scopes
+This can be useful when trying to minimise the number of transactions
+rclone does if you know the bucket exists already.
- 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).
+Properties:
- A comma-separated list is allowed e.g. `drive.readonly,drive.file`.
+- Config: no_check_bucket
+- Env Var: RCLONE_GCS_NO_CHECK_BUCKET
+- Type: bool
+- Default: false
- The scope are
+--gcs-decompress
- #### drive
+If set this will decompress gzip encoded objects.
- This is the default scope and allows full access to all files, except
- for the Application Data Folder (see below).
+It is possible to upload objects to GCS with "Content-Encoding: gzip"
+set. Normally rclone will download these files as compressed objects.
- Choose this one if you aren't sure.
+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.
- #### drive.readonly
+Properties:
- This allows read only access to all files. Files may be listed and
- downloaded but not uploaded, renamed or deleted.
+- Config: decompress
+- Env Var: RCLONE_GCS_DECOMPRESS
+- Type: bool
+- Default: false
- #### drive.file
+--gcs-endpoint
- With this scope rclone can read/view/modify only those files and
- folders it creates.
+Endpoint for the service.
- So if you uploaded files to drive via the web interface (or any other
- means) they will not be visible to rclone.
+Leave blank normally.
- 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.
+Properties:
- Files created with this scope are visible in the web interface.
+- Config: endpoint
+- Env Var: RCLONE_GCS_ENDPOINT
+- Type: string
+- Required: false
- #### drive.appfolder
+--gcs-encoding
- 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.
+The encoding for the backend.
- ### Root folder ID
+See the encoding section in the overview for more info.
- 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:
- Normally you will leave this blank and rclone will determine the
- correct root to use itself.
+- Config: encoding
+- Env Var: RCLONE_GCS_ENCODING
+- Type: Encoding
+- Default: Slash,CrLf,InvalidUtf8,Dot
- 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).
+--gcs-description
- 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.
+Description of the remote.
- 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.
+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.
- **NB** folders under the "Computers" tab seem to be read only (drive
- gives a 500 error) when using rclone.
+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:
- There doesn't appear to be an API to discover the folder IDs of the
- "Computers" tab - please contact us if you know otherwise!
+ 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.
- Note also that rclone can't access any data under the "Backups" tab on
- the google drive web interface yet.
+Root folder ID
- ### Service Account support
+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.
- 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.
+Normally you will leave this blank and rclone will determine the correct
+root to use itself.
- 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.
+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).
- #### Use case - Google Apps/G-suite account and individual Drive
+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.
- 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**.
+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.
- There's a few steps we need to go through to accomplish this:
+NB folders under the "Computers" tab seem to be read only (drive gives a
+500 error) when using rclone.
- ##### 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.
+There doesn't appear to be an API to discover the folder IDs of the
+"Computers" tab - please contact us if you know otherwise!
- ##### 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.
+Note also that rclone can't access any data under the "Backups" tab on
+the google drive web interface yet.
- ##### 3. Configure rclone, assuming a new install
+Service Account support
-rclone 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.
-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
+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.
+Use case - Google Apps/G-suite account and individual Drive
- ##### 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.
+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
- 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`
+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
- ### Shared drives (team drives)
+Only Invalid UTF-8 bytes will be replaced, as they can't be used in JSON
+strings.
- 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)?`.
+In contrast to other backends, / can also be used in names and . or ..
+are valid names.
- 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.
+Revisions
- For example:
+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.
-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
+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.
- ### --fast-list
+Deleting files
- 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 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.
- It does this by combining multiple `list` calls into a single API request.
+Shortcuts
- 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:
+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.
-trashed=false and 'a' in parents trashed=false and 'b' in parents
-trashed=false and 'c' in parents
+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.
- These can now be combined into a single request:
+By default rclone treats these as follows.
-trashed=false and ('a' in parents or 'b' in parents or 'c' in parents)
+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 --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.
- 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.
+For shortcuts pointing to folders:
- In tests, these batch requests were up to 20x faster than the regular method.
- Running the following command against different sized folders gives:
+- 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.
-rclone lsjson -vv -R --checkers=6 gdrive:folder
+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.
- small folder (220 directories, 700 files):
+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.
- - without `--fast-list`: 38s
- - with `--fast-list`: 10s
+Emptying trash
- large folder (10600 directories, 39000 files):
+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.
- - without `--fast-list`: 22:05 min
- - with `--fast-list`: 58s
+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.
- ### Modification times and hashes
+Quota information
- Google drive stores modification times accurate to 1 ms.
+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.
- 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.
+Import/Export of google documents
- ### Restricted filename characters
+Google documents can be exported from and uploaded to Google Drive.
- Only Invalid UTF-8 bytes will be [replaced](https://rclone.org/overview/#invalid-utf8),
- as they can't be used in JSON strings.
+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.
- In contrast to other backends, `/` can also be used in names and `.`
- or `..` are valid names.
+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.
- ### Revisions
+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.
- 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.
+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.
- Revisions follow the standard google policy which at time of writing
- was
+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.
- * They are deleted after 30 days or 100 revisions (whatever comes first).
- * They do not count towards a user storage quota.
+The conversion must result in a file with the same extension when the
+--drive-export-formats rules are applied to the uploaded document.
- ### Deleting files
+Here are some examples for allowed and prohibited 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.
+ 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
- ### Shortcuts
+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.
- 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).
+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.
- 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 list can be changed by Google Drive at any time and might not
+represent the currently available conversions.
- By default rclone treats these as follows.
+ --------------------------------------------------------------------------------------------------------------------------
+ Extension Mime Type Description
+ ------------------- --------------------------------------------------------------------------- --------------------------
+ bmp image/bmp Windows Bitmap format
- For shortcuts pointing to files:
+ csv text/csv Standard CSV format for
+ Spreadsheets
- - 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.
+ doc application/msword Classic Word file
- For shortcuts pointing to folders:
+ docx application/vnd.openxmlformats-officedocument.wordprocessingml.document Microsoft Office Document
- - 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.
+ epub application/epub+zip E-book format
- The [rclone backend](https://rclone.org/commands/rclone_backend/) command can be used to create shortcuts.
+ html text/html An HTML Document
- Shortcuts can be completely ignored with the `--drive-skip-shortcuts` flag
- or the corresponding `skip_shortcuts` configuration setting.
+ jpg image/jpeg A JPEG Image File
- ### Emptying trash
+ json application/vnd.google-apps.script+json JSON Text Format for
+ Google Apps scripts
- 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.
+ odp application/vnd.oasis.opendocument.presentation Openoffice Presentation
- 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:
+ ods application/vnd.oasis.opendocument.spreadsheet Openoffice Spreadsheet
- - Config: client_id
- - Env Var: RCLONE_DRIVE_CLIENT_ID
- - Type: string
- - Required: false
+ ods application/x-vnd.oasis.opendocument.spreadsheet Openoffice Spreadsheet
- #### --drive-client-secret
+ odt application/vnd.oasis.opendocument.text Openoffice Document
- OAuth Client Secret.
+ pdf application/pdf Adobe PDF Format
- Leave blank normally.
+ pjpeg image/pjpeg Progressive JPEG Image
- Properties:
+ png image/png PNG Image Format
- - Config: client_secret
- - Env Var: RCLONE_DRIVE_CLIENT_SECRET
- - Type: string
- - Required: false
+ pptx application/vnd.openxmlformats-officedocument.presentationml.presentation Microsoft Office
+ Powerpoint
- #### --drive-scope
+ rtf application/rtf Rich Text Format
- Comma separated list of scopes that rclone should use when requesting access from drive.
+ svg image/svg+xml Scalable Vector Graphics
+ Format
- Properties:
+ tsv text/tab-separated-values Standard TSV format for
+ spreadsheets
- - 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.
+ txt text/plain Plain Text
- #### --drive-service-account-file
+ wmf application/x-msmetafile Windows Meta File
- Service Account Credentials JSON file path.
+ xls application/vnd.ms-excel Classic Excel file
- Leave blank normally.
- Needed only if you want use SA instead of interactive login.
+ xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Microsoft Office
+ Spreadsheet
- Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
+ zip application/zip A ZIP file of HTML, Images
+ CSS
+ --------------------------------------------------------------------------------------------------------------------------
- Properties:
+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.
- - Config: service_account_file
- - Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_FILE
- - Type: string
- - Required: false
+ 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
- #### --drive-alternate-export
+Standard options
- Deprecated: No longer needed.
+Here are the Standard options specific to drive (Google Drive).
- Properties:
+--drive-client-id
- - Config: alternate_export
- - Env Var: RCLONE_DRIVE_ALTERNATE_EXPORT
- - Type: bool
- - Default: 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.
- ### Advanced options
+Properties:
- Here are the Advanced options specific to drive (Google Drive).
+- Config: client_id
+- Env Var: RCLONE_DRIVE_CLIENT_ID
+- Type: string
+- Required: false
- #### --drive-token
+--drive-client-secret
- OAuth Access Token as a JSON blob.
+OAuth Client Secret.
- Properties:
+Leave blank normally.
- - Config: token
- - Env Var: RCLONE_DRIVE_TOKEN
- - Type: string
- - Required: false
+Properties:
- #### --drive-auth-url
+- Config: client_secret
+- Env Var: RCLONE_DRIVE_CLIENT_SECRET
+- Type: string
+- Required: false
- Auth server URL.
+--drive-scope
- Leave blank to use the provider defaults.
+Comma separated list of scopes that rclone should use when requesting
+access from drive.
- Properties:
+Properties:
- - Config: auth_url
- - Env Var: RCLONE_DRIVE_AUTH_URL
- - Type: string
- - Required: false
+- 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.
- #### --drive-token-url
+--drive-service-account-file
- Token server url.
+Service Account Credentials JSON file path.
- Leave blank to use the provider defaults.
+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: token_url
- - Env Var: RCLONE_DRIVE_TOKEN_URL
- - Type: string
- - Required: false
+Properties:
- #### --drive-root-folder-id
+- Config: service_account_file
+- Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_FILE
+- Type: string
+- Required: false
- ID of the root folder.
- Leave blank normally.
+--drive-alternate-export
- Fill in to access "Computers" folders (see docs), or for rclone to use
- a non root folder as its starting point.
+Deprecated: No longer needed.
+Properties:
- Properties:
+- Config: alternate_export
+- Env Var: RCLONE_DRIVE_ALTERNATE_EXPORT
+- Type: bool
+- Default: false
- - Config: root_folder_id
- - Env Var: RCLONE_DRIVE_ROOT_FOLDER_ID
- - Type: string
- - Required: false
+Advanced options
- #### --drive-service-account-credentials
+Here are the Advanced options specific to drive (Google Drive).
- Service Account Credentials JSON blob.
+--drive-token
- Leave blank normally.
- Needed only if you want use SA instead of interactive login.
+OAuth Access Token as a JSON blob.
- Properties:
+Properties:
- - Config: service_account_credentials
- - Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_CREDENTIALS
- - Type: string
- - Required: false
+- Config: token
+- Env Var: RCLONE_DRIVE_TOKEN
+- Type: string
+- Required: false
- #### --drive-team-drive
+--drive-auth-url
- ID of the Shared Drive (Team Drive).
+Auth server URL.
- Properties:
+Leave blank to use the provider defaults.
- - Config: team_drive
- - Env Var: RCLONE_DRIVE_TEAM_DRIVE
- - Type: string
- - Required: false
+Properties:
- #### --drive-auth-owner-only
+- Config: auth_url
+- Env Var: RCLONE_DRIVE_AUTH_URL
+- Type: string
+- Required: false
- Only consider files owned by the authenticated user.
+--drive-token-url
- Properties:
+Token server url.
- - Config: auth_owner_only
- - Env Var: RCLONE_DRIVE_AUTH_OWNER_ONLY
- - Type: bool
- - Default: false
+Leave blank to use the provider defaults.
- #### --drive-use-trash
+Properties:
- Send files to the trash instead of deleting permanently.
+- Config: token_url
+- Env Var: RCLONE_DRIVE_TOKEN_URL
+- Type: string
+- Required: false
- Defaults to true, namely sending files to the trash.
- Use `--drive-use-trash=false` to delete files permanently instead.
+--drive-root-folder-id
- Properties:
+ID of the root folder. Leave blank normally.
- - Config: use_trash
- - Env Var: RCLONE_DRIVE_USE_TRASH
- - Type: bool
- - Default: true
+Fill in to access "Computers" folders (see docs), or for rclone to use a
+non root folder as its starting point.
- #### --drive-copy-shortcut-content
+Properties:
- Server side copy contents of shortcuts instead of the shortcut.
+- Config: root_folder_id
+- Env Var: RCLONE_DRIVE_ROOT_FOLDER_ID
+- Type: string
+- Required: false
- When doing server side copies, normally rclone will copy shortcuts as
- shortcuts.
+--drive-service-account-credentials
- If this flag is used then rclone will copy the contents of shortcuts
- rather than shortcuts themselves when doing server side copies.
+Service Account Credentials JSON blob.
- Properties:
+Leave blank normally. Needed only if you want use SA instead of
+interactive login.
- - Config: copy_shortcut_content
- - Env Var: RCLONE_DRIVE_COPY_SHORTCUT_CONTENT
- - Type: bool
- - Default: false
+Properties:
- #### --drive-skip-gdocs
+- Config: service_account_credentials
+- Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_CREDENTIALS
+- Type: string
+- Required: false
- Skip google documents in all listings.
+--drive-team-drive
- If given, gdocs practically become invisible to rclone.
+ID of the Shared Drive (Team Drive).
- Properties:
+Properties:
- - Config: skip_gdocs
- - Env Var: RCLONE_DRIVE_SKIP_GDOCS
- - Type: bool
- - Default: false
+- Config: team_drive
+- Env Var: RCLONE_DRIVE_TEAM_DRIVE
+- Type: string
+- Required: false
- #### --drive-show-all-gdocs
+--drive-auth-owner-only
- Show all Google Docs including non-exportable ones in listings.
+Only consider files owned by the authenticated user.
- If you try a server side copy on a Google Form without this flag, you
- will get this error:
+Properties:
- No export formats found for "application/vnd.google-apps.form"
+- Config: auth_owner_only
+- Env Var: RCLONE_DRIVE_AUTH_OWNER_ONLY
+- Type: bool
+- Default: false
- However adding this flag will allow the form to be server side copied.
+--drive-use-trash
- Note that rclone doesn't add extensions to the Google Docs file names
- in this mode.
+Send files to the trash instead of deleting permanently.
- Do **not** use this flag when trying to download Google Docs - rclone
- will fail to download them.
+Defaults to true, namely sending files to the trash. Use
+--drive-use-trash=false to delete files permanently instead.
+Properties:
- Properties:
+- Config: use_trash
+- Env Var: RCLONE_DRIVE_USE_TRASH
+- Type: bool
+- Default: true
- - Config: show_all_gdocs
- - Env Var: RCLONE_DRIVE_SHOW_ALL_GDOCS
- - Type: bool
- - Default: false
+--drive-copy-shortcut-content
- #### --drive-skip-checksum-gphotos
+Server side copy contents of shortcuts instead of the shortcut.
- Skip checksums on Google photos and videos only.
+When doing server side copies, normally rclone will copy shortcuts as
+shortcuts.
- Use this if you get checksum errors when transferring Google photos or
- videos.
+If this flag is used then rclone will copy the contents of shortcuts
+rather than shortcuts themselves when doing server side copies.
- Setting this flag will cause Google photos and videos to return a
- blank checksums.
+Properties:
- Google photos are identified by being in the "photos" space.
+- Config: copy_shortcut_content
+- Env Var: RCLONE_DRIVE_COPY_SHORTCUT_CONTENT
+- Type: bool
+- Default: false
- Corrupted checksums are caused by Google modifying the image/video but
- not updating the checksum.
+--drive-skip-gdocs
- Properties:
+Skip google documents in all listings.
- - Config: skip_checksum_gphotos
- - Env Var: RCLONE_DRIVE_SKIP_CHECKSUM_GPHOTOS
- - Type: bool
- - Default: false
+If given, gdocs practically become invisible to rclone.
- #### --drive-shared-with-me
+Properties:
- Only show files that are shared with me.
+- Config: skip_gdocs
+- Env Var: RCLONE_DRIVE_SKIP_GDOCS
+- Type: bool
+- Default: false
- 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).
+--drive-show-all-gdocs
- This works both with the "list" (lsd, lsl, etc.) and the "copy"
- commands (copy, sync, etc.), and with all other commands too.
+Show all Google Docs including non-exportable ones in listings.
- Properties:
+If you try a server side copy on a Google Form without this flag, you
+will get this error:
- - Config: shared_with_me
- - Env Var: RCLONE_DRIVE_SHARED_WITH_ME
- - Type: bool
- - Default: false
+ No export formats found for "application/vnd.google-apps.form"
- #### --drive-trashed-only
+However adding this flag will allow the form to be server side copied.
- Only show files that are in the trash.
+Note that rclone doesn't add extensions to the Google Docs file names in
+this mode.
- This will show trashed files in their original directory structure.
+Do not use this flag when trying to download Google Docs - rclone will
+fail to download them.
- Properties:
+Properties:
- - Config: trashed_only
- - Env Var: RCLONE_DRIVE_TRASHED_ONLY
- - Type: bool
- - Default: false
+- Config: show_all_gdocs
+- Env Var: RCLONE_DRIVE_SHOW_ALL_GDOCS
+- Type: bool
+- Default: false
- #### --drive-starred-only
+--drive-skip-checksum-gphotos
- Only show files that are starred.
+Skip checksums on Google photos and videos only.
- Properties:
+Use this if you get checksum errors when transferring Google photos or
+videos.
- - Config: starred_only
- - Env Var: RCLONE_DRIVE_STARRED_ONLY
- - Type: bool
- - Default: false
+Setting this flag will cause Google photos and videos to return a blank
+checksums.
- #### --drive-formats
+Google photos are identified by being in the "photos" space.
- Deprecated: See export_formats.
+Corrupted checksums are caused by Google modifying the image/video but
+not updating the checksum.
- Properties:
+Properties:
- - Config: formats
- - Env Var: RCLONE_DRIVE_FORMATS
- - Type: string
- - Required: false
+- Config: skip_checksum_gphotos
+- Env Var: RCLONE_DRIVE_SKIP_CHECKSUM_GPHOTOS
+- Type: bool
+- Default: false
- #### --drive-export-formats
+--drive-shared-with-me
- Comma separated list of preferred formats for downloading Google docs.
+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: export_formats
- - Env Var: RCLONE_DRIVE_EXPORT_FORMATS
- - Type: string
- - Default: "docx,xlsx,pptx,svg"
+This works both with the "list" (lsd, lsl, etc.) and the "copy" commands
+(copy, sync, etc.), and with all other commands too.
- #### --drive-import-formats
+Properties:
- Comma separated list of preferred formats for uploading Google docs.
+- Config: shared_with_me
+- Env Var: RCLONE_DRIVE_SHARED_WITH_ME
+- Type: bool
+- Default: false
- Properties:
+--drive-trashed-only
- - Config: import_formats
- - Env Var: RCLONE_DRIVE_IMPORT_FORMATS
- - Type: string
- - Required: false
+Only show files that are in the trash.
- #### --drive-allow-import-name-change
+This will show trashed files in their original directory structure.
- 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: trashed_only
+- Env Var: RCLONE_DRIVE_TRASHED_ONLY
+- Type: bool
+- Default: false
- Properties:
+--drive-starred-only
- - Config: allow_import_name_change
- - Env Var: RCLONE_DRIVE_ALLOW_IMPORT_NAME_CHANGE
- - Type: bool
- - Default: false
+Only show files that are starred.
- #### --drive-use-created-date
+Properties:
- Use file created date instead of modified date.
+- Config: starred_only
+- Env Var: RCLONE_DRIVE_STARRED_ONLY
+- Type: bool
+- Default: false
- Useful when downloading data and you want the creation date used in
- place of the last modified date.
+--drive-formats
- **WARNING**: This flag may have some unexpected consequences.
+Deprecated: See export_formats.
- 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: formats
+- Env Var: RCLONE_DRIVE_FORMATS
+- Type: string
+- Required: false
- Properties:
+--drive-export-formats
- - Config: use_created_date
- - Env Var: RCLONE_DRIVE_USE_CREATED_DATE
- - Type: bool
- - Default: false
+Comma separated list of preferred formats for downloading Google docs.
- #### --drive-use-shared-date
+Properties:
- Use date file was shared instead of modified date.
+- Config: export_formats
+- Env Var: RCLONE_DRIVE_EXPORT_FORMATS
+- Type: string
+- Default: "docx,xlsx,pptx,svg"
- Note that, as with "--drive-use-created-date", this flag may have
- unexpected consequences when uploading/downloading files.
+--drive-import-formats
- If both this flag and "--drive-use-created-date" are set, the created
- date is used.
+Comma separated list of preferred formats for uploading Google docs.
- Properties:
+Properties:
- - Config: use_shared_date
- - Env Var: RCLONE_DRIVE_USE_SHARED_DATE
- - Type: bool
- - Default: false
+- Config: import_formats
+- Env Var: RCLONE_DRIVE_IMPORT_FORMATS
+- Type: string
+- Required: false
- #### --drive-list-chunk
+--drive-allow-import-name-change
- Size of listing chunk 100-1000, 0 to disable.
+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: list_chunk
- - Env Var: RCLONE_DRIVE_LIST_CHUNK
- - Type: int
- - Default: 1000
+Properties:
- #### --drive-impersonate
+- Config: allow_import_name_change
+- Env Var: RCLONE_DRIVE_ALLOW_IMPORT_NAME_CHANGE
+- Type: bool
+- Default: false
- Impersonate this user when using a service account.
+--drive-use-created-date
- Properties:
+Use file created date instead of modified date.
- - Config: impersonate
- - Env Var: RCLONE_DRIVE_IMPERSONATE
- - Type: string
- - Required: false
+Useful when downloading data and you want the creation date used in
+place of the last modified date.
- #### --drive-upload-cutoff
+WARNING: This flag may have some unexpected consequences.
- Cutoff for switching to chunked upload.
+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: upload_cutoff
- - Env Var: RCLONE_DRIVE_UPLOAD_CUTOFF
- - Type: SizeSuffix
- - Default: 8Mi
+Properties:
- #### --drive-chunk-size
+- Config: use_created_date
+- Env Var: RCLONE_DRIVE_USE_CREATED_DATE
+- Type: bool
+- Default: false
- Upload chunk size.
+--drive-use-shared-date
- Must a power of 2 >= 256k.
+Use date file was shared instead of modified date.
- Making this larger will improve performance, but note that each chunk
- is buffered in memory one per transfer.
+Note that, as with "--drive-use-created-date", this flag may have
+unexpected consequences when uploading/downloading files.
- Reducing this will reduce memory usage but decrease performance.
+If both this flag and "--drive-use-created-date" are set, the created
+date is used.
- Properties:
+Properties:
- - Config: chunk_size
- - Env Var: RCLONE_DRIVE_CHUNK_SIZE
- - Type: SizeSuffix
- - Default: 8Mi
+- Config: use_shared_date
+- Env Var: RCLONE_DRIVE_USE_SHARED_DATE
+- Type: bool
+- Default: false
- #### --drive-acknowledge-abuse
+--drive-list-chunk
- Set to allow files which return cannotDownloadAbusiveFile to be downloaded.
+Size of listing chunk 100-1000, 0 to disable.
- 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: list_chunk
+- Env Var: RCLONE_DRIVE_LIST_CHUNK
+- Type: int
+- Default: 1000
- Properties:
+--drive-impersonate
- - Config: acknowledge_abuse
- - Env Var: RCLONE_DRIVE_ACKNOWLEDGE_ABUSE
- - Type: bool
- - Default: false
+Impersonate this user when using a service account.
- #### --drive-keep-revision-forever
+Properties:
- Keep new head revision of each file forever.
+- Config: impersonate
+- Env Var: RCLONE_DRIVE_IMPERSONATE
+- Type: string
+- Required: false
- Properties:
+--drive-upload-cutoff
- - Config: keep_revision_forever
- - Env Var: RCLONE_DRIVE_KEEP_REVISION_FOREVER
- - Type: bool
- - Default: false
+Cutoff for switching to chunked upload.
- #### --drive-size-as-quota
+Properties:
- Show sizes as storage quota usage, not actual size.
+- Config: upload_cutoff
+- Env Var: RCLONE_DRIVE_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 8Mi
- 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.
+--drive-chunk-size
- **WARNING**: This flag may have some unexpected consequences.
+Upload chunk size.
- 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.
+Must a power of 2 >= 256k.
- If you do use this flag for syncing (not recommended) then you will
- need to use --ignore size also.
+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: size_as_quota
- - Env Var: RCLONE_DRIVE_SIZE_AS_QUOTA
- - Type: bool
- - Default: false
+Properties:
- #### --drive-v2-download-min-size
+- Config: chunk_size
+- Env Var: RCLONE_DRIVE_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 8Mi
- If Object's are greater, use drive v2 API to download.
+--drive-acknowledge-abuse
- Properties:
+Set to allow files which return cannotDownloadAbusiveFile to be
+downloaded.
- - Config: v2_download_min_size
- - Env Var: RCLONE_DRIVE_V2_DOWNLOAD_MIN_SIZE
- - Type: SizeSuffix
- - Default: off
+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-pacer-min-sleep
+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.
- Minimum time to sleep between API calls.
+Properties:
- Properties:
+- Config: acknowledge_abuse
+- Env Var: RCLONE_DRIVE_ACKNOWLEDGE_ABUSE
+- Type: bool
+- Default: false
- - Config: pacer_min_sleep
- - Env Var: RCLONE_DRIVE_PACER_MIN_SLEEP
- - Type: Duration
- - Default: 100ms
+--drive-keep-revision-forever
- #### --drive-pacer-burst
+Keep new head revision of each file forever.
- Number of API calls to allow without sleeping.
+Properties:
- Properties:
+- Config: keep_revision_forever
+- Env Var: RCLONE_DRIVE_KEEP_REVISION_FOREVER
+- Type: bool
+- Default: false
- - Config: pacer_burst
- - Env Var: RCLONE_DRIVE_PACER_BURST
- - Type: int
- - Default: 100
+--drive-size-as-quota
- #### --drive-server-side-across-configs
+Show sizes as storage quota usage, not actual size.
- Deprecated: use --server-side-across-configs instead.
+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.
- Allow server-side operations (e.g. copy) to work across different drive configs.
+WARNING: This flag may have some unexpected consequences.
- 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.
+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.
- Properties:
+If you do use this flag for syncing (not recommended) then you will need
+to use --ignore size also.
- - Config: server_side_across_configs
- - Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS
- - Type: bool
- - Default: false
+Properties:
- #### --drive-disable-http2
+- Config: size_as_quota
+- Env Var: RCLONE_DRIVE_SIZE_AS_QUOTA
+- Type: bool
+- Default: false
- Disable drive using http2.
+--drive-v2-download-min-size
- 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.
+If Object's are greater, use drive v2 API to download.
- See: https://github.com/rclone/rclone/issues/3631
+Properties:
+- Config: v2_download_min_size
+- Env Var: RCLONE_DRIVE_V2_DOWNLOAD_MIN_SIZE
+- Type: SizeSuffix
+- Default: off
+--drive-pacer-min-sleep
- Properties:
+Minimum time to sleep between API calls.
- - Config: disable_http2
- - Env Var: RCLONE_DRIVE_DISABLE_HTTP2
- - Type: bool
- - Default: true
+Properties:
- #### --drive-stop-on-upload-limit
+- Config: pacer_min_sleep
+- Env Var: RCLONE_DRIVE_PACER_MIN_SLEEP
+- Type: Duration
+- Default: 100ms
- Make upload limit errors be fatal.
+--drive-pacer-burst
- 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.
+Number of API calls to allow without sleeping.
- Note that this detection is relying on error message strings which
- Google don't document so it may break in the future.
+Properties:
- See: https://github.com/rclone/rclone/issues/3857
+- Config: pacer_burst
+- Env Var: RCLONE_DRIVE_PACER_BURST
+- Type: int
+- Default: 100
+--drive-server-side-across-configs
- Properties:
+Deprecated: use --server-side-across-configs instead.
- - Config: stop_on_upload_limit
- - Env Var: RCLONE_DRIVE_STOP_ON_UPLOAD_LIMIT
- - Type: bool
- - Default: false
+Allow server-side operations (e.g. copy) to work across different drive
+configs.
- #### --drive-stop-on-download-limit
+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.
- Make download limit errors be fatal.
+Properties:
- 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.
+- Config: server_side_across_configs
+- Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS
+- Type: bool
+- Default: false
- Note that this detection is relying on error message strings which
- Google don't document so it may break in the future.
+--drive-disable-http2
+Disable drive using http2.
- Properties:
+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.
- - Config: stop_on_download_limit
- - Env Var: RCLONE_DRIVE_STOP_ON_DOWNLOAD_LIMIT
- - Type: bool
- - Default: false
+See: https://github.com/rclone/rclone/issues/3631
- #### --drive-skip-shortcuts
+Properties:
- If set skip shortcut files.
+- Config: disable_http2
+- Env Var: RCLONE_DRIVE_DISABLE_HTTP2
+- Type: bool
+- Default: true
- 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.
+--drive-stop-on-upload-limit
+Make upload limit errors be fatal.
- Properties:
+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.
- - Config: skip_shortcuts
- - Env Var: RCLONE_DRIVE_SKIP_SHORTCUTS
- - Type: bool
- - Default: false
+Note that this detection is relying on error message strings which
+Google don't document so it may break in the future.
- #### --drive-skip-dangling-shortcuts
+See: https://github.com/rclone/rclone/issues/3857
- If set skip dangling shortcut files.
+Properties:
- If this is set then rclone will not show any dangling shortcuts in listings.
+- Config: stop_on_upload_limit
+- Env Var: RCLONE_DRIVE_STOP_ON_UPLOAD_LIMIT
+- Type: bool
+- Default: false
+--drive-stop-on-download-limit
- Properties:
+Make download limit errors be fatal.
- - Config: skip_dangling_shortcuts
- - Env Var: RCLONE_DRIVE_SKIP_DANGLING_SHORTCUTS
- - Type: bool
- - Default: false
+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.
- #### --drive-resource-key
+Note that this detection is relying on error message strings which
+Google don't document so it may break in the future.
- Resource key for accessing a link-shared file.
+Properties:
- If you need to access files shared with a link like this
+- Config: stop_on_download_limit
+- Env Var: RCLONE_DRIVE_STOP_ON_DOWNLOAD_LIMIT
+- Type: bool
+- Default: false
- https://drive.google.com/drive/folders/XXX?resourcekey=YYY&usp=sharing
+--drive-skip-shortcuts
- 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.
+If set skip shortcut files.
- See: https://developers.google.com/drive/api/guides/resource-keys
+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.
- This resource key requirement only applies to a subset of old files.
+Properties:
- 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.
+- Config: skip_shortcuts
+- Env Var: RCLONE_DRIVE_SKIP_SHORTCUTS
+- Type: bool
+- Default: false
+--drive-skip-dangling-shortcuts
- Properties:
+If set skip dangling shortcut files.
- - Config: resource_key
- - Env Var: RCLONE_DRIVE_RESOURCE_KEY
- - Type: string
- - Required: false
+If this is set then rclone will not show any dangling shortcuts in
+listings.
- #### --drive-fast-list-bug-fix
+Properties:
- Work around a bug in Google Drive listing.
+- Config: skip_dangling_shortcuts
+- Env Var: RCLONE_DRIVE_SKIP_DANGLING_SHORTCUTS
+- Type: bool
+- Default: false
- 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
+--drive-resource-key
- Rclone detects this by finding no items in more than one directory
- when listing and retries them as lists of individual directories.
+Resource key for accessing a link-shared file.
- 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.
+If you need to access files shared with a link like this
- 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.
+ https://drive.google.com/drive/folders/XXX?resourcekey=YYY&usp=sharing
+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.
- Properties:
+See: https://developers.google.com/drive/api/guides/resource-keys
- - Config: fast_list_bug_fix
- - Env Var: RCLONE_DRIVE_FAST_LIST_BUG_FIX
- - Type: bool
- - Default: true
+This resource key requirement only applies to a subset of old files.
- #### --drive-metadata-owner
+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.
- Control whether owner should be read or written in metadata.
+Properties:
- 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.
+- Config: resource_key
+- Env Var: RCLONE_DRIVE_RESOURCE_KEY
+- Type: string
+- Required: false
- 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.
+--drive-fast-list-bug-fix
+Work around a bug in Google Drive listing.
- Properties:
+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
- - 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.
+Rclone detects this by finding no items in more than one directory when
+listing and retries them as lists of individual directories.
- #### --drive-metadata-permissions
+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.
- Control whether permissions should be read or written in metadata.
+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.
- Reading permissions metadata from files can be done quickly, but it
- isn't always desirable to set the permissions from the metadata.
+Properties:
- 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.
+- Config: fast_list_bug_fix
+- Env Var: RCLONE_DRIVE_FAST_LIST_BUG_FIX
+- Type: bool
+- Default: true
+--drive-metadata-owner
- Properties:
+Control whether owner should be read or written in metadata.
- - 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.
+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.
- #### --drive-metadata-labels
+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.
- Control whether labels should be read or written in metadata.
+Properties:
- 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.
+- 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.
- 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.
+--drive-metadata-permissions
- 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.
+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:
+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.
- - 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.
+Properties:
- #### --drive-encoding
+- 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.
- The encoding for the backend.
+--drive-metadata-labels
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+Control whether labels should be read or written in metadata.
- Properties:
+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.
- - Config: encoding
- - Env Var: RCLONE_DRIVE_ENCODING
- - Type: Encoding
- - Default: InvalidUtf8
+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.
- #### --drive-env-auth
+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.
- Get IAM credentials from runtime (environment variables or instance meta data if no env vars).
+Properties:
- Only applies if service_account_file and service_account_credentials is blank.
+- 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.
- 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: 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).
- ### Metadata
+--drive-description
- User metadata is stored in the properties field of the drive object.
+Description of the remote.
- Here are the possible system metadata items for the drive backend.
+Properties:
- | 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 |
+- Config: description
+- Env Var: RCLONE_DRIVE_DESCRIPTION
+- Type: string
+- Required: false
- See the [metadata](https://rclone.org/docs/#metadata) docs for more info.
+Metadata
- ## Backend commands
+User metadata is stored in the properties field of the drive object.
- Here are the commands specific to the drive backend.
+Metadata is supported on files and directories.
- Run them with
+Here are the possible system metadata items for the drive backend.
- rclone backend COMMAND remote:
+ ----------------------------------------------------------------------------------------------------------------------------------
+ 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.
- The help below will explain what arguments each command takes.
+ content-type The MIME type of the file. string text/plain N
- See the [backend](https://rclone.org/commands/rclone_backend/) command for more
- info on how to pass options and arguments.
+ copy-requires-writer-permission Whether the options to copy, boolean true N
+ print, or download this file,
+ should be disabled for readers
+ and commenters.
- These can be run on a running backend using the rc command
- [backend/command](https://rclone.org/rc/#backend-command).
+ description A short description of the string Contract for signing N
+ file.
- ### get
+ folder-color-rgb The color for a folder or a string 881133 N
+ shortcut to a folder as an RGB
+ hex string.
- Get command for fetching the drive config parameters
+ labels Labels attached to this file in JSON [] N
+ a JSON dump of Googled drive
+ format. Enable with
+ --drive-metadata-labels.
- rclone backend get remote: [options] [+]
+ mtime Time of last modification with RFC 3339 2006-01-02T15:04:05.999Z07:00 N
+ mS accuracy.
- This is a get command which will be used to fetch the various drive config parameters
+ owner The owner of the file. Usually string user@example.com N
+ an email address. Enable with
+ --drive-metadata-owner.
- Usage Examples:
+ 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 get drive: [-o service_account_file] [-o chunk_size]
- rclone rc backend/command command=get fs=drive: [-o service_account_file] [-o chunk_size]
+ starred Whether the user has starred boolean false N
+ the file.
+ viewed-by-me Whether the file has been boolean true Y
+ viewed by this user.
- Options:
+ 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.
+ ----------------------------------------------------------------------------------------------------------------------------------
- - "chunk_size": show the current upload chunk size
- - "service_account_file": show the current service account file
+See the metadata docs for more info.
- ### set
+Backend commands
- Set command for updating the drive config parameters
+Here are the commands specific to the drive backend.
- rclone backend set remote: [options] [+]
+Run them with
- This is a set command which will be used to update the various drive config parameters
+ rclone backend COMMAND remote:
- Usage Examples:
+The help below will explain what arguments each command takes.
- 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]
+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": update the current upload chunk size
- - "service_account_file": update the current service account file
+Get command for fetching the drive config parameters
- ### shortcut
+ rclone backend get remote: [options] [+]
- Create shortcuts from files or directories
+This is a get command which will be used to fetch the various drive
+config parameters
- rclone backend shortcut remote: [options] [+]
+Usage Examples:
- This command creates shortcuts from files or directories.
+ 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:
+Options:
- rclone backend shortcut drive: source_item destination_shortcut
- rclone backend shortcut drive: source_item -o target=drive2: destination_shortcut
+- "chunk_size": show the current upload chunk size
+- "service_account_file": show the current service account file
- 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:"
+set
- 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:".
+Set command for updating the drive config parameters
+ rclone backend set remote: [options] [+]
- Options:
+This is a set command which will be used to update the various drive
+config parameters
- - "target": optional target remote for the shortcut destination
+Usage Examples:
- ### drives
+ 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]
- List the Shared Drives available to this account
+Options:
- rclone backend drives remote: [options] [+]
+- "chunk_size": update the current upload chunk size
+- "service_account_file": update the current service account file
- This command lists the Shared Drives (Team Drives) available to this
- account.
+shortcut
- Usage:
+Create shortcuts from files or directories
- rclone backend [-o config] drives drive:
+ rclone backend shortcut remote: [options] [+]
- This will return a JSON list of objects like this
+This command creates shortcuts from files or directories.
- [
- {
- "id": "0ABCDEF-01234567890",
- "kind": "drive#teamDrive",
- "name": "My Drive"
- },
- {
- "id": "0ABCDEFabcdefghijkl",
- "kind": "drive#teamDrive",
- "name": "Test Drive"
- }
- ]
+Usage:
- 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.
+ rclone backend shortcut drive: source_item destination_shortcut
+ rclone backend shortcut drive: source_item -o target=drive2: destination_shortcut
- [My Drive]
- type = alias
- remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=:
+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:"
- [Test Drive]
- type = alias
- remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=:
+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:".
- [AllDrives]
- type = combine
- upstreams = "My Drive=My Drive:" "Test Drive=Test Drive:"
+Options:
- 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.
+- "target": optional target remote for the shortcut destination
+drives
- ### untrash
+List the Shared Drives available to this account
- Untrash files and directories
+ rclone backend drives remote: [options] [+]
- rclone backend untrash remote: [options] [+]
+This command lists the Shared Drives (Team Drives) available to this
+account.
- This command untrashes all the files and directories in the directory
- passed in recursively.
+Usage:
- Usage:
+ rclone backend [-o config] drives drive:
- 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
-
- ## 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):
- ### Metadata
+ rclone hashsum MD5 --download Hasher:path/to/subtree > /dev/null
- Any metadata supported by the underlying remote is read and written.
+ rclone backend dump Hasher:path/to/subtree
- See the [metadata](https://rclone.org/docs/#metadata) docs for more info.
+You can print or drop hashsum cache using custom backend commands:
- ## Backend commands
+ rclone backend dump Hasher:dir/subdir
- Here are the commands specific to the hasher backend.
+ rclone backend drop Hasher:
- Run them with
+Pre-Seed from a SUM File
- rclone backend COMMAND remote:
+Hasher supports two backend commands: generic SUM file import and faster
+but less consistent stickyimport.
- The help below will explain what arguments each command takes.
+ rclone backend import Hasher:dir/subdir SHA1 /path/to/SHA1SUM [--checkers 4]
- See the [backend](https://rclone.org/commands/rclone_backend/) command for more
- info on how to pass options and arguments.
+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.
- These can be run on a running backend using the rc command
- [backend/command](https://rclone.org/rc/#backend-command).
+ rclone backend stickyimport hasher:path/to/data sha1 remote:/path/to/sum.sha1
- ### drop
+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.
- Drop cache
+Configuration reference
- rclone backend drop remote: [options] [+]
+Standard options
- Completely drop checksum cache.
- Usage Example:
- rclone backend drop hasher:
+Here are the Standard options specific to hasher (Better checksums for
+other remotes).
+--hasher-remote
- ### dump
+Remote to cache checksums for (e.g. myRemote:path).
- Dump the database
+Properties:
- rclone backend dump remote: [options] [+]
+- Config: remote
+- Env Var: RCLONE_HASHER_REMOTE
+- Type: string
+- Required: true
- Dump cache records covered by the current remote
+--hasher-hashes
- ### fulldump
+Comma separated list of supported checksum types.
- Full dump of the database
+Properties:
- rclone backend fulldump remote: [options] [+]
+- Config: hashes
+- Env Var: RCLONE_HASHER_HASHES
+- Type: CommaSepList
+- Default: md5,sha1
- Dump all cache records in the database
+--hasher-max-age
- ### import
+Maximum time to keep checksums in cache (0 = no cache, off = cache
+forever).
- Import a SUM file
+Properties:
- rclone backend import remote: [options] [+]
+- Config: max_age
+- Env Var: RCLONE_HASHER_MAX_AGE
+- Type: Duration
+- Default: off
- 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
+Advanced options
+Here are the Advanced options specific to hasher (Better checksums for
+other remotes).
- ### stickyimport
+--hasher-auto-size
- Perform fast import of a SUM file
+Auto-update checksum for files smaller than this size (disabled by
+default).
- 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: auto_size
+- Env Var: RCLONE_HASHER_AUTO_SIZE
+- Type: SizeSuffix
+- Default: 0
+--hasher-description
+Description of the remote.
+Properties:
- ## Implementation details (advanced)
+- Config: description
+- Env Var: RCLONE_HASHER_DESCRIPTION
+- Type: string
+- Required: false
- This section explains how various rclone operations work on a hasher remote.
+Metadata
- **Disclaimer. This section describes current implementation which can
- change in future rclone versions!.**
+Any metadata supported by the underlying remote is read and written.
- ### Hashsum command
+See the metadata docs for more info.
- The `rclone hashsum` (or `md5sum` or `sha1sum`) command will:
+Backend commands
- 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.
+Here are the commands specific to the hasher backend.
- ### Other operations
+Run them with
- - 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
+ rclone backend COMMAND remote:
- Note that setting `max_age = 0` will disable checksum caching completely.
+The help below will explain what arguments each command takes.
- If you set `max_age = off`, checksums in cache will never age, unless you
- fully rewrite or delete the file.
+See the backend command for more info on how to pass options and
+arguments.
- ### Cache storage
+These can be run on a running backend using the rc command
+backend/command.
- 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.
+drop
- # HDFS
+Drop cache
- [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 drop remote: [options] [+]
- Paths are specified as `remote:` or `remote:path/to/dir`.
+Completely drop checksum cache. Usage Example: rclone backend drop
+hasher:
- ## Configuration
+dump
- Here is an example of how to make a remote called `remote`. First run:
+Dump the database
- rclone config
+ rclone backend dump remote: [options] [+]
- This will guide you through an interactive setup process:
+Dump cache records covered by the current remote
-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/ **
+fulldump
-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:
+Full dump of the database
-Name Type ==== ==== hadoop hdfs
+ rclone backend fulldump 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
+Dump all cache records in the database
+import
- This remote is called `remote` and can now be used like this
+Import a SUM file
- See all the top level directories
+ rclone backend import remote: [options] [+]
- rclone lsd remote:
+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
- List the contents of a directory
+stickyimport
- rclone ls remote:directory
+Perform fast import of a SUM file
- Sync the remote `directory` to `/home/local/directory`, deleting any excess files.
+ rclone backend stickyimport remote: [options] [+]
- rclone sync --interactive remote:directory /home/local/directory
+Fill hash cache from a SUM file without verifying file fingerprints.
+Usage Example: rclone backend stickyimport hasher:subdir md5
+remote:path/to/sum.md5
- ### Setting up your own HDFS instance for testing
+Implementation details (advanced)
- 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:
+This section explains how various rclone operations work on a hasher
+remote.
- If you want to build the docker image
+Disclaimer. This section describes current implementation which can
+change in future rclone versions!.
-git clone https://github.com/rclone/rclone.git cd
-rclone/fstest/testserver/images/test-hdfs docker build --rm -t
-rclone/test-hdfs .
+Hashsum command
+The rclone hashsum (or md5sum or sha1sum) command will:
- Or you can just use the latest one pushed
+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.
-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
+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 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
- **NB** it need few seconds to startup.
+Note that setting max_age = 0 will disable checksum caching completely.
- For this docker image the remote needs to be configured like this:
+If you set max_age = off, checksums in cache will never age, unless you
+fully rewrite or delete the file.
-[remote] type = hdfs namenode = 127.0.0.1:8020 username = root
+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.
- You can stop this image with `docker kill rclone-hdfs` (**NB** it does not use volumes, so all data
- uploaded will be lost.)
+HDFS
- ### Modification times
+HDFS is a distributed file-system, part of the Apache Hadoop framework.
- Time accurate to 1 second is stored.
+Paths are specified as remote: or remote:path/to/dir.
- ### Checksum
+Configuration
- No checksums are implemented.
+Here is an example of how to make a remote called remote. First run:
- ### Usage information
+ rclone config
- You can use the `rclone about remote:` command which will display filesystem size and current usage.
+This will guide you through an interactive setup process:
- ### Restricted filename characters
+ 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/ **
- In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters)
- the following characters are also replaced:
+ 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:
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | : | 0x3A | : |
+ Name Type
+ ==== ====
+ hadoop hdfs
- Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8).
+ 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
+This remote is called remote and can now be used like this
- ### Standard options
+See all the top level directories
- Here are the Standard options specific to hdfs (Hadoop distributed file system).
+ rclone lsd remote:
- #### --hdfs-namenode
+List the contents of a directory
- Hadoop name nodes and ports.
+ rclone ls remote:directory
- E.g. "namenode-1:8020,namenode-2:8020,..." to connect to host namenodes at port 8020.
+Sync the remote directory to /home/local/directory, deleting any excess
+files.
- Properties:
+ rclone sync --interactive remote:directory /home/local/directory
- - Config: namenode
- - Env Var: RCLONE_HDFS_NAMENODE
- - Type: CommaSepList
- - Default:
+Setting up your own HDFS instance for testing
- #### --hdfs-username
+You may start with a manual setup or use the docker image from the
+tests:
- Hadoop user name.
+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: username
- - Env Var: RCLONE_HDFS_USERNAME
- - Type: string
- - Required: false
- - Examples:
- - "root"
- - Connect to hdfs as root.
+Or you can just use the latest one pushed
- ### Advanced options
+ 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
- Here are the Advanced options specific to hdfs (Hadoop distributed file system).
+NB it need few seconds to startup.
- #### --hdfs-service-principal-name
+For this docker image the remote needs to be configured like this:
- Kerberos service principal name for the namenode.
+ [remote]
+ type = hdfs
+ namenode = 127.0.0.1:8020
+ username = root
- 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'.
+You can stop this image with docker kill rclone-hdfs (NB it does not use
+volumes, so all data uploaded will be lost.)
- Properties:
+Modification times
- - Config: service_principal_name
- - Env Var: RCLONE_HDFS_SERVICE_PRINCIPAL_NAME
- - Type: string
- - Required: false
+Time accurate to 1 second is stored.
- #### --hdfs-data-transfer-protection
+Checksum
- Kerberos data transfer protection: authentication|integrity|privacy.
+No checksums are implemented.
- 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.
+Usage information
- Properties:
+You can use the rclone about remote: command which will display
+filesystem size and current usage.
- - Config: data_transfer_protection
- - Env Var: RCLONE_HDFS_DATA_TRANSFER_PROTECTION
- - Type: string
- - Required: false
- - Examples:
- - "privacy"
- - Ensure authentication, integrity and encryption enabled.
+Restricted filename characters
- #### --hdfs-encoding
+In addition to the default restricted characters set the following
+characters are also replaced:
- The encoding for the backend.
+ Character Value Replacement
+ ----------- ------- -------------
+ : 0x3A :
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+Invalid UTF-8 bytes will also be replaced.
- Properties:
+Standard options
- - Config: encoding
- - Env Var: RCLONE_HDFS_ENCODING
- - Type: Encoding
- - Default: Slash,Colon,Del,Ctl,InvalidUtf8,Dot
+Here are the Standard options specific to hdfs (Hadoop distributed file
+system).
+--hdfs-namenode
+Hadoop name nodes and ports.
- ## Limitations
+E.g. "namenode-1:8020,namenode-2:8020,..." to connect to host namenodes
+at port 8020.
- - No server-side `Move` or `DirMove`.
- - Checksums not implemented.
+Properties:
- # HiDrive
+- Config: namenode
+- Env Var: RCLONE_HDFS_NAMENODE
+- Type: CommaSepList
+- Default:
- Paths are specified as `remote:path`
+--hdfs-username
- Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
+Hadoop user name.
- 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.
+Properties:
- ## Configuration
+- Config: username
+- Env Var: RCLONE_HDFS_USERNAME
+- Type: string
+- Required: false
+- Examples:
+ - "root"
+ - Connect to hdfs as root.
- Here is an example of how to make a remote called `remote`. First run:
+Advanced options
- rclone config
+Here are the Advanced options specific to hdfs (Hadoop distributed file
+system).
- This will guide you through an interactive setup process:
+--hdfs-service-principal-name
-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
+Kerberos service principal name for the namenode.
+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'.
- **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.
+Properties:
- See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a
- machine with no Internet browser available.
+- Config: service_principal_name
+- Env Var: RCLONE_HDFS_SERVICE_PRINCIPAL_NAME
+- Type: string
+- Required: false
- 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.
+--hdfs-data-transfer-protection
- Once configured you can then use `rclone` like this,
+Kerberos data transfer protection: authentication|integrity|privacy.
- List directories in top level of your HiDrive root folder
+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.
- rclone lsd remote:
+Properties:
- List all the files in your HiDrive filesystem
+- Config: data_transfer_protection
+- Env Var: RCLONE_HDFS_DATA_TRANSFER_PROTECTION
+- Type: string
+- Required: false
+- Examples:
+ - "privacy"
+ - Ensure authentication, integrity and encryption enabled.
- rclone ls remote:
+--hdfs-encoding
- To copy a local directory to a HiDrive directory called backup
+The encoding for the backend.
- rclone copy /home/source remote:backup
+See the encoding section in the overview for more info.
- ### 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: encoding
+- Env Var: RCLONE_HDFS_ENCODING
+- Type: Encoding
+- Default: Slash,Colon,Del,Ctl,InvalidUtf8,Dot
- 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).
+--hdfs-description
- ### Invalid refresh token
+Description of the remote.
- 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.
+Properties:
- This means that if you
+- Config: description
+- Env Var: RCLONE_HDFS_DESCRIPTION
+- Type: string
+- Required: false
- * Don't use the HiDrive remote for 60 days
+Limitations
- then rclone will return an error which includes a text
- that implies the refresh token is *invalid* or *expired*.
+- No server-side Move or DirMove.
+- Checksums not implemented.
- To fix this you will need to authorize rclone to access your HiDrive account again.
+HiDrive
- Using
+Paths are specified as remote:path
- rclone config reconnect remote:
+Paths may be as deep as required, e.g. remote:directory/subdirectory.
- the process is very similar to the process of initial setup exemplified before.
+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.
- ### Modification times and hashes
+Configuration
- HiDrive allows modification times to be set on objects accurate to 1 second.
+Here is an example of how to make a remote called remote. First run:
- 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.
+ rclone config
- ### 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.
+Properties:
+- 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.
- ## Limitations
+Advanced options
- ### Symbolic links
+Here are the Advanced options specific to hidrive (HiDrive).
- HiDrive is able to store symbolic links (*symlinks*) by design,
- for example, when unpacked from a zip archive.
+--hidrive-token
- 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.
+OAuth Access Token as a JSON blob.
- *This does not affect the `.rclonelink`-files
- that rclone uses to encode and store symbolic links.*
+Properties:
- ### Sparse files
+- Config: token
+- Env Var: RCLONE_HIDRIVE_TOKEN
+- Type: string
+- Required: false
- It is possible to store sparse files in HiDrive.
+--hidrive-auth-url
- 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.
+Auth server URL.
- # HTTP
+Leave blank to use the provider defaults.
- 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!)
+Properties:
- Paths are specified as `remote:` or `remote:path`.
+- Config: auth_url
+- Env Var: RCLONE_HIDRIVE_AUTH_URL
+- Type: string
+- Required: false
- 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.
+--hidrive-token-url
- 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.
+Token server url.
- To just download a single file it is easier to use
- [copyurl](https://rclone.org/commands/rclone_copyurl/).
+Leave blank to use the provider defaults.
- ## Configuration
+Properties:
- Here is an example of how to make a remote called `remote`. First
- run:
+- Config: token_url
+- Env Var: RCLONE_HIDRIVE_TOKEN_URL
+- Type: string
+- Required: false
- rclone config
+--hidrive-scope-role
- This will guide you through an interactive setup process:
+User-level that rclone should use when requesting access from HiDrive.
-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:
+Properties:
-Name Type ==== ==== remote http
+- 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.
-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
+--hidrive-root-prefix
+The root/parent folder for all paths.
- This remote is called `remote` and can now be used like this
+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.
- See all the top level directories
+Properties:
- rclone lsd remote:
+- 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".
- List the contents of a directory
+--hidrive-endpoint
- rclone ls remote:directory
+Endpoint for the service.
- Sync the remote `directory` to `/home/local/directory`, deleting any excess files.
+This is the URL that API-calls will be made to.
- rclone sync --interactive remote:directory /home/local/directory
+Properties:
- ### Read only
+- Config: endpoint
+- Env Var: RCLONE_HIDRIVE_ENDPOINT
+- Type: string
+- Default: "https://api.hidrive.strato.com/2.1"
- This remote is read only - you can't upload files to an HTTP server.
+--hidrive-disable-fetching-member-count
- ### Modification times
+Do not fetch number of objects in directories unless it is absolutely
+necessary.
- Most HTTP servers store time accurate to 1 second.
+Requests may be faster if the number of objects in subdirectories is not
+fetched.
- ### Checksum
+Properties:
- No checksums are stored.
+- Config: disable_fetching_member_count
+- Env Var: RCLONE_HIDRIVE_DISABLE_FETCHING_MEMBER_COUNT
+- Type: bool
+- Default: false
- ### Usage without a config file
+--hidrive-chunk-size
- Since the http remote only has one config parameter it is easy to use
- without a config file:
+Chunksize for chunked uploads.
- rclone lsd --http-url https://beta.rclone.org :http:
+Any files larger than the configured cutoff (or files of unknown size)
+will be uploaded in chunks of this size.
- or:
+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 :http,url='https://beta.rclone.org':
+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.
+Properties:
- ### Standard options
+- Config: chunk_size
+- Env Var: RCLONE_HIDRIVE_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 48Mi
- Here are the Standard options specific to http (HTTP).
+--hidrive-upload-cutoff
- #### --http-url
+Cutoff/Threshold for chunked uploads.
- URL of HTTP host to connect to.
+Any files larger than this will be uploaded in chunks of the configured
+chunksize.
- E.g. "https://example.com", or "https://user:pass@example.com" to use a username and password.
+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.
- Properties:
+Properties:
- - Config: url
- - Env Var: RCLONE_HTTP_URL
- - Type: string
- - Required: true
+- Config: upload_cutoff
+- Env Var: RCLONE_HIDRIVE_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 96Mi
- ### Advanced options
+--hidrive-upload-concurrency
- Here are the Advanced options specific to http (HTTP).
+Concurrency for chunked uploads.
- #### --http-headers
+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.
- Set HTTP headers for all transactions.
+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.
- Use this to set additional HTTP headers for all transactions.
+Properties:
- The input format is comma separated list of key,value pairs. Standard
- [CSV encoding](https://godoc.org/encoding/csv) may be used.
+- Config: upload_concurrency
+- Env Var: RCLONE_HIDRIVE_UPLOAD_CONCURRENCY
+- Type: int
+- Default: 4
- For example, to set a Cookie use 'Cookie,name=value', or '"Cookie","name=value"'.
+--hidrive-encoding
- You can set multiple headers, e.g. '"Cookie","name=value","Authorization","xxx"'.
+The encoding for the backend.
- Properties:
+See the encoding section in the overview for more info.
- - Config: headers
- - Env Var: RCLONE_HTTP_HEADERS
- - Type: CommaSepList
- - Default:
+Properties:
- #### --http-no-slash
+- Config: encoding
+- Env Var: RCLONE_HIDRIVE_ENCODING
+- Type: Encoding
+- Default: Slash,Dot
- Set this if the site doesn't end directories with /.
+--hidrive-description
- Use this if your target website does not use / on the end of
- directories.
+Description of the remote.
- 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.
+Properties:
- Note that this may cause rclone to confuse genuine HTML files with
- directories.
+- Config: description
+- Env Var: RCLONE_HIDRIVE_DESCRIPTION
+- Type: string
+- Required: false
- Properties:
+Limitations
- - Config: no_slash
- - Env Var: RCLONE_HTTP_NO_SLASH
- - Type: bool
- - Default: false
+Symbolic links
- #### --http-no-head
+HiDrive is able to store symbolic links (symlinks) by design, for
+example, when unpacked from a zip archive.
- Don't use HEAD requests.
+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.
- 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:
+This does not affect the .rclonelink-files that rclone uses to encode
+and store symbolic links.
- - find its size
- - check it really exists
- - check to see if it is a directory
+Sparse files
- 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.
+It is possible to store sparse files in HiDrive.
- Properties:
+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.
- - Config: no_head
- - Env Var: RCLONE_HTTP_NO_HEAD
- - Type: bool
- - Default: false
+HTTP
- ## Backend commands
+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!)
- Here are the commands specific to the http backend.
+Paths are specified as remote: or remote:path.
- Run them with
+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.
- rclone backend COMMAND remote:
+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.
- The help below will explain what arguments each command takes.
+To just download a single file it is easier to use copyurl.
- See the [backend](https://rclone.org/commands/rclone_backend/) command for more
- info on how to pass options and arguments.
+Configuration
- These can be run on a running backend using the rc command
- [backend/command](https://rclone.org/rc/#backend-command).
+Here is an example of how to make a remote called remote. First run:
- ### set
+ rclone config
- Set command for updating the config parameters.
+This will guide you through an interactive setup process:
- rclone backend set remote: [options] [+]
+ 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:
- This set command can be used to update the config parameters
- for a running http backend.
+ Name Type
+ ==== ====
+ remote http
- Usage Examples:
+ 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
- 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 called remote and can now be used like this
- The option keys are named as they are in the config file.
+See all the top level directories
- 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.
+ rclone lsd remote:
- It doesn't return anything.
+List the contents of a directory
+ rclone ls remote:directory
+Sync the remote directory to /home/local/directory, deleting any excess
+files.
+ rclone sync --interactive remote:directory /home/local/directory
- ## Limitations
+Read only
- `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.
+This remote is read only - you can't upload files to an HTTP server.
- 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/)
+Modification times
- # ImageKit
- This is a backend for the [ImageKit.io](https://imagekit.io/) storage service.
+Most HTTP servers store time accurate to 1 second.
- #### 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.
+Checksum
+No checksums are stored.
- #### Accounts & Pricing
+Usage without a config file
- 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).
+Since the http remote only has one config parameter it is easy to use
+without a config file:
- ## Configuration
+ rclone lsd --http-url https://beta.rclone.org :http:
- Here is an example of making an imagekit configuration.
+or:
- Firstly create a [ImageKit.io](https://imagekit.io/) account and choose a plan.
+ rclone lsd :http,url='https://beta.rclone.org':
- You will need to log in and get the `publicKey` and `privateKey` for your account from the developer section.
+Standard options
- Now run
+Here are the Standard options specific to http (HTTP).
-rclone config
+--http-url
+URL of HTTP host to connect to.
- This will guide you through an interactive setup process:
+E.g. "https://example.com", or "https://user:pass@example.com" to use a
+username and password.
-No remotes found, make a new one? n) New remote s) Set configuration
-password q) Quit config n/s/q> n
+Properties:
-Enter the name for the new remote. name> imagekit-media-library
+- Config: url
+- Env Var: RCLONE_HTTP_URL
+- Type: string
+- Required: true
-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
+--http-no-escape
-Option endpoint. You can find your ImageKit.io URL endpoint in your
-dashboard Enter a value. endpoint> https://ik.imagekit.io/imagekit_id
+Do not escape URL metacharacters in path names.
-Option public_key. You can find your ImageKit.io public key in your
-dashboard Enter a value. public_key> public_****************************
+Properties:
-Option private_key. You can find your ImageKit.io private key in your
-dashboard Enter a value. private_key>
-private_****************************
+- Config: no_escape
+- Env Var: RCLONE_HTTP_NO_ESCAPE
+- Type: bool
+- Default: false
-Edit advanced config? y) Yes n) No (default) y/n> n
+Advanced options
-Configuration complete. Options: - type: imagekit - endpoint:
-https://ik.imagekit.io/imagekit_id - public_key:
-public_**************************** - private_key:
-private_****************************
+Here are the Advanced options specific to http (HTTP).
-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-headers
- List directories in the top level of your Media Library
+Set HTTP headers for all transactions.
-rclone lsd imagekit-media-library:
+Use this to set additional HTTP headers for all transactions.
- Make a new directory.
+The input format is comma separated list of key,value pairs. Standard
+CSV encoding may be used.
-rclone mkdir imagekit-media-library:directory
+For example, to set a Cookie use 'Cookie,name=value', or
+'"Cookie","name=value"'.
- List the contents of a directory.
+You can set multiple headers, e.g.
+'"Cookie","name=value","Authorization","xxx"'.
-rclone ls imagekit-media-library:directory
+Properties:
+- Config: headers
+- Env Var: RCLONE_HTTP_HEADERS
+- Type: CommaSepList
+- Default:
- ### Modified time and hashes
+--http-no-slash
- ImageKit does not support modification times or hashes yet.
+Set this if the site doesn't end directories with /.
- ### Checksums
+Use this if your target website does not use / on the end of
+directories.
- No checksums are supported.
+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.
+Note that this may cause rclone to confuse genuine HTML files with
+directories.
- ### Standard options
+Properties:
- Here are the Standard options specific to imagekit (ImageKit.io).
+- Config: no_slash
+- Env Var: RCLONE_HTTP_NO_SLASH
+- Type: bool
+- Default: false
- #### --imagekit-endpoint
+--http-no-head
+Don't use HEAD requests.
+
+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't have the
+times or sizes of any files, and some files that don'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 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
- ### Metadata
+Properties:
- Any metadata supported by the underlying remote is read and written.
+- Config: public_key
+- Env Var: RCLONE_IMAGEKIT_PUBLIC_KEY
+- Type: string
+- Required: true
- Here are the possible system metadata items for the imagekit backend.
+--imagekit-private-key
- | 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** |
+You can find your ImageKit.io private key in your dashboard
- See the [metadata](https://rclone.org/docs/#metadata) docs for more info.
+Properties:
+- Config: private_key
+- Env Var: RCLONE_IMAGEKIT_PRIVATE_KEY
+- Type: string
+- Required: true
+Advanced options
- # Internet Archive
+Here are the Advanced options specific to imagekit (ImageKit.io).
- The Internet Archive backend utilizes Items on [archive.org](https://archive.org/)
+--imagekit-only-signed
- Refer to [IAS3 API documentation](https://archive.org/services/docs/api/ias3.html) for the API this backend uses.
+If you have configured Restrict unsigned image URLs in your dashboard
+settings, set this to true.
- 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: only_signed
+- Env Var: RCLONE_IMAGEKIT_ONLY_SIGNED
+- Type: bool
+- Default: false
- Once you have made a remote, you can use it like this:
+--imagekit-versions
- Make a new item
+Include old versions in directory listings.
- rclone mkdir remote:item
+Properties:
- List the contents of a item
+- Config: versions
+- Env Var: RCLONE_IMAGEKIT_VERSIONS
+- Type: bool
+- Default: false
- rclone ls remote:item
+--imagekit-upload-tags
- Sync `/home/local/directory` to the remote item, deleting any excess
- files in the item.
+Tags to add to the uploaded files, e.g. "tag1,tag2".
- rclone sync --interactive /home/local/directory remote:item
+Properties:
- ## 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.
+- Config: upload_tags
+- Env Var: RCLONE_IMAGEKIT_UPLOAD_TAGS
+- Type: string
+- Required: false
- 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.
+--imagekit-encoding
- ## 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 encoding for the backend.
- The following are reserved by Internet Archive:
- - `name`
- - `source`
- - `size`
- - `md5`
- - `crc32`
- - `sha1`
- - `format`
- - `old_version`
- - `viruscheck`
- - `summation`
+See the encoding section in the overview for more info.
- 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: encoding
+- Env Var: RCLONE_IMAGEKIT_ENCODING
+- Type: Encoding
+- Default:
+ Slash,LtGt,DoubleQuote,Dollar,Question,Hash,Percent,BackSlash,Del,Ctl,InvalidUtf8,Dot,SquareBracket
- 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.
+--imagekit-description
- Reading metadata will also provide custom (non-standard nor reserved) ones.
+Description of the remote.
- ## Filtering auto generated files
+Properties:
- 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.
+- Config: description
+- Env Var: RCLONE_IMAGEKIT_DESCRIPTION
+- Type: string
+- Required: false
- These auto-created files can be excluded from the sync using [metadata
- filtering](https://rclone.org/filtering/#metadata).
+Metadata
- rclone sync ... --metadata-exclude "source=metadata" --metadata-exclude "format=Metadata"
+Any metadata supported by the underlying remote is read and written.
- 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.
+Here are the possible system metadata items for the imagekit backend.
- ## Configuration
+ -----------------------------------------------------------------------------------------------------------
+ Name Help Type Example Read Only
+ -------------------- --------------- ----------- ------------------------------------- --------------------
+ aws-tags AI generated string tag1,tag2 Y
+ tags by AWS
+ Rekognition
+ 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).
+ btime Time of file RFC 3339 2006-01-02T15:04:05.999999999Z07:00 Y
+ birth
+ (creation) read
+ from
+ Last-Modified
+ header
- First run
+ custom-coordinates Custom string 0,0,100,100 Y
+ coordinates of
+ the file
- rclone config
+ file-type Type of the string image Y
+ file
- This will guide you through an interactive setup process.
+ google-tags AI generated string tag1,tag2 Y
+ tags by Google
+ Cloud Vision
+ associated with
+ the image
-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
+ has-alpha Whether the bool Y
+ image has alpha
+ channel or not
+ height Height of the int Y
+ image or video
+ in pixels
+ is-private-file Whether the bool Y
+ file is private
+ or not
- ### Standard options
+ size Size of the int64 Y
+ object in bytes
- Here are the Standard options specific to internetarchive (Internet Archive).
+ tags Tags associated string tag1,tag2 Y
+ with the file
- #### --internetarchive-access-key-id
+ width Width of the int Y
+ image or video
+ in pixels
+ -----------------------------------------------------------------------------------------------------------
+See the metadata docs for more info.
+
+Internet Archive
+
+The Internet Archive backend utilizes Items on archive.org
+
+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
-
- ### Metadata
+Here are the Standard options specific to internetarchive (Internet
+Archive).
- 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-access-key-id
- Owner is able to add custom keys. Metadata feature grabs all the keys including them.
+IAS3 Access Key.
- Here are the possible system metadata items for the internetarchive backend.
+Leave blank for anonymous access. You can find one here:
+https://archive.org/account/s3.php
- | 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: access_key_id
+- Env Var: RCLONE_INTERNETARCHIVE_ACCESS_KEY_ID
+- Type: string
+- Required: false
+--internetarchive-secret-access-key
+IAS3 Secret Key (password).
- # Jottacloud
+Leave blank for anonymous access.
- 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)
-
- 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
+Properties:
- 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
+- Config: secret_access_key
+- Env Var: RCLONE_INTERNETARCHIVE_SECRET_ACCESS_KEY
+- Type: string
+- Required: false
- rclone ls remote:
-
- To copy a local directory to an Jottacloud directory called backup
+Advanced options
- rclone copy /home/source remote:backup
+Here are the Advanced options specific to internetarchive (Internet
+Archive).
- ### Devices and Mountpoints
+--internetarchive-endpoint
- 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.
+IAS3 Endpoint.
- 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.
+Leave blank for default value.
- 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.
+Properties:
- 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.
+- Config: endpoint
+- Env Var: RCLONE_INTERNETARCHIVE_ENDPOINT
+- Type: string
+- Default: "https://s3.us.archive.org"
- ### --fast-list
+--internetarchive-front-endpoint
- 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.
+Host of InternetArchive Frontend.
- 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.
+Leave blank for default value.
- 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`.
+Properties:
- ### Modification times and hashes
+- Config: front_endpoint
+- Env Var: RCLONE_INTERNETARCHIVE_FRONT_ENDPOINT
+- Type: string
+- Default: "https://archive.org"
- 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.
+--internetarchive-disable-checksum
- Jottacloud supports MD5 type hashes, so you can use the `--checksum`
- flag.
+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.
- 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).
+Properties:
- ### Restricted filename characters
+- Config: disable_checksum
+- Env Var: RCLONE_INTERNETARCHIVE_DISABLE_CHECKSUM
+- Type: bool
+- Default: true
- In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters)
- the following characters are also replaced:
+--internetarchive-wait-archive
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | " | 0x22 | " |
- | * | 0x2A | * |
- | : | 0x3A | : |
- | < | 0x3C | < |
- | > | 0x3E | > |
- | ? | 0x3F | ? |
- | \| | 0x7C | | |
+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.
- Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
- as they can't be used in XML strings.
+Properties:
- ### Deleting files
+- Config: wait_archive
+- Env Var: RCLONE_INTERNETARCHIVE_WAIT_ARCHIVE
+- Type: Duration
+- Default: 0s
- 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.
+--internetarchive-encoding
- ### Versions
+The encoding for the backend.
- 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.
+See the encoding section in the overview for more info.
- 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.
+Properties:
- ### Quota information
+- Config: encoding
+- Env Var: RCLONE_INTERNETARCHIVE_ENCODING
+- Type: Encoding
+- Default: Slash,LtGt,CrLf,Del,Ctl,InvalidUtf8,Dot
- 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.
+--internetarchive-description
+Description of the remote.
- ### Standard options
+Properties:
- Here are the Standard options specific to jottacloud (Jottacloud).
+- Config: description
+- Env Var: RCLONE_INTERNETARCHIVE_DESCRIPTION
+- Type: string
+- Required: false
- #### --jottacloud-client-id
+Metadata
- OAuth Client Id.
+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.
- Leave blank normally.
+Owner is able to add custom keys. Metadata feature grabs all the keys
+including them.
- Properties:
+Here are the possible system metadata items for the internetarchive
+backend.
- - Config: client_id
- - Env Var: RCLONE_JOTTACLOUD_CLIENT_ID
- - Type: string
- - Required: false
+ --------------------------------------------------------------------------------------------------------------------------------------
+ Name Help Type Example Read Only
+ --------------------- ---------------------------------- ----------- -------------------------------------------- --------------------
+ crc32 CRC32 calculated by Internet string 01234567 Y
+ Archive
- #### --jottacloud-client-secret
+ format Name of format identified by string Comma-Separated Values Y
+ Internet Archive
- OAuth Client Secret.
+ md5 MD5 hash calculated by Internet string 01234567012345670123456701234567 Y
+ Archive
- Leave blank normally.
+ mtime Time of last modification, managed RFC 3339 2006-01-02T15:04:05.999999999Z Y
+ by Rclone
- Properties:
+ name Full file path, without the bucket filename backend/internetarchive/internetarchive.go Y
+ part
- - Config: client_secret
- - Env Var: RCLONE_JOTTACLOUD_CLIENT_SECRET
- - Type: string
- - Required: false
+ old_version Whether the file was replaced and boolean true Y
+ moved by keep-old-version flag
- ### Advanced options
+ rclone-ia-mtime Time of last modification, managed RFC 3339 2006-01-02T15:04:05.999999999Z N
+ by Internet Archive
- Here are the Advanced options specific to jottacloud (Jottacloud).
+ rclone-mtime Time of last modification, managed RFC 3339 2006-01-02T15:04:05.999999999Z N
+ by Rclone
- #### --jottacloud-token
+ rclone-update-track Random value used by Rclone for string aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa N
+ tracking changes inside Internet
+ Archive
- OAuth Access Token as a JSON blob.
+ sha1 SHA1 hash calculated by Internet string 0123456701234567012345670123456701234567 Y
+ Archive
- Properties:
+ size File size in bytes decimal 123456 Y
+ number
- - Config: token
- - Env Var: RCLONE_JOTTACLOUD_TOKEN
- - Type: string
- - Required: false
+ source The source of the file string original Y
- #### --jottacloud-auth-url
+ summation Check string md5 Y
+ https://forum.rclone.org/t/31922
+ for how it is used
- Auth server URL.
+ viruscheck The last time viruscheck process unixtime 1654191352 Y
+ was run for the file (?)
+ --------------------------------------------------------------------------------------------------------------------------------------
- Leave blank to use the provider defaults.
+See the metadata docs for more info.
- Properties:
+Jottacloud
- - Config: auth_url
- - Env Var: RCLONE_JOTTACLOUD_AUTH_URL
- - Type: string
- - Required: false
+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)
- #### --jottacloud-token-url
+Most of the white-label versions are supported by this backend, although
+may require different authentication setup - described below.
- Token server url.
+Paths are specified as remote:path
- Leave blank to use the provider defaults.
+Paths may be as deep as required, e.g. remote:directory/subdirectory.
- Properties:
+Authentication types
- - Config: token_url
- - Env Var: RCLONE_JOTTACLOUD_TOKEN_URL
- - Type: string
- - Required: false
+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.
- #### --jottacloud-md5-memory-limit
+Standard authentication
- Files bigger than this will be cached on disk to calculate the MD5 if required.
+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.
- Properties:
+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).
- - Config: md5_memory_limit
- - Env Var: RCLONE_JOTTACLOUD_MD5_MEMORY_LIMIT
- - Type: SizeSuffix
- - Default: 10Mi
+Restricted filename characters
- #### --jottacloud-trashed-only
+In addition to the default restricted characters set the following
+characters are also replaced:
- Only show files that are in the trash.
+ Character Value Replacement
+ ----------- ------- -------------
+ " 0x22 "
+ * 0x2A *
+ : 0x3A :
+ < 0x3C <
+ > 0x3E >
+ ? 0x3F ?
+ | 0x7C |
- This will show trashed files in their original directory structure.
+Invalid UTF-8 bytes will also be replaced, as they can't be used in XML
+strings.
- Properties:
+Deleting files
- - Config: trashed_only
- - Env Var: RCLONE_JOTTACLOUD_TRASHED_ONLY
- - Type: bool
- - Default: false
+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.
- #### --jottacloud-hard-delete
+Versions
- Delete files permanently rather than putting them into the trash.
+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.
- Properties:
+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.
- - Config: hard_delete
- - Env Var: RCLONE_JOTTACLOUD_HARD_DELETE
- - Type: bool
- - Default: false
+Quota information
- #### --jottacloud-upload-resume-limit
+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.
- Files bigger than this can be resumed if the upload fail's.
+Standard options
- Properties:
+Here are the Standard options specific to jottacloud (Jottacloud).
- - Config: upload_resume_limit
- - Env Var: RCLONE_JOTTACLOUD_UPLOAD_RESUME_LIMIT
- - Type: SizeSuffix
- - Default: 10Mi
+--jottacloud-client-id
- #### --jottacloud-no-versions
+OAuth Client Id.
- Avoid server side versioning by deleting files and recreating files instead of overwriting them.
+Leave blank normally.
- Properties:
+Properties:
- - Config: no_versions
- - Env Var: RCLONE_JOTTACLOUD_NO_VERSIONS
- - Type: bool
- - Default: false
+- Config: client_id
+- Env Var: RCLONE_JOTTACLOUD_CLIENT_ID
+- Type: string
+- Required: false
- #### --jottacloud-encoding
+--jottacloud-client-secret
- The encoding for the backend.
+OAuth Client Secret.
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+Leave blank normally.
- Properties:
+Properties:
- - Config: encoding
- - Env Var: RCLONE_JOTTACLOUD_ENCODING
- - Type: Encoding
- - Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,Del,Ctl,InvalidUtf8,Dot
+- Config: client_secret
+- Env Var: RCLONE_JOTTACLOUD_CLIENT_SECRET
+- Type: string
+- Required: false
- ### Metadata
+Advanced options
- Jottacloud has limited support for metadata, currently an extended set of timestamps.
+Here are the Advanced options specific to jottacloud (Jottacloud).
- Here are the possible system metadata items for the jottacloud backend.
+--jottacloud-token
- | 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** |
+OAuth Access Token as a JSON blob.
- See the [metadata](https://rclone.org/docs/#metadata) docs for more info.
+Properties:
+- Config: token
+- Env Var: RCLONE_JOTTACLOUD_TOKEN
+- Type: string
+- Required: false
+--jottacloud-auth-url
- ## Limitations
+Auth server URL.
- Note that Jottacloud is case insensitive so you can't have a file called
- "Hello.doc" and one called "hello.doc".
+Leave blank to use the provider defaults.
- 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.
+Properties:
- Jottacloud only supports filenames up to 255 characters in length.
+- Config: auth_url
+- Env Var: RCLONE_JOTTACLOUD_AUTH_URL
+- Type: string
+- Required: false
- ## Troubleshooting
+--jottacloud-token-url
- 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.
+Token server url.
- # Koofr
+Leave blank to use the provider defaults.
- Paths are specified as `remote:path`
+Properties:
- Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
+- Config: token_url
+- Env Var: RCLONE_JOTTACLOUD_TOKEN_URL
+- Type: string
+- Required: false
- ## Configuration
+--jottacloud-md5-memory-limit
- 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.
+Files bigger than this will be cached on disk to calculate the MD5 if
+required.
- Here is an example of how to make a remote called `koofr`. First run:
+Properties:
- rclone config
+- Config: md5_memory_limit
+- Env Var: RCLONE_JOTTACLOUD_MD5_MEMORY_LIMIT
+- Type: SizeSuffix
+- Default: 10Mi
- This will guide you through an interactive setup process:
+--jottacloud-trashed-only
-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
+Only show files that are in the trash.
+This will show trashed files in their original directory structure.
- 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: trashed_only
+- Env Var: RCLONE_JOTTACLOUD_TRASHED_ONLY
+- Type: bool
+- Default: false
- List directories in top level of your Koofr
+--jottacloud-hard-delete
- rclone lsd koofr:
+Delete files permanently rather than putting them into the trash.
- List all the files in your Koofr
+Properties:
- rclone ls koofr:
+- Config: hard_delete
+- Env Var: RCLONE_JOTTACLOUD_HARD_DELETE
+- Type: bool
+- Default: false
- To copy a local directory to an Koofr directory called backup
+--jottacloud-upload-resume-limit
- rclone copy /home/source koofr:backup
+Files bigger than this can be resumed if the upload fail's.
- ### Restricted filename characters
+Properties:
- In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters)
- the following characters are also replaced:
+- Config: upload_resume_limit
+- Env Var: RCLONE_JOTTACLOUD_UPLOAD_RESUME_LIMIT
+- Type: SizeSuffix
+- Default: 10Mi
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | \ | 0x5C | \ |
+--jottacloud-no-versions
- Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
- as they can't be used in XML strings.
+Avoid server side versioning by deleting files and recreating files
+instead of overwriting them.
+Properties:
- ### Standard options
+- Config: no_versions
+- Env Var: RCLONE_JOTTACLOUD_NO_VERSIONS
+- Type: bool
+- Default: false
- Here are the Standard options specific to koofr (Koofr, Digi Storage and other Koofr-compatible storage providers).
+--jottacloud-encoding
- #### --koofr-provider
+The encoding for the backend.
+See the encoding section in the overview 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 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.
+Properties:
+- Config: endpoint
+- Env Var: RCLONE_KOOFR_ENDPOINT
+- Provider: other
+- Type: string
+- Required: true
- ## Limitations
+--koofr-user
- Note that Koofr is case insensitive so you can't have a file called
- "Hello.doc" and one called "hello.doc".
+Your user name.
- ## Providers
+Properties:
- ### Koofr
+- Config: user
+- Env Var: RCLONE_KOOFR_USER
+- Type: string
+- Required: true
- This is the original [Koofr](https://koofr.eu) storage provider used as main example and described in the [configuration](#configuration) section above.
+--koofr-password
- ### Digi Storage
+Your password for rclone generate one at
+https://app.koofr.net/app/admin/preferences/password.
- [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.
+NB Input to this must be obscured - see rclone obscure.
- Here is an example of how to make a remote called `ds`. First run:
+Properties:
- rclone config
+- Config: password
+- Env Var: RCLONE_KOOFR_PASSWORD
+- Provider: koofr
+- Type: string
+- Required: true
- This will guide you through an interactive setup process:
+Advanced options
-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
+Here are the Advanced options specific to koofr (Koofr, Digi Storage and
+other Koofr-compatible storage providers).
+--koofr-mountid
- ### Other
+Mount ID of the mount to use.
- 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.
+If omitted, the primary mount is used.
- Here is an example of how to make a remote called `other`. First run:
+Properties:
- rclone config
+- Config: mountid
+- Env Var: RCLONE_KOOFR_MOUNTID
+- Type: string
+- Required: false
- This will guide you through an interactive setup process:
+--koofr-setmtime
-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
+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.
- # Linkbox
+Properties:
- Linkbox is [a private cloud drive](https://linkbox.to/).
+- Config: setmtime
+- Env Var: RCLONE_KOOFR_SETMTIME
+- Type: bool
+- Default: true
- ## Configuration
+--koofr-encoding
- Here is an example of making a remote for Linkbox.
+The encoding for the backend.
- First run:
+See the encoding section in the overview for more info.
- rclone config
+Properties:
- This will guide you through an interactive setup process:
+- Config: encoding
+- Env Var: RCLONE_KOOFR_ENCODING
+- Type: Encoding
+- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
-No remotes found, make a new one? n) New remote s) Set configuration
-password q) Quit config n/s/q> n
+--koofr-description
-Enter name for new remote. name> remote
+Description of the remote.
-Option Storage. Type of storage to configure. Choose a number from
-below, or type in your own value. XX / Linkbox (linkbox) Storage> XX
+Properties:
-Option token. Token from https://www.linkbox.to/admin/account Enter a
-value. token> testFromCLToken
+- Config: description
+- Env Var: RCLONE_KOOFR_DESCRIPTION
+- Type: string
+- Required: false
-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
+Limitations
+Note that Koofr is case insensitive so you can't have a file called
+"Hello.doc" and one called "hello.doc".
+Providers
- ### Standard options
+Koofr
- Here are the Standard options specific to linkbox (Linkbox).
+This is the original Koofr storage provider used as main example and
+described in the configuration section above.
- #### --linkbox-token
+Digi Storage
+Digi Storage is a cloud storage service run by Digi.ro that provides a
+Koofr API.
+
+Here is an example of how to make a remote called ds. 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> 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
+Here are the Standard options specific to linkbox (Linkbox).
+--linkbox-token
- ## Limitations
+Token from https://www.linkbox.to/admin/account
- 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: token
+- Env Var: RCLONE_LINKBOX_TOKEN
+- Type: string
+- Required: true
- [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.
+Advanced options
- ## Features highlights
+Here are the Advanced options specific to linkbox (Linkbox).
- - 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)
+--linkbox-description
- ## Configuration
+Description of the remote.
- Here is an example of making a mailru configuration.
+Properties:
- First create a Mail.ru Cloud account and choose a tariff.
+- Config: description
+- Env Var: RCLONE_LINKBOX_DESCRIPTION
+- Type: string
+- Required: false
- 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`.
+Limitations
- - 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.
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON
+strings.
- Now run
+Mail.ru Cloud
- rclone config
+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.
- This will guide you through an interactive setup process:
+Features highlights
-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
+- 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)
-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
+Configuration
+Here is an example of making a mailru configuration.
- Configuration of this backend does not require a local web browser.
- You can use the configured backend as shown below:
+First create a Mail.ru Cloud account and choose a tariff.
- See top level directories
+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.
- rclone lsd remote:
+- 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.
- Make a new directory
+Now run
- rclone mkdir remote:directory
+ rclone config
- List the contents of a directory
+This will guide you through an interactive setup process:
- 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.
+Properties:
+- Config: token
+- Env Var: RCLONE_MAILRU_TOKEN
+- Type: string
+- Required: false
- ## Limitations
+--mailru-auth-url
- 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.
+Auth server URL.
- Note that Mailru is case insensitive so you can't have a file called
- "Hello.doc" and one called "hello.doc".
+Leave blank to use the provider defaults.
- # Mega
+Properties:
- [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.
+- Config: auth_url
+- Env Var: RCLONE_MAILRU_AUTH_URL
+- Type: string
+- Required: false
- This is an rclone backend for Mega which supports the file transfer
- features of Mega using the same client side encryption.
+--mailru-token-url
- Paths are specified as `remote:path`
+Token server url.
- Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
+Leave blank to use the provider defaults.
- ## Configuration
+Properties:
- Here is an example of how to make a remote called `remote`. First run:
+- Config: token_url
+- Env Var: RCLONE_MAILRU_TOKEN_URL
+- Type: string
+- Required: false
- rclone config
+--mailru-speedup-file-patterns
- This will guide you through an interactive setup process:
+Comma separated list of file name patterns eligible for speedup (put by
+hash).
-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
+Patterns are case insensitive and can contain '*' or '?' meta
+characters.
+Properties:
- **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.
+- 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.
- Once configured you can then use `rclone` like this,
+--mailru-speedup-max-disk
- List directories in top level of your Mega
+This option allows you to disable speedup (put by hash) for large files.
- rclone lsd remote:
+Reason is that preliminary hashing can exhaust your RAM or disk space.
- List all the files in your Mega
+Properties:
- rclone ls remote:
+- 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.
- To copy a local directory to an Mega directory called backup
+--mailru-speedup-max-memory
- rclone copy /home/source remote:backup
+Files larger than the size given below will always be hashed on disk.
- ### Modification times and hashes
+Properties:
- Mega does not support modification times or hashes yet.
+- 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.
- ### Restricted filename characters
+--mailru-check-hash
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | NUL | 0x00 | ␀ |
- | / | 0x2F | / |
+What should copy do if file checksum is mismatched or invalid.
- Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
- as they can't be used in JSON strings.
+Properties:
- ### Duplicated files
+- Config: check_hash
+- Env Var: RCLONE_MAILRU_CHECK_HASH
+- Type: bool
+- Default: true
+- Examples:
+ - "true"
+ - Fail with error.
+ - "false"
+ - Ignore and continue.
- Mega can have two files with exactly the same name and path (unlike a
- normal file system).
+--mailru-user-agent
- Duplicated files cause problems with the syncing and you will see
- messages in the log about duplicates.
+HTTP user agent used internally by client.
- Use `rclone dedupe` to fix duplicated files.
+Defaults to "rclone/VERSION" or "--user-agent" provided on command line.
- ### Failure to log-in
+Properties:
- #### Object not found
+- Config: user_agent
+- Env Var: RCLONE_MAILRU_USER_AGENT
+- Type: string
+- Required: 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
+--mailru-quirks
-Failed to create file system for "my-mega-remote:": couldn't login:
-Object (typically, node or user) not found
+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.
+Quirks will be removed when the backend grows stable. Supported quirks:
+atomicmkdir binlist unknowndirs
- 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.
+Properties:
- 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.
+- Config: quirks
+- Env Var: RCLONE_MAILRU_QUIRKS
+- Type: string
+- Required: false
-MEGA CMD> login me@example.com Password: Fetching nodes ... Loading
-transfers from local cache Login complete as me@example.com
-me@example.com:/$
+--mailru-encoding
+The encoding for the backend.
- 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.
+See the encoding section in the overview for more info.
+Properties:
- #### Repeated commands blocks access
+- Config: encoding
+- Env Var: RCLONE_MAILRU_ENCODING
+- Type: Encoding
+- Default:
+ Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Del,Ctl,InvalidUtf8,Dot
- 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.
+--mailru-description
- 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.
+Description of the remote.
- 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.
+Properties:
- Rclone does not currently close mega sessions (you can see them in the
- web interface), however closing the sessions does not solve the issue.
+- Config: description
+- Env Var: RCLONE_MAILRU_DESCRIPTION
+- Type: string
+- Required: false
- 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...
+Limitations
- Note that this has been observed by trial and error and might not be
- set in stone.
+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.
- 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.
+Note that Mailru is case insensitive so you can't have a file called
+"Hello.doc" and one called "hello.doc".
- 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.
+Mega
- 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 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.
- 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.
+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 remote:path
- ### Standard options
+Paths may be as deep as required, e.g. remote:directory/subdirectory.
- Here are the Standard options specific to mega (Mega).
+Configuration
- #### --mega-user
+Here is an example of how to make a remote called remote. First run:
- User name.
+ rclone config
- 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.
+Repeated commands blocks access
+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.
- ### Process `killed`
+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.
- 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).
+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.
- ## Limitations
+Rclone does not currently close mega sessions (you can see them in the
+web interface), however closing the sessions does not solve the issue.
- 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.
+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 allows duplicate files which may confuse rclone.
+Note that this has been observed by trial and error and might not be set
+in stone.
- # Memory
+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.
- The memory backend is an in RAM backend. It does not persist its
- data - use the local backend for that.
+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.
- 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.
+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.
- You can configure it as a remote like this with `rclone config` too if
- you want to:
+Standard options
-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/ **
+Here are the Standard options specific to mega (Mega).
-Remote config
+--mega-user
- ---------------
- [remote]
- type = memory
- ---------------
+User name.
-y) Yes this is OK (default)
-z) Edit this remote
-a) Delete this remote y/e/d> y
+Properties:
+- Config: user
+- Env Var: RCLONE_MEGA_USER
+- Type: string
+- Required: true
- Because the memory backend isn't persistent it is most useful for
- testing or with an rclone server or rclone mount, e.g.
+--mega-pass
- rclone mount :memory: /mnt/tmp
- rclone serve webdav :memory:
- rclone serve sftp :memory:
+Password.
- ### Modification times and hashes
+NB Input to this must be obscured - see rclone obscure.
- The memory backend supports MD5 hashes and modification times accurate to 1 nS.
+Properties:
- ### Restricted filename characters
+- Config: pass
+- Env Var: RCLONE_MEGA_PASS
+- Type: string
+- Required: true
- The memory backend replaces the [default restricted characters
- set](https://rclone.org/overview/#restricted-characters).
+Advanced options
+Here are the Advanced options specific to mega (Mega).
+--mega-debug
+Output more debug from Mega.
- # Akamai NetStorage
+If this flag is set (along with -vv) it will print further debugging
+information from the mega backend.
- 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: debug
+- Env Var: RCLONE_MEGA_DEBUG
+- Type: bool
+- Default: false
+--mega-hard-delete
- 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.
+Delete files permanently rather than putting them into the trash.
- ## Configuration
+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.
- Here's an example of how to make a remote called `ns1`.
+Properties:
- 1. To begin the interactive configuration process, enter this command:
+- Config: hard_delete
+- Env Var: RCLONE_MEGA_HARD_DELETE
+- Type: bool
+- Default: false
-rclone config
+--mega-use-https
+Use HTTPS for transfers.
- 2. Type `n` to create a new remote.
+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.
-n) New remote
-o) Delete remote
-p) Quit config e/n/d/q> n
+Properties:
+- Config: use_https
+- Env Var: RCLONE_MEGA_USE_HTTPS
+- Type: bool
+- Default: false
- 3. For this example, enter `ns1` when you reach the name> prompt.
+--mega-encoding
-name> ns1
+The encoding for the backend.
+See the encoding section in the overview for more info.
- 4. Enter `netstorage` as the type of storage to configure.
+Properties:
-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
+- Config: encoding
+- Env Var: RCLONE_MEGA_ENCODING
+- Type: Encoding
+- Default: Slash,InvalidUtf8,Dot
+--mega-description
- 5. Select between the HTTP or HTTPS protocol. Most users should choose HTTPS, which is the default. HTTP is provided primarily for debugging purposes.
+Description of the remote.
-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
+Properties:
+- Config: description
+- Env Var: RCLONE_MEGA_DESCRIPTION
+- Type: string
+- Required: false
- 6. Specify your NetStorage host, CP code, and any necessary content paths using this format: `///`
+Process killed
-Enter a string value. Press Enter for the default (""). host>
-baseball-nsu.akamaihd.net/123456/content/
+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.
+Limitations
- 7. Set the netstorage account name
+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.
-Enter a string value. Press Enter for the default (""). account>
-username
+Mega allows duplicate files which may confuse rclone.
+Memory
- 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 is an in RAM backend. It does not persist its data -
+use the local backend for that.
-y) Yes type in my own password
-z) Generate random password y/g> y Enter the password: password:
- Confirm the password: password:
+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.
+Configuration
- 9. View the summary and confirm your remote configuration.
+You can configure it as a remote like this with rclone config too if you
+want to:
-[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
+ 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/ **
+ Remote config
- This remote is called `ns1` and can now be used.
+ --------------------
+ [remote]
+ type = memory
+ --------------------
+ y) Yes this is OK (default)
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
- ## Example operations
+Because the memory backend isn't persistent it is most useful for
+testing or with an rclone server or rclone mount, e.g.
- Get started with rclone and NetStorage with these examples. For additional rclone commands, visit https://rclone.org/commands/.
+ rclone mount :memory: /mnt/tmp
+ rclone serve webdav :memory:
+ rclone serve sftp :memory:
- ### See contents of a directory in your project
+Modification times and hashes
- rclone lsd ns1:/974012/testing/
+The memory backend supports MD5 hashes and modification times accurate
+to 1 nS.
- ### Sync the contents local with remote
+Restricted filename characters
- rclone sync . ns1:/974012/testing/
+The memory backend replaces the default restricted characters set.
- ### Upload local content to remote
- rclone copy notes.txt ns1:/974012/testing/
+Advanced options
- ### Delete content on remote
- rclone delete ns1:/974012/testing/notes.txt
+Here are the Advanced options specific to memory (In memory object
+storage system.).
- ### Move or copy content between CP codes.
+--memory-description
- Your credentials must have access to two CP codes on the same remote. You can't perform operations between different remotes.
+Description of the remote.
- rclone move ns1:/974012/testing/notes.txt ns1:/974450/testing2/
+Properties:
- ## Features
+- Config: description
+- Env Var: RCLONE_MEMORY_DESCRIPTION
+- Type: string
+- Required: false
- ### Symlink Support
+Akamai NetStorage
- 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.
+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 //.
- 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.
+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
- 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.
+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.
- **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.
+Configuration
- ### Implicit vs. Explicit Directories
+Here's an example of how to make a remote called ns1.
- With NetStorage, directories can exist in one of two forms:
+1. To begin the interactive configuration process, enter this command:
- 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.
+ rclone config
- 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.
+2. Type n to create a new remote.
- ### `--fast-list` / ListR support
+ n) New remote
+ d) Delete remote
+ q) Quit config
+ e/n/d/q> n
- 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.
+3. For this example, enter ns1 when you reach the name> prompt.
- * **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.
+ name> ns1
- * **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.
+4. Enter netstorage as the type of storage to configure.
- 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.
+ 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**: 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.
+5. Select between the HTTP or HTTPS protocol. Most users should choose
+ HTTPS, which is the default. HTTP is provided primarily for
+ debugging purposes.
- ### Purge
+ 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
- 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.
+6. Specify your NetStorage host, CP code, and any necessary content
+ paths using this format: ///
- **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.
+ Enter a string value. Press Enter for the default ("").
+ host> baseball-nsu.akamaihd.net/123456/content/
+7. Set the netstorage account name
- ### Standard options
+ Enter a string value. Press Enter for the default ("").
+ account> username
- Here are the Standard options specific to netstorage (Akamai NetStorage).
+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.
- #### --netstorage-host
+ y) Yes type in my own password
+ g) Generate random password
+ y/g> y
+ Enter the password:
+ password:
+ Confirm the password:
+ password:
- Domain+path of NetStorage host to connect to.
+9. View the summary and confirm your remote configuration.
- Format should be `/`
+ [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
- Properties:
+This remote is called ns1 and can now be used.
- - Config: host
- - Env Var: RCLONE_NETSTORAGE_HOST
- - Type: string
- - Required: true
+Example operations
- #### --netstorage-account
+Get started with rclone and NetStorage with these examples. For
+additional rclone commands, visit https://rclone.org/commands/.
- Set the NetStorage account name
+See contents of a directory in your project
- Properties:
+ rclone lsd ns1:/974012/testing/
- - Config: account
- - Env Var: RCLONE_NETSTORAGE_ACCOUNT
- - Type: string
- - Required: true
+Sync the contents local with remote
- #### --netstorage-secret
+ rclone sync . ns1:/974012/testing/
- Set the NetStorage account secret/G2O key for authentication.
+Upload local content to remote
- Please choose the 'y' option to set your own password then enter your secret.
+ rclone copy notes.txt ns1:/974012/testing/
- **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
+Delete content on remote
- Properties:
+ rclone delete ns1:/974012/testing/notes.txt
- - Config: secret
- - Env Var: RCLONE_NETSTORAGE_SECRET
- - Type: string
- - Required: true
+Move or copy content between CP codes.
- ### Advanced options
+Your credentials must have access to two CP codes on the same remote.
+You can't perform operations between different remotes.
- Here are the Advanced options specific to netstorage (Akamai NetStorage).
+ rclone move ns1:/974012/testing/notes.txt ns1:/974450/testing2/
- #### --netstorage-protocol
+Features
- Select between HTTP or HTTPS protocol.
+Symlink Support
- Most users should choose HTTPS, which is the default.
- HTTP is provided primarily for debugging purposes.
+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.
- Properties:
+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.
- - Config: protocol
- - Env Var: RCLONE_NETSTORAGE_PROTOCOL
- - Type: string
- - Default: "https"
- - Examples:
- - "http"
- - HTTP protocol
- - "https"
- - HTTPS protocol
+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.
- ## Backend commands
+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.
- Here are the commands specific to the netstorage backend.
+Implicit vs. Explicit Directories
- Run them with
+With NetStorage, directories can exist in one of two forms:
- rclone backend COMMAND remote:
+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.
- The help below will explain what arguments each command takes.
+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.
- See the [backend](https://rclone.org/commands/rclone_backend/) command for more
- info on how to pass options and arguments.
+--fast-list / ListR support
- These can be run on a running backend using the rc command
- [backend/command](https://rclone.org/rc/#backend-command).
+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.
- ### du
+- 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.
- Return disk usage information for a specified directory
+- 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.
- rclone backend du remote: [options] [+]
+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.
- The usage information returned, includes the targeted directory as well as all
- files stored in any sub-directories that may exist.
+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.
- ### symlink
+Purge
- You can create a symbolic link in ObjectStore with the symlink action.
+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.
- rclone backend symlink remote: [options] [+]
+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.
- 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 `
+Standard options
+Here are the Standard options specific to netstorage (Akamai
+NetStorage).
+--netstorage-host
- # Microsoft Azure Blob Storage
+Domain+path of NetStorage host to connect to.
- 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`.
+Format should be /
- ## Configuration
+Properties:
- Here is an example of making a Microsoft Azure Blob Storage
- configuration. For a remote called `remote`. First run:
+- Config: host
+- Env Var: RCLONE_NETSTORAGE_HOST
+- Type: string
+- Required: true
- rclone config
+--netstorage-account
- This will guide you through an interactive setup process:
+Set the NetStorage account name
-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
+Properties:
+- Config: account
+- Env Var: RCLONE_NETSTORAGE_ACCOUNT
+- Type: string
+- Required: true
- See all containers
+--netstorage-secret
- rclone lsd remote:
+Set the NetStorage account secret/G2O key for authentication.
- Make a new container
+Please choose the 'y' option to set your own password then enter your
+secret.
- rclone mkdir remote:container
+NB Input to this must be obscured - see rclone obscure.
- List the contents of a container
+Properties:
- rclone ls remote:container
+- Config: secret
+- Env Var: RCLONE_NETSTORAGE_SECRET
+- Type: string
+- Required: true
- Sync `/home/local/directory` to the remote container, deleting any excess
- files in the container.
+Advanced options
- rclone sync --interactive /home/local/directory remote:container
+Here are the Advanced options specific to netstorage (Akamai
+NetStorage).
- ### --fast-list
+--netstorage-protocol
- 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.
+Select between HTTP or HTTPS protocol.
- ### Modification times and hashes
+Most users should choose HTTPS, which is the default. HTTP is provided
+primarily for debugging purposes.
- 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.
+Properties:
- 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`.
+- Config: protocol
+- Env Var: RCLONE_NETSTORAGE_PROTOCOL
+- Type: string
+- Default: "https"
+- Examples:
+ - "http"
+ - HTTP protocol
+ - "https"
+ - HTTPS protocol
- 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.
+--netstorage-description
- ### Performance
+Description of the remote.
- 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.
+Properties:
- ### Restricted filename characters
+- Config: description
+- Env Var: RCLONE_NETSTORAGE_DESCRIPTION
+- Type: string
+- Required: false
- In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters)
- the following characters are also replaced:
+Backend commands
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | / | 0x2F | / |
- | \ | 0x5C | \ |
+Here are the commands specific to the netstorage backend.
- File names can also not end with the following characters.
- These only get replaced if they are the last character in the name:
+Run them with
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | . | 0x2E | . |
+ rclone backend COMMAND remote:
- Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
- as they can't be used in JSON strings.
+The help below will explain what arguments each command takes.
- ### Authentication {#authentication}
+See the backend command for more info on how to pass options and
+arguments.
- There are a number of ways of supplying credentials for Azure Blob
- Storage. Rclone tries them in the order of the sections below.
+These can be run on a running backend using the rc command
+backend/command.
- #### Env Auth
+du
- If the `env_auth` config parameter is `true` then rclone will pull
- credentials from the environment or runtime.
+Return disk usage information for a specified directory
- It tries these authentication methods in this order:
+ rclone backend du remote: [options] [+]
- 1. Environment Variables
- 2. Managed Service Identity Credentials
- 3. Azure CLI credentials (as used by the az tool)
+The usage information returned, includes the targeted directory as well
+as all files stored in any sub-directories that may exist.
- These are described in the following sections
+symlink
- ##### Env Auth: 1. Environment Variables
+You can create a symbolic link in ObjectStore with the symlink action.
- 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 backend symlink remote: [options] [+]
- 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).
+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
+Microsoft Azure Blob Storage
- ##### Env Auth: 2. Managed Service Identity Credentials
+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.
- 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.
+Configuration
- 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).
+Here is an example of making a Microsoft Azure Blob Storage
+configuration. For a remote called remote. First run:
- ##### Env Auth: 3. Azure CLI credentials (as used by the az tool)
+ rclone config
- Credentials created with the `az` tool can be picked up using `env_auth`.
+This will guide you through an interactive setup process:
- For example if you were to login with a service principal like this:
+ 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
- az login --service-principal -u XXX -p XXX --tenant XXX
+See all containers
- Then you could access rclone resources like this:
+ rclone lsd remote:
- rclone lsf :azureblob,env_auth,account=ACCOUNT:CONTAINER
+Make a new container
- Or
+ rclone mkdir remote:container
- rclone lsf --azureblob-env-auth --azureblob-account=ACCOUNT :azureblob:CONTAINER
+List the contents of a container
- Which is analogous to using the `az` tool:
+ rclone ls remote:container
- az storage blob list --container-name CONTAINER --account-name ACCOUNT --auth-mode login
+Sync /home/local/directory to the remote container, deleting any excess
+files in the container.
- #### Account and Shared Key
+ rclone sync --interactive /home/local/directory remote:container
- This is the most straight forward and least flexible way. Just fill
- in the `account` and `key` lines and leave the rest blank.
+--fast-list
- #### SAS URL
+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 can be an account level SAS URL or container level SAS URL.
+Modification times and hashes
- To use it leave `account` and `key` blank and fill in `sas_url`.
+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.
- 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 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.
- If you use a container level SAS URL, rclone operations are permitted
- only on a particular container, e.g.
+Restricted filename characters
- rclone ls azureblob:container
+In addition to the default restricted characters set the following
+characters are also replaced:
- You can also list the single container from the root. This will only
- show the container specified by the SAS URL.
+ Character Value Replacement
+ ----------- ------- -------------
+ / 0x2F /
+ \ 0x5C \
- $ rclone lsd azureblob:
- container/
+File names can also not end with the following characters. These only
+get replaced if they are the last character in the name:
- Note that you can't see or access any other containers - this will
- fail
+ Character Value Replacement
+ ----------- ------- -------------
+ . 0x2E .
- rclone ls azureblob:othercontainer
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON
+strings.
- 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.
+Authentication
- #### Service principal with client secret
+There are a number of ways of supplying credentials for Azure Blob
+Storage. Rclone tries them in the order of the sections below.
- If these variables are set, rclone will authenticate with a service principal with a client secret.
+Env Auth
- - `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 the env_auth config parameter is true then rclone will pull
+credentials from the environment or runtime.
- The credentials can also be placed in a file using the
- `service_principal_file` configuration option.
+It tries these authentication methods in this order:
- #### Service principal with certificate
+1. Environment Variables
+2. Managed Service Identity Credentials
+3. Azure CLI credentials (as used by the az tool)
- If these variables are set, rclone will authenticate with a service principal with certificate.
+These are described in the following sections
- - `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.
+Env Auth: 1. Environment Variables
- **NB** `client_certificate_password` must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
+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:
- #### User with username and password
+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).
- If these variables are set, rclone will authenticate with username and password.
+Env Auth: 2. Managed Service Identity Credentials
- - `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
+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.
- 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 the resource has multiple user-assigned identities you will need to
+unset env_auth and set use_msi instead. See the use_msi section.
- **NB** `password` must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
+Env Auth: 3. Azure CLI credentials (as used by the az tool)
- #### Managed Service Identity Credentials {#use_msi}
+Credentials created with the az tool can be picked up using env_auth.
- 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.
+For example if you were to login with a service principal like 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.
+ az login --service-principal -u XXX -p XXX --tenant XXX
- If none of `msi_object_id`, `msi_client_id`, or `msi_mi_res_id` is
- set, this is is equivalent to using `env_auth`.
+Then you could access rclone resources like this:
+ rclone lsf :azureblob,env_auth,account=ACCOUNT:CONTAINER
- ### Standard options
+Or
- Here are the Standard options specific to azureblob (Microsoft Azure Blob Storage).
+ rclone lsf --azureblob-env-auth --azureblob-account=ACCOUNT :azureblob:CONTAINER
- #### --azureblob-account
+Which is analogous to using the az tool:
- Azure Storage Account Name.
+ az storage blob list --container-name CONTAINER --account-name ACCOUNT --auth-mode login
- Set this to the Azure Storage Account Name in use.
+Account and Shared Key
- Leave blank to use SAS URL or Emulator, otherwise it needs to be set.
+This is the most straight forward and least flexible way. Just fill in
+the account and key lines and leave the rest blank.
- If this is blank and if env_auth is set it will be read from the
- environment variable `AZURE_STORAGE_ACCOUNT_NAME` if possible.
+SAS URL
+This can be an account level SAS URL or container level SAS URL.
- Properties:
+To use it leave account and key blank and fill in sas_url.
- - Config: account
- - Env Var: RCLONE_AZUREBLOB_ACCOUNT
- - Type: string
- - Required: false
+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.
- #### --azureblob-env-auth
+If you use a container level SAS URL, rclone operations are permitted
+only on a particular container, e.g.
- Read credentials from runtime (environment variables, CLI or MSI).
+ rclone ls azureblob:container
- See the [authentication docs](/azureblob#authentication) for full info.
+You can also list the single container from the root. This will only
+show the container specified by the SAS URL.
- Properties:
+ $ rclone lsd azureblob:
+ container/
- - Config: env_auth
- - Env Var: RCLONE_AZUREBLOB_ENV_AUTH
- - Type: bool
- - Default: false
+Note that you can't see or access any other containers - this will fail
- #### --azureblob-key
+ rclone ls azureblob:othercontainer
- Storage Account Shared Key.
+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.
- Leave blank to use SAS URL or Emulator.
+Service principal with client secret
- Properties:
+If these variables are set, rclone will authenticate with a service
+principal with a client secret.
- - Config: key
- - Env Var: RCLONE_AZUREBLOB_KEY
- - Type: string
- - Required: false
+- 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
- #### --azureblob-sas-url
+The credentials can also be placed in a file using the
+service_principal_file configuration option.
- SAS URL for container level access only.
+Service principal with certificate
- Leave blank if using account/key or Emulator.
+If these variables are set, rclone will authenticate with a service
+principal with certificate.
- 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
-
-
-
- ### 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
-
-
-
- ### 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 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-encoding
+Leave blank to use SAS URL or Emulator, otherwise it needs to be set.
- The encoding for the backend.
+If this is blank and if env_auth is set it will be read from the
+environment variable AZURE_STORAGE_ACCOUNT_NAME if possible.
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+Properties:
- Properties:
+- Config: account
+- Env Var: RCLONE_AZUREBLOB_ACCOUNT
+- Type: string
+- Required: false
- - 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
+--azureblob-env-auth
+Read credentials from runtime (environment variables, CLI or MSI).
+See the authentication docs for full info.
- ## Limitations
+Properties:
- If you don't use rclone for 90 days the refresh token will
- expire. This will result in authorization problems. This is easy to
- fix by running the `rclone config reconnect remote:` command to get a
- new token and refresh token.
+- Config: env_auth
+- Env Var: RCLONE_AZUREBLOB_ENV_AUTH
+- Type: bool
+- Default: false
- ### Naming
+--azureblob-key
- Note that OneDrive is case insensitive so you can't have a
- file called "Hello.doc" and one called "hello.doc".
+Storage Account Shared Key.
- There are quite a few characters that can't be in OneDrive 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.
+Leave blank to use SAS URL or Emulator.
- ### File sizes
+Properties:
- The largest allowed file size is 250 GiB for both OneDrive Personal and OneDrive for Business [(Updated 13 Jan 2021)](https://support.microsoft.com/en-us/office/invalid-file-names-and-file-types-in-onedrive-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa?ui=en-us&rs=en-us&ad=us#individualfilesize).
+- Config: key
+- Env Var: RCLONE_AZUREBLOB_KEY
+- Type: string
+- Required: false
- ### Path length
+--azureblob-sas-url
- The entire path, including the file name, must contain fewer than 400 characters for OneDrive, OneDrive for Business and SharePoint Online. If you are encrypting file and folder names with rclone, you may want to pay attention to this limitation because the encrypted names are typically longer than the original ones.
+SAS URL for container level access only.
- ### Number of files
+Leave blank if using account/key or Emulator.
- OneDrive seems to be OK with at least 50,000 files in a folder, but at
- 100,000 rclone will get errors listing the directory like `couldn’t
- list files: UnknownError:`. See
- [#2707](https://github.com/rclone/rclone/issues/2707) for more info.
+Properties:
- An official document about the limitations for different types of OneDrive can be found [here](https://support.office.com/en-us/article/invalid-file-names-and-file-types-in-onedrive-onedrive-for-business-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa).
+- Config: sas_url
+- Env Var: RCLONE_AZUREBLOB_SAS_URL
+- Type: string
+- Required: false
- ## Versions
+--azureblob-tenant
- Every change in a file OneDrive causes the service to create a new
- version of the file. This counts against a users quota. For
- example changing the modification time of a file creates a second
- version, so the file apparently uses twice the space.
+ID of the service principal's tenant. Also called its directory ID.
- For example the `copy` command is affected by this as rclone copies
- the file and then afterwards sets the modification time to match the
- source file which uses another version.
+Set this if using - Service principal with client secret - Service
+principal with certificate - User with username and password
- You can use the `rclone cleanup` command (see below) to remove all old
- versions.
+Properties:
- Or you can set the `no_versions` parameter to `true` and rclone will
- remove versions after operations which create new versions. This takes
- extra transactions so only enable it if you need it.
+- Config: tenant
+- Env Var: RCLONE_AZUREBLOB_TENANT
+- Type: string
+- Required: false
- **Note** At the time of writing Onedrive Personal creates versions
- (but not for setting the modification time) but the API for removing
- them returns "API not found" so cleanup and `no_versions` should not
- be used on Onedrive Personal.
+--azureblob-client-id
- ### Disabling versioning
+The ID of the client in use.
- Starting October 2018, users will no longer be able to
- disable versioning by default. This is because Microsoft has brought
- an
- [update](https://techcommunity.microsoft.com/t5/Microsoft-OneDrive-Blog/New-Updates-to-OneDrive-and-SharePoint-Team-Site-Versioning/ba-p/204390)
- to the mechanism. To change this new default setting, a PowerShell
- command is required to be run by a SharePoint admin. If you are an
- admin, you can run these commands in PowerShell to change that
- setting:
+Set this if using - Service principal with client secret - Service
+principal with certificate - User with username and password
- 1. `Install-Module -Name Microsoft.Online.SharePoint.PowerShell` (in case you haven't installed this already)
- 2. `Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking`
- 3. `Connect-SPOService -Url https://YOURSITE-admin.sharepoint.com -Credential YOU@YOURSITE.COM` (replacing `YOURSITE`, `YOU`, `YOURSITE.COM` with the actual values; this will prompt for your credentials)
- 4. `Set-SPOTenant -EnableMinimumVersionRequirement $False`
- 5. `Disconnect-SPOService` (to disconnect from the server)
+Properties:
- *Below are the steps for normal users to disable versioning. If you don't see the "No Versioning" option, make sure the above requirements are met.*
+- Config: client_id
+- Env Var: RCLONE_AZUREBLOB_CLIENT_ID
+- Type: string
+- Required: false
- User [Weropol](https://github.com/Weropol) has found a method to disable
- versioning on OneDrive
+--azureblob-client-secret
- 1. Open the settings menu by clicking on the gear symbol at the top of the OneDrive Business page.
- 2. Click Site settings.
- 3. Once on the Site settings page, navigate to Site Administration > Site libraries and lists.
- 4. Click Customize "Documents".
- 5. Click General Settings > Versioning Settings.
- 6. Under Document Version History select the option No versioning.
- Note: This will disable the creation of new file versions, but will not remove any previous versions. Your documents are safe.
- 7. Apply the changes by clicking OK.
- 8. Use rclone to upload or modify files. (I also use the --no-update-modtime flag)
- 9. Restore the versioning settings after using rclone. (Optional)
+One of the service principal's client secrets
- ## Cleanup
+Set this if using - Service principal with client secret
- OneDrive supports `rclone cleanup` which causes rclone to look through
- every file under the path supplied and delete all version but the
- current version. Because this involves traversing all the files, then
- querying each file for versions it can be quite slow. Rclone does
- `--checkers` tests in parallel. The command also supports `--interactive`/`i`
- or `--dry-run` which is a great way to see what it would do.
+Properties:
- rclone cleanup --interactive remote:path/subdir # interactively remove all old version for path/subdir
- rclone cleanup remote:path/subdir # unconditionally remove all old version for path/subdir
+- Config: client_secret
+- Env Var: RCLONE_AZUREBLOB_CLIENT_SECRET
+- Type: string
+- Required: false
- **NB** Onedrive personal can't currently delete versions
+--azureblob-client-certificate-path
- ## Troubleshooting ##
+Path to a PEM or PKCS12 certificate file including the private key.
- ### Excessive throttling or blocked on SharePoint
+Set this if using - Service principal with certificate
- If you experience excessive throttling or is being blocked on SharePoint then it may help to set the user agent explicitly with a flag like this: `--user-agent "ISV|rclone.org|rclone/v1.55.1"`
+Properties:
- The specific details can be found in the Microsoft document: [Avoid getting throttled or blocked in SharePoint Online](https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online#how-to-decorate-your-http-traffic-to-avoid-throttling)
+- Config: client_certificate_path
+- Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PATH
+- Type: string
+- Required: false
- ### Unexpected file size/hash differences on Sharepoint ####
+--azureblob-client-certificate-password
- It is a
- [known](https://github.com/OneDrive/onedrive-api-docs/issues/935#issuecomment-441741631)
- issue that Sharepoint (not OneDrive or OneDrive for Business) silently modifies
- uploaded files, mainly Office files (.docx, .xlsx, etc.), causing file size and
- hash checks to fail. There are also other situations that will cause OneDrive to
- report inconsistent file sizes. To use rclone with such
- affected files on Sharepoint, you
- may disable these checks with the following command line arguments:
+Password for the certificate file (optional).
---ignore-checksum --ignore-size
+Optionally set this if using - Service principal with certificate
+And the certificate has a password.
- Alternatively, if you have write access to the OneDrive files, it may be possible
- to fix this problem for certain files, by attempting the steps below.
- Open the web interface for [OneDrive](https://onedrive.live.com) and find the
- affected files (which will be in the error messages/log for rclone). Simply click on
- each of these files, causing OneDrive to open them on the web. This will cause each
- file to be converted in place to a format that is functionally equivalent
- but which will no longer trigger the size discrepancy. Once all problematic files
- are converted you will no longer need the ignore options above.
+NB Input to this must be obscured - see rclone obscure.
- ### Replacing/deleting existing files on Sharepoint gets "item not found" ####
+Properties:
- It is a [known](https://github.com/OneDrive/onedrive-api-docs/issues/1068) issue
- that Sharepoint (not OneDrive or OneDrive for Business) may return "item not
- found" errors when users try to replace or delete uploaded files; this seems to
- mainly affect Office files (.docx, .xlsx, etc.) and web files (.html, .aspx, etc.). As a workaround, you may use
- the `--backup-dir ` command line argument so rclone moves the
- files to be replaced/deleted into a given backup directory (instead of directly
- replacing/deleting them). For example, to instruct rclone to move the files into
- the directory `rclone-backup-dir` on backend `mysharepoint`, you may use:
+- Config: client_certificate_password
+- Env Var: RCLONE_AZUREBLOB_CLIENT_CERTIFICATE_PASSWORD
+- Type: string
+- Required: false
---backup-dir mysharepoint:rclone-backup-dir
+Advanced options
+Here are the Advanced options specific to azureblob (Microsoft Azure
+Blob Storage).
- ### access\_denied (AADSTS65005) ####
+--azureblob-client-send-certificate-chain
-Error: access_denied Code: AADSTS65005 Description: Using application
-'rclone' is currently not supported for your organization
-[YOUR_ORGANIZATION] because it is in an unmanaged state. An
-administrator needs to claim ownership of the company by DNS validation
-of [YOUR_ORGANIZATION] before the application rclone can be provisioned.
+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.
- This means that rclone can't use the OneDrive for Business API with your account. You can't do much about it, maybe write an email to your admins.
+Optionally set this if using - Service principal with certificate
- However, there are other ways to interact with your OneDrive account. Have a look at the WebDAV backend: https://rclone.org/webdav/#sharepoint
+Properties:
- ### invalid\_grant (AADSTS50076) ####
+- Config: client_send_certificate_chain
+- Env Var: RCLONE_AZUREBLOB_CLIENT_SEND_CERTIFICATE_CHAIN
+- Type: bool
+- Default: false
-Error: invalid_grant Code: AADSTS50076 Description: Due to a
-configuration change made by your administrator, or because you moved to
-a new location, you must use multi-factor authentication to access
-'...'.
+--azureblob-username
+User name (usually an email address)
- If you see the error above after enabling multi-factor authentication for your account, you can fix it by refreshing your OAuth refresh token. To do that, run `rclone config`, and choose to edit your OneDrive backend. Then, you don't need to actually make any changes until you reach this question: `Already have a token - refresh?`. For this question, answer `y` and go through the process to refresh your token, just like the first time the backend is configured. After this, rclone should work again for this backend.
+Set this if using - User with username and password
- ### Invalid request when making public links ####
+Properties:
- On Sharepoint and OneDrive for Business, `rclone link` may return an "Invalid
- request" error. A possible cause is that the organisation admin didn't allow
- public links to be made for the organisation/sharepoint library. To fix the
- permissions as an admin, take a look at the docs:
- [1](https://docs.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off),
- [2](https://support.microsoft.com/en-us/office/set-up-and-manage-access-requests-94b26e0b-2822-49d4-929a-8455698654b3).
+- Config: username
+- Env Var: RCLONE_AZUREBLOB_USERNAME
+- Type: string
+- Required: false
- ### Can not access `Shared` with me files
+--azureblob-password
- Shared with me files is not supported by rclone [currently](https://github.com/rclone/rclone/issues/4062), but there is a workaround:
+The user's password
- 1. Visit [https://onedrive.live.com](https://onedrive.live.com/)
- 2. Right click a item in `Shared`, then click `Add shortcut to My files` in the context
- ")
- 3. The shortcut will appear in `My files`, you can access it with rclone, it behaves like a normal folder/file.
- ")
- ")
+Set this if using - User with username and password
- ### Live Photos uploaded from iOS (small video clips in .heic files)
+NB Input to this must be obscured - see rclone obscure.
- The iOS OneDrive app introduced [upload and storage](https://techcommunity.microsoft.com/t5/microsoft-onedrive-blog/live-photos-come-to-onedrive/ba-p/1953452)
- of [Live Photos](https://support.apple.com/en-gb/HT207310) in 2020.
- The usage and download of these uploaded Live Photos is unfortunately still work-in-progress
- and this introduces several issues when copying, synchronising and mounting – both in rclone and in the native OneDrive client on Windows.
+Properties:
- The root cause can easily be seen if you locate one of your Live Photos in the OneDrive web interface.
- Then download the photo from the web interface. You will then see that the size of downloaded .heic file is smaller than the size displayed in the web interface.
- The downloaded file is smaller because it only contains a single frame (still photo) extracted from the Live Photo (movie) stored in OneDrive.
+- Config: password
+- Env Var: RCLONE_AZUREBLOB_PASSWORD
+- Type: string
+- Required: false
- The different sizes will cause `rclone copy/sync` to repeatedly recopy unmodified photos something like this:
+--azureblob-service-principal-file
- DEBUG : 20230203_123826234_iOS.heic: Sizes differ (src 4470314 vs dst 1298667)
- DEBUG : 20230203_123826234_iOS.heic: sha1 = fc2edde7863b7a7c93ca6771498ac797f8460750 OK
- INFO : 20230203_123826234_iOS.heic: Copied (replaced existing)
+Path to file containing credentials for use with a service principal.
- These recopies can be worked around by adding `--ignore-size`. Please note that this workaround only syncs the still-picture not the movie clip,
- and relies on modification dates being correctly updated on all files in all situations.
+Leave blank normally. Needed only if you want to use a service principal
+instead of interactive login.
- The different sizes will also cause `rclone check` to report size errors something like this:
+ $ 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
- ERROR : 20230203_123826234_iOS.heic: sizes differ
+See "Create an Azure service principal" and "Assign an Azure role for
+access to blob data" pages for more details.
- These check errors can be suppressed by adding `--ignore-size`.
+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.
- The different sizes will also cause `rclone mount` to fail downloading with an error something like this:
+Properties:
- ERROR : 20230203_123826234_iOS.heic: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
+- Config: service_principal_file
+- Env Var: RCLONE_AZUREBLOB_SERVICE_PRINCIPAL_FILE
+- Type: string
+- Required: false
- or like this when using `--cache-mode=full`:
+--azureblob-use-msi
- INFO : 20230203_123826234_iOS.heic: vfs cache: downloader: error count now 1: vfs reader: failed to write to cache file: 416 Requested Range Not Satisfiable:
- ERROR : 20230203_123826234_iOS.heic: vfs cache: failed to download: vfs reader: failed to write to cache file: 416 Requested Range Not Satisfiable:
+Use a managed service identity to authenticate (only works in Azure).
- # OpenDrive
+When true, use a managed service identity to authenticate to Azure
+Storage instead of a SAS token or account key.
- Paths are specified as `remote:path`
+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.
- Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
+Properties:
- ## Configuration
+- Config: use_msi
+- Env Var: RCLONE_AZUREBLOB_USE_MSI
+- Type: bool
+- Default: false
- Here is an example of how to make a remote called `remote`. First run:
+--azureblob-msi-object-id
- rclone config
+Object ID of the user-assigned MSI to use, if any.
- This will guide you through an interactive setup process:
+Leave blank if msi_client_id or msi_mi_res_id specified.
-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 /
- OpenDrive "opendrive" [snip] Storage> opendrive Username username>
+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:
+
+ [
+ {
+ "id": "1234567890ABC!123",
+ "grantedTo": {
+ "user": {
+ "id": "ryan@contoso.com"
+ },
+ "application": {},
+ "device": {}
+ },
+ "invitation": {
+ "email": "ryan@contoso.com"
+ },
+ "link": {
+ "webUrl": "https://1drv.ms/t/s!1234567890ABC"
+ },
+ "roles": [
+ "read"
+ ],
+ "shareId": "s!1234567890ABC"
+ }
+ ]
+
+Example for OneDrive Business:
+
+ [
+ {
+ "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
+ "grantedToIdentities": [
+ {
+ "user": {
+ "displayName": "ryan@contoso.com"
+ },
+ "application": {},
+ "device": {}
+ }
+ ],
+ "link": {
+ "type": "view",
+ "scope": "users",
+ "webUrl": "https://contoso.sharepoint.com/:w:/t/design/a577ghg9hgh737613bmbjf839026561fmzhsr85ng9f3hjck2t5s"
+ },
+ "roles": [
+ "read"
+ ],
+ "shareId": "u!LKj1lkdlals90j1nlkascl"
+ },
+ {
+ "id": "5D33DD65C6932946",
+ "grantedTo": {
+ "user": {
+ "displayName": "John Doe",
+ "id": "efee1b77-fb3b-4f65-99d6-274c11914d12"
+ },
+ "application": {},
+ "device": {}
+ },
+ "roles": [
+ "owner"
+ ],
+ "shareId": "FWxc1lasfdbEAGM5fI7B67aB5ZMPDMmQ11U"
+ }
+ ]
+
+To write permissions, pass in a "permissions" metadata key using this
+same format. The --metadata-mapper tool can 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.
+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 with --metadata-mapper:
+
+ {
+ "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.
+
+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.) 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 --onedrive-metadata-permissions.
+
+Metadata and permissions are supported for Folders (directories) as well
+as Files. Note that setting the mtime or btime on a Folder requires one
+extra API call on OneDrive Business only.
+
+OneDrive does not currently support User Metadata. When writing
+metadata, only writeable system properties will be written -- any
+read-only or unrecognized keys passed in will be ignored.
+
+TIP: to see the metadata and permissions for any file or folder, run:
+
+ rclone lsjson remote:path --stat -M --onedrive-metadata-permissions read
+
+Here are the possible system metadata items for the onedrive backend.
+
+ ------------------------------------------------------------------------------------------------------------------------------------------
+ Name Help Type Example Read Only
+ ------------------------------- ---------------------------------- ----------- -------------------------------------- --------------------
+ btime Time of file birth (creation) with RFC 3339 2006-01-02T15:04:05Z N
+ S accuracy (mS for OneDrive
+ Personal).
+
+ content-type The MIME type of the file. string text/plain Y
+
+ created-by-display-name Display name of the user that string John Doe Y
+ created the item.
+
+ created-by-id ID of the user that created the string 48d31887-5fad-4d73-a9f5-3c356e68a038 Y
+ item.
+
+ description A short description of the file. string Contract for signing N
+ Max 1024 characters. Only
+ supported for OneDrive Personal.
+
+ id The unique identifier of the item string 01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K Y
+ within OneDrive.
+
+ last-modified-by-display-name Display name of the user that last string John Doe Y
+ modified the item.
+
+ last-modified-by-id ID of the user that last modified string 48d31887-5fad-4d73-a9f5-3c356e68a038 Y
+ the item.
+
+ malware-detected Whether OneDrive has detected that boolean true Y
+ the item contains malware.
+
+ mtime Time of last modification with S RFC 3339 2006-01-02T15:04:05Z N
+ accuracy (mS for OneDrive
+ Personal).
+
+ package-type If present, indicates that this string oneNote Y
+ item is a package instead of a
+ folder or file. Packages are
+ treated like files in some
+ contexts and folders in others.
+
+ permissions Permissions in a JSON dump of JSON {} N
+ OneDrive format. Enable with
+ --onedrive-metadata-permissions.
+ Properties: id, grantedTo,
+ grantedToIdentities, invitation,
+ inheritedFrom, link, roles,
+ shareId
+
+ shared-by-id ID of the user that shared the string 48d31887-5fad-4d73-a9f5-3c356e68a038 Y
+ item (if shared).
+
+ shared-owner-id ID of the owner of the shared item string 48d31887-5fad-4d73-a9f5-3c356e68a038 Y
+ (if shared).
+
+ shared-scope If shared, indicates the scope of string users Y
+ how the item is shared: anonymous,
+ organization, or users.
+
+ shared-time Time when the item was shared, RFC 3339 2006-01-02T15:04:05Z Y
+ with S accuracy (mS for OneDrive
+ Personal).
+
+ utime Time of upload with S accuracy (mS RFC 3339 2006-01-02T15:04:05Z Y
+ for OneDrive Personal).
+ ------------------------------------------------------------------------------------------------------------------------------------------
+
+See the metadata docs for more info.
+
+Limitations
+
+If you don't use rclone for 90 days the refresh token will expire. This
+will result in authorization problems. This is easy to fix by running
+the rclone config reconnect remote: command to get a new token and
+refresh token.
+
+Naming
+
+Note that OneDrive 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 OneDrive 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.
+
+File sizes
+
+The largest allowed file size is 250 GiB for both OneDrive Personal and
+OneDrive for Business (Updated 13 Jan 2021).
+
+Path length
+
+The entire path, including the file name, must contain fewer than 400
+characters for OneDrive, OneDrive for Business and SharePoint Online. If
+you are encrypting file and folder names with rclone, you may want to
+pay attention to this limitation because the encrypted names are
+typically longer than the original ones.
+
+Number of files
+
+OneDrive seems to be OK with at least 50,000 files in a folder, but at
+100,000 rclone will get errors listing the directory like
+couldn’t list files: UnknownError:. See #2707 for more info.
+
+An official document about the limitations for different types of
+OneDrive can be found here.
+
+Versions
+
+Every change in a file OneDrive causes the service to create a new
+version of the file. This counts against a users quota. For example
+changing the modification time of a file creates a second version, so
+the file apparently uses twice the space.
+
+For example the copy command is affected by this as rclone copies the
+file and then afterwards sets the modification time to match the source
+file which uses another version.
+
+You can use the rclone cleanup command (see below) to remove all old
+versions.
+
+Or you can set the no_versions parameter to true and rclone will remove
+versions after operations which create new versions. This takes extra
+transactions so only enable it if you need it.
+
+Note At the time of writing Onedrive Personal creates versions (but not
+for setting the modification time) but the API for removing them returns
+"API not found" so cleanup and no_versions should not be used on
+Onedrive Personal.
+
+Disabling versioning
+
+Starting October 2018, users will no longer be able to disable
+versioning by default. This is because Microsoft has brought an update
+to the mechanism. To change this new default setting, a PowerShell
+command is required to be run by a SharePoint admin. If you are an
+admin, you can run these commands in PowerShell to change that setting:
+
+1. Install-Module -Name Microsoft.Online.SharePoint.PowerShell (in case
+ you haven't installed this already)
+2. Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
+3. Connect-SPOService -Url https://YOURSITE-admin.sharepoint.com -Credential YOU@YOURSITE.COM
+ (replacing YOURSITE, YOU, YOURSITE.COM with the actual values; this
+ will prompt for your credentials)
+4. Set-SPOTenant -EnableMinimumVersionRequirement $False
+5. Disconnect-SPOService (to disconnect from the server)
+
+Below are the steps for normal users to disable versioning. If you don't
+see the "No Versioning" option, make sure the above requirements are
+met.
+
+User Weropol has found a method to disable versioning on OneDrive
+
+1. Open the settings menu by clicking on the gear symbol at the top of
+ the OneDrive Business page.
+2. Click Site settings.
+3. Once on the Site settings page, navigate to Site Administration >
+ Site libraries and lists.
+4. Click Customize "Documents".
+5. Click General Settings > Versioning Settings.
+6. Under Document Version History select the option No versioning.
+ Note: This will disable the creation of new file versions, but will
+ not remove any previous versions. Your documents are safe.
+7. Apply the changes by clicking OK.
+8. Use rclone to upload or modify files. (I also use the
+ --no-update-modtime flag)
+9. Restore the versioning settings after using rclone. (Optional)
+
+Cleanup
+
+OneDrive supports rclone cleanup which causes rclone to look through
+every file under the path supplied and delete all version but the
+current version. Because this involves traversing all the files, then
+querying each file for versions it can be quite slow. Rclone does
+--checkers tests in parallel. The command also supports --interactive/i
+or --dry-run which is a great way to see what it would do.
+
+ rclone cleanup --interactive remote:path/subdir # interactively remove all old version for path/subdir
+ rclone cleanup remote:path/subdir # unconditionally remove all old version for path/subdir
+
+NB Onedrive personal can't currently delete versions
+
+Troubleshooting
+
+Excessive throttling or blocked on SharePoint
+
+If you experience excessive throttling or is being blocked on SharePoint
+then it may help to set the user agent explicitly with a flag like this:
+--user-agent "ISV|rclone.org|rclone/v1.55.1"
+
+The specific details can be found in the Microsoft document: Avoid
+getting throttled or blocked in SharePoint Online
+
+Unexpected file size/hash differences on Sharepoint
+
+It is a known issue that Sharepoint (not OneDrive or OneDrive for
+Business) silently modifies uploaded files, mainly Office files (.docx,
+.xlsx, etc.), causing file size and hash checks to fail. There are also
+other situations that will cause OneDrive to report inconsistent file
+sizes. To use rclone with such affected files on Sharepoint, you may
+disable these checks with the following command line arguments:
+
+ --ignore-checksum --ignore-size
+
+Alternatively, if you have write access to the OneDrive files, it may be
+possible to fix this problem for certain files, by attempting the steps
+below. Open the web interface for OneDrive and find the affected files
+(which will be in the error messages/log for rclone). Simply click on
+each of these files, causing OneDrive to open them on the web. This will
+cause each file to be converted in place to a format that is
+functionally equivalent but which will no longer trigger the size
+discrepancy. Once all problematic files are converted you will no longer
+need the ignore options above.
+
+Replacing/deleting existing files on Sharepoint gets "item not found"
+
+It is a known issue that Sharepoint (not OneDrive or OneDrive for
+Business) may return "item not found" errors when users try to replace
+or delete uploaded files; this seems to mainly affect Office files
+(.docx, .xlsx, etc.) and web files (.html, .aspx, etc.). As a
+workaround, you may use the --backup-dir command line
+argument so rclone moves the files to be replaced/deleted into a given
+backup directory (instead of directly replacing/deleting them). For
+example, to instruct rclone to move the files into the directory
+rclone-backup-dir on backend mysharepoint, you may use:
+
+ --backup-dir mysharepoint:rclone-backup-dir
+
+access_denied (AADSTS65005)
+
+ Error: access_denied
+ Code: AADSTS65005
+ Description: Using application 'rclone' is currently not supported for your organization [YOUR_ORGANIZATION] because it is in an unmanaged state. An administrator needs to claim ownership of the company by DNS validation of [YOUR_ORGANIZATION] before the application rclone can be provisioned.
+
+This means that rclone can't use the OneDrive for Business API with your
+account. You can't do much about it, maybe write an email to your
+admins.
+
+However, there are other ways to interact with your OneDrive account.
+Have a look at the WebDAV backend: https://rclone.org/webdav/#sharepoint
+
+invalid_grant (AADSTS50076)
+
+ Error: invalid_grant
+ Code: AADSTS50076
+ Description: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '...'.
+
+If you see the error above after enabling multi-factor authentication
+for your account, you can fix it by refreshing your OAuth refresh token.
+To do that, run rclone config, and choose to edit your OneDrive backend.
+Then, you don't need to actually make any changes until you reach this
+question: Already have a token - refresh?. For this question, answer y
+and go through the process to refresh your token, just like the first
+time the backend is configured. After this, rclone should work again for
+this backend.
+
+Invalid request when making public links
+
+On Sharepoint and OneDrive for Business, rclone link may return an
+"Invalid request" error. A possible cause is that the organisation admin
+didn't allow public links to be made for the organisation/sharepoint
+library. To fix the permissions as an admin, take a look at the docs: 1,
+2.
+
+Can not access Shared with me files
+
+Shared with me files is not supported by rclone currently, but there is
+a workaround:
+
+1. Visit https://onedrive.live.com
+2. Right click a item in Shared, then click Add shortcut to My files in
+ the context [make_shortcut]
+3. The shortcut will appear in My files, you can access it with rclone,
+ it behaves like a normal folder/file. [in_my_files] [rclone_mount]
+
+Live Photos uploaded from iOS (small video clips in .heic files)
+
+The iOS OneDrive app introduced upload and storage of Live Photos in
+2020. The usage and download of these uploaded Live Photos is
+unfortunately still work-in-progress and this introduces several issues
+when copying, synchronising and mounting – both in rclone and in the
+native OneDrive client on Windows.
+
+The root cause can easily be seen if you locate one of your Live Photos
+in the OneDrive web interface. Then download the photo from the web
+interface. You will then see that the size of downloaded .heic file is
+smaller than the size displayed in the web interface. The downloaded
+file is smaller because it only contains a single frame (still photo)
+extracted from the Live Photo (movie) stored in OneDrive.
+
+The different sizes will cause rclone copy/sync to repeatedly recopy
+unmodified photos something like this:
+
+ DEBUG : 20230203_123826234_iOS.heic: Sizes differ (src 4470314 vs dst 1298667)
+ DEBUG : 20230203_123826234_iOS.heic: sha1 = fc2edde7863b7a7c93ca6771498ac797f8460750 OK
+ INFO : 20230203_123826234_iOS.heic: Copied (replaced existing)
+
+These recopies can be worked around by adding --ignore-size. Please note
+that this workaround only syncs the still-picture not the movie clip,
+and relies on modification dates being correctly updated on all files in
+all situations.
+
+The different sizes will also cause rclone check to report size errors
+something like this:
+
+ ERROR : 20230203_123826234_iOS.heic: sizes differ
+
+These check errors can be suppressed by adding --ignore-size.
+
+The different sizes will also cause rclone mount to fail downloading
+with an error something like this:
+
+ ERROR : 20230203_123826234_iOS.heic: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
+
+or like this when using --cache-mode=full:
+
+ INFO : 20230203_123826234_iOS.heic: vfs cache: downloader: error count now 1: vfs reader: failed to write to cache file: 416 Requested Range Not Satisfiable:
+ ERROR : 20230203_123826234_iOS.heic: vfs cache: failed to download: vfs reader: failed to write to cache file: 416 Requested Range Not Satisfiable:
+
+OpenDrive
+
+Paths are specified as remote:path
+
+Paths may be as deep as required, e.g. remote:directory/subdirectory.
+
+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:
+
+ 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 / OpenDrive
+ \ "opendrive"
+ [snip]
+ Storage> opendrive
+ Username
+ username>
Password
-q) Yes type in my own password
-r) Generate random password y/g> y Enter the password: password:
- Confirm the password: password: -------------------- [remote]
- username = password = *** ENCRYPTED *** --------------------
-s) Yes this is OK
-t) Edit this remote
-u) Delete this remote y/e/d> y
+ y) Yes type in my own password
+ g) Generate random password
+ y/g> y
+ Enter the password:
+ password:
+ Confirm the password:
+ password:
+ --------------------
+ [remote]
+ username =
+ password = *** ENCRYPTED ***
+ --------------------
+ y) Yes this is OK
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
+List directories in top level of your OpenDrive
- List directories in top level of your OpenDrive
+ rclone lsd remote:
- rclone lsd remote:
+List all the files in your OpenDrive
- List all the files in your OpenDrive
+ rclone ls remote:
- rclone ls remote:
+To copy a local directory to an OpenDrive directory called backup
- To copy a local directory to an OpenDrive directory called backup
+ rclone copy /home/source remote:backup
- rclone copy /home/source remote:backup
+Modification times and hashes
- ### Modification times and hashes
+OpenDrive allows modification times to be set on objects accurate to 1
+second. These will be used to detect whether objects need syncing or
+not.
- OpenDrive allows modification times to be set on objects accurate to 1
- second. These will be used to detect whether objects need syncing or
- not.
+The MD5 hash algorithm is supported.
- The MD5 hash algorithm is supported.
+Restricted filename characters
- ### Restricted filename characters
+ Character Value Replacement
+ ----------- ------- -------------
+ NUL 0x00 ␀
+ / 0x2F /
+ " 0x22 "
+ * 0x2A *
+ : 0x3A :
+ < 0x3C <
+ > 0x3E >
+ ? 0x3F ?
+ \ 0x5C \
+ | 0x7C |
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | NUL | 0x00 | ␀ |
- | / | 0x2F | / |
- | " | 0x22 | " |
- | * | 0x2A | * |
- | : | 0x3A | : |
- | < | 0x3C | < |
- | > | 0x3E | > |
- | ? | 0x3F | ? |
- | \ | 0x5C | \ |
- | \| | 0x7C | | |
+File names can also not begin or end with the following characters.
+These only get replaced if they are the first or last character in the
+name:
- File names can also not begin 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 ␠
+ HT 0x09 ␉
+ LF 0x0A ␊
+ VT 0x0B ␋
+ CR 0x0D ␍
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | SP | 0x20 | ␠ |
- | HT | 0x09 | ␉ |
- | LF | 0x0A | ␊ |
- | VT | 0x0B | ␋ |
- | CR | 0x0D | ␍ |
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON
+strings.
+Standard options
- Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
- as they can't be used in JSON strings.
+Here are the Standard options specific to opendrive (OpenDrive).
+--opendrive-username
- ### Standard options
+Username.
- Here are the Standard options specific to opendrive (OpenDrive).
+Properties:
- #### --opendrive-username
+- Config: username
+- Env Var: RCLONE_OPENDRIVE_USERNAME
+- Type: string
+- Required: true
- Username.
+--opendrive-password
- Properties:
+Password.
- - Config: username
- - Env Var: RCLONE_OPENDRIVE_USERNAME
- - Type: string
- - Required: true
+NB Input to this must be obscured - see rclone obscure.
- #### --opendrive-password
+Properties:
- Password.
+- Config: password
+- Env Var: RCLONE_OPENDRIVE_PASSWORD
+- Type: string
+- Required: true
- **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
+Advanced options
- Properties:
+Here are the Advanced options specific to opendrive (OpenDrive).
- - Config: password
- - Env Var: RCLONE_OPENDRIVE_PASSWORD
- - Type: string
- - Required: true
+--opendrive-encoding
- ### Advanced options
+The encoding for the backend.
- Here are the Advanced options specific to opendrive (OpenDrive).
+See the encoding section in the overview for more info.
- #### --opendrive-encoding
+Properties:
- The encoding for the backend.
+- Config: encoding
+- Env Var: RCLONE_OPENDRIVE_ENCODING
+- Type: Encoding
+- Default:
+ Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+--opendrive-chunk-size
- Properties:
+Files will be uploaded in chunks this size.
- - Config: encoding
- - Env Var: RCLONE_OPENDRIVE_ENCODING
- - Type: Encoding
- - Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot
+Note that these chunks are buffered in memory so increasing them will
+increase memory use.
- #### --opendrive-chunk-size
+Properties:
- Files will be uploaded in chunks this size.
+- Config: chunk_size
+- Env Var: RCLONE_OPENDRIVE_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 10Mi
- Note that these chunks are buffered in memory so increasing them will
- increase memory use.
+--opendrive-description
- Properties:
+Description of the remote.
- - Config: chunk_size
- - Env Var: RCLONE_OPENDRIVE_CHUNK_SIZE
- - Type: SizeSuffix
- - Default: 10Mi
+Properties:
+- Config: description
+- Env Var: RCLONE_OPENDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+Limitations
- ## Limitations
+Note that OpenDrive is case insensitive so you can't have a file called
+"Hello.doc" and one called "hello.doc".
- 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.
- 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.
- `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.
+See List of backends that do not support rclone about and rclone about
- 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/)
+Oracle Object Storage
- # Oracle Object Storage
- - [Oracle Object Storage Overview](https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/objectstorageoverview.htm)
- - [Oracle Object Storage FAQ](https://www.oracle.com/cloud/storage/object-storage/faq/)
- - [Oracle Object Storage Limits](https://docs.oracle.com/en-us/iaas/Content/Resources/Assets/whitepapers/oci-object-storage-best-practices.pdf)
+- Oracle Object Storage Overview
+- Oracle Object Storage FAQ
+- Oracle Object Storage Limits
- 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`.
+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:
+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`
+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 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:
+Here is an example of how to make a remote called remote. First run:
- rclone config
+ rclone config
- This will guide you through an interactive setup process:
+This will guide you through an interactive setup process:
-n) New remote
-o) Delete remote
-p) Rename remote
-q) Copy remote
-r) Set configuration password
-s) Quit config e/n/d/r/c/s/q> n
+ 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
-Enter name for new remote. name> remote
+ 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. [snip] XX / Oracle Cloud
-Infrastructure Object Storage (oracleobjectstorage) Storage>
-oracleobjectstorage
-
-Option provider. Choose your Auth Provider Choose a number from below,
-or type in your own string value. Press Enter for the default
-(env_auth). 1 / automatically pickup the credentials from runtime(env),
-first one to provide auth wins (env_auth) / use an OCI user and an API
-key for authentication. 2 | you’ll need to put in a config file your
-tenancy OCID, user OCID, region, the path, fingerprint to an API key. |
-https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
- (user_principal_auth) / use instance principals to authorize an
-instance to make API calls. 3 | each instance has its own identity, and
-authenticates using the certificates that are read from instance
-metadata. |
-https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
- (instance_principal_auth) 4 / use resource principals to make API calls
- (resource_principal_auth) 5 / no credentials needed, this is typically
-for reading public buckets (no_auth) provider> 2
-
-Option namespace. Object storage namespace Enter a value. namespace>
-idbamagbg734
-
-Option compartment. Object storage compartment OCID Enter a value.
-compartment>
-ocid1.compartment.oc1..aaaaaaaapufkxc7ame3sthry5i7ujrwfc7ejnthhu6bhanm5oqfjpyasjkba
-
-Option region. Object storage Region Enter a value. region> us-ashburn-1
-
-Option endpoint. Endpoint for Object storage API. Leave blank to use the
-default endpoint for the region. Enter a value. Press Enter to leave
-empty. endpoint>
-
-Option config_file. Full Path to OCI config file Choose a number from
-below, or type in your own string value. Press Enter for the default
-(~/.oci/config). 1 / oci configuration file location (~/.oci/config)
-config_file> /etc/oci/dev.conf
-
-Option config_profile. Profile name inside OCI config file Choose a
-number from below, or type in your own string value. Press Enter for the
-default (Default). 1 / Use the default profile (Default)
-config_profile> Test
-
-Edit advanced config? y) Yes n) No (default) y/n> n
-
-Configuration complete. Options: - type: oracleobjectstorage -
-namespace: idbamagbg734 - compartment:
-ocid1.compartment.oc1..aaaaaaaapufkxc7ame3sthry5i7ujrwfc7ejnthhu6bhanm5oqfjpyasjkba
-- region: us-ashburn-1 - provider: user_principal_auth - config_file:
-/etc/oci/dev.conf - config_profile: Test Keep this "remote" remote? y)
-Yes this is OK (default) e) Edit this remote d) Delete this remote
-y/e/d> y
-
-
- See all buckets
-
- rclone lsd remote:
-
- Create a new bucket
-
- rclone mkdir remote:bucket
-
- List the contents of a bucket
-
- rclone ls remote:bucket
- rclone ls remote:bucket --max-depth 1
-
- ## Authentication Providers
-
- OCI has various authentication methods. To learn more about authentication methods please refer [oci authentication
- methods](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm)
- These choices can be specified in the rclone config file.
-
- Rclone supports the following OCI authentication provider.
-
- User Principal
- Instance Principal
- Resource Principal
- No authentication
-
- ### User Principal
-
- Sample rclone config file for Authentication Provider User Principal:
-
- [oos]
- type = oracleobjectstorage
- namespace = id34
- compartment = ocid1.compartment.oc1..aaba
- region = us-ashburn-1
- provider = user_principal_auth
- config_file = /home/opc/.oci/config
- config_profile = Default
-
- Advantages:
- - One can use this method from any server within OCI or on-premises or from other cloud provider.
-
- Considerations:
- - you need to configure user’s privileges / policy to allow access to object storage
- - Overhead of managing users and keys.
- - If the user is deleted, the config file will no longer work and may cause automation regressions that use the user's credentials.
-
- ### Instance Principal
-
- An OCI compute instance can be authorized to use rclone by using it's identity and certificates as an instance principal.
- With this approach no credentials have to be stored and managed.
-
- Sample rclone configuration file for Authentication Provider Instance Principal:
-
- [opc@rclone ~]$ cat ~/.config/rclone/rclone.conf
- [oos]
- type = oracleobjectstorage
- namespace = idfn
- compartment = ocid1.compartment.oc1..aak7a
- region = us-ashburn-1
- provider = instance_principal_auth
-
- Advantages:
-
- - With instance principals, you don't need to configure user credentials and transfer/ save it to disk in your compute
- instances or rotate the credentials.
- - You don’t need to deal with users and keys.
- - Greatly helps in automation as you don't have to manage access keys, user private keys, storing them in vault,
- using kms etc.
-
- Considerations:
-
- - You need to configure a dynamic group having this instance as member and add policy to read object storage to that
- dynamic group.
- - Everyone who has access to this machine can execute the CLI commands.
- - It is applicable for oci compute instances only. It cannot be used on external instance or resources.
-
- ### Resource Principal
-
- Resource principal auth is very similar to instance principal auth but used for resources that are not
- compute instances such as [serverless functions](https://docs.oracle.com/en-us/iaas/Content/Functions/Concepts/functionsoverview.htm).
- To use resource principal ensure Rclone process is started with these environment variables set in its process.
-
- export OCI_RESOURCE_PRINCIPAL_VERSION=2.2
- export OCI_RESOURCE_PRINCIPAL_REGION=us-ashburn-1
- export OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM=/usr/share/model-server/key.pem
- export OCI_RESOURCE_PRINCIPAL_RPST=/usr/share/model-server/security_token
-
- Sample rclone configuration file for Authentication Provider Resource Principal:
-
- [oos]
- type = oracleobjectstorage
- namespace = id34
- compartment = ocid1.compartment.oc1..aaba
- region = us-ashburn-1
- provider = resource_principal_auth
-
- ### No authentication
-
- Public buckets do not require any authentication mechanism to read objects.
- Sample rclone configuration file for No authentication:
-
- [oos]
- type = oracleobjectstorage
- namespace = id34
- compartment = ocid1.compartment.oc1..aaba
- region = us-ashburn-1
- provider = no_auth
-
- ### 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.
-
- The MD5 hash algorithm is supported.
-
- ### Multipart uploads
-
- rclone supports multipart uploads with OOS which means that it can
- upload files bigger than 5 GiB.
-
- Note that files uploaded *both* with multipart upload *and* through
- crypt remotes do not have MD5 sums.
-
- rclone switches from single part uploads to multipart uploads at the
- point specified by `--oos-upload-cutoff`. This can be a maximum of 5 GiB
- and a minimum of 0 (ie always upload multipart files).
-
- The chunk sizes used in the multipart upload are specified by
- `--oos-chunk-size` and the number of chunks uploaded concurrently is
- specified by `--oos-upload-concurrency`.
-
- 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
-
- Here are the Standard options specific to oracleobjectstorage (Oracle Cloud Infrastructure Object Storage).
-
- #### --oos-provider
+ Option Storage.
+ Type of storage to configure.
+ Choose a number from below, or type in your own value.
+ [snip]
+ XX / Oracle Cloud Infrastructure Object Storage
+ \ (oracleobjectstorage)
+ Storage> oracleobjectstorage
+ Option provider.
Choose your Auth Provider
+ Choose a number from below, or type in your own string value.
+ Press Enter for the default (env_auth).
+ 1 / automatically pickup the credentials from runtime(env), first one to provide auth wins
+ \ (env_auth)
+ / use an OCI user and an API key for authentication.
+ 2 | you’ll need to put in a config file your tenancy OCID, user OCID, region, the path, fingerprint to an API key.
+ | https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
+ \ (user_principal_auth)
+ / use instance principals to authorize an instance to make API calls.
+ 3 | each instance has its own identity, and authenticates using the certificates that are read from instance metadata.
+ | https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
+ \ (instance_principal_auth)
+ / use workload identity to grant Kubernetes pods policy-driven access to Oracle Cloud
+ 4 | Infrastructure (OCI) resources using OCI Identity and Access Management (IAM).
+ | https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contenggrantingworkloadaccesstoresources.htm
+ \ (workload_identity_auth)
+ 5 / use resource principals to make API calls
+ \ (resource_principal_auth)
+ 6 / no credentials needed, this is typically for reading public buckets
+ \ (no_auth)
+ provider> 2
- Properties:
-
- - Config: provider
- - Env Var: RCLONE_OOS_PROVIDER
- - Type: string
- - Default: "env_auth"
- - Examples:
- - "env_auth"
- - automatically pickup the credentials from runtime(env), first one to provide auth wins
- - "user_principal_auth"
- - use an OCI user and an API key for authentication.
- - you’ll need to put in a config file your tenancy OCID, user OCID, region, the path, fingerprint to an API key.
- - https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
- - "instance_principal_auth"
- - use instance principals to authorize an instance to make API calls.
- - each instance has its own identity, and authenticates using the certificates that are read from instance metadata.
- - https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
- - "resource_principal_auth"
- - use resource principals to make API calls
- - "no_auth"
- - no credentials needed, this is typically for reading public buckets
-
- #### --oos-namespace
-
+ Option namespace.
Object storage namespace
+ Enter a value.
+ namespace> idbamagbg734
- Properties:
-
- - Config: namespace
- - Env Var: RCLONE_OOS_NAMESPACE
- - Type: string
- - Required: true
-
- #### --oos-compartment
-
+ Option compartment.
Object storage compartment OCID
+ Enter a value.
+ compartment> ocid1.compartment.oc1..aaaaaaaapufkxc7ame3sthry5i7ujrwfc7ejnthhu6bhanm5oqfjpyasjkba
- Properties:
-
- - Config: compartment
- - Env Var: RCLONE_OOS_COMPARTMENT
- - Provider: !no_auth
- - Type: string
- - Required: true
-
- #### --oos-region
-
+ Option region.
Object storage Region
+ Enter a value.
+ region> us-ashburn-1
- Properties:
-
- - Config: region
- - Env Var: RCLONE_OOS_REGION
- - Type: string
- - Required: true
-
- #### --oos-endpoint
-
+ Option endpoint.
Endpoint for Object storage API.
-
Leave blank to use the default endpoint for the region.
+ Enter a value. Press Enter to leave empty.
+ endpoint>
+
+ Option config_file.
+ Full Path to OCI config file
+ Choose a number from below, or type in your own string value.
+ Press Enter for the default (~/.oci/config).
+ 1 / oci configuration file location
+ \ (~/.oci/config)
+ config_file> /etc/oci/dev.conf
+
+ Option config_profile.
+ Profile name inside OCI config file
+ Choose a number from below, or type in your own string value.
+ Press Enter for the default (Default).
+ 1 / Use the default profile
+ \ (Default)
+ config_profile> Test
+
+ Edit advanced config?
+ y) Yes
+ n) No (default)
+ y/n> n
+
+ Configuration complete.
+ Options:
+ - type: oracleobjectstorage
+ - namespace: idbamagbg734
+ - compartment: ocid1.compartment.oc1..aaaaaaaapufkxc7ame3sthry5i7ujrwfc7ejnthhu6bhanm5oqfjpyasjkba
+ - region: us-ashburn-1
+ - provider: user_principal_auth
+ - config_file: /etc/oci/dev.conf
+ - config_profile: Test
+ Keep this "remote" remote?
+ y) Yes this is OK (default)
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
+
+See all buckets
+
+ rclone lsd remote:
+
+Create a new bucket
+
+ rclone mkdir remote:bucket
+
+List the contents of a bucket
+
+ rclone ls remote:bucket
+ rclone ls remote:bucket --max-depth 1
+
+Authentication Providers
+
+OCI has various authentication methods. To learn more about
+authentication methods please refer oci authentication methods These
+choices can be specified in the rclone config file.
+
+Rclone supports the following OCI authentication provider.
+
+ User Principal
+ Instance Principal
+ Resource Principal
+ Workload Identity
+ No authentication
+
+User Principal
+
+Sample rclone config file for Authentication Provider User Principal:
+
+ [oos]
+ type = oracleobjectstorage
+ namespace = id34
+ compartment = ocid1.compartment.oc1..aaba
+ region = us-ashburn-1
+ provider = user_principal_auth
+ config_file = /home/opc/.oci/config
+ config_profile = Default
+
+Advantages: - One can use this method from any server within OCI or
+on-premises or from other cloud provider.
+
+Considerations: - you need to configure user’s privileges / policy to
+allow access to object storage - Overhead of managing users and keys. -
+If the user is deleted, the config file will no longer work and may
+cause automation regressions that use the user's credentials.
- Properties:
+Instance Principal
+
+An OCI compute instance can be authorized to use rclone by using it's
+identity and certificates as an instance principal. With this approach
+no credentials have to be stored and managed.
+
+Sample rclone configuration file for Authentication Provider Instance
+Principal:
+
+ [opc@rclone ~]$ cat ~/.config/rclone/rclone.conf
+ [oos]
+ type = oracleobjectstorage
+ namespace = idfn
+ compartment = ocid1.compartment.oc1..aak7a
+ region = us-ashburn-1
+ provider = instance_principal_auth
+
+Advantages:
- - Config: endpoint
- - Env Var: RCLONE_OOS_ENDPOINT
- - Type: string
- - Required: false
+- With instance principals, you don't need to configure user
+ credentials and transfer/ save it to disk in your compute instances
+ or rotate the credentials.
+- You don’t need to deal with users and keys.
+- Greatly helps in automation as you don't have to manage access keys,
+ user private keys, storing them in vault, using kms etc.
- #### --oos-config-file
+Considerations:
- Path to OCI config file
+- You need to configure a dynamic group having this instance as member
+ and add policy to read object storage to that dynamic group.
+- Everyone who has access to this machine can execute the CLI
+ commands.
+- It is applicable for oci compute instances only. It cannot be used
+ on external instance or resources.
- Properties:
+Resource Principal
- - Config: config_file
- - Env Var: RCLONE_OOS_CONFIG_FILE
- - Provider: user_principal_auth
- - Type: string
- - Default: "~/.oci/config"
- - Examples:
- - "~/.oci/config"
- - oci configuration file location
+Resource principal auth is very similar to instance principal auth but
+used for resources that are not compute instances such as serverless
+functions. To use resource principal ensure Rclone process is started
+with these environment variables set in its process.
- #### --oos-config-profile
+ export OCI_RESOURCE_PRINCIPAL_VERSION=2.2
+ export OCI_RESOURCE_PRINCIPAL_REGION=us-ashburn-1
+ export OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM=/usr/share/model-server/key.pem
+ export OCI_RESOURCE_PRINCIPAL_RPST=/usr/share/model-server/security_token
- Profile name inside the oci config file
+Sample rclone configuration file for Authentication Provider Resource
+Principal:
- Properties:
+ [oos]
+ type = oracleobjectstorage
+ namespace = id34
+ compartment = ocid1.compartment.oc1..aaba
+ region = us-ashburn-1
+ provider = resource_principal_auth
- - Config: config_profile
- - Env Var: RCLONE_OOS_CONFIG_PROFILE
- - Provider: user_principal_auth
- - Type: string
- - Default: "Default"
- - Examples:
- - "Default"
- - Use the default profile
+Workload Identity
+
+Workload Identity auth may be used when running Rclone from Kubernetes
+pod on a Container Engine for Kubernetes (OKE) cluster. For more details
+on configuring Workload Identity, see Granting Workloads Access to OCI
+Resources. To use workload identity, ensure Rclone is started with these
+environment variables set in its process.
+
+ export OCI_RESOURCE_PRINCIPAL_VERSION=2.2
+ export OCI_RESOURCE_PRINCIPAL_REGION=us-ashburn-1
+
+No authentication
+
+Public buckets do not require any authentication mechanism to read
+objects. Sample rclone configuration file for No authentication:
+
+ [oos]
+ type = oracleobjectstorage
+ namespace = id34
+ compartment = ocid1.compartment.oc1..aaba
+ region = us-ashburn-1
+ provider = no_auth
+
+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.
- ### Advanced options
+The MD5 hash algorithm is supported.
- Here are the Advanced options specific to oracleobjectstorage (Oracle Cloud Infrastructure Object Storage).
+Multipart uploads
- #### --oos-storage-tier
+rclone supports multipart uploads with OOS which means that it can
+upload files bigger than 5 GiB.
- The storage class to use when storing new objects in storage. https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm
+Note that files uploaded both with multipart upload and through crypt
+remotes do not have MD5 sums.
- Properties:
+rclone switches from single part uploads to multipart uploads at the
+point specified by --oos-upload-cutoff. This can be a maximum of 5 GiB
+and a minimum of 0 (ie always upload multipart files).
- - Config: storage_tier
- - Env Var: RCLONE_OOS_STORAGE_TIER
- - Type: string
- - Default: "Standard"
- - Examples:
- - "Standard"
- - Standard storage tier, this is the default tier
- - "InfrequentAccess"
- - InfrequentAccess storage tier
- - "Archive"
- - Archive storage tier
+The chunk sizes used in the multipart upload are specified by
+--oos-chunk-size and the number of chunks uploaded concurrently is
+specified by --oos-upload-concurrency.
- #### --oos-upload-cutoff
+Multipart uploads will use --transfers * --oos-upload-concurrency *
+--oos-chunk-size extra memory. Single part uploads to not use extra
+memory.
- Cutoff for switching to chunked upload.
+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.
- Any files larger than this will be uploaded in chunks of chunk_size.
- The minimum is 0 and the maximum is 5 GiB.
+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.
- Properties:
+Standard options
- - Config: upload_cutoff
- - Env Var: RCLONE_OOS_UPLOAD_CUTOFF
- - Type: SizeSuffix
- - Default: 200Mi
+Here are the Standard options specific to oracleobjectstorage (Oracle
+Cloud Infrastructure Object Storage).
- #### --oos-chunk-size
+--oos-provider
- Chunk size to use for uploading.
+Choose your Auth Provider
- When uploading files larger than upload_cutoff or files with unknown
- size (e.g. from "rclone rcat" or uploaded with "rclone mount" they will be uploaded
- as multipart uploads using this chunk size.
+Properties:
- Note that "upload_concurrency" chunks of this size are buffered
- in memory per transfer.
+- Config: provider
+- Env Var: RCLONE_OOS_PROVIDER
+- Type: string
+- Default: "env_auth"
+- Examples:
+ - "env_auth"
+ - automatically pickup the credentials from runtime(env),
+ first one to provide auth wins
+ - "user_principal_auth"
+ - use an OCI user and an API key for authentication.
+ - you’ll need to put in a config file your tenancy OCID, user
+ OCID, region, the path, fingerprint to an API key.
+ - https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
+ - "instance_principal_auth"
+ - use instance principals to authorize an instance to make API
+ calls.
+ - each instance has its own identity, and authenticates using
+ the certificates that are read from instance metadata.
+ - https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
+ - "workload_identity_auth"
+ - use workload identity to grant OCI Container Engine for
+ Kubernetes workloads policy-driven access to OCI resources
+ using OCI Identity and Access Management (IAM).
+ - https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contenggrantingworkloadaccesstoresources.htm
+ - "resource_principal_auth"
+ - use resource principals to make API calls
+ - "no_auth"
+ - no credentials needed, this is typically for reading public
+ buckets
- If you are transferring large files over high-speed links and you have
- enough memory, then increasing this will speed up the transfers.
+--oos-namespace
- Rclone will automatically increase the chunk size when uploading a
- large file of known size to stay below the 10,000 chunks limit.
+Object storage namespace
- Files of unknown size are uploaded with the configured
- chunk_size. Since the default chunk size is 5 MiB and there can be at
- most 10,000 chunks, this means that by default the maximum size of
- a file you can stream upload is 48 GiB. If you wish to stream upload
- larger files then you will need to increase chunk_size.
+Properties:
- Increasing the chunk size decreases the accuracy of the progress
- statistics displayed with "-P" flag.
+- Config: namespace
+- Env Var: RCLONE_OOS_NAMESPACE
+- Type: string
+- Required: true
+--oos-compartment
- Properties:
+Object storage compartment OCID
- - Config: chunk_size
- - Env Var: RCLONE_OOS_CHUNK_SIZE
- - Type: SizeSuffix
- - Default: 5Mi
+Properties:
- #### --oos-max-upload-parts
+- Config: compartment
+- Env Var: RCLONE_OOS_COMPARTMENT
+- Provider: !no_auth
+- Type: string
+- Required: true
- Maximum number of parts in a multipart upload.
+--oos-region
- This option defines the maximum number of multipart chunks to use
- when doing a multipart upload.
+Object storage Region
- OCI has max parts limit of 10,000 chunks.
+Properties:
- Rclone will automatically increase the chunk size when uploading a
- large file of a known size to stay below this number of chunks limit.
+- Config: region
+- Env Var: RCLONE_OOS_REGION
+- Type: string
+- Required: true
+--oos-endpoint
- Properties:
+Endpoint for Object storage API.
- - Config: max_upload_parts
- - Env Var: RCLONE_OOS_MAX_UPLOAD_PARTS
- - Type: int
- - Default: 10000
+Leave blank to use the default endpoint for the region.
- #### --oos-upload-concurrency
+Properties:
- Concurrency for multipart uploads.
+- Config: endpoint
+- Env Var: RCLONE_OOS_ENDPOINT
+- Type: string
+- Required: false
- This is the number of chunks of the same file that are uploaded
- concurrently.
+--oos-config-file
- 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.
+Path to OCI config file
- Properties:
+Properties:
- - Config: upload_concurrency
- - Env Var: RCLONE_OOS_UPLOAD_CONCURRENCY
- - Type: int
- - Default: 10
+- Config: config_file
+- Env Var: RCLONE_OOS_CONFIG_FILE
+- Provider: user_principal_auth
+- Type: string
+- Default: "~/.oci/config"
+- Examples:
+ - "~/.oci/config"
+ - oci configuration file location
- #### --oos-copy-cutoff
+--oos-config-profile
- Cutoff for switching to multipart copy.
+Profile name inside the oci config file
- Any files larger than this that need to be server-side copied will be
- copied in chunks of this size.
+Properties:
- The minimum is 0 and the maximum is 5 GiB.
+- Config: config_profile
+- Env Var: RCLONE_OOS_CONFIG_PROFILE
+- Provider: user_principal_auth
+- Type: string
+- Default: "Default"
+- Examples:
+ - "Default"
+ - Use the default profile
- Properties:
+Advanced options
- - Config: copy_cutoff
- - Env Var: RCLONE_OOS_COPY_CUTOFF
- - Type: SizeSuffix
- - Default: 4.656Gi
+Here are the Advanced options specific to oracleobjectstorage (Oracle
+Cloud Infrastructure Object Storage).
- #### --oos-copy-timeout
+--oos-storage-tier
- Timeout for copy.
+The storage class to use when storing new objects in storage.
+https://docs.oracle.com/en-us/iaas/Content/Object/Concepts/understandingstoragetiers.htm
- Copy is an asynchronous operation, specify timeout to wait for copy to succeed
+Properties:
+- Config: storage_tier
+- Env Var: RCLONE_OOS_STORAGE_TIER
+- Type: string
+- Default: "Standard"
+- Examples:
+ - "Standard"
+ - Standard storage tier, this is the default tier
+ - "InfrequentAccess"
+ - InfrequentAccess storage tier
+ - "Archive"
+ - Archive storage tier
- Properties:
+--oos-upload-cutoff
- - Config: copy_timeout
- - Env Var: RCLONE_OOS_COPY_TIMEOUT
- - Type: Duration
- - Default: 1m0s
+Cutoff for switching to chunked upload.
- #### --oos-disable-checksum
+Any files larger than this will be uploaded in chunks of chunk_size. The
+minimum is 0 and the maximum is 5 GiB.
- Don't store MD5 checksum with object metadata.
+Properties:
- 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.
+- Config: upload_cutoff
+- Env Var: RCLONE_OOS_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 200Mi
- Properties:
+--oos-chunk-size
- - Config: disable_checksum
- - Env Var: RCLONE_OOS_DISABLE_CHECKSUM
- - Type: bool
- - Default: false
+Chunk size to use for uploading.
- #### --oos-encoding
+When uploading files larger than upload_cutoff or files with unknown
+size (e.g. from "rclone rcat" or uploaded with "rclone mount" they will
+be uploaded as multipart uploads using this chunk size.
- The encoding for the backend.
+Note that "upload_concurrency" chunks of this size are buffered in
+memory per transfer.
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+If you are transferring large files over high-speed links and you have
+enough memory, then increasing this will speed up the transfers.
- Properties:
+Rclone will automatically increase the chunk size when uploading a large
+file of known size to stay below the 10,000 chunks limit.
- - Config: encoding
- - Env Var: RCLONE_OOS_ENCODING
- - Type: Encoding
- - Default: Slash,InvalidUtf8,Dot
+Files of unknown size are uploaded with the configured chunk_size. Since
+the default chunk size is 5 MiB and there can be at most 10,000 chunks,
+this means that by default the maximum size of a file you can stream
+upload is 48 GiB. If you wish to stream upload larger files then you
+will need to increase chunk_size.
- #### --oos-leave-parts-on-error
+Increasing the chunk size decreases the accuracy of the progress
+statistics displayed with "-P" flag.
- If true avoid calling abort upload on a failure, leaving all successfully uploaded parts for manual recovery.
+Properties:
- It should be set to true for resuming uploads across different sessions.
+- Config: chunk_size
+- Env Var: RCLONE_OOS_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 5Mi
- WARNING: Storing parts of an incomplete multipart upload counts towards space usage on object storage and will add
- additional costs if not cleaned up.
+--oos-max-upload-parts
+Maximum number of parts in a multipart upload.
- Properties:
+This option defines the maximum number of multipart chunks to use when
+doing a multipart upload.
- - Config: leave_parts_on_error
- - Env Var: RCLONE_OOS_LEAVE_PARTS_ON_ERROR
- - Type: bool
- - Default: false
+OCI has max parts limit of 10,000 chunks.
- #### --oos-attempt-resume-upload
+Rclone will automatically increase the chunk size when uploading a large
+file of a known size to stay below this number of chunks limit.
- If true attempt to resume previously started multipart upload for the object.
- This will be helpful to speed up multipart transfers by resuming uploads from past session.
+Properties:
- WARNING: If chunk size differs in resumed session from past incomplete session, then the resumed multipart upload is
- aborted and a new multipart upload is started with the new chunk size.
+- Config: max_upload_parts
+- Env Var: RCLONE_OOS_MAX_UPLOAD_PARTS
+- Type: int
+- Default: 10000
- The flag leave_parts_on_error must be true to resume and optimize to skip parts that were already uploaded successfully.
+--oos-upload-concurrency
+Concurrency for multipart uploads.
- Properties:
+This is the number of chunks of the same file that are uploaded
+concurrently.
- - Config: attempt_resume_upload
- - Env Var: RCLONE_OOS_ATTEMPT_RESUME_UPLOAD
- - Type: bool
- - Default: false
+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.
- #### --oos-no-check-bucket
+Properties:
- If set, don't attempt to check the bucket exists or create it.
+- Config: upload_concurrency
+- Env Var: RCLONE_OOS_UPLOAD_CONCURRENCY
+- Type: int
+- Default: 10
- This can be useful when trying to minimise the number of transactions
- rclone does if you know the bucket exists already.
+--oos-copy-cutoff
- It can also be needed if the user you are using does not have bucket
- creation permissions.
+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.
- Properties:
+The minimum is 0 and the maximum is 5 GiB.
- - Config: no_check_bucket
- - Env Var: RCLONE_OOS_NO_CHECK_BUCKET
- - Type: bool
- - Default: false
+Properties:
- #### --oos-sse-customer-key-file
+- Config: copy_cutoff
+- Env Var: RCLONE_OOS_COPY_CUTOFF
+- Type: SizeSuffix
+- Default: 4.656Gi
- To use SSE-C, a file containing the base64-encoded string of the AES-256 encryption key associated
- with the object. Please note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id is needed.'
+--oos-copy-timeout
- Properties:
+Timeout for copy.
- - Config: sse_customer_key_file
- - Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY_FILE
- - Type: string
- - Required: false
- - Examples:
- - ""
- - None
+Copy is an asynchronous operation, specify timeout to wait for copy to
+succeed
- #### --oos-sse-customer-key
+Properties:
- To use SSE-C, the optional header that specifies the base64-encoded 256-bit encryption key to use to
- encrypt or decrypt the data. Please note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id is
- needed. For more information, see Using Your Own Keys for Server-Side Encryption
- (https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm)
+- Config: copy_timeout
+- Env Var: RCLONE_OOS_COPY_TIMEOUT
+- Type: Duration
+- Default: 1m0s
- Properties:
+--oos-disable-checksum
- - Config: sse_customer_key
- - Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY
- - Type: string
- - Required: false
- - Examples:
- - ""
- - None
+Don't store MD5 checksum with object metadata.
- #### --oos-sse-customer-key-sha256
+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.
- If using SSE-C, The optional header that specifies the base64-encoded SHA256 hash of the encryption
- key. This value is used to check the integrity of the encryption key. see Using Your Own Keys for
- Server-Side Encryption (https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm).
+Properties:
- Properties:
+- Config: disable_checksum
+- Env Var: RCLONE_OOS_DISABLE_CHECKSUM
+- Type: bool
+- Default: false
- - Config: sse_customer_key_sha256
- - Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY_SHA256
- - Type: string
- - Required: false
- - Examples:
- - ""
- - None
+--oos-encoding
- #### --oos-sse-kms-key-id
+The encoding for the backend.
- if using your own master key in vault, this header specifies the
- OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a master encryption key used to call
- the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- Please note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id is needed.
+See the encoding section in the overview for more info.
- Properties:
+Properties:
- - Config: sse_kms_key_id
- - Env Var: RCLONE_OOS_SSE_KMS_KEY_ID
- - Type: string
- - Required: false
- - Examples:
- - ""
- - None
+- Config: encoding
+- Env Var: RCLONE_OOS_ENCODING
+- Type: Encoding
+- Default: Slash,InvalidUtf8,Dot
- #### --oos-sse-customer-algorithm
+--oos-leave-parts-on-error
- If using SSE-C, the optional header that specifies "AES256" as the encryption algorithm.
- Object Storage supports "AES256" as the encryption algorithm. For more information, see
- Using Your Own Keys for Server-Side Encryption (https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm).
+If true avoid calling abort upload on a failure, leaving all
+successfully uploaded parts for manual recovery.
- Properties:
+It should be set to true for resuming uploads across different sessions.
- - Config: sse_customer_algorithm
- - Env Var: RCLONE_OOS_SSE_CUSTOMER_ALGORITHM
- - Type: string
- - Required: false
- - Examples:
- - ""
- - None
- - "AES256"
- - AES256
+WARNING: Storing parts of an incomplete multipart upload counts towards
+space usage on object storage and will add additional costs if not
+cleaned up.
- ## Backend commands
+Properties:
- Here are the commands specific to the oracleobjectstorage backend.
+- Config: leave_parts_on_error
+- Env Var: RCLONE_OOS_LEAVE_PARTS_ON_ERROR
+- Type: bool
+- Default: false
- Run them with
+--oos-attempt-resume-upload
- rclone backend COMMAND remote:
+If true attempt to resume previously started multipart upload for the
+object. This will be helpful to speed up multipart transfers by resuming
+uploads from past session.
- The help below will explain what arguments each command takes.
+WARNING: If chunk size differs in resumed session from past incomplete
+session, then the resumed multipart upload is aborted and a new
+multipart upload is started with the new chunk size.
- See the [backend](https://rclone.org/commands/rclone_backend/) command for more
- info on how to pass options and arguments.
+The flag leave_parts_on_error must be true to resume and optimize to
+skip parts that were already uploaded successfully.
- These can be run on a running backend using the rc command
- [backend/command](https://rclone.org/rc/#backend-command).
+Properties:
- ### rename
+- Config: attempt_resume_upload
+- Env Var: RCLONE_OOS_ATTEMPT_RESUME_UPLOAD
+- Type: bool
+- Default: false
- change the name of an object
+--oos-no-check-bucket
- rclone backend rename remote: [options] [+]
+If set, don't attempt to check the bucket exists or create it.
- This command can be used to rename a object.
+This can be useful when trying to minimise the number of transactions
+rclone does if you know the bucket exists already.
+
+It can also be needed if the user you are using does not have bucket
+creation permissions.
+
+Properties:
+
+- Config: no_check_bucket
+- Env Var: RCLONE_OOS_NO_CHECK_BUCKET
+- Type: bool
+- Default: false
+
+--oos-sse-customer-key-file
+
+To use SSE-C, a file containing the base64-encoded string of the AES-256
+encryption key associated with the object. Please note only one of
+sse_customer_key_file|sse_customer_key|sse_kms_key_id is needed.'
+
+Properties:
+
+- Config: sse_customer_key_file
+- Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY_FILE
+- Type: string
+- Required: false
+- Examples:
+ - ""
+ - None
+
+--oos-sse-customer-key
+
+To use SSE-C, the optional header that specifies the base64-encoded
+256-bit encryption key to use to encrypt or decrypt the data. Please
+note only one of sse_customer_key_file|sse_customer_key|sse_kms_key_id
+is needed. For more information, see Using Your Own Keys for Server-Side
+Encryption
+(https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm)
+
+Properties:
+
+- Config: sse_customer_key
+- Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY
+- Type: string
+- Required: false
+- Examples:
+ - ""
+ - None
+
+--oos-sse-customer-key-sha256
+
+If using SSE-C, The optional header that specifies the base64-encoded
+SHA256 hash of the encryption key. This value is used to check the
+integrity of the encryption key. see Using Your Own Keys for Server-Side
+Encryption
+(https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm).
+
+Properties:
+
+- Config: sse_customer_key_sha256
+- Env Var: RCLONE_OOS_SSE_CUSTOMER_KEY_SHA256
+- Type: string
+- Required: false
+- Examples:
+ - ""
+ - None
+
+--oos-sse-kms-key-id
+
+if using your own master key in vault, this header specifies the OCID
+(https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)
+of a master encryption key used to call the Key Management service to
+generate a data encryption key or to encrypt or decrypt a data
+encryption key. Please note only one of
+sse_customer_key_file|sse_customer_key|sse_kms_key_id is needed.
+
+Properties:
+
+- Config: sse_kms_key_id
+- Env Var: RCLONE_OOS_SSE_KMS_KEY_ID
+- Type: string
+- Required: false
+- Examples:
+ - ""
+ - None
+
+--oos-sse-customer-algorithm
+
+If using SSE-C, the optional header that specifies "AES256" as the
+encryption algorithm. Object Storage supports "AES256" as the encryption
+algorithm. For more information, see Using Your Own Keys for Server-Side
+Encryption
+(https://docs.cloud.oracle.com/Content/Object/Tasks/usingyourencryptionkeys.htm).
+
+Properties:
+
+- Config: sse_customer_algorithm
+- Env Var: RCLONE_OOS_SSE_CUSTOMER_ALGORITHM
+- Type: string
+- Required: false
+- Examples:
+ - ""
+ - None
+ - "AES256"
+ - AES256
+
+--oos-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_OOS_DESCRIPTION
+- Type: string
+- Required: false
+
+Backend commands
+
+Here are the commands specific to the oracleobjectstorage 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.
+
+rename
+
+change the name of an object
+
+ rclone backend rename remote: [options] [+]
+
+This command can be used to rename a object.
+
+Usage Examples:
+
+ rclone backend rename oos:bucket relative-object-path-under-bucket object-new-name
+
+list-multipart-uploads
+
+List the unfinished multipart uploads
+
+ rclone backend list-multipart-uploads remote: [options] [+]
+
+This command lists the unfinished multipart uploads in JSON format.
+
+ rclone backend list-multipart-uploads oos:bucket/path/to/object
+
+It returns a dictionary of buckets with values as lists of unfinished
+multipart uploads.
+
+You can call it with no bucket in which case it lists all bucket, with a
+bucket or with a bucket and path.
+
+ {
+ "test-bucket": [
+ {
+ "namespace": "test-namespace",
+ "bucket": "test-bucket",
+ "object": "600m.bin",
+ "uploadId": "51dd8114-52a4-b2f2-c42f-5291f05eb3c8",
+ "timeCreated": "2022-07-29T06:21:16.595Z",
+ "storageTier": "Standard"
+ }
+ ]
+
+cleanup
+
+Remove unfinished multipart uploads.
+
+ rclone backend cleanup remote: [options] [+]
+
+This command removes unfinished multipart 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 oos:bucket/path/to/object
+ rclone backend cleanup -o max-age=7w oos: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
+
+restore
+
+Restore objects from Archive to Standard storage
+
+ rclone backend restore remote: [options] [+]
+
+This command can be used to restore one or more objects from Archive to
+Standard storage.
Usage Examples:
- rclone backend rename oos:bucket relative-object-path-under-bucket object-new-name
+ rclone backend restore oos:bucket/path/to/directory -o hours=HOURS
+ rclone backend restore oos:bucket -o hours=HOURS
+This flag also obeys the filters. Test first with --interactive/-i or
+--dry-run flags
- ### list-multipart-uploads
+ rclone --interactive backend restore --include "*.txt" oos:bucket/path -o hours=72
- List the unfinished multipart uploads
+All the objects shown will be marked for restore, then
- rclone backend list-multipart-uploads remote: [options] [+]
+ rclone backend restore --include "*.txt" oos:bucket/path -o hours=72
- This command lists the unfinished multipart uploads in JSON format.
-
- rclone backend list-multipart-uploads oos:bucket/path/to/object
-
- It returns a dictionary of buckets with values as lists of unfinished
- multipart uploads.
-
- You can call it with no bucket in which case it lists all bucket, with
- a bucket or with a bucket and path.
+ It returns a list of status dictionaries with Object Name and Status
+ keys. The Status will be "RESTORED"" if it was successful or an error message
+ if not.
+ [
{
- "test-bucket": [
- {
- "namespace": "test-namespace",
- "bucket": "test-bucket",
- "object": "600m.bin",
- "uploadId": "51dd8114-52a4-b2f2-c42f-5291f05eb3c8",
- "timeCreated": "2022-07-29T06:21:16.595Z",
- "storageTier": "Standard"
- }
- ]
+ "Object": "test.txt"
+ "Status": "RESTORED",
+ },
+ {
+ "Object": "test/file4.txt"
+ "Status": "RESTORED",
+ }
+ ]
+Options:
- ### cleanup
+- "hours": The number of hours for which this object will be restored.
+ Default is 24 hrs.
- Remove unfinished multipart uploads.
+Tutorials
- rclone backend cleanup remote: [options] [+]
+Mounting Buckets
- This command removes unfinished multipart uploads of age greater than
- max-age which defaults to 24 hours.
+QingStor
- Note that you can use --interactive/-i or --dry-run with this command to see what
- it would do.
+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.
- rclone backend cleanup oos:bucket/path/to/object
- rclone backend cleanup -o max-age=7w oos:bucket/path/to/object
+Configuration
- Durations are parsed as per the rest of rclone, 2h, 7d, 7w etc.
+Here is an example of making an QingStor configuration. First run
+ rclone config
- Options:
-
- - "max-age": Max age of upload to delete
-
-
-
- ## Tutorials
- ### [Mounting Buckets](https://rclone.org/oracleobjectstorage/tutorial_mount/)
-
- # 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
-
- Here is an example of making an QingStor configuration. First run
-
- rclone config
-
- 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>
-remote Type of storage to configure. Choose a number from below, or type
-in your own value [snip] XX / QingStor Object Storage "qingstor" [snip]
-Storage> qingstor Get QingStor credentials from runtime. Only applies if
-access_key_id and secret_access_key is blank. Choose a number from
-below, or type in your own value 1 / Enter QingStor credentials in the
-next step "false" 2 / Get QingStor credentials from the environment
-(env vars or IAM) "true" env_auth> 1 QingStor Access Key ID - leave
-blank for anonymous access or runtime credentials. access_key_id>
-access_key QingStor Secret Access Key (password) - leave blank for
-anonymous access or runtime credentials. secret_access_key> secret_key
-Enter an endpoint URL to connection QingStor API. Leave blank will use
-the default value "https://qingstor.com:443" endpoint> Zone connect to.
-Default is "pek3a". Choose a number from below, or type in your own
-value / The Beijing (China) Three Zone 1 | Needs location constraint
-pek3a. "pek3a" / The Shanghai (China) First Zone 2 | Needs location
-constraint sh1a. "sh1a" zone> 1 Number of connection retry. Leave blank
-will use the default value "3". connection_retries> Remote config
--------------------- [remote] env_auth = false access_key_id =
-access_key secret_access_key = secret_key endpoint = zone = pek3a
-connection_retries = -------------------- 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:
-
- 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
-
- ### --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.
-
- ### 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.
-
- Note that incomplete multipart uploads older than 24 hours can be
- removed with `rclone cleanup remote:bucket` just for one bucket
- `rclone cleanup remote:` for all buckets. QingStor does not ever
- remove incomplete multipart uploads so it may be necessary to run this
- from time to time.
-
- ### Buckets and Zone
-
- With QingStor you can list buckets (`rclone lsd`) using any zone,
- but you can only access the content of a bucket from the zone it was
- created in. If you attempt to access a bucket from the wrong zone,
- you will get an error, `incorrect zone, the bucket is not in 'XXX'
- zone`.
-
- ### Authentication
-
- There are two ways to supply `rclone` with a set of QingStor
- credentials. In order of precedence:
-
- - Directly in the rclone configuration file (as configured by `rclone config`)
- - set `access_key_id` and `secret_access_key`
- - Runtime configuration:
- - set `env_auth` to `true` in the config file
- - Exporting the following environment variables before running `rclone`
- - Access Key ID: `QS_ACCESS_KEY_ID` or `QS_ACCESS_KEY`
- - Secret Access Key: `QS_SECRET_ACCESS_KEY` or `QS_SECRET_KEY`
-
- ### Restricted filename characters
-
- The control characters 0x00-0x1F and / are replaced as in the [default
- restricted characters set](https://rclone.org/overview/#restricted-characters). Note
- that 0x7F is not replaced.
-
- 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 qingstor (QingCloud Object Storage).
-
- #### --qingstor-env-auth
-
- Get QingStor credentials from runtime.
-
- Only applies if access_key_id and secret_access_key is blank.
-
- Properties:
-
- - Config: env_auth
- - Env Var: RCLONE_QINGSTOR_ENV_AUTH
- - Type: bool
- - Default: false
- - Examples:
- - "false"
- - Enter QingStor credentials in the next step.
- - "true"
- - Get QingStor credentials from the environment (env vars or IAM).
-
- #### --qingstor-access-key-id
-
- QingStor Access Key ID.
-
- Leave blank for anonymous access or runtime credentials.
-
- Properties:
-
- - Config: access_key_id
- - Env Var: RCLONE_QINGSTOR_ACCESS_KEY_ID
- - Type: string
- - Required: false
-
- #### --qingstor-secret-access-key
-
- QingStor Secret Access Key (password).
-
- Leave blank for anonymous access or runtime credentials.
-
- Properties:
-
- - Config: secret_access_key
- - Env Var: RCLONE_QINGSTOR_SECRET_ACCESS_KEY
- - Type: string
- - Required: false
-
- #### --qingstor-endpoint
+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> remote
+ Type of storage to configure.
+ Choose a number from below, or type in your own value
+ [snip]
+ XX / QingStor Object Storage
+ \ "qingstor"
+ [snip]
+ Storage> qingstor
+ Get QingStor credentials from runtime. Only applies if access_key_id and secret_access_key is blank.
+ Choose a number from below, or type in your own value
+ 1 / Enter QingStor credentials in the next step
+ \ "false"
+ 2 / Get QingStor credentials from the environment (env vars or IAM)
+ \ "true"
+ env_auth> 1
+ QingStor Access Key ID - leave blank for anonymous access or runtime credentials.
+ access_key_id> access_key
+ QingStor Secret Access Key (password) - leave blank for anonymous access or runtime credentials.
+ secret_access_key> secret_key
Enter an endpoint URL to connection QingStor API.
+ Leave blank will use the default value "https://qingstor.com:443"
+ endpoint>
+ Zone connect to. Default is "pek3a".
+ Choose a number from below, or type in your own value
+ / The Beijing (China) Three Zone
+ 1 | Needs location constraint pek3a.
+ \ "pek3a"
+ / The Shanghai (China) First Zone
+ 2 | Needs location constraint sh1a.
+ \ "sh1a"
+ zone> 1
+ Number of connection retry.
+ Leave blank will use the default value "3".
+ connection_retries>
+ Remote config
+ --------------------
+ [remote]
+ env_auth = false
+ access_key_id = access_key
+ secret_access_key = secret_key
+ endpoint =
+ zone = pek3a
+ connection_retries =
+ --------------------
+ y) Yes this is OK
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
- Leave blank will use the default value "https://qingstor.com:443".
+This remote is called remote and can now be used like this
- Properties:
+See all buckets
- - Config: endpoint
- - Env Var: RCLONE_QINGSTOR_ENDPOINT
- - Type: string
- - Required: false
+ rclone lsd remote:
- #### --qingstor-zone
+Make a new bucket
- Zone to connect to.
+ rclone mkdir remote:bucket
- Default is "pek3a".
+List the contents of a bucket
- Properties:
+ rclone ls remote:bucket
- - Config: zone
- - Env Var: RCLONE_QINGSTOR_ZONE
- - Type: string
- - Required: false
- - Examples:
- - "pek3a"
- - The Beijing (China) Three Zone.
- - Needs location constraint pek3a.
- - "sh1a"
- - The Shanghai (China) First Zone.
- - Needs location constraint sh1a.
- - "gd2a"
- - The Guangdong (China) Second Zone.
- - Needs location constraint gd2a.
+Sync /home/local/directory to the remote bucket, deleting any excess
+files in the bucket.
- ### Advanced options
+ rclone sync --interactive /home/local/directory remote:bucket
- Here are the Advanced options specific to qingstor (QingCloud Object Storage).
+--fast-list
- #### --qingstor-connection-retries
+This remote supports --fast-list which allows you to use fewer
+transactions in exchange for more memory. See the rclone docs for more
+details.
- Number of connection retries.
+Multipart uploads
- Properties:
+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.
- - Config: connection_retries
- - Env Var: RCLONE_QINGSTOR_CONNECTION_RETRIES
- - Type: int
- - Default: 3
+Note that incomplete multipart uploads older than 24 hours can be
+removed with rclone cleanup remote:bucket just for one bucket
+rclone cleanup remote: for all buckets. QingStor does not ever remove
+incomplete multipart uploads so it may be necessary to run this from
+time to time.
- #### --qingstor-upload-cutoff
+Buckets and Zone
- Cutoff for switching to chunked upload.
+With QingStor you can list buckets (rclone lsd) using any zone, but you
+can only access the content of a bucket from the zone it was created in.
+If you attempt to access a bucket from the wrong zone, you will get an
+error, incorrect zone, the bucket is not in 'XXX' zone.
- Any files larger than this will be uploaded in chunks of chunk_size.
- The minimum is 0 and the maximum is 5 GiB.
+Authentication
- Properties:
+There are two ways to supply rclone with a set of QingStor credentials.
+In order of precedence:
- - Config: upload_cutoff
- - Env Var: RCLONE_QINGSTOR_UPLOAD_CUTOFF
- - Type: SizeSuffix
- - Default: 200Mi
+- Directly in the rclone configuration file (as configured by
+ rclone config)
+ - set access_key_id and secret_access_key
+- Runtime configuration:
+ - set env_auth to true in the config file
+ - Exporting the following environment variables before running
+ rclone
+ - Access Key ID: QS_ACCESS_KEY_ID or QS_ACCESS_KEY
+ - Secret Access Key: QS_SECRET_ACCESS_KEY or QS_SECRET_KEY
- #### --qingstor-chunk-size
+Restricted filename characters
- Chunk size to use for uploading.
+The control characters 0x00-0x1F and / are replaced as in the default
+restricted characters set. Note that 0x7F is not replaced.
- When uploading files larger than upload_cutoff they will be uploaded
- as multipart uploads using this chunk size.
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON
+strings.
- Note that "--qingstor-upload-concurrency" chunks of this size are buffered
- in memory per transfer.
+Standard options
- If you are transferring large files over high-speed links and you have
- enough memory, then increasing this will speed up the transfers.
+Here are the Standard options specific to qingstor (QingCloud Object
+Storage).
- Properties:
+--qingstor-env-auth
- - Config: chunk_size
- - Env Var: RCLONE_QINGSTOR_CHUNK_SIZE
- - Type: SizeSuffix
- - Default: 4Mi
+Get QingStor credentials from runtime.
- #### --qingstor-upload-concurrency
+Only applies if access_key_id and secret_access_key is blank.
- Concurrency for multipart uploads.
+Properties:
- This is the number of chunks of the same file that are uploaded
- concurrently.
+- Config: env_auth
+- Env Var: RCLONE_QINGSTOR_ENV_AUTH
+- Type: bool
+- Default: false
+- Examples:
+ - "false"
+ - Enter QingStor credentials in the next step.
+ - "true"
+ - Get QingStor credentials from the environment (env vars or
+ IAM).
- NB if you set this to > 1 then the checksums of multipart uploads
- become corrupted (the uploads themselves are not corrupted though).
+--qingstor-access-key-id
- 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.
+QingStor Access Key ID.
- Properties:
+Leave blank for anonymous access or runtime credentials.
- - Config: upload_concurrency
- - Env Var: RCLONE_QINGSTOR_UPLOAD_CONCURRENCY
- - Type: int
- - Default: 1
+Properties:
- #### --qingstor-encoding
+- Config: access_key_id
+- Env Var: RCLONE_QINGSTOR_ACCESS_KEY_ID
+- Type: string
+- Required: false
- The encoding for the backend.
+--qingstor-secret-access-key
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+QingStor Secret Access Key (password).
- Properties:
+Leave blank for anonymous access or runtime credentials.
- - Config: encoding
- - Env Var: RCLONE_QINGSTOR_ENCODING
- - Type: Encoding
- - Default: Slash,Ctl,InvalidUtf8
+Properties:
+- Config: secret_access_key
+- Env Var: RCLONE_QINGSTOR_SECRET_ACCESS_KEY
+- Type: string
+- Required: false
+--qingstor-endpoint
- ## Limitations
+Enter an endpoint URL to connection QingStor API.
- `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.
+Leave blank will use the default value "https://qingstor.com:443".
- 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:
- # Quatrix
+- Config: endpoint
+- Env Var: RCLONE_QINGSTOR_ENDPOINT
+- Type: string
+- Required: false
- Quatrix by Maytech is [Quatrix Secure Compliant File Sharing | Maytech](https://www.maytech.net/products/quatrix-business).
+--qingstor-zone
- Paths are specified as `remote:path`
+Zone to connect to.
- Paths may be as deep as required, e.g., `remote:directory/subdirectory`.
+Default is "pek3a".
- 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:///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.
+Properties:
- See complete Swagger documentation for Quatrix - https://docs.maytech.net/quatrix/quatrix-api/api-explorer
+- Config: zone
+- Env Var: RCLONE_QINGSTOR_ZONE
+- Type: string
+- Required: false
+- Examples:
+ - "pek3a"
+ - The Beijing (China) Three Zone.
+ - Needs location constraint pek3a.
+ - "sh1a"
+ - The Shanghai (China) First Zone.
+ - Needs location constraint sh1a.
+ - "gd2a"
+ - The Guangdong (China) Second Zone.
+ - Needs location constraint gd2a.
- ## Configuration
+Advanced options
- Here is an example of how to make a remote called `remote`. First run:
+Here are the Advanced options specific to qingstor (QingCloud Object
+Storage).
- rclone config
+--qingstor-connection-retries
- This will guide you through an interactive setup process:
+Number of connection retries.
-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 / Quatrix by Maytech "quatrix" [snip] Storage> quatrix API key for
-accessing Quatrix account. api_key> your_api_key Host name of Quatrix
-account. host> example.quatrix.it
+Properties:
- --------------------
- [remote] api_key =
- your_api_key host =
- example.quatrix.it
- --------------------
- y) Yes this is OK e)
- Edit this remote d)
- Delete this remote
- y/e/d> y ```
+- Config: connection_retries
+- Env Var: RCLONE_QINGSTOR_CONNECTION_RETRIES
+- Type: int
+- Default: 3
- Once configured you
- can then use rclone
- like this,
+--qingstor-upload-cutoff
- List directories in
- top level of your
- Quatrix
+Cutoff for switching to chunked upload.
- rclone lsd remote:
+Any files larger than this will be uploaded in chunks of chunk_size. The
+minimum is 0 and the maximum is 5 GiB.
- List all the files
- in your Quatrix
+Properties:
- rclone ls remote:
+- Config: upload_cutoff
+- Env Var: RCLONE_QINGSTOR_UPLOAD_CUTOFF
+- Type: SizeSuffix
+- Default: 200Mi
- To copy a local
- directory to an
- Quatrix directory
- called backup
-
- rclone copy
- /home/source
- remote:backup
-
- ### API key validity
-
- API Key is created
- with no expiration
- date. It will be
- valid until you
- delete or deactivate
- it in your account.
- After disabling, the
- API Key can be
- enabled back. If the
- API Key was deleted
- and a new key was
- created, you can
- update it in rclone
- config. The same
- happens if the
- hostname was
- changed.
-
- ``` $ rclone config
- Current remotes:
-
- Name Type ==== ====
- remote quatrix
-
- 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 = quatrix host = some_host.quatrix.it api_key =
-your_api_key -------------------- Edit remote Option api_key. API key
-for accessing Quatrix account Enter a string value. Press Enter for the
-default (your_api_key) api_key> Option host. Host name of Quatrix
-account Enter a string value. Press Enter for the default
-(some_host.quatrix.it).
-
- --------------------------------------------------
- [remote] type = quatrix host =
- some_host.quatrix.it api_key = your_api_key
- --------------------------------------------------
- y) Yes this is OK e) Edit this remote d) Delete
- this remote y/e/d> y ```
-
- ### 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
-
- 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.
+--qingstor-chunk-size
- ### Transfers
+Chunk size to use for uploading.
- 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.
+When uploading files larger than upload_cutoff they will be uploaded as
+multipart uploads using this chunk size.
- ### Deleting files
+Note that "--qingstor-upload-concurrency" chunks of this size are
+buffered in memory per transfer.
- 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.
+If you are transferring large files over high-speed links and you have
+enough memory, then increasing this will speed up the transfers.
- ### Standard options
+Properties:
- Here are the Standard options specific to quatrix
- (Quatrix by Maytech).
+- Config: chunk_size
+- Env Var: RCLONE_QINGSTOR_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 4Mi
- #### --quatrix-api-key
+--qingstor-upload-concurrency
- API key for accessing Quatrix account
+Concurrency for multipart uploads.
- Properties:
+This is the number of chunks of the same file that are uploaded
+concurrently.
- - Config: api_key - Env Var:
- RCLONE_QUATRIX_API_KEY - Type: string - Required:
- true
+NB if you set this to > 1 then the checksums of multipart uploads become
+corrupted (the uploads themselves are not corrupted though).
- #### --quatrix-host
+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.
- Host name of Quatrix account
+Properties:
- Properties:
+- Config: upload_concurrency
+- Env Var: RCLONE_QINGSTOR_UPLOAD_CONCURRENCY
+- Type: int
+- Default: 1
- - Config: host - Env Var: RCLONE_QUATRIX_HOST -
- Type: string - Required: true
+--qingstor-encoding
- ### Advanced options
+The encoding for the backend.
- Here are the Advanced options specific to quatrix
- (Quatrix by Maytech).
+See the encoding section in the overview for more info.
- #### --quatrix-encoding
+Properties:
- The encoding for the backend.
+- Config: encoding
+- Env Var: RCLONE_QINGSTOR_ENCODING
+- Type: Encoding
+- Default: Slash,Ctl,InvalidUtf8
- See the encoding section in the overview for more
- info.
+--qingstor-description
- Properties:
+Description of the remote.
- - Config: encoding - Env Var:
- RCLONE_QUATRIX_ENCODING - Type: Encoding -
- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
+Properties:
- #### --quatrix-effective-upload-time
+- Config: description
+- Env Var: RCLONE_QINGSTOR_DESCRIPTION
+- Type: string
+- Required: false
- Wanted upload time for one chunk
+Limitations
- Properties:
+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.
- - Config: effective_upload_time - Env Var:
- RCLONE_QUATRIX_EFFECTIVE_UPLOAD_TIME - Type:
- string - Default: "4s"
+See List of backends that do not support rclone about and rclone about
- #### --quatrix-minimal-chunk-size
+Quatrix
- The minimal size for one chunk
+Quatrix by Maytech is Quatrix Secure Compliant File Sharing | Maytech.
- Properties:
+Paths are specified as remote:path
- - Config: minimal_chunk_size - Env Var:
- RCLONE_QUATRIX_MINIMAL_CHUNK_SIZE - Type:
- SizeSuffix - Default: 9.537Mi
-
- #### --quatrix-maximal-summary-chunk-size
-
- The maximal summary for all chunks. It should not
- be less than 'transfers'*'minimal_chunk_size'
+Paths may be as deep as required, e.g., remote:directory/subdirectory.
- Properties:
-
- - Config: maximal_summary_chunk_size - Env Var:
- RCLONE_QUATRIX_MAXIMAL_SUMMARY_CHUNK_SIZE - Type:
- SizeSuffix - Default: 95.367Mi
+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:///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.
- #### --quatrix-hard-delete
+See complete Swagger documentation for Quatrix -
+https://docs.maytech.net/quatrix/quatrix-api/api-explorer
- Delete files permanently rather than putting them
- into the trash.
+Configuration
- Properties:
+Here is an example of how to make a remote called remote. First run:
- - Config: hard_delete - Env Var:
- RCLONE_QUATRIX_HARD_DELETE - Type: bool - Default:
- false
+ rclone config
- ## Storage usage
+This will guide you through an interactive setup process:
- The storage usage in Quatrix is restricted to the
- account during the purchase. You can restrict any
- user with a smaller storage limit. The account
- limit is applied if the user has no custom storage
- limit. Once you've reached the limit, the upload
- of files will fail. This can be fixed by freeing
- up the space or increasing the quota.
+ 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 / Quatrix by Maytech
+ \ "quatrix"
+ [snip]
+ Storage> quatrix
+ API key for accessing Quatrix account.
+ api_key> your_api_key
+ Host name of Quatrix account.
+ host> example.quatrix.it
- ## Server-side operations
-
- Quatrix supports server-side operations (copy and
- move). In case of conflict, files are overwritten
- during server-side operation.
+ --------------------
+ [remote]
+ api_key = your_api_key
+ host = example.quatrix.it
+ --------------------
+ y) Yes this is OK
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
+
+Once configured you can then use rclone like this,
- # Sia
+List directories in top level of your Quatrix
+
+ rclone lsd remote:
+
+List all the files in your Quatrix
- Sia (sia.tech) is a decentralized cloud storage
- platform based on the blockchain technology. With
- rclone you can use it like any other remote
- filesystem or mount Sia folders locally. The
- technology behind it involves a number of new
- concepts such as Siacoins and Wallet, Blockchain
- and Consensus, Renting and Hosting, and so on. If
- you are new to it, you'd better first familiarize
- yourself using their excellent support
- documentation.
+ rclone ls remote:
- ## Introduction
+To copy a local directory to an Quatrix directory called backup
- Before you can use rclone with Sia, you will need
- to have a running copy of Sia-UI or siad (the Sia
- daemon) locally on your computer or on local
- network (e.g. a NAS). Please follow the Get
- started guide and install one.
+ rclone copy /home/source remote:backup
- rclone interacts with Sia network by talking to
- the Sia daemon via HTTP API which is usually
- available on port 9980. By default you will run
- the daemon locally on the same computer so it's
- safe to leave the API password blank (the API URL
- will be http://127.0.0.1:9980 making external
- access impossible).
+API key validity
- However, if you want to access Sia daemon running
- on another node, for example due to memory
- constraints or because you want to share single
- daemon between several rclone and Sia-UI
- instances, you'll need to make a few more
- provisions: - Ensure you have Sia daemon installed
- directly or in a docker container because Sia-UI
- does not support this mode natively. - Run it on
- externally accessible port, for example provide
- --api-addr :9980 and --disable-api-security
- arguments on the daemon command line. - Enforce
- API password for the siad daemon via environment
- variable SIA_API_PASSWORD or text file named
- apipassword in the daemon directory. - Set rclone
- backend option api_password taking it from above
- locations.
+API Key is created with no expiration date. It will be valid until you
+delete or deactivate it in your account. After disabling, the API Key
+can be enabled back. If the API Key was deleted and a new key was
+created, you can update it in rclone config. The same happens if the
+hostname was changed.
- Notes: 1. If your wallet is locked, rclone cannot
- unlock it automatically. You should either unlock
- it in advance by using Sia-UI or via command line
- siac wallet unlock. Alternatively you can make
- siad unlock your wallet automatically upon startup
- by running it with environment variable
- SIA_WALLET_PASSWORD. 2. If siad cannot find the
- SIA_API_PASSWORD variable or the apipassword file
- in the SIA_DIR directory, it will generate a
- random password and store in the text file named
- apipassword under YOUR_HOME/.sia/ directory on
- Unix or
- C:\Users\YOUR_HOME\AppData\Local\Sia\apipassword
- on Windows. Remember this when you configure
- password in rclone. 3. The only way to use siad
- without API password is to run it on localhost
- with command line argument --authorize-api=false,
- but this is insecure and strongly discouraged.
-
- ## Configuration
-
- Here is an example of how to make a sia remote
- called mySia. 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> mySia 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 ... 29 / Sia Decentralized
- Cloud "sia" ... Storage> sia Sia daemon API URL,
- like http://sia.daemon.host:9980. Note that siad
- must run with --disable-api-security to open API
- port for other hosts (not recommended). Keep
- default if Sia daemon runs on localhost. Enter a
- string value. Press Enter for the default
- ("http://127.0.0.1:9980"). api_url>
- http://127.0.0.1:9980 Sia Daemon API Password. Can
- be found in the apipassword file located in
- HOME/.sia/ or in the daemon directory. 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
- --------------------------------------------------
-
-[mySia] type = sia api_url = http://127.0.0.1:9980 api_password = ***
-ENCRYPTED *** -------------------- 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 Sia storage
-
-rclone lsd mySia:
-
-
- - List all the files in your Sia storage
-
-rclone ls mySia:
-
-
- - Upload a local directory to the Sia directory called _backup_
-
-rclone copy /home/source mySia:backup
-
-
-
- ### Standard options
-
- Here are the Standard options specific to sia (Sia Decentralized Cloud).
-
- #### --sia-api-url
+ $ rclone config
+ Current remotes:
+ Name Type
+ ==== ====
+ remote quatrix
+
+ 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 = quatrix
+ host = some_host.quatrix.it
+ api_key = your_api_key
+ --------------------
+ Edit remote
+ Option api_key.
+ API key for accessing Quatrix account
+ Enter a string value. Press Enter for the default (your_api_key)
+ api_key>
+ Option host.
+ Host name of Quatrix account
+ Enter a string value. Press Enter for the default (some_host.quatrix.it).
+
+ --------------------
+ [remote]
+ type = quatrix
+ host = some_host.quatrix.it
+ api_key = your_api_key
+ --------------------
+ y) Yes this is OK
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
+
+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
+
+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
+
+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
+
+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
+
+Here are the Standard options specific to quatrix (Quatrix by Maytech).
+
+--quatrix-api-key
+
+API key for accessing Quatrix account
+
+Properties:
+
+- Config: api_key
+- Env Var: RCLONE_QUATRIX_API_KEY
+- Type: string
+- Required: true
+
+--quatrix-host
+
+Host name of Quatrix account
+
+Properties:
+
+- Config: host
+- Env Var: RCLONE_QUATRIX_HOST
+- Type: string
+- Required: true
+
+Advanced options
+
+Here are the Advanced options specific to quatrix (Quatrix by Maytech).
+
+--quatrix-encoding
+
+The encoding for the backend.
+
+See the encoding section in the overview for more info.
+
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_QUATRIX_ENCODING
+- Type: Encoding
+- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
+
+--quatrix-effective-upload-time
+
+Wanted upload time for one chunk
+
+Properties:
+
+- Config: effective_upload_time
+- Env Var: RCLONE_QUATRIX_EFFECTIVE_UPLOAD_TIME
+- Type: string
+- Default: "4s"
+
+--quatrix-minimal-chunk-size
+
+The minimal size for one chunk
+
+Properties:
+
+- Config: minimal_chunk_size
+- Env Var: RCLONE_QUATRIX_MINIMAL_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 9.537Mi
+
+--quatrix-maximal-summary-chunk-size
+
+The maximal summary for all chunks. It should not be less than
+'transfers'*'minimal_chunk_size'
+
+Properties:
+
+- Config: maximal_summary_chunk_size
+- Env Var: RCLONE_QUATRIX_MAXIMAL_SUMMARY_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 95.367Mi
+
+--quatrix-hard-delete
+
+Delete files permanently rather than putting them into the trash
+
+Properties:
+
+- Config: hard_delete
+- Env Var: RCLONE_QUATRIX_HARD_DELETE
+- Type: bool
+- Default: false
+
+--quatrix-skip-project-folders
+
+Skip project folders in operations
+
+Properties:
+
+- Config: skip_project_folders
+- Env Var: RCLONE_QUATRIX_SKIP_PROJECT_FOLDERS
+- Type: bool
+- Default: false
+
+--quatrix-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_QUATRIX_DESCRIPTION
+- Type: string
+- Required: false
+
+Storage usage
+
+The storage usage in Quatrix is restricted to the account during the
+purchase. You can restrict any user with a smaller storage limit. The
+account limit is applied if the user has no custom storage limit. Once
+you've reached the limit, the upload of files will fail. This can be
+fixed by freeing up the space or increasing the quota.
+
+Server-side operations
+
+Quatrix supports server-side operations (copy and move). In case of
+conflict, files are overwritten during server-side operation.
+
+Sia
+
+Sia (sia.tech) is a decentralized cloud storage platform based on the
+blockchain technology. With rclone you can use it like any other remote
+filesystem or mount Sia folders locally. The technology behind it
+involves a number of new concepts such as Siacoins and Wallet,
+Blockchain and Consensus, Renting and Hosting, and so on. If you are new
+to it, you'd better first familiarize yourself using their excellent
+support documentation.
+
+Introduction
+
+Before you can use rclone with Sia, you will need to have a running copy
+of Sia-UI or siad (the Sia daemon) locally on your computer or on local
+network (e.g. a NAS). Please follow the Get started guide and install
+one.
+
+rclone interacts with Sia network by talking to the Sia daemon via HTTP
+API which is usually available on port 9980. By default you will run the
+daemon locally on the same computer so it's safe to leave the API
+password blank (the API URL will be http://127.0.0.1:9980 making
+external access impossible).
+
+However, if you want to access Sia daemon running on another node, for
+example due to memory constraints or because you want to share single
+daemon between several rclone and Sia-UI instances, you'll need to make
+a few more provisions: - Ensure you have Sia daemon installed directly
+or in a docker container because Sia-UI does not support this mode
+natively. - Run it on externally accessible port, for example provide
+--api-addr :9980 and --disable-api-security arguments on the daemon
+command line. - Enforce API password for the siad daemon via environment
+variable SIA_API_PASSWORD or text file named apipassword in the daemon
+directory. - Set rclone backend option api_password taking it from above
+locations.
+
+Notes: 1. If your wallet is locked, rclone cannot unlock it
+automatically. You should either unlock it in advance by using Sia-UI or
+via command line siac wallet unlock. Alternatively you can make siad
+unlock your wallet automatically upon startup by running it with
+environment variable SIA_WALLET_PASSWORD. 2. If siad cannot find the
+SIA_API_PASSWORD variable or the apipassword file in the SIA_DIR
+directory, it will generate a random password and store in the text file
+named apipassword under YOUR_HOME/.sia/ directory on Unix or
+C:\Users\YOUR_HOME\AppData\Local\Sia\apipassword on Windows. Remember
+this when you configure password in rclone. 3. The only way to use siad
+without API password is to run it on localhost with command line
+argument --authorize-api=false, but this is insecure and strongly
+discouraged.
+
+Configuration
+
+Here is an example of how to make a sia remote called mySia. 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> mySia
+ 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
+ ...
+ 29 / Sia Decentralized Cloud
+ \ "sia"
+ ...
+ Storage> sia
Sia daemon API URL, like http://sia.daemon.host:9980.
-
Note that siad must run with --disable-api-security to open API port for other hosts (not recommended).
Keep default if Sia daemon runs on localhost.
-
- Properties:
-
- - Config: api_url
- - Env Var: RCLONE_SIA_API_URL
- - Type: string
- - Default: "http://127.0.0.1:9980"
-
- #### --sia-api-password
-
+ Enter a string value. Press Enter for the default ("http://127.0.0.1:9980").
+ api_url> http://127.0.0.1:9980
Sia Daemon API Password.
-
Can be found in the apipassword file located in HOME/.sia/ or in the daemon directory.
+ 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
+ --------------------
+ [mySia]
+ type = sia
+ api_url = http://127.0.0.1:9980
+ api_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/).
+Once configured, you can then use rclone like this:
- Properties:
+- List directories in top level of your Sia storage
- - Config: api_password
- - Env Var: RCLONE_SIA_API_PASSWORD
- - Type: string
- - Required: false
+ rclone lsd mySia:
- ### Advanced options
+- List all the files in your Sia storage
- Here are the Advanced options specific to sia (Sia Decentralized Cloud).
+ rclone ls mySia:
- #### --sia-user-agent
+- Upload a local directory to the Sia directory called backup
- Siad User Agent
+ rclone copy /home/source mySia:backup
- Sia daemon requires the 'Sia-Agent' user agent by default for security
+Standard options
- Properties:
+Here are the Standard options specific to sia (Sia Decentralized Cloud).
- - Config: user_agent
- - Env Var: RCLONE_SIA_USER_AGENT
- - Type: string
- - Default: "Sia-Agent"
+--sia-api-url
- #### --sia-encoding
+Sia daemon API URL, like http://sia.daemon.host:9980.
- The encoding for the backend.
+Note that siad must run with --disable-api-security to open API port for
+other hosts (not recommended). Keep default if Sia daemon runs on
+localhost.
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+Properties:
- Properties:
+- Config: api_url
+- Env Var: RCLONE_SIA_API_URL
+- Type: string
+- Default: "http://127.0.0.1:9980"
- - Config: encoding
- - Env Var: RCLONE_SIA_ENCODING
- - Type: Encoding
- - Default: Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot
+--sia-api-password
+Sia Daemon API Password.
+Can be found in the apipassword file located in HOME/.sia/ or in the
+daemon directory.
- ## Limitations
+NB Input to this must be obscured - see rclone obscure.
- - Modification times not supported
- - Checksums not supported
- - `rclone about` not supported
- - rclone can work only with _Siad_ or _Sia-UI_ at the moment,
- the **SkyNet daemon is not supported yet.**
- - Sia does not allow control characters or symbols like question and pound
- signs in file names. rclone will transparently [encode](https://rclone.org/overview/#encoding)
- them for you, but you'd better be aware
+Properties:
- # Swift
+- Config: api_password
+- Env Var: RCLONE_SIA_API_PASSWORD
+- Type: string
+- Required: false
- Swift refers to [OpenStack Object Storage](https://docs.openstack.org/swift/latest/).
- Commercial implementations of that being:
+Advanced options
- * [Rackspace Cloud Files](https://www.rackspace.com/cloud/files/)
- * [Memset Memstore](https://www.memset.com/cloud/storage/)
- * [OVH Object Storage](https://www.ovh.co.uk/public-cloud/storage/object-storage/)
- * [Oracle Cloud Storage](https://docs.oracle.com/en-us/iaas/integration/doc/configure-object-storage.html)
- * [Blomp Cloud Storage](https://www.blomp.com/cloud-storage/)
- * [IBM Bluemix Cloud ObjectStorage Swift](https://console.bluemix.net/docs/infrastructure/objectstorage-swift/index.html)
+Here are the Advanced options specific to sia (Sia Decentralized Cloud).
- 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`.
+--sia-user-agent
- ## Configuration
+Siad User Agent
- Here is an example of making a swift configuration. First run
+Sia daemon requires the 'Sia-Agent' user agent by default for security
- rclone config
+Properties:
- This will guide you through an interactive setup process.
+- Config: user_agent
+- Env Var: RCLONE_SIA_USER_AGENT
+- Type: string
+- Default: "Sia-Agent"
-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 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset
-Memstore, OVH) "swift" [snip] Storage> swift Get swift credentials from
-environment variables in standard OpenStack form. Choose a number from
-below, or type in your own value 1 / Enter swift credentials in the next
-step "false" 2 / Get swift credentials from environment vars. Leave
-other fields blank if using this. "true" env_auth> true User name to
-log in (OS_USERNAME). user> API key or password (OS_PASSWORD). key>
-Authentication URL for server (OS_AUTH_URL). Choose a number from below,
-or type in your own value 1 / Rackspace US
- "https://auth.api.rackspacecloud.com/v1.0" 2 / Rackspace UK
- "https://lon.auth.api.rackspacecloud.com/v1.0" 3 / Rackspace v2
- "https://identity.api.rackspacecloud.com/v2.0" 4 / Memset Memstore UK
- "https://auth.storage.memset.com/v1.0" 5 / Memset Memstore UK v2
- "https://auth.storage.memset.com/v2.0" 6 / OVH
- "https://auth.cloud.ovh.net/v3" 7 / Blomp Cloud Storage
- "https://authenticate.ain.net" auth> User ID to log in - optional -
-most swift systems use user and leave this blank (v3 auth) (OS_USER_ID).
-user_id> User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME) domain>
-Tenant name - optional for v1 auth, this or tenant_id required otherwise
-(OS_TENANT_NAME or OS_PROJECT_NAME) tenant> Tenant ID - optional for v1
-auth, this or tenant required otherwise (OS_TENANT_ID) tenant_id> Tenant
-domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME) tenant_domain>
-Region name - optional (OS_REGION_NAME) region> Storage URL - optional
-(OS_STORAGE_URL) storage_url> Auth Token from alternate authentication -
-optional (OS_AUTH_TOKEN) auth_token> AuthVersion - optional - set to
-(1,2,3) if your auth URL has no version (ST_AUTH_VERSION) auth_version>
-Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE)
-Choose a number from below, or type in your own value 1 / Public
-(default, choose this if not sure) "public" 2 / Internal (use internal
-service net) "internal" 3 / Admin "admin" endpoint_type> Remote config
--------------------- [test] env_auth = true user = key = auth = user_id
-= domain = tenant = tenant_id = tenant_domain = region = storage_url =
-auth_token = auth_version = endpoint_type = -------------------- y) Yes
-this is OK e) Edit this remote d) Delete this remote y/e/d> y
+--sia-encoding
+The encoding for the backend.
- This remote is called `remote` and can now be used like this
+See the encoding section in the overview for more info.
- See all containers
+Properties:
- rclone lsd remote:
+- Config: encoding
+- Env Var: RCLONE_SIA_ENCODING
+- Type: Encoding
+- Default: Slash,Question,Hash,Percent,Del,Ctl,InvalidUtf8,Dot
- Make a new container
+--sia-description
- rclone mkdir remote:container
+Description of the remote.
- List the contents of a container
+Properties:
- rclone ls remote:container
+- Config: description
+- Env Var: RCLONE_SIA_DESCRIPTION
+- Type: string
+- Required: false
- Sync `/home/local/directory` to the remote container, deleting any
- excess files in the container.
+Limitations
- rclone sync --interactive /home/local/directory remote:container
+- Modification times not supported
+- Checksums not supported
+- rclone about not supported
+- rclone can work only with Siad or Sia-UI at the moment, the SkyNet
+ daemon is not supported yet.
+- Sia does not allow control characters or symbols like question and
+ pound signs in file names. rclone will transparently encode them for
+ you, but you'd better be aware
- ### Configuration from an OpenStack credentials file
+Swift
- An OpenStack credentials file typically looks something something
- like this (without the comments)
+Swift refers to OpenStack Object Storage. Commercial implementations of
+that being:
-export OS_AUTH_URL=https://a.provider.net/v2.0 export
-OS_TENANT_ID=ffffffffffffffffffffffffffffffff export
-OS_TENANT_NAME="1234567890123456" export OS_USERNAME="123abc567xy" echo
-"Please enter your OpenStack Password: " read -sr OS_PASSWORD_INPUT
-export
-OS_PASSWORD=$OS_PASSWORD_INPUT export OS_REGION_NAME="SBG1" if [ -z "$OS_REGION_NAME"
-]; then unset OS_REGION_NAME; fi
+- Rackspace Cloud Files
+- Memset Memstore
+- OVH Object Storage
+- Oracle Cloud Storage
+- Blomp Cloud Storage
+- IBM Bluemix Cloud ObjectStorage Swift
+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.
- The config file needs to look something like this where `$OS_USERNAME`
- represents the value of the `OS_USERNAME` variable - `123abc567xy` in
- the example above.
+Configuration
-[remote] type = swift user = $OS_USERNAME key = $OS_PASSWORD auth =
-$OS_AUTH_URL tenant = $OS_TENANT_NAME
+Here is an example of making a swift configuration. First run
+ rclone config
- Note that you may (or may not) need to set `region` too - try without first.
-
- ### Configuration from the environment
-
- If you prefer you can configure rclone to use swift using a standard
- set of OpenStack environment variables.
-
- When you run through the config, make sure you choose `true` for
- `env_auth` and leave everything else blank.
-
- rclone will then set any empty config parameters from the environment
- using standard OpenStack environment variables. There is [a list of
- the
- variables](https://godoc.org/github.com/ncw/swift#Connection.ApplyEnvironment)
- in the docs for the swift library.
-
- ### Using an alternate authentication method
-
- If your OpenStack installation uses a non-standard authentication method
- that might not be yet supported by rclone or the underlying swift library,
- you can authenticate externally (e.g. calling manually the `openstack`
- commands to get a token). Then, you just need to pass the two
- configuration variables ``auth_token`` and ``storage_url``.
- If they are both provided, the other variables are ignored. rclone will
- not try to authenticate but instead assume it is already authenticated
- and use these two variables to access the OpenStack installation.
-
- #### Using rclone without a config file
-
- You can use rclone with swift without a config file, if desired, like
- this:
-
-source openstack-credentials-file export
-RCLONE_CONFIG_MYREMOTE_TYPE=swift export
-RCLONE_CONFIG_MYREMOTE_ENV_AUTH=true rclone lsd myremote:
-
-
- ### --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.
-
- ### --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
-
- 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
-
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | NUL | 0x00 | ␀ |
- | / | 0x2F | / |
-
- 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 swift (OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)).
-
- #### --swift-env-auth
+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 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)
+ \ "swift"
+ [snip]
+ Storage> swift
Get swift credentials from environment variables in standard OpenStack form.
-
- Properties:
-
- - Config: env_auth
- - Env Var: RCLONE_SWIFT_ENV_AUTH
- - Type: bool
- - Default: false
- - Examples:
- - "false"
- - Enter swift credentials in the next step.
- - "true"
- - Get swift credentials from environment vars.
- - Leave other fields blank if using this.
-
- #### --swift-user
-
+ Choose a number from below, or type in your own value
+ 1 / Enter swift credentials in the next step
+ \ "false"
+ 2 / Get swift credentials from environment vars. Leave other fields blank if using this.
+ \ "true"
+ env_auth> true
User name to log in (OS_USERNAME).
-
- Properties:
-
- - Config: user
- - Env Var: RCLONE_SWIFT_USER
- - Type: string
- - Required: false
-
- #### --swift-key
-
+ user>
API key or password (OS_PASSWORD).
-
- Properties:
-
- - Config: key
- - Env Var: RCLONE_SWIFT_KEY
- - Type: string
- - Required: false
-
- #### --swift-auth
-
+ key>
Authentication URL for server (OS_AUTH_URL).
-
- Properties:
-
- - Config: auth
- - Env Var: RCLONE_SWIFT_AUTH
- - Type: string
- - Required: false
- - Examples:
- - "https://auth.api.rackspacecloud.com/v1.0"
- - Rackspace US
- - "https://lon.auth.api.rackspacecloud.com/v1.0"
- - Rackspace UK
- - "https://identity.api.rackspacecloud.com/v2.0"
- - Rackspace v2
- - "https://auth.storage.memset.com/v1.0"
- - Memset Memstore UK
- - "https://auth.storage.memset.com/v2.0"
- - Memset Memstore UK v2
- - "https://auth.cloud.ovh.net/v3"
- - OVH
- - "https://authenticate.ain.net"
- - Blomp Cloud Storage
-
- #### --swift-user-id
-
+ Choose a number from below, or type in your own value
+ 1 / Rackspace US
+ \ "https://auth.api.rackspacecloud.com/v1.0"
+ 2 / Rackspace UK
+ \ "https://lon.auth.api.rackspacecloud.com/v1.0"
+ 3 / Rackspace v2
+ \ "https://identity.api.rackspacecloud.com/v2.0"
+ 4 / Memset Memstore UK
+ \ "https://auth.storage.memset.com/v1.0"
+ 5 / Memset Memstore UK v2
+ \ "https://auth.storage.memset.com/v2.0"
+ 6 / OVH
+ \ "https://auth.cloud.ovh.net/v3"
+ 7 / Blomp Cloud Storage
+ \ "https://authenticate.ain.net"
+ auth>
User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID).
-
- Properties:
-
- - Config: user_id
- - Env Var: RCLONE_SWIFT_USER_ID
- - Type: string
- - Required: false
-
- #### --swift-domain
-
+ user_id>
User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME)
+ domain>
+ Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME)
+ tenant>
+ Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID)
+ tenant_id>
+ Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME)
+ tenant_domain>
+ Region name - optional (OS_REGION_NAME)
+ region>
+ Storage URL - optional (OS_STORAGE_URL)
+ storage_url>
+ Auth Token from alternate authentication - optional (OS_AUTH_TOKEN)
+ auth_token>
+ AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION)
+ auth_version>
+ Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE)
+ Choose a number from below, or type in your own value
+ 1 / Public (default, choose this if not sure)
+ \ "public"
+ 2 / Internal (use internal service net)
+ \ "internal"
+ 3 / Admin
+ \ "admin"
+ endpoint_type>
+ Remote config
+ --------------------
+ [test]
+ env_auth = true
+ user =
+ key =
+ auth =
+ user_id =
+ domain =
+ tenant =
+ tenant_id =
+ tenant_domain =
+ region =
+ storage_url =
+ auth_token =
+ auth_version =
+ endpoint_type =
+ --------------------
+ 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 containers
+
+ rclone lsd remote:
+
+Make a new container
+
+ rclone mkdir remote:container
+
+List the contents of a container
+
+ rclone ls remote:container
+
+Sync /home/local/directory to the remote container, deleting any excess
+files in the container.
+
+ rclone sync --interactive /home/local/directory remote:container
+
+Configuration from an OpenStack credentials file
+
+An OpenStack credentials file typically looks something something like
+this (without the comments)
+
+ export OS_AUTH_URL=https://a.provider.net/v2.0
+ export OS_TENANT_ID=ffffffffffffffffffffffffffffffff
+ export OS_TENANT_NAME="1234567890123456"
+ export OS_USERNAME="123abc567xy"
+ echo "Please enter your OpenStack Password: "
+ read -sr OS_PASSWORD_INPUT
+ export OS_PASSWORD=$OS_PASSWORD_INPUT
+ export OS_REGION_NAME="SBG1"
+ if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
+
+The config file needs to look something like this where $OS_USERNAME
+represents the value of the OS_USERNAME variable - 123abc567xy in the
+example above.
+
+ [remote]
+ type = swift
+ user = $OS_USERNAME
+ key = $OS_PASSWORD
+ auth = $OS_AUTH_URL
+ tenant = $OS_TENANT_NAME
+
+Note that you may (or may not) need to set region too - try without
+first.
+
+Configuration from the environment
+
+If you prefer you can configure rclone to use swift using a standard set
+of OpenStack environment variables.
+
+When you run through the config, make sure you choose true for env_auth
+and leave everything else blank.
+
+rclone will then set any empty config parameters from the environment
+using standard OpenStack environment variables. There is a list of the
+variables in the docs for the swift library.
+
+Using an alternate authentication method
- Properties:
+If your OpenStack installation uses a non-standard authentication method
+that might not be yet supported by rclone or the underlying swift
+library, you can authenticate externally (e.g. calling manually the
+openstack commands to get a token). Then, you just need to pass the two
+configuration variables auth_token and storage_url. If they are both
+provided, the other variables are ignored. rclone will not try to
+authenticate but instead assume it is already authenticated and use
+these two variables to access the OpenStack installation.
- - Config: domain
- - Env Var: RCLONE_SWIFT_DOMAIN
- - Type: string
- - Required: false
+Using rclone without a config file
- #### --swift-tenant
+You can use rclone with swift without a config file, if desired, like
+this:
- Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME).
+ source openstack-credentials-file
+ export RCLONE_CONFIG_MYREMOTE_TYPE=swift
+ export RCLONE_CONFIG_MYREMOTE_ENV_AUTH=true
+ rclone lsd myremote:
- Properties:
+--fast-list
- - Config: tenant
- - Env Var: RCLONE_SWIFT_TENANT
- - Type: string
- - Required: false
+This remote supports --fast-list which allows you to use fewer
+transactions in exchange for more memory. See the rclone docs for more
+details.
- #### --swift-tenant-id
+--update and --use-server-modtime
- Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID).
+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.
- Properties:
+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.
- - Config: tenant_id
- - Env Var: RCLONE_SWIFT_TENANT_ID
- - Type: string
- - Required: false
+Modification times and hashes
- #### --swift-tenant-domain
+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.
- Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME).
+This is a de facto standard (used in the official python-swiftclient
+amongst others) for storing the modification time for an object.
- Properties:
+The MD5 hash algorithm is supported.
- - Config: tenant_domain
- - Env Var: RCLONE_SWIFT_TENANT_DOMAIN
- - Type: string
- - Required: false
+Restricted filename characters
- #### --swift-region
+ Character Value Replacement
+ ----------- ------- -------------
+ NUL 0x00 ␀
+ / 0x2F /
- Region name - optional (OS_REGION_NAME).
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON
+strings.
- Properties:
+Standard options
- - Config: region
- - Env Var: RCLONE_SWIFT_REGION
- - Type: string
- - Required: false
+Here are the Standard options specific to swift (OpenStack Swift
+(Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)).
- #### --swift-storage-url
+--swift-env-auth
- Storage URL - optional (OS_STORAGE_URL).
+Get swift credentials from environment variables in standard OpenStack
+form.
- Properties:
+Properties:
- - Config: storage_url
- - Env Var: RCLONE_SWIFT_STORAGE_URL
- - Type: string
- - Required: false
+- Config: env_auth
+- Env Var: RCLONE_SWIFT_ENV_AUTH
+- Type: bool
+- Default: false
+- Examples:
+ - "false"
+ - Enter swift credentials in the next step.
+ - "true"
+ - Get swift credentials from environment vars.
+ - Leave other fields blank if using this.
- #### --swift-auth-token
+--swift-user
- Auth Token from alternate authentication - optional (OS_AUTH_TOKEN).
+User name to log in (OS_USERNAME).
- Properties:
+Properties:
- - Config: auth_token
- - Env Var: RCLONE_SWIFT_AUTH_TOKEN
- - Type: string
- - Required: false
+- Config: user
+- Env Var: RCLONE_SWIFT_USER
+- Type: string
+- Required: false
- #### --swift-application-credential-id
+--swift-key
- Application Credential ID (OS_APPLICATION_CREDENTIAL_ID).
+API key or password (OS_PASSWORD).
- Properties:
+Properties:
- - Config: application_credential_id
- - Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_ID
- - Type: string
- - Required: false
+- Config: key
+- Env Var: RCLONE_SWIFT_KEY
+- Type: string
+- Required: false
- #### --swift-application-credential-name
+--swift-auth
- Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME).
+Authentication URL for server (OS_AUTH_URL).
- Properties:
+Properties:
- - Config: application_credential_name
- - Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_NAME
- - Type: string
- - Required: false
+- Config: auth
+- Env Var: RCLONE_SWIFT_AUTH
+- Type: string
+- Required: false
+- Examples:
+ - "https://auth.api.rackspacecloud.com/v1.0"
+ - Rackspace US
+ - "https://lon.auth.api.rackspacecloud.com/v1.0"
+ - Rackspace UK
+ - "https://identity.api.rackspacecloud.com/v2.0"
+ - Rackspace v2
+ - "https://auth.storage.memset.com/v1.0"
+ - Memset Memstore UK
+ - "https://auth.storage.memset.com/v2.0"
+ - Memset Memstore UK v2
+ - "https://auth.cloud.ovh.net/v3"
+ - OVH
+ - "https://authenticate.ain.net"
+ - Blomp Cloud Storage
- #### --swift-application-credential-secret
+--swift-user-id
- Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET).
+User ID to log in - optional - most swift systems use user and leave
+this blank (v3 auth) (OS_USER_ID).
- Properties:
+Properties:
- - Config: application_credential_secret
- - Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_SECRET
- - Type: string
- - Required: false
+- Config: user_id
+- Env Var: RCLONE_SWIFT_USER_ID
+- Type: string
+- Required: false
- #### --swift-auth-version
+--swift-domain
- AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION).
+User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME)
- Properties:
+Properties:
- - Config: auth_version
- - Env Var: RCLONE_SWIFT_AUTH_VERSION
- - Type: int
- - Default: 0
+- Config: domain
+- Env Var: RCLONE_SWIFT_DOMAIN
+- Type: string
+- Required: false
- #### --swift-endpoint-type
+--swift-tenant
- Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE).
+Tenant name - optional for v1 auth, this or tenant_id required otherwise
+(OS_TENANT_NAME or OS_PROJECT_NAME).
- Properties:
+Properties:
- - Config: endpoint_type
- - Env Var: RCLONE_SWIFT_ENDPOINT_TYPE
- - Type: string
- - Default: "public"
- - Examples:
- - "public"
- - Public (default, choose this if not sure)
- - "internal"
- - Internal (use internal service net)
- - "admin"
- - Admin
+- Config: tenant
+- Env Var: RCLONE_SWIFT_TENANT
+- Type: string
+- Required: false
- #### --swift-storage-policy
+--swift-tenant-id
- The storage policy to use when creating a new container.
+Tenant ID - optional for v1 auth, this or tenant required otherwise
+(OS_TENANT_ID).
- This applies the specified storage policy when creating a new
- container. The policy cannot be changed afterwards. The allowed
- configuration values and their meaning depend on your Swift storage
- provider.
+Properties:
- Properties:
+- Config: tenant_id
+- Env Var: RCLONE_SWIFT_TENANT_ID
+- Type: string
+- Required: false
- - Config: storage_policy
- - Env Var: RCLONE_SWIFT_STORAGE_POLICY
- - Type: string
- - Required: false
- - Examples:
- - ""
- - Default
- - "pcs"
- - OVH Public Cloud Storage
- - "pca"
- - OVH Public Cloud Archive
+--swift-tenant-domain
- ### Advanced options
+Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME).
- Here are the Advanced options specific to swift (OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)).
+Properties:
- #### --swift-leave-parts-on-error
+- Config: tenant_domain
+- Env Var: RCLONE_SWIFT_TENANT_DOMAIN
+- Type: string
+- Required: false
- If true avoid calling abort upload on a failure.
+--swift-region
- It should be set to true for resuming uploads across different sessions.
+Region name - optional (OS_REGION_NAME).
- Properties:
+Properties:
- - Config: leave_parts_on_error
- - Env Var: RCLONE_SWIFT_LEAVE_PARTS_ON_ERROR
- - Type: bool
- - Default: false
+- Config: region
+- Env Var: RCLONE_SWIFT_REGION
+- Type: string
+- Required: false
- #### --swift-chunk-size
+--swift-storage-url
- Above this size files will be chunked into a _segments container.
+Storage URL - optional (OS_STORAGE_URL).
- Above this size files will be chunked into a _segments container. The
- default for this is 5 GiB which is its maximum value.
+Properties:
- Properties:
+- Config: storage_url
+- Env Var: RCLONE_SWIFT_STORAGE_URL
+- Type: string
+- Required: false
- - Config: chunk_size
- - Env Var: RCLONE_SWIFT_CHUNK_SIZE
- - Type: SizeSuffix
- - Default: 5Gi
+--swift-auth-token
- #### --swift-no-chunk
+Auth Token from alternate authentication - optional (OS_AUTH_TOKEN).
- Don't chunk files during streaming upload.
+Properties:
- When doing streaming uploads (e.g. using rcat or mount) setting this
- flag will cause the swift backend to not upload chunked files.
+- Config: auth_token
+- Env Var: RCLONE_SWIFT_AUTH_TOKEN
+- Type: string
+- Required: false
- This will limit the maximum upload size to 5 GiB. However non chunked
- files are easier to deal with and have an MD5SUM.
+--swift-application-credential-id
- Rclone will still chunk files bigger than chunk_size when doing normal
- copy operations.
+Application Credential ID (OS_APPLICATION_CREDENTIAL_ID).
- Properties:
+Properties:
- - Config: no_chunk
- - Env Var: RCLONE_SWIFT_NO_CHUNK
- - Type: bool
- - Default: false
+- Config: application_credential_id
+- Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_ID
+- Type: string
+- Required: false
- #### --swift-no-large-objects
+--swift-application-credential-name
- Disable support for static and dynamic large objects
+Application Credential Name (OS_APPLICATION_CREDENTIAL_NAME).
- 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.
+Properties:
- 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.
+- Config: application_credential_name
+- Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_NAME
+- Type: string
+- Required: false
- 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.
+--swift-application-credential-secret
- 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.
+Application Credential Secret (OS_APPLICATION_CREDENTIAL_SECRET).
+Properties:
- Properties:
+- Config: application_credential_secret
+- Env Var: RCLONE_SWIFT_APPLICATION_CREDENTIAL_SECRET
+- Type: string
+- Required: false
- - Config: no_large_objects
- - Env Var: RCLONE_SWIFT_NO_LARGE_OBJECTS
- - Type: bool
- - Default: false
+--swift-auth-version
- #### --swift-encoding
+AuthVersion - optional - set to (1,2,3) if your auth URL has no version
+(ST_AUTH_VERSION).
- The encoding for the backend.
+Properties:
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+- Config: auth_version
+- Env Var: RCLONE_SWIFT_AUTH_VERSION
+- Type: int
+- Default: 0
- Properties:
+--swift-endpoint-type
- - Config: encoding
- - Env Var: RCLONE_SWIFT_ENCODING
- - Type: Encoding
- - Default: Slash,InvalidUtf8
+Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE).
+Properties:
+- Config: endpoint_type
+- Env Var: RCLONE_SWIFT_ENDPOINT_TYPE
+- Type: string
+- Default: "public"
+- Examples:
+ - "public"
+ - Public (default, choose this if not sure)
+ - "internal"
+ - Internal (use internal service net)
+ - "admin"
+ - Admin
- ## Limitations
+--swift-storage-policy
- 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.
+The storage policy to use when creating a new container.
- ## Troubleshooting
+This applies the specified storage policy when creating a new container.
+The policy cannot be changed afterwards. The allowed configuration
+values and their meaning depend on your Swift storage provider.
- ### Rclone gives Failed to create file system for "remote:": Bad Request
+Properties:
- 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.
+- Config: storage_policy
+- Env Var: RCLONE_SWIFT_STORAGE_POLICY
+- Type: string
+- Required: false
+- Examples:
+ - ""
+ - Default
+ - "pcs"
+ - OVH Public Cloud Storage
+ - "pca"
+ - OVH Public Cloud Archive
- So this most likely means your username / password is wrong. You can
- investigate further with the `--dump-bodies` flag.
+Advanced options
- This may also be caused by specifying the region when you shouldn't
- have (e.g. OVH).
+Here are the Advanced options specific to swift (OpenStack Swift
+(Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)).
- ### Rclone gives Failed to create file system: Response didn't have storage url and auth token
+--swift-leave-parts-on-error
- This is most likely caused by forgetting to specify your tenant when
- setting up a swift remote.
+If true avoid calling abort upload on a failure.
- ## OVH Cloud Archive
+It should be set to true for resuming uploads across different sessions.
- To use rclone with OVH cloud archive, first use `rclone config` to set up a `swift` backend with OVH, choosing `pca` as the `storage_policy`.
+Properties:
- ### Uploading Objects
+- Config: leave_parts_on_error
+- Env Var: RCLONE_SWIFT_LEAVE_PARTS_ON_ERROR
+- Type: bool
+- Default: false
- Uploading objects to OVH cloud archive is no different to object storage, you just simply run the command you like (move, copy or sync) to upload the objects. Once uploaded the objects will show in a "Frozen" state within the OVH control panel.
+--swift-chunk-size
- ### Retrieving Objects
+Above this size files will be chunked.
- To retrieve objects use `rclone copy` as normal. If the objects are in a frozen state then rclone will ask for them all to be unfrozen and it will wait at the end of the output with a message like the following:
+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.
- `2019/03/23 13:06:33 NOTICE: Received retry after error - sleeping until 2019-03-23T13:16:33.481657164+01:00 (9m59.99985121s)`
+Rclone uploads chunked files as dynamic large objects (DLO).
- Rclone will wait for the time specified then retry the copy.
+Properties:
- # pCloud
+- Config: chunk_size
+- Env Var: RCLONE_SWIFT_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 5Gi
- Paths are specified as `remote:path`
+--swift-no-chunk
- Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
+Don't chunk files during streaming upload.
- ## Configuration
+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.
- 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.
+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.
- Here is an example of how to make a remote called `remote`. First run:
+Rclone will still chunk files bigger than chunk_size when doing normal
+copy operations.
- rclone config
+Properties:
- This will guide you through an interactive setup process:
+- Config: no_chunk
+- Env Var: RCLONE_SWIFT_NO_CHUNK
+- Type: bool
+- Default: false
-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 / Pcloud "pcloud" [snip] Storage> pcloud Pcloud App Client Id -
-leave blank normally. client_id> Pcloud App Client Secret - leave blank
-normally. client_secret> 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","expiry":"0001-01-01T00:00:00Z"}
--------------------- y) Yes this is OK e) Edit this remote d) Delete
-this remote y/e/d> y
+--swift-no-large-objects
+Disable support for static and dynamic large objects
- See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a
- machine with no Internet browser available.
+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.
- Note that rclone runs a webserver on your local machine to collect the
- token as returned from pCloud. 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.
+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.
- Once configured you can then use `rclone` like this,
+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.
- List directories in top level of your pCloud
+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.
- rclone lsd remote:
+Properties:
- List all the files in your pCloud
+- Config: no_large_objects
+- Env Var: RCLONE_SWIFT_NO_LARGE_OBJECTS
+- Type: bool
+- Default: false
- rclone ls remote:
+--swift-use-segments-container
- To copy a local directory to a pCloud directory called backup
+Choose destination for large object segments
- rclone copy /home/source remote:backup
+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.
- ### Modification times and hashes
+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.
- 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.
+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.
- 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.
+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.
- ### Restricted filename characters
+Properties:
- In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters)
- the following characters are also replaced:
+- Config: use_segments_container
+- Env Var: RCLONE_SWIFT_USE_SEGMENTS_CONTAINER
+- Type: Tristate
+- Default: unset
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | \ | 0x5C | \ |
+--swift-encoding
- Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
- as they can't be used in JSON strings.
+The encoding for the backend.
- ### Deleting files
+See the encoding section in the overview for more info.
- 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.
+Properties:
- ### Emptying the trash
+- Config: encoding
+- Env Var: RCLONE_SWIFT_ENCODING
+- Type: Encoding
+- Default: Slash,InvalidUtf8
- 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.
+--swift-description
- ### Root folder ID
+Description of the remote.
- 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.
+Properties:
- Normally you will leave this blank and rclone will determine the
- correct root to use itself.
+- Config: description
+- Env Var: RCLONE_SWIFT_DESCRIPTION
+- Type: string
+- Required: false
- However you can set this to restrict rclone to a specific folder
- hierarchy.
+Limitations
- 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.
+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.
- 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.
+Troubleshooting
+Rclone gives Failed to create file system for "remote:": Bad Request
- ### Standard options
+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.
- Here are the Standard options specific to pcloud (Pcloud).
+So this most likely means your username / password is wrong. You can
+investigate further with the --dump-bodies flag.
- #### --pcloud-client-id
+This may also be caused by specifying the region when you shouldn't have
+(e.g. OVH).
- OAuth Client Id.
+Rclone gives Failed to create file system: Response didn't have storage url and auth token
- Leave blank normally.
+This is most likely caused by forgetting to specify your tenant when
+setting up a swift remote.
- Properties:
+OVH Cloud Archive
- - Config: client_id
- - Env Var: RCLONE_PCLOUD_CLIENT_ID
- - Type: string
- - Required: false
+To use rclone with OVH cloud archive, first use rclone config to set up
+a swift backend with OVH, choosing pca as the storage_policy.
- #### --pcloud-client-secret
+Uploading Objects
- OAuth Client Secret.
+Uploading objects to OVH cloud archive is no different to object
+storage, you just simply run the command you like (move, copy or sync)
+to upload the objects. Once uploaded the objects will show in a "Frozen"
+state within the OVH control panel.
- Leave blank normally.
+Retrieving Objects
- Properties:
+To retrieve objects use rclone copy as normal. If the objects are in a
+frozen state then rclone will ask for them all to be unfrozen and it
+will wait at the end of the output with a message like the following:
- - Config: client_secret
- - Env Var: RCLONE_PCLOUD_CLIENT_SECRET
- - Type: string
- - Required: false
+2019/03/23 13:06:33 NOTICE: Received retry after error - sleeping until 2019-03-23T13:16:33.481657164+01:00 (9m59.99985121s)
- ### Advanced options
+Rclone will wait for the time specified then retry the copy.
- Here are the Advanced options specific to pcloud (Pcloud).
+pCloud
- #### --pcloud-token
+Paths are specified as remote:path
- OAuth Access Token as a JSON blob.
+Paths may be as deep as required, e.g. remote:directory/subdirectory.
- Properties:
+Configuration
- - Config: token
- - Env Var: RCLONE_PCLOUD_TOKEN
- - Type: string
- - Required: false
+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.
- #### --pcloud-auth-url
+Here is an example of how to make a remote called remote. First run:
- Auth server URL.
+ rclone config
- Leave blank to use the provider defaults.
+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 / Pcloud
+ \ "pcloud"
+ [snip]
+ Storage> pcloud
+ Pcloud App Client Id - leave blank normally.
+ client_id>
+ Pcloud App Client Secret - leave blank normally.
+ client_secret>
+ 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","expiry":"0001-01-01T00:00:00Z"}
+ --------------------
+ y) Yes this is OK
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
- - Config: auth_url
- - Env Var: RCLONE_PCLOUD_AUTH_URL
- - Type: string
- - Required: false
+See the remote setup docs for how to set it up on a machine with no
+Internet browser available.
- #### --pcloud-token-url
+Note that rclone runs a webserver on your local machine to collect the
+token as returned from pCloud. 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.
- Token server url.
+Once configured you can then use rclone like this,
- Leave blank to use the provider defaults.
+List directories in top level of your pCloud
- Properties:
+ rclone lsd remote:
- - Config: token_url
- - Env Var: RCLONE_PCLOUD_TOKEN_URL
- - Type: string
- - Required: false
+List all the files in your pCloud
- #### --pcloud-encoding
+ rclone ls remote:
- The encoding for the backend.
+To copy a local directory to a pCloud directory called backup
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+ rclone copy /home/source remote:backup
- Properties:
+Modification times and hashes
- - Config: encoding
- - Env Var: RCLONE_PCLOUD_ENCODING
- - Type: Encoding
- - Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
+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-root-folder-id
+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.
- Fill in for rclone to use a non root folder as its starting point.
+Restricted filename characters
- Properties:
+In addition to the default restricted characters set the following
+characters are also replaced:
- - Config: root_folder_id
- - Env Var: RCLONE_PCLOUD_ROOT_FOLDER_ID
- - Type: string
- - Default: "d0"
+ Character Value Replacement
+ ----------- ------- -------------
+ \ 0x5C \
- #### --pcloud-hostname
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON
+strings.
- Hostname to connect to.
+Deleting files
- This is normally set when rclone initially does the oauth connection,
- however you will need to set it by hand if you are using remote config
- with rclone authorize.
+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
- Properties:
+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.
- - Config: hostname
- - Env Var: RCLONE_PCLOUD_HOSTNAME
- - Type: string
- - Default: "api.pcloud.com"
- - Examples:
- - "api.pcloud.com"
- - Original/US region
- - "eapi.pcloud.com"
- - EU region
+Root folder ID
- #### --pcloud-username
+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.
- Your pcloud username.
-
- This is only required when you want to use the cleanup command. Due to a bug
- in the pcloud API the required API does not support OAuth authentication so
- we have to rely on user password authentication for it.
+Normally you will leave this blank and rclone will determine the correct
+root to use itself.
- Properties:
+However you can set this to restrict rclone to a specific folder
+hierarchy.
- - Config: username
- - Env Var: RCLONE_PCLOUD_USERNAME
- - Type: string
- - Required: false
+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.
- #### --pcloud-password
+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.
- Your pcloud password.
+Standard options
- **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
+Here are the Standard options specific to pcloud (Pcloud).
- Properties:
+--pcloud-client-id
- - Config: password
- - Env Var: RCLONE_PCLOUD_PASSWORD
- - Type: string
- - Required: false
+OAuth Client Id.
+Leave blank normally.
+Properties:
- # PikPak
+- Config: client_id
+- Env Var: RCLONE_PCLOUD_CLIENT_ID
+- Type: string
+- Required: false
- PikPak is [a private cloud drive](https://mypikpak.com/).
+--pcloud-client-secret
- Paths are specified as `remote:path`, and may be as deep as required, e.g. `remote:directory/subdirectory`.
+OAuth Client Secret.
- ## Configuration
+Leave blank normally.
- Here is an example of making a remote for PikPak.
+Properties:
- First run:
+- Config: client_secret
+- Env Var: RCLONE_PCLOUD_CLIENT_SECRET
+- Type: string
+- Required: false
- rclone config
+Advanced options
- This will guide you through an interactive setup process:
+Here are the Advanced options specific to pcloud (Pcloud).
-No remotes found, make a new one? n) New remote s) Set configuration
-password q) Quit config n/s/q> n
+--pcloud-token
-Enter name for new remote. name> remote
+OAuth Access Token as a JSON blob.
-Option Storage. Type of storage to configure. Choose a number from
-below, or type in your own value. XX / PikPak (pikpak) Storage> XX
+Properties:
-Option user. Pikpak username. Enter a value. user> USERNAME
+- Config: token
+- Env Var: RCLONE_PCLOUD_TOKEN
+- Type: string
+- Required: false
-Option pass. Pikpak 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:
+--pcloud-auth-url
-Edit advanced config? y) Yes n) No (default) y/n>
+Auth server URL.
-Configuration complete. Options: - type: pikpak - user: USERNAME - pass:
-*** ENCRYPTED *** - token:
-{"access_token":"eyJ...","token_type":"Bearer","refresh_token":"os...","expiry":"2023-01-26T18:54:32.170582647+09:00"}
-Keep this "remote" remote? y) Yes this is OK (default) e) Edit this
-remote d) Delete this remote y/e/d> y
+Leave blank to use the provider defaults.
+Properties:
- ### Modification times and hashes
+- Config: auth_url
+- Env Var: RCLONE_PCLOUD_AUTH_URL
+- Type: string
+- Required: false
- PikPak keeps modification times on objects, and updates them when uploading objects,
- but it does not support changing only the modification time
+--pcloud-token-url
- The MD5 hash algorithm is supported.
+Token server url.
+Leave blank to use the provider defaults.
- ### Standard options
+Properties:
- Here are the Standard options specific to pikpak (PikPak).
+- Config: token_url
+- Env Var: RCLONE_PCLOUD_TOKEN_URL
+- Type: string
+- Required: false
- #### --pikpak-user
+--pcloud-encoding
+The encoding for the backend.
+
+See the encoding section in the overview for more info.
+
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_PCLOUD_ENCODING
+- Type: Encoding
+- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
+
+--pcloud-root-folder-id
+
+Fill in for rclone to use a non root folder as its starting point.
+
+Properties:
+
+- Config: root_folder_id
+- Env Var: RCLONE_PCLOUD_ROOT_FOLDER_ID
+- Type: string
+- Default: "d0"
+
+--pcloud-hostname
+
+Hostname to connect to.
+
+This is normally set when rclone initially does the oauth connection,
+however you will need to set it by hand if you are using remote config
+with rclone authorize.
+
+Properties:
+
+- Config: hostname
+- Env Var: RCLONE_PCLOUD_HOSTNAME
+- Type: string
+- Default: "api.pcloud.com"
+- Examples:
+ - "api.pcloud.com"
+ - Original/US region
+ - "eapi.pcloud.com"
+ - EU region
+
+--pcloud-username
+
+Your pcloud username.
+
+This is only required when you want to use the cleanup command. Due to a
+bug in the pcloud API the required API does not support OAuth
+authentication so we have to rely on user password authentication for
+it.
+
+Properties:
+
+- Config: username
+- Env Var: RCLONE_PCLOUD_USERNAME
+- Type: string
+- Required: false
+
+--pcloud-password
+
+Your pcloud password.
+
+NB Input to this must be obscured - see rclone obscure.
+
+Properties:
+
+- Config: password
+- Env Var: RCLONE_PCLOUD_PASSWORD
+- Type: string
+- Required: false
+
+--pcloud-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PCLOUD_DESCRIPTION
+- Type: string
+- Required: false
+
+PikPak
+
+PikPak is a private cloud drive.
+
+Paths are specified as remote:path, and may be as deep as required, e.g.
+remote:directory/subdirectory.
+
+Configuration
+
+Here is an example of making a remote for PikPak.
+
+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 / PikPak
+ \ (pikpak)
+ Storage> XX
+
+ Option user.
Pikpak username.
+ Enter a value.
+ user> USERNAME
- Properties:
-
- - Config: user
- - Env Var: RCLONE_PIKPAK_USER
- - Type: string
- - Required: true
-
- #### --pikpak-pass
-
+ Option pass.
Pikpak 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:
- **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
+ Edit advanced config?
+ y) Yes
+ n) No (default)
+ y/n>
- Properties:
+ Configuration complete.
+ Options:
+ - type: pikpak
+ - user: USERNAME
+ - pass: *** ENCRYPTED ***
+ - token: {"access_token":"eyJ...","token_type":"Bearer","refresh_token":"os...","expiry":"2023-01-26T18:54:32.170582647+09:00"}
+ Keep this "remote" remote?
+ y) Yes this is OK (default)
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
- - Config: pass
- - Env Var: RCLONE_PIKPAK_PASS
- - Type: string
- - Required: true
+Modification times and hashes
- ### Advanced options
+PikPak keeps modification times on objects, and updates them when
+uploading objects, but it does not support changing only the
+modification time
- Here are the Advanced options specific to pikpak (PikPak).
+The MD5 hash algorithm is supported.
- #### --pikpak-client-id
+Standard options
- OAuth Client Id.
+Here are the Standard options specific to pikpak (PikPak).
- Leave blank normally.
+--pikpak-user
- Properties:
+Pikpak username.
- - Config: client_id
- - Env Var: RCLONE_PIKPAK_CLIENT_ID
- - Type: string
- - Required: false
+Properties:
- #### --pikpak-client-secret
+- Config: user
+- Env Var: RCLONE_PIKPAK_USER
+- Type: string
+- Required: true
- OAuth Client Secret.
+--pikpak-pass
- Leave blank normally.
+Pikpak password.
- Properties:
+NB Input to this must be obscured - see rclone obscure.
- - Config: client_secret
- - Env Var: RCLONE_PIKPAK_CLIENT_SECRET
- - Type: string
- - Required: false
+Properties:
- #### --pikpak-token
+- Config: pass
+- Env Var: RCLONE_PIKPAK_PASS
+- Type: string
+- Required: true
- OAuth Access Token as a JSON blob.
+Advanced options
- Properties:
+Here are the Advanced options specific to pikpak (PikPak).
- - Config: token
- - Env Var: RCLONE_PIKPAK_TOKEN
- - Type: string
- - Required: false
+--pikpak-client-id
- #### --pikpak-auth-url
+OAuth Client Id.
- Auth server URL.
+Leave blank normally.
- Leave blank to use the provider defaults.
+Properties:
- Properties:
+- Config: client_id
+- Env Var: RCLONE_PIKPAK_CLIENT_ID
+- Type: string
+- Required: false
- - Config: auth_url
- - Env Var: RCLONE_PIKPAK_AUTH_URL
- - Type: string
- - Required: false
+--pikpak-client-secret
- #### --pikpak-token-url
+OAuth Client Secret.
- Token server url.
+Leave blank normally.
- Leave blank to use the provider defaults.
+Properties:
- Properties:
+- Config: client_secret
+- Env Var: RCLONE_PIKPAK_CLIENT_SECRET
+- Type: string
+- Required: false
- - Config: token_url
- - Env Var: RCLONE_PIKPAK_TOKEN_URL
- - Type: string
- - Required: false
+--pikpak-token
- #### --pikpak-root-folder-id
+OAuth Access Token as a JSON blob.
- ID of the root folder.
- Leave blank normally.
+Properties:
- Fill in for rclone to use a non root folder as its starting point.
+- Config: token
+- Env Var: RCLONE_PIKPAK_TOKEN
+- Type: string
+- Required: false
+--pikpak-auth-url
- Properties:
+Auth server URL.
- - Config: root_folder_id
- - Env Var: RCLONE_PIKPAK_ROOT_FOLDER_ID
- - Type: string
- - Required: false
+Leave blank to use the provider defaults.
- #### --pikpak-use-trash
+Properties:
- Send files to the trash instead of deleting permanently.
+- Config: auth_url
+- Env Var: RCLONE_PIKPAK_AUTH_URL
+- Type: string
+- Required: false
- Defaults to true, namely sending files to the trash.
- Use `--pikpak-use-trash=false` to delete files permanently instead.
+--pikpak-token-url
- Properties:
+Token server url.
- - Config: use_trash
- - Env Var: RCLONE_PIKPAK_USE_TRASH
- - Type: bool
- - Default: true
+Leave blank to use the provider defaults.
- #### --pikpak-trashed-only
+Properties:
- Only show files that are in the trash.
+- Config: token_url
+- Env Var: RCLONE_PIKPAK_TOKEN_URL
+- Type: string
+- Required: false
- This will show trashed files in their original directory structure.
+--pikpak-root-folder-id
- Properties:
+ID of the root folder. Leave blank normally.
- - Config: trashed_only
- - Env Var: RCLONE_PIKPAK_TRASHED_ONLY
- - Type: bool
- - Default: false
+Fill in for rclone to use a non root folder as its starting point.
- #### --pikpak-hash-memory-limit
+Properties:
- Files bigger than this will be cached on disk to calculate hash if required.
+- Config: root_folder_id
+- Env Var: RCLONE_PIKPAK_ROOT_FOLDER_ID
+- Type: string
+- Required: false
- Properties:
+--pikpak-use-trash
- - Config: hash_memory_limit
- - Env Var: RCLONE_PIKPAK_HASH_MEMORY_LIMIT
- - Type: SizeSuffix
- - Default: 10Mi
+Send files to the trash instead of deleting permanently.
- #### --pikpak-encoding
+Defaults to true, namely sending files to the trash. Use
+--pikpak-use-trash=false to delete files permanently instead.
- The encoding for the backend.
+Properties:
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+- Config: use_trash
+- Env Var: RCLONE_PIKPAK_USE_TRASH
+- Type: bool
+- Default: true
- Properties:
+--pikpak-trashed-only
- - Config: encoding
- - Env Var: RCLONE_PIKPAK_ENCODING
- - Type: Encoding
- - Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot
+Only show files that are in the trash.
- ## Backend commands
+This will show trashed files in their original directory structure.
- Here are the commands specific to the pikpak backend.
+Properties:
- Run them with
+- Config: trashed_only
+- Env Var: RCLONE_PIKPAK_TRASHED_ONLY
+- Type: bool
+- Default: false
- rclone backend COMMAND remote:
+--pikpak-hash-memory-limit
- The help below will explain what arguments each command takes.
+Files bigger than this will be cached on disk to calculate hash if
+required.
- 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: hash_memory_limit
+- Env Var: RCLONE_PIKPAK_HASH_MEMORY_LIMIT
+- Type: SizeSuffix
+- Default: 10Mi
- ### addurl
+--pikpak-chunk-size
- Add offline download task for url
+Chunk size for multipart uploads.
- rclone backend addurl remote: [options] [+]
+Large files will be uploaded in chunks of this size.
- This command adds offline download task for url.
+Note that this is stored in memory and there may be up to "--transfers"
+* "--pikpak-upload-concurrency" chunks stored at once in memory.
- Usage:
+If you are transferring large files over high-speed links and you have
+enough memory, then increasing this will speed up the transfers.
- rclone backend addurl pikpak:dirpath url
+Rclone will automatically increase the chunk size when uploading a large
+file of known size to stay below the 10,000 chunks limit.
- Downloads will be stored in 'dirpath'. If 'dirpath' is invalid,
- download will fallback to default 'My Pack' folder.
+Increasing the chunk size decreases the accuracy of the progress
+statistics displayed with "-P" flag.
+Properties:
- ### decompress
+- Config: chunk_size
+- Env Var: RCLONE_PIKPAK_CHUNK_SIZE
+- Type: SizeSuffix
+- Default: 5Mi
- Request decompress of a file/files in a folder
+--pikpak-upload-concurrency
- rclone backend decompress remote: [options] [+]
+Concurrency for multipart uploads.
- This command requests decompress of file/files in a folder.
+This is the number of chunks of the same file that are uploaded
+concurrently for multipart uploads.
- Usage:
+Note that chunks are stored in memory and there may be up to
+"--transfers" * "--pikpak-upload-concurrency" chunks stored at once in
+memory.
- rclone backend decompress pikpak:dirpath {filename} -o password=password
- rclone backend decompress pikpak:dirpath {filename} -o delete-src-file
+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.
- An optional argument 'filename' can be specified for a file located in
- 'pikpak:dirpath'. You may want to pass '-o password=password' for a
- password-protected files. Also, pass '-o delete-src-file' to delete
- source files after decompression finished.
+Properties:
- Result:
+- Config: upload_concurrency
+- Env Var: RCLONE_PIKPAK_UPLOAD_CONCURRENCY
+- Type: int
+- Default: 5
- {
- "Decompressed": 17,
- "SourceDeleted": 0,
- "Errors": 0
- }
+--pikpak-encoding
+The encoding for the backend.
+See the encoding section in the overview for more info.
+Properties:
- ## Limitations
+- Config: encoding
+- Env Var: RCLONE_PIKPAK_ENCODING
+- Type: Encoding
+- Default:
+ Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,RightSpace,RightPeriod,InvalidUtf8,Dot
- ### Hashes may be empty
+--pikpak-description
- PikPak supports MD5 hash, but sometimes given empty especially for user-uploaded files.
+Description of the remote.
- ### Deleted files still visible with trashed-only
+Properties:
- Deleted files will still be visible with `--pikpak-trashed-only` even after the
- trash emptied. This goes away after few days.
+- Config: description
+- Env Var: RCLONE_PIKPAK_DESCRIPTION
+- Type: string
+- Required: false
- # premiumize.me
+Backend commands
- Paths are specified as `remote:path`
+Here are the commands specific to the pikpak backend.
- Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
+Run them with
- ## Configuration
+ rclone backend COMMAND remote:
- The initial setup for [premiumize.me](https://premiumize.me/) involves getting a token from premiumize.me which you
- need to do in your browser. `rclone config` walks you through it.
+The help below will explain what arguments each command takes.
- Here is an example of how to make a remote called `remote`. First run:
+See the backend command for more info on how to pass options and
+arguments.
- rclone config
+These can be run on a running backend using the rc command
+backend/command.
- This will guide you through an interactive setup process:
+addurl
-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 /
-premiumize.me "premiumizeme" [snip] Storage> premiumizeme ** See help
-for premiumizeme backend at: https://rclone.org/premiumizeme/ **
+Add offline download task for url
-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 =
-premiumizeme token =
-{"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2029-08-07T18:44:15.548915378+01:00"}
--------------------- y) Yes this is OK e) Edit this remote d) Delete
-this remote y/e/d>
+ rclone backend addurl remote: [options] [+]
+This command adds offline download task for url.
- See the [remote setup docs](https://rclone.org/remote_setup/) for how to set it up on a
- machine with no Internet browser available.
+Usage:
- Note that rclone runs a webserver on your local machine to collect the
- token as returned from premiumize.me. 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.
+ rclone backend addurl pikpak:dirpath url
- Once configured you can then use `rclone` like this,
+Downloads will be stored in 'dirpath'. If 'dirpath' is invalid, download
+will fallback to default 'My Pack' folder.
- List directories in top level of your premiumize.me
+decompress
- rclone lsd remote:
+Request decompress of a file/files in a folder
- List all the files in your premiumize.me
+ rclone backend decompress remote: [options] [+]
- rclone ls remote:
+This command requests decompress of file/files in a folder.
- To copy a local directory to an premiumize.me directory called backup
+Usage:
- rclone copy /home/source remote:backup
+ rclone backend decompress pikpak:dirpath {filename} -o password=password
+ rclone backend decompress pikpak:dirpath {filename} -o delete-src-file
- ### Modification times and hashes
+An optional argument 'filename' can be specified for a file located in
+'pikpak:dirpath'. You may want to pass '-o password=password' for a
+password-protected files. Also, pass '-o delete-src-file' to delete
+source files after decompression finished.
- premiumize.me does not support modification times or hashes, therefore
- syncing will default to `--size-only` checking. Note that using
- `--update` will work.
+Result:
- ### Restricted filename characters
+ {
+ "Decompressed": 17,
+ "SourceDeleted": 0,
+ "Errors": 0
+ }
- In addition to the [default restricted characters set](https://rclone.org/overview/#restricted-characters)
- the following characters are also replaced:
+Limitations
- | Character | Value | Replacement |
- | --------- |:-----:|:-----------:|
- | \ | 0x5C | \ |
- | " | 0x22 | " |
+Hashes may be empty
- Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
- as they can't be used in JSON strings.
+PikPak supports MD5 hash, but sometimes given empty especially for
+user-uploaded files.
+Deleted files still visible with trashed-only
- ### Standard options
+Deleted files will still be visible with --pikpak-trashed-only even
+after the trash emptied. This goes away after few days.
- Here are the Standard options specific to premiumizeme (premiumize.me).
+premiumize.me
- #### --premiumizeme-client-id
+Paths are specified as remote:path
- OAuth Client Id.
+Paths may be as deep as required, e.g. remote:directory/subdirectory.
- Leave blank normally.
+Configuration
- Properties:
+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.
- - Config: client_id
- - Env Var: RCLONE_PREMIUMIZEME_CLIENT_ID
- - Type: string
- - Required: false
+Here is an example of how to make a remote called remote. First run:
- #### --premiumizeme-client-secret
+ rclone config
- OAuth Client Secret.
+This will guide you through an interactive setup process:
- Leave blank normally.
+ 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 / premiumize.me
+ \ "premiumizeme"
+ [snip]
+ Storage> premiumizeme
+ ** See help for premiumizeme backend at: https://rclone.org/premiumizeme/ **
- Properties:
+ 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 = premiumizeme
+ token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2029-08-07T18:44:15.548915378+01:00"}
+ --------------------
+ y) Yes this is OK
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d>
- - Config: client_secret
- - Env Var: RCLONE_PREMIUMIZEME_CLIENT_SECRET
- - Type: string
- - Required: false
+See the remote setup docs for how to set it up on a machine with no
+Internet browser available.
- #### --premiumizeme-api-key
+Note that rclone runs a webserver on your local machine to collect the
+token as returned from premiumize.me. 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.
- API Key.
+Once configured you can then use rclone like this,
- This is not normally used - use oauth instead.
+List directories in top level of your premiumize.me
+ rclone lsd remote:
- Properties:
+List all the files in your premiumize.me
- - Config: api_key
- - Env Var: RCLONE_PREMIUMIZEME_API_KEY
- - Type: string
- - Required: false
+ rclone ls remote:
- ### Advanced options
+To copy a local directory to an premiumize.me directory called backup
- Here are the Advanced options specific to premiumizeme (premiumize.me).
+ rclone copy /home/source remote:backup
- #### --premiumizeme-token
+Modification times and hashes
- OAuth Access Token as a JSON blob.
+premiumize.me does not support modification times or hashes, therefore
+syncing will default to --size-only checking. Note that using --update
+will work.
- Properties:
+Restricted filename characters
- - Config: token
- - Env Var: RCLONE_PREMIUMIZEME_TOKEN
- - Type: string
- - Required: false
+In addition to the default restricted characters set the following
+characters are also replaced:
- #### --premiumizeme-auth-url
+ Character Value Replacement
+ ----------- ------- -------------
+ \ 0x5C \
+ " 0x22 "
- 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 premiumizeme (premiumize.me).
- - Config: auth_url
- - Env Var: RCLONE_PREMIUMIZEME_AUTH_URL
- - Type: string
- - Required: false
+--premiumizeme-client-id
- #### --premiumizeme-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_PREMIUMIZEME_CLIENT_ID
+- Type: string
+- Required: false
- - Config: token_url
- - Env Var: RCLONE_PREMIUMIZEME_TOKEN_URL
- - Type: string
- - Required: false
+--premiumizeme-client-secret
- #### --premiumizeme-encoding
+OAuth Client Secret.
- The encoding for the backend.
+Leave blank normally.
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+Properties:
- Properties:
+- Config: client_secret
+- Env Var: RCLONE_PREMIUMIZEME_CLIENT_SECRET
+- Type: string
+- Required: false
- - Config: encoding
- - Env Var: RCLONE_PREMIUMIZEME_ENCODING
- - Type: Encoding
- - Default: Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot
+--premiumizeme-api-key
+API Key.
+This is not normally used - use oauth instead.
- ## Limitations
+Properties:
- Note that premiumize.me is case insensitive so you can't have a file called
- "Hello.doc" and one called "hello.doc".
+- Config: api_key
+- Env Var: RCLONE_PREMIUMIZEME_API_KEY
+- Type: string
+- Required: false
- premiumize.me file names can't have the `\` or `"` characters in.
- rclone maps these to and from an identical looking unicode equivalents
- `\` and `"`
+Advanced options
- premiumize.me only supports filenames up to 255 characters in length.
+Here are the Advanced options specific to premiumizeme (premiumize.me).
- # Proton Drive
+--premiumizeme-token
- [Proton Drive](https://proton.me/drive) is an end-to-end encrypted Swiss vault
- for your files that protects your data.
+OAuth Access Token as a JSON blob.
- This is an rclone backend for Proton Drive which supports the file transfer
- features of Proton Drive using the same client-side encryption.
+Properties:
- Due to the fact that Proton Drive doesn't publish its API documentation, this
- backend is implemented with best efforts by reading the open-sourced client
- source code and observing the Proton Drive traffic in the browser.
+- Config: token
+- Env Var: RCLONE_PREMIUMIZEME_TOKEN
+- Type: string
+- Required: false
- **NB** This backend is currently in Beta. It is believed to be correct
- and all the integration tests pass. However the Proton Drive protocol
- has evolved over time there may be accounts it is not compatible
- with. Please [post on the rclone forum](https://forum.rclone.org/) if
- you find an incompatibility.
+--premiumizeme-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.
- ## Configurations
+Properties:
- Here is an example of how to make a remote called `remote`. First run:
+- Config: auth_url
+- Env Var: RCLONE_PREMIUMIZEME_AUTH_URL
+- Type: string
+- Required: false
- rclone config
+--premiumizeme-token-url
- This will guide you through an interactive setup process:
+Token server url.
-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 / Proton Drive "Proton Drive" [snip] Storage> protondrive User name
-user> you@protonmail.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: Option
-2fa. 2FA code (if the account requires one) Enter a value. Press Enter
-to leave empty. 2fa> 123456 Remote config -------------------- [remote]
-type = protondrive user = you@protonmail.com pass = *** ENCRYPTED ***
--------------------- y) Yes this is OK e) Edit this remote d) Delete
-this remote y/e/d> y
+Leave blank to use the provider defaults.
+Properties:
- **NOTE:** The Proton Drive 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.
+- Config: token_url
+- Env Var: RCLONE_PREMIUMIZEME_TOKEN_URL
+- Type: string
+- Required: false
- Once configured you can then use `rclone` like this,
+--premiumizeme-encoding
- List directories in top level of your Proton Drive
+The encoding for the backend.
- rclone lsd remote:
+See the encoding section in the overview for more info.
- List all the files in your Proton Drive
+Properties:
- rclone ls remote:
+- Config: encoding
+- Env Var: RCLONE_PREMIUMIZEME_ENCODING
+- Type: Encoding
+- Default: Slash,DoubleQuote,BackSlash,Del,Ctl,InvalidUtf8,Dot
- To copy a local directory to an Proton Drive directory called backup
+--premiumizeme-description
- rclone copy /home/source remote:backup
+Description of the remote.
- ### Modification times and hashes
+Properties:
- Proton Drive Bridge does not support updating modification times yet.
+- Config: description
+- Env Var: RCLONE_PREMIUMIZEME_DESCRIPTION
+- Type: string
+- Required: false
- The SHA1 hash algorithm is supported.
+Limitations
- ### Restricted filename characters
+Note that premiumize.me is case insensitive so you can't have a file
+called "Hello.doc" and one called "hello.doc".
- Invalid UTF-8 bytes will be [replaced](https://rclone.org/overview/#invalid-utf8), also left and
- right spaces will be removed ([code reference](https://github.com/ProtonMail/WebClients/blob/b4eba99d241af4fdae06ff7138bd651a40ef5d3c/applications/drive/src/app/store/_links/validation.ts#L51))
+premiumize.me file names can't have the \ or " characters in. rclone
+maps these to and from an identical looking unicode equivalents \ and
+"
- ### Duplicated files
+premiumize.me only supports filenames up to 255 characters in length.
- 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.
+Proton Drive
- ### [Mailbox password](https://proton.me/support/the-difference-between-the-mailbox-password-and-login-password)
+Proton Drive is an end-to-end encrypted Swiss vault for your files that
+protects your data.
- Please set your mailbox password in the advanced config section.
+This is an rclone backend for Proton Drive which supports the file
+transfer features of Proton Drive using the same client-side encryption.
- ### Caching
+Due to the fact that Proton Drive doesn't publish its API documentation,
+this backend is implemented with best efforts by reading the
+open-sourced client source code and observing the Proton Drive traffic
+in the browser.
- 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.
+NB This backend is currently in Beta. It is believed to be correct and
+all the integration tests pass. However the Proton Drive protocol has
+evolved over time there may be accounts it is not compatible with.
+Please post on the rclone forum if you find an incompatibility.
+Paths are specified as remote:path
- ### Standard options
+Paths may be as deep as required, e.g. remote:directory/subdirectory.
- Here are the Standard options specific to protondrive (Proton Drive).
+Configurations
- #### --protondrive-username
+Here is an example of how to make a remote called remote. First run:
- The username of your proton account
+ rclone config
- Properties:
-
- - Config: username
- - Env Var: RCLONE_PROTONDRIVE_USERNAME
- - Type: string
- - Required: true
-
- #### --protondrive-password
-
- The password of your proton account.
-
- **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
- Properties:
-
- - Config: password
- - Env Var: RCLONE_PROTONDRIVE_PASSWORD
- - Type: string
- - Required: true
-
- #### --protondrive-2fa
-
- The 2FA code
-
- The value can also be provided with --protondrive-2fa=000000
-
- The 2FA code of your proton drive account if the account is set up with
- two-factor authentication
-
- Properties:
-
- - Config: 2fa
- - Env Var: RCLONE_PROTONDRIVE_2FA
- - Type: string
- - Required: false
-
- ### Advanced options
-
- Here are the Advanced options specific to protondrive (Proton Drive).
-
- #### --protondrive-mailbox-password
-
- The mailbox password of your two-password proton account.
-
- For more information regarding the mailbox password, please check the
- following official knowledge base article:
- https://proton.me/support/the-difference-between-the-mailbox-password-and-login-password
-
-
- **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
- Properties:
-
- - Config: mailbox_password
- - Env Var: RCLONE_PROTONDRIVE_MAILBOX_PASSWORD
- - Type: string
- - Required: false
-
- #### --protondrive-client-uid
-
- Client uid key (internal use only)
-
- Properties:
-
- - Config: client_uid
- - Env Var: RCLONE_PROTONDRIVE_CLIENT_UID
- - Type: string
- - Required: false
-
- #### --protondrive-client-access-token
-
- Client access token key (internal use only)
-
- Properties:
-
- - Config: client_access_token
- - Env Var: RCLONE_PROTONDRIVE_CLIENT_ACCESS_TOKEN
- - Type: string
- - Required: false
-
- #### --protondrive-client-refresh-token
-
- Client refresh token key (internal use only)
-
- Properties:
-
- - Config: client_refresh_token
- - Env Var: RCLONE_PROTONDRIVE_CLIENT_REFRESH_TOKEN
- - Type: string
- - Required: false
-
- #### --protondrive-client-salted-key-pass
-
- Client salted key pass key (internal use only)
-
- Properties:
-
- - Config: client_salted_key_pass
- - Env Var: RCLONE_PROTONDRIVE_CLIENT_SALTED_KEY_PASS
- - Type: string
- - Required: false
-
- #### --protondrive-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_PROTONDRIVE_ENCODING
- - Type: Encoding
- - Default: Slash,LeftSpace,RightSpace,InvalidUtf8,Dot
-
- #### --protondrive-original-file-size
-
- Return the file size before encryption
-
- The size of the encrypted file will be different from (bigger than) the
- original file size. Unless there is a reason to return the file size
- after encryption is performed, otherwise, set this option to true, as
- features like Open() which will need to be supplied with original content
- size, will fail to operate properly
-
- Properties:
-
- - Config: original_file_size
- - Env Var: RCLONE_PROTONDRIVE_ORIGINAL_FILE_SIZE
- - Type: bool
- - Default: true
-
- #### --protondrive-app-version
-
- The app version string
-
- The app version string indicates the client that is currently performing
- the API request. This information is required and will be sent with every
- API request.
-
- Properties:
-
- - Config: app_version
- - Env Var: RCLONE_PROTONDRIVE_APP_VERSION
- - Type: string
- - Default: "macos-drive@1.0.0-alpha.1+rclone"
-
- #### --protondrive-replace-existing-draft
-
- Create a new revision when filename conflict is detected
-
- When a file upload is cancelled or failed before completion, a draft will be
- created and the subsequent upload of the same file to the same location will be
- reported as a conflict.
-
- The value can also be set by --protondrive-replace-existing-draft=true
-
- If the option is set to true, the draft will be replaced and then the upload
- operation will restart. If there are other clients also uploading at the same
- file location at the same time, the behavior is currently unknown. Need to set
- to true for integration tests.
- If the option is set to false, an error "a draft exist - usually this means a
- file is being uploaded at another client, or, there was a failed upload attempt"
- will be returned, and no upload will happen.
-
- Properties:
-
- - Config: replace_existing_draft
- - Env Var: RCLONE_PROTONDRIVE_REPLACE_EXISTING_DRAFT
- - Type: bool
- - Default: false
-
- #### --protondrive-enable-caching
-
- Caches the files and folders metadata to reduce API calls
-
- Notice: If you are mounting ProtonDrive as a VFS, please disable this feature,
- as the current implementation doesn't update or clear the cache when there are
- external changes.
-
- The files and folders on ProtonDrive are represented as links with keyrings,
- which can be cached to improve performance and be friendly to the API server.
-
- 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.
-
- Properties:
-
- - Config: enable_caching
- - Env Var: RCLONE_PROTONDRIVE_ENABLE_CACHING
- - Type: bool
- - Default: true
-
-
-
- ## Limitations
-
- This backend uses the
- [Proton-API-Bridge](https://github.com/henrybear327/Proton-API-Bridge), which
- is based on [go-proton-api](https://github.com/henrybear327/go-proton-api), a
- fork of the [official repo](https://github.com/ProtonMail/go-proton-api).
-
- There is no official API documentation available from Proton Drive. But, thanks
- to Proton open sourcing [proton-go-api](https://github.com/ProtonMail/go-proton-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](https://github.com/ProtonMail/go-proton-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.
-
- # put.io
-
- Paths are specified as `remote:path`
-
- put.io paths may be as deep as required, e.g.
- `remote:directory/subdirectory`.
-
- ## 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
-
- 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> putio 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 / Put.io
- "putio" [snip] Storage> putio ** See help for putio backend at:
-https://rclone.org/putio/ **
-
-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 -------------------- [putio] type = putio
-token = {"access_token":"XXXXXXXX","expiry":"0001-01-01T00:00:00Z"}
--------------------- y) Yes this is OK e) Edit this remote d) Delete
-this remote y/e/d> y Current remotes:
-
-Name Type ==== ==== putio putio
-
-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
-
-
- 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 put.io 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.
-
- You can then use it like this,
-
- List directories in top level of your put.io
-
- rclone lsd remote:
-
- List all the files in your put.io
-
- rclone ls remote:
-
- To copy a local directory to a put.io directory called backup
-
- rclone copy /home/source remote: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 |
- | --------- |:-----:|:-----------:|
- | \ | 0x5C | \ |
-
- 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 putio (Put.io).
-
- #### --putio-client-id
-
- OAuth Client Id.
-
- Leave blank normally.
-
- Properties:
-
- - Config: client_id
- - Env Var: RCLONE_PUTIO_CLIENT_ID
- - Type: string
- - Required: false
-
- #### --putio-client-secret
-
- OAuth Client Secret.
-
- Leave blank normally.
-
- Properties:
-
- - Config: client_secret
- - Env Var: RCLONE_PUTIO_CLIENT_SECRET
- - Type: string
- - Required: false
-
- ### Advanced options
-
- Here are the Advanced options specific to putio (Put.io).
-
- #### --putio-token
-
- OAuth Access Token as a JSON blob.
-
- Properties:
-
- - Config: token
- - Env Var: RCLONE_PUTIO_TOKEN
- - Type: string
- - Required: false
-
- #### --putio-auth-url
-
- Auth server URL.
-
- Leave blank to use the provider defaults.
-
- Properties:
-
- - Config: auth_url
- - Env Var: RCLONE_PUTIO_AUTH_URL
- - Type: string
- - Required: false
-
- #### --putio-token-url
-
- Token server url.
-
- Leave blank to use the provider defaults.
-
- Properties:
-
- - Config: token_url
- - Env Var: RCLONE_PUTIO_TOKEN_URL
- - Type: string
- - Required: false
-
- #### --putio-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_PUTIO_ENCODING
- - Type: Encoding
- - Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
-
-
-
- ## 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
-
- [Proton Drive](https://proton.me/drive) is an end-to-end encrypted Swiss vault
- for your files that protects your data.
-
- This is an rclone backend for Proton Drive which supports the file transfer
- features of Proton Drive using the same client-side encryption.
-
- Due to the fact that Proton Drive doesn't publish its API documentation, this
- backend is implemented with best efforts by reading the open-sourced client
- source code and observing the Proton Drive traffic in the browser.
-
- **NB** This backend is currently in Beta. It is believed to be correct
- and all the integration tests pass. However the Proton Drive protocol
- has evolved over time there may be accounts it is not compatible
- with. Please [post on the rclone forum](https://forum.rclone.org/) if
- you find an incompatibility.
-
- Paths are specified as `remote:path`
-
- Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
-
- ## Configurations
-
- 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 / Proton Drive "Proton Drive" [snip] Storage> protondrive User name
-user> you@protonmail.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: Option
-2fa. 2FA code (if the account requires one) Enter a value. Press Enter
-to leave empty. 2fa> 123456 Remote config -------------------- [remote]
-type = protondrive user = you@protonmail.com pass = *** ENCRYPTED ***
--------------------- y) Yes this is OK e) Edit this remote d) Delete
-this remote y/e/d> y
-
-
- **NOTE:** The Proton Drive 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.
-
- Once configured you can then use `rclone` like this,
-
- List directories in top level of your Proton Drive
-
- rclone lsd remote:
-
- List all the files in your Proton Drive
-
- 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
-
- Proton Drive Bridge does not support updating modification times yet.
-
- The SHA1 hash algorithm is supported.
-
- ### Restricted filename characters
-
- Invalid UTF-8 bytes will be [replaced](https://rclone.org/overview/#invalid-utf8), also left and
- right spaces will be removed ([code reference](https://github.com/ProtonMail/WebClients/blob/b4eba99d241af4fdae06ff7138bd651a40ef5d3c/applications/drive/src/app/store/_links/validation.ts#L51))
-
- ### 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](https://proton.me/support/the-difference-between-the-mailbox-password-and-login-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
-
- Here are the Standard options specific to protondrive (Proton Drive).
-
- #### --protondrive-username
-
- The username of your proton account
-
- Properties:
-
- - Config: username
- - Env Var: RCLONE_PROTONDRIVE_USERNAME
- - Type: string
- - Required: true
-
- #### --protondrive-password
-
- The password of your proton account.
-
- **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
- Properties:
-
- - Config: password
- - Env Var: RCLONE_PROTONDRIVE_PASSWORD
- - Type: string
- - Required: true
-
- #### --protondrive-2fa
-
- The 2FA code
-
- The value can also be provided with --protondrive-2fa=000000
-
- The 2FA code of your proton drive account if the account is set up with
- two-factor authentication
-
- Properties:
-
- - Config: 2fa
- - Env Var: RCLONE_PROTONDRIVE_2FA
- - Type: string
- - Required: false
-
- ### Advanced options
-
- Here are the Advanced options specific to protondrive (Proton Drive).
-
- #### --protondrive-mailbox-password
-
- The mailbox password of your two-password proton account.
-
- For more information regarding the mailbox password, please check the
- following official knowledge base article:
- https://proton.me/support/the-difference-between-the-mailbox-password-and-login-password
-
-
- **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
-
- Properties:
-
- - Config: mailbox_password
- - Env Var: RCLONE_PROTONDRIVE_MAILBOX_PASSWORD
- - Type: string
- - Required: false
-
- #### --protondrive-client-uid
-
- Client uid key (internal use only)
-
- Properties:
-
- - Config: client_uid
- - Env Var: RCLONE_PROTONDRIVE_CLIENT_UID
- - Type: string
- - Required: false
-
- #### --protondrive-client-access-token
-
- Client access token key (internal use only)
-
- Properties:
-
- - Config: client_access_token
- - Env Var: RCLONE_PROTONDRIVE_CLIENT_ACCESS_TOKEN
- - Type: string
- - Required: false
-
- #### --protondrive-client-refresh-token
-
- Client refresh token key (internal use only)
-
- Properties:
-
- - Config: client_refresh_token
- - Env Var: RCLONE_PROTONDRIVE_CLIENT_REFRESH_TOKEN
- - Type: string
- - Required: false
-
- #### --protondrive-client-salted-key-pass
-
- Client salted key pass key (internal use only)
-
- Properties:
-
- - Config: client_salted_key_pass
- - Env Var: RCLONE_PROTONDRIVE_CLIENT_SALTED_KEY_PASS
- - Type: string
- - Required: false
-
- #### --protondrive-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_PROTONDRIVE_ENCODING
- - Type: Encoding
- - Default: Slash,LeftSpace,RightSpace,InvalidUtf8,Dot
-
- #### --protondrive-original-file-size
-
- Return the file size before encryption
-
- The size of the encrypted file will be different from (bigger than) the
- original file size. Unless there is a reason to return the file size
- after encryption is performed, otherwise, set this option to true, as
- features like Open() which will need to be supplied with original content
- size, will fail to operate properly
-
- Properties:
-
- - Config: original_file_size
- - Env Var: RCLONE_PROTONDRIVE_ORIGINAL_FILE_SIZE
- - Type: bool
- - Default: true
-
- #### --protondrive-app-version
-
- The app version string
-
- The app version string indicates the client that is currently performing
- the API request. This information is required and will be sent with every
- API request.
-
- Properties:
-
- - Config: app_version
- - Env Var: RCLONE_PROTONDRIVE_APP_VERSION
- - Type: string
- - Default: "macos-drive@1.0.0-alpha.1+rclone"
-
- #### --protondrive-replace-existing-draft
-
- Create a new revision when filename conflict is detected
-
- When a file upload is cancelled or failed before completion, a draft will be
- created and the subsequent upload of the same file to the same location will be
- reported as a conflict.
-
- The value can also be set by --protondrive-replace-existing-draft=true
-
- If the option is set to true, the draft will be replaced and then the upload
- operation will restart. If there are other clients also uploading at the same
- file location at the same time, the behavior is currently unknown. Need to set
- to true for integration tests.
- If the option is set to false, an error "a draft exist - usually this means a
- file is being uploaded at another client, or, there was a failed upload attempt"
- will be returned, and no upload will happen.
-
- Properties:
-
- - Config: replace_existing_draft
- - Env Var: RCLONE_PROTONDRIVE_REPLACE_EXISTING_DRAFT
- - Type: bool
- - Default: false
-
- #### --protondrive-enable-caching
-
- Caches the files and folders metadata to reduce API calls
-
- Notice: If you are mounting ProtonDrive as a VFS, please disable this feature,
- as the current implementation doesn't update or clear the cache when there are
- external changes.
-
- The files and folders on ProtonDrive are represented as links with keyrings,
- which can be cached to improve performance and be friendly to the API server.
-
- 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.
-
- Properties:
-
- - Config: enable_caching
- - Env Var: RCLONE_PROTONDRIVE_ENABLE_CACHING
- - Type: bool
- - Default: true
-
-
-
- ## Limitations
-
- This backend uses the
- [Proton-API-Bridge](https://github.com/henrybear327/Proton-API-Bridge), which
- is based on [go-proton-api](https://github.com/henrybear327/go-proton-api), a
- fork of the [official repo](https://github.com/ProtonMail/go-proton-api).
-
- There is no official API documentation available from Proton Drive. But, thanks
- to Proton open sourcing [proton-go-api](https://github.com/ProtonMail/go-proton-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](https://github.com/ProtonMail/go-proton-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](https://www.seafile.com/) 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
-
- 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
-
- rclone config
-
- This will guide you through an interactive setup process. To authenticate
- you will need the URL of your server, your email (or username) and your password.
-
-No remotes found, make a new one? n) New remote s) Set configuration
-password q) Quit config n/s/q> n name> seafile 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 /
-Seafile "seafile" [snip] Storage> seafile ** See help for seafile
-backend at: https://rclone.org/seafile/ **
-
-URL of seafile 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 cloud.seafile.com "https://cloud.seafile.com/" url>
-http://my.seafile.server/ User name (usually email address) Enter a
-string value. Press Enter for the default (""). user> me@example.com
-Password y) Yes type in my own password g) Generate random password n)
-No leave this optional password blank (default) y/g> y Enter the
-password: password: Confirm the password: password: Two-factor
-authentication ('true' if the account has 2FA enabled) Enter a boolean
-value (true or false). Press Enter for the default ("false"). 2fa> false
-Name of the library. Leave blank to access all non-encrypted libraries.
-Enter a string value. Press Enter for the default (""). library> Library
-password (for encrypted libraries only). Leave blank if you pass it
-through the command line. y) Yes type in my own password g) Generate
-random password n) No leave this optional password blank (default)
-y/g/n> n Edit advanced config? (y/n) y) Yes n) No (default) y/n> n
-Remote config Two-factor authentication is not enabled on this account.
--------------------- [seafile] type = seafile url =
-http://my.seafile.server/ user = me@example.com pass = *** ENCRYPTED ***
-2fa = false -------------------- y) Yes this is OK (default) e) Edit
-this remote d) Delete this remote y/e/d> y
-
-
- This remote is called `seafile`. It's pointing to the root of your seafile server and can now be used like this:
-
- See all libraries
-
- rclone lsd seafile:
-
- Create a new library
-
- rclone mkdir seafile:library
-
- List the contents of a library
-
- rclone ls seafile:library
-
- Sync `/home/local/directory` to the remote library, deleting any
- excess files in the library.
-
- rclone sync --interactive /home/local/directory seafile:library
-
- ### Configuration in library mode
-
- Here's an example of a configuration in library mode with a user that has the two-factor authentication enabled. Your 2FA code will be asked at the end of the configuration, and will attempt to authenticate you:
-
-No remotes found, make a new one? n) New remote s) Set configuration
-password q) Quit config n/s/q> n name> seafile 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 /
-Seafile "seafile" [snip] Storage> seafile ** See help for seafile
-backend at: https://rclone.org/seafile/ **
-
-URL of seafile 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 cloud.seafile.com "https://cloud.seafile.com/" url>
-http://my.seafile.server/ User name (usually email address) Enter a
-string value. Press Enter for the default (""). user> me@example.com
-Password y) Yes type in my own password g) Generate random password n)
-No leave this optional password blank (default) y/g> y Enter the
-password: password: Confirm the password: password: Two-factor
-authentication ('true' if the account has 2FA enabled) Enter a boolean
-value (true or false). Press Enter for the default ("false"). 2fa> true
-Name of the library. Leave blank to access all non-encrypted libraries.
-Enter a string value. Press Enter for the default (""). library> My
-Library Library password (for encrypted libraries only). Leave blank if
-you pass it through the command line. y) Yes type in my own password g)
-Generate random password n) No leave this optional password blank
-(default) y/g/n> n Edit advanced config? (y/n) y) Yes n) No (default)
-y/n> n Remote config Two-factor authentication: please enter your 2FA
-code 2fa code> 123456 Authenticating... Success! --------------------
-[seafile] type = seafile url = http://my.seafile.server/ user =
-me@example.com pass = 2fa = true library = My Library
--------------------- y) Yes this is OK (default) e) Edit this remote d)
-Delete this remote y/e/d> y
-
-
- You'll notice your password is blank in the configuration. It's because we only need the password to authenticate you once.
-
- You specified `My Library` during the configuration. The root of the remote is pointing at the
- root of the library `My Library`:
-
- See all files in the library:
-
- rclone lsd seafile:
-
- Create a new directory inside the library
-
- rclone mkdir seafile:directory
-
- List the contents of a directory
-
- 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
-
- Seafile version 7+ 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.
- Please note this is not supported on seafile server version 6.x
-
-
- ### 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 | / |
- | " | 0x22 | " |
- | \ | 0x5C | \ |
-
- Invalid UTF-8 bytes will also be [replaced](https://rclone.org/overview/#invalid-utf8),
- as they can't be used in JSON strings.
-
- ### Seafile and rclone link
-
- Rclone supports generating share links for non-encrypted libraries only.
- They can either be for a file or a directory:
-
-rclone link seafile:seafile-tutorial.doc
-http://my.seafile.server/f/fdcd8a2f93f84b8b90f4/
-
-
- or if run on a directory you will get:
-
-rclone link seafile:dir http://my.seafile.server/d/9ea2455f6f55478bbb0d/
-
-
- Please note a share link is unique for each file or directory. If you run a link command on a file/dir
- that has already been shared, you will get the exact same link.
-
- ### Compatibility
-
- It has been actively developed using the [seafile docker image](https://github.com/haiwen/seafile-docker) 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](https://hub.docker.com/r/seafileltd/seafile-mc/) of the seafile community server.
-
-
- ### Standard options
-
- Here are the Standard options specific to seafile (seafile).
-
- #### --seafile-url
-
- URL of seafile host to connect to.
-
- Properties:
-
- - Config: url
- - Env Var: RCLONE_SEAFILE_URL
- - Type: string
- - Required: true
- - Examples:
- - "https://cloud.seafile.com/"
- - Connect to cloud.seafile.com.
-
- #### --seafile-user
-
- User name (usually email address).
-
- Properties:
-
- - Config: user
- - Env Var: RCLONE_SEAFILE_USER
- - Type: string
- - Required: true
-
- #### --seafile-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 / Proton Drive
+ \ "protondrive"
+ [snip]
+ Storage> protondrive
+ User name
+ user> you@protonmail.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:
+ Option 2fa.
+ 2FA code (if the account requires one)
+ Enter a value. Press Enter to leave empty.
+ 2fa> 123456
+ Remote config
+ --------------------
+ [remote]
+ type = protondrive
+ user = you@protonmail.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 Proton Drive 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_SEAFILE_PASS
- - Type: string
- - Required: false
+List directories in top level of your Proton Drive
- #### --seafile-2fa
+ rclone lsd remote:
- Two-factor authentication ('true' if the account has 2FA enabled).
+List all the files in your Proton Drive
- Properties:
+ rclone ls remote:
- - Config: 2fa
- - Env Var: RCLONE_SEAFILE_2FA
- - Type: bool
- - Default: false
+To copy a local directory to an Proton Drive directory called backup
- #### --seafile-library
+ rclone copy /home/source remote:backup
- Name of the library.
+Modification times and hashes
- Leave blank to access all non-encrypted libraries.
+Proton Drive Bridge does not support updating modification times yet.
- Properties:
+The SHA1 hash algorithm is supported.
- - Config: library
- - Env Var: RCLONE_SEAFILE_LIBRARY
- - Type: string
- - Required: false
+Restricted filename characters
- #### --seafile-library-key
+Invalid UTF-8 bytes will be replaced, also left and right spaces will be
+removed (code reference)
- Library password (for encrypted libraries only).
+Duplicated files
- Leave blank if you pass it through the command line.
+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.
- **NB** Input to this must be obscured - see [rclone obscure](https://rclone.org/commands/rclone_obscure/).
+Mailbox password
- Properties:
+Please set your mailbox password in the advanced config section.
- - Config: library_key
- - Env Var: RCLONE_SEAFILE_LIBRARY_KEY
- - Type: string
- - Required: false
+Caching
- #### --seafile-auth-token
+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.
- Authentication token.
+Standard options
- Properties:
+Here are the Standard options specific to protondrive (Proton Drive).
- - Config: auth_token
- - Env Var: RCLONE_SEAFILE_AUTH_TOKEN
- - Type: string
- - Required: false
+--protondrive-username
- ### Advanced options
+The username of your proton account
- Here are the Advanced options specific to seafile (seafile).
+Properties:
- #### --seafile-create-library
+- Config: username
+- Env Var: RCLONE_PROTONDRIVE_USERNAME
+- Type: string
+- Required: true
- Should rclone create a library if it doesn't exist.
+--protondrive-password
- Properties:
+The password of your proton account.
- - Config: create_library
- - Env Var: RCLONE_SEAFILE_CREATE_LIBRARY
- - Type: bool
- - Default: false
+NB Input to this must be obscured - see rclone obscure.
- #### --seafile-encoding
+Properties:
- The encoding for the backend.
+- Config: password
+- Env Var: RCLONE_PROTONDRIVE_PASSWORD
+- Type: string
+- Required: true
- See the [encoding section in the overview](https://rclone.org/overview/#encoding) for more info.
+--protondrive-2fa
- Properties:
+The 2FA code
- - Config: encoding
- - Env Var: RCLONE_SEAFILE_ENCODING
- - Type: Encoding
- - Default: Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8
+The value can also be provided with --protondrive-2fa=000000
+The 2FA code of your proton drive account if the account is set up with
+two-factor authentication
+Properties:
- # SFTP
+- Config: 2fa
+- Env Var: RCLONE_PROTONDRIVE_2FA
+- Type: string
+- Required: false
- SFTP is the [Secure (or SSH) File Transfer
- Protocol](https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol).
+Advanced options
- The SFTP backend can be used with a number of different providers:
+Here are the Advanced options specific to protondrive (Proton Drive).
+--protondrive-mailbox-password
- - Hetzner Storage Box
- - rsync.net
+The mailbox password of your two-password proton account.
+For more information regarding the mailbox password, please check the
+following official knowledge base article:
+https://proton.me/support/the-difference-between-the-mailbox-password-and-login-password
- SFTP runs over SSH v2 and is installed as standard with most modern
- SSH installations.
+NB Input to this must be obscured - see rclone obscure.
- 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. For example, `rclone lsd remote:`
- would list the home directory of the user configured in the rclone remote config
- (`i.e /home/sftpuser`). However, `rclone lsd remote:/` would list the root
- directory for remote machine (i.e. `/`)
+Properties:
- Note that some SFTP servers will need the leading / - Synology is a
- good example of this. rsync.net and Hetzner, on the other hand, requires users to
- OMIT the leading /.
+- Config: mailbox_password
+- Env Var: RCLONE_PROTONDRIVE_MAILBOX_PASSWORD
+- Type: string
+- Required: false
- Note that by default rclone will try to execute shell commands on
- the server, see [shell access considerations](#shell-access-considerations).
+--protondrive-client-uid
- ## Configuration
+Client uid key (internal use only)
- Here is an example of making an SFTP configuration. First run
+Properties:
- rclone config
+- Config: client_uid
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_UID
+- Type: string
+- Required: false
- This will guide you through an interactive setup process.
+--protondrive-client-access-token
-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 / SSH/SFTP "sftp" [snip] Storage> sftp SSH host to connect to Choose
-a number from below, or type in your own value 1 / Connect to
-example.com "example.com" host> example.com SSH username Enter a string
-value. Press Enter for the default ("$USER"). user> sftpuser SSH port
-number Enter a signed integer. Press Enter for the default (22). port>
-SSH password, leave blank to use ssh-agent. y) Yes type in my own
-password g) Generate random password n) No leave this optional password
-blank y/g/n> n Path to unencrypted PEM-encoded private key file, leave
-blank to use ssh-agent. key_file> Remote config --------------------
-[remote] host = example.com user = sftpuser port = pass = key_file =
--------------------- y) Yes this is OK e) Edit this remote d) Delete
-this remote y/e/d> y
+Client access token key (internal use only)
+Properties:
- This remote is called `remote` and can now be used like this:
+- Config: client_access_token
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_ACCESS_TOKEN
+- Type: string
+- Required: false
- See all directories in the home directory
+--protondrive-client-refresh-token
- rclone lsd remote:
+Client refresh token key (internal use only)
- See all directories in the root directory
+Properties:
- rclone lsd remote:/
+- Config: client_refresh_token
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_REFRESH_TOKEN
+- Type: string
+- Required: false
- Make a new directory
+--protondrive-client-salted-key-pass
- rclone mkdir remote:path/to/directory
+Client salted key pass key (internal use only)
- List the contents of a directory
+Properties:
- rclone ls remote:path/to/directory
+- Config: client_salted_key_pass
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_SALTED_KEY_PASS
+- Type: string
+- Required: false
- Sync `/home/local/directory` to the remote directory, deleting any
- excess files in the directory.
+--protondrive-encoding
- rclone sync --interactive /home/local/directory remote:directory
+The encoding for the backend.
- Mount the remote path `/srv/www-data/` to the local path
- `/mnt/www-data`
+See the encoding section in the overview for more info.
- rclone mount remote:/srv/www-data/ /mnt/www-data
+Properties:
- ### SSH Authentication
+- Config: encoding
+- Env Var: RCLONE_PROTONDRIVE_ENCODING
+- Type: Encoding
+- Default: Slash,LeftSpace,RightSpace,InvalidUtf8,Dot
- The SFTP remote supports three authentication methods:
+--protondrive-original-file-size
- * Password
- * Key file, including certificate signed keys
- * ssh-agent
+Return the file size before encryption
- Key files should be PEM-encoded private key files. For instance `/home/$USER/.ssh/id_rsa`.
- Only unencrypted OpenSSH or PEM encrypted files are supported.
+The size of the encrypted file will be different from (bigger than) the
+original file size. Unless there is a reason to return the file size
+after encryption is performed, otherwise, set this option to true, as
+features like Open() which will need to be supplied with original
+content size, will fail to operate properly
- The key file can be specified in either an external file (key_file) or contained within the
- rclone config file (key_pem). If using key_pem in the config file, the entry should be on a
- single line with new line ('\n' or '\r\n') separating lines. i.e.
+Properties:
- key_pem = -----BEGIN RSA PRIVATE KEY-----\nMaMbaIXtE\n0gAMbMbaSsd\nMbaass\n-----END RSA PRIVATE KEY-----
+- Config: original_file_size
+- Env Var: RCLONE_PROTONDRIVE_ORIGINAL_FILE_SIZE
+- Type: bool
+- Default: true
- This will generate it correctly for key_pem for use in the config:
+--protondrive-app-version
- awk '{printf "%s\\n", $0}' < ~/.ssh/id_rsa
+The app version string
- If you don't specify `pass`, `key_file`, or `key_pem` or `ask_password` then
- rclone will attempt to contact an ssh-agent. You can also specify `key_use_agent`
- to force the usage of an ssh-agent. In this case `key_file` or `key_pem` can
- also be specified to force the usage of a specific key in the ssh-agent.
+The app version string indicates the client that is currently performing
+the API request. This information is required and will be sent with
+every API request.
- Using an ssh-agent is the only way to load encrypted OpenSSH keys at the moment.
+Properties:
- If you set the `ask_password` option, rclone will prompt for a password when
- needed and no password has been configured.
+- Config: app_version
+- Env Var: RCLONE_PROTONDRIVE_APP_VERSION
+- Type: string
+- Default: "macos-drive@1.0.0-alpha.1+rclone"
- #### Certificate-signed keys
+--protondrive-replace-existing-draft
- With traditional key-based authentication, you configure your private key only,
- and the public key built into it will be used during the authentication process.
+Create a new revision when filename conflict is detected
- If you have a certificate you may use it to sign your public key, creating a
- separate SSH user certificate that should be used instead of the plain public key
- extracted from the private key. Then you must provide the path to the
- user certificate public key file in `pubkey_file`.
+When a file upload is cancelled or failed before completion, a draft
+will be created and the subsequent upload of the same file to the same
+location will be reported as a conflict.
- Note: This is not the traditional public key paired with your private key,
- typically saved as `/home/$USER/.ssh/id_rsa.pub`. Setting this path in
- `pubkey_file` will not work.
+The value can also be set by --protondrive-replace-existing-draft=true
- Example:
+If the option is set to true, the draft will be replaced and then the
+upload operation will restart. If there are other clients also uploading
+at the same file location at the same time, the behavior is currently
+unknown. Need to set to true for integration tests. If the option is set
+to false, an error "a draft exist - usually this means a file is being
+uploaded at another client, or, there was a failed upload attempt" will
+be returned, and no upload will happen.
-[remote] type = sftp host = example.com user = sftpuser key_file =
-~/id_rsa pubkey_file = ~/id_rsa-cert.pub
+Properties:
+- Config: replace_existing_draft
+- Env Var: RCLONE_PROTONDRIVE_REPLACE_EXISTING_DRAFT
+- Type: bool
+- Default: false
- If you concatenate a cert with a private key then you can specify the
- merged file in both places.
+--protondrive-enable-caching
- Note: the cert must come first in the file. e.g.
+Caches the files and folders metadata to reduce API calls
+
+Notice: If you are mounting ProtonDrive as a VFS, please disable this
+feature, as the current implementation doesn't update or clear the cache
+when there are external changes.
+
+The files and folders on ProtonDrive are represented as links with
+keyrings, which can be cached to improve performance and be friendly to
+the API server.
+
+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.
+
+Properties:
+
+- Config: enable_caching
+- Env Var: RCLONE_PROTONDRIVE_ENABLE_CACHING
+- Type: bool
+- Default: true
+
+--protondrive-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PROTONDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
+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.
+
+put.io
+
+Paths are specified as remote:path
+
+put.io paths may be as deep as required, e.g.
+remote:directory/subdirectory.
+
+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
+
+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> putio
+ 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 / Put.io
+ \ "putio"
+ [snip]
+ Storage> putio
+ ** See help for putio backend at: https://rclone.org/putio/ **
+
+ 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
+ --------------------
+ [putio]
+ type = putio
+ token = {"access_token":"XXXXXXXX","expiry":"0001-01-01T00:00:00Z"}
+ --------------------
+ y) Yes this is OK
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
+ Current remotes:
+
+ Name Type
+ ==== ====
+ putio putio
+
+ 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
+
+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 put.io 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.
+
+You can then use it like this,
+
+List directories in top level of your put.io
+
+ rclone lsd remote:
+
+List all the files in your put.io
+
+ rclone ls remote:
+
+To copy a local directory to a put.io directory called backup
+
+ rclone copy /home/source remote:backup
+
+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.
+
+Standard options
+
+Here are the Standard options specific to putio (Put.io).
+
+--putio-client-id
+
+OAuth Client Id.
+
+Leave blank normally.
+
+Properties:
+
+- Config: client_id
+- Env Var: RCLONE_PUTIO_CLIENT_ID
+- Type: string
+- Required: false
+
+--putio-client-secret
+
+OAuth Client Secret.
+
+Leave blank normally.
+
+Properties:
+
+- Config: client_secret
+- Env Var: RCLONE_PUTIO_CLIENT_SECRET
+- Type: string
+- Required: false
+
+Advanced options
+
+Here are the Advanced options specific to putio (Put.io).
+
+--putio-token
+
+OAuth Access Token as a JSON blob.
+
+Properties:
+
+- Config: token
+- Env Var: RCLONE_PUTIO_TOKEN
+- Type: string
+- Required: false
+
+--putio-auth-url
+
+Auth server URL.
+
+Leave blank to use the provider defaults.
+
+Properties:
+
+- Config: auth_url
+- Env Var: RCLONE_PUTIO_AUTH_URL
+- Type: string
+- Required: false
+
+--putio-token-url
+
+Token server url.
+
+Leave blank to use the provider defaults.
+
+Properties:
+
+- Config: token_url
+- Env Var: RCLONE_PUTIO_TOKEN_URL
+- Type: string
+- Required: false
+
+--putio-encoding
+
+The encoding for the backend.
+
+See the encoding section in the overview for more info.
+
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_PUTIO_ENCODING
+- Type: Encoding
+- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
+
+--putio-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PUTIO_DESCRIPTION
+- Type: string
+- Required: false
+
+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
+
+Proton Drive is an end-to-end encrypted Swiss vault for your files that
+protects your data.
+
+This is an rclone backend for Proton Drive which supports the file
+transfer features of Proton Drive using the same client-side encryption.
+
+Due to the fact that Proton Drive doesn't publish its API documentation,
+this backend is implemented with best efforts by reading the
+open-sourced client source code and observing the Proton Drive traffic
+in the browser.
+
+NB This backend is currently in Beta. It is believed to be correct and
+all the integration tests pass. However the Proton Drive protocol has
+evolved over time there may be accounts it is not compatible with.
+Please post on the rclone forum if you find an incompatibility.
+
+Paths are specified as remote:path
+
+Paths may be as deep as required, e.g. remote:directory/subdirectory.
+
+Configurations
+
+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 / Proton Drive
+ \ "protondrive"
+ [snip]
+ Storage> protondrive
+ User name
+ user> you@protonmail.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:
+ Option 2fa.
+ 2FA code (if the account requires one)
+ Enter a value. Press Enter to leave empty.
+ 2fa> 123456
+ Remote config
+ --------------------
+ [remote]
+ type = protondrive
+ user = you@protonmail.com
+ pass = *** ENCRYPTED ***
+ --------------------
+ y) Yes this is OK
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
+
+NOTE: The Proton Drive 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.
+
+Once configured you can then use rclone like this,
+
+List directories in top level of your Proton Drive
+
+ rclone lsd remote:
+
+List all the files in your Proton Drive
+
+ 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
+
+Proton Drive Bridge does not support updating modification times yet.
+
+The SHA1 hash algorithm is supported.
+
+Restricted filename characters
+
+Invalid UTF-8 bytes will be replaced, also left and right spaces will be
+removed (code reference)
+
+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
+
+Here are the Standard options specific to protondrive (Proton Drive).
+
+--protondrive-username
+
+The username of your proton account
+
+Properties:
+
+- Config: username
+- Env Var: RCLONE_PROTONDRIVE_USERNAME
+- Type: string
+- Required: true
+
+--protondrive-password
+
+The password of your proton account.
+
+NB Input to this must be obscured - see rclone obscure.
+
+Properties:
+
+- Config: password
+- Env Var: RCLONE_PROTONDRIVE_PASSWORD
+- Type: string
+- Required: true
+
+--protondrive-2fa
+
+The 2FA code
+
+The value can also be provided with --protondrive-2fa=000000
+
+The 2FA code of your proton drive account if the account is set up with
+two-factor authentication
+
+Properties:
+
+- Config: 2fa
+- Env Var: RCLONE_PROTONDRIVE_2FA
+- Type: string
+- Required: false
+
+Advanced options
+
+Here are the Advanced options specific to protondrive (Proton Drive).
+
+--protondrive-mailbox-password
+
+The mailbox password of your two-password proton account.
+
+For more information regarding the mailbox password, please check the
+following official knowledge base article:
+https://proton.me/support/the-difference-between-the-mailbox-password-and-login-password
+
+NB Input to this must be obscured - see rclone obscure.
+
+Properties:
+
+- Config: mailbox_password
+- Env Var: RCLONE_PROTONDRIVE_MAILBOX_PASSWORD
+- Type: string
+- Required: false
+
+--protondrive-client-uid
+
+Client uid key (internal use only)
+
+Properties:
+
+- Config: client_uid
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_UID
+- Type: string
+- Required: false
+
+--protondrive-client-access-token
+
+Client access token key (internal use only)
+
+Properties:
+
+- Config: client_access_token
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_ACCESS_TOKEN
+- Type: string
+- Required: false
+
+--protondrive-client-refresh-token
+
+Client refresh token key (internal use only)
+
+Properties:
+
+- Config: client_refresh_token
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_REFRESH_TOKEN
+- Type: string
+- Required: false
+
+--protondrive-client-salted-key-pass
+
+Client salted key pass key (internal use only)
+
+Properties:
+
+- Config: client_salted_key_pass
+- Env Var: RCLONE_PROTONDRIVE_CLIENT_SALTED_KEY_PASS
+- Type: string
+- Required: false
+
+--protondrive-encoding
+
+The encoding for the backend.
+
+See the encoding section in the overview for more info.
+
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_PROTONDRIVE_ENCODING
+- Type: Encoding
+- Default: Slash,LeftSpace,RightSpace,InvalidUtf8,Dot
+
+--protondrive-original-file-size
+
+Return the file size before encryption
+
+The size of the encrypted file will be different from (bigger than) the
+original file size. Unless there is a reason to return the file size
+after encryption is performed, otherwise, set this option to true, as
+features like Open() which will need to be supplied with original
+content size, will fail to operate properly
+
+Properties:
+
+- Config: original_file_size
+- Env Var: RCLONE_PROTONDRIVE_ORIGINAL_FILE_SIZE
+- Type: bool
+- Default: true
+
+--protondrive-app-version
+
+The app version string
+
+The app version string indicates the client that is currently performing
+the API request. This information is required and will be sent with
+every API request.
+
+Properties:
+
+- Config: app_version
+- Env Var: RCLONE_PROTONDRIVE_APP_VERSION
+- Type: string
+- Default: "macos-drive@1.0.0-alpha.1+rclone"
+
+--protondrive-replace-existing-draft
+
+Create a new revision when filename conflict is detected
+
+When a file upload is cancelled or failed before completion, a draft
+will be created and the subsequent upload of the same file to the same
+location will be reported as a conflict.
+
+The value can also be set by --protondrive-replace-existing-draft=true
+
+If the option is set to true, the draft will be replaced and then the
+upload operation will restart. If there are other clients also uploading
+at the same file location at the same time, the behavior is currently
+unknown. Need to set to true for integration tests. If the option is set
+to false, an error "a draft exist - usually this means a file is being
+uploaded at another client, or, there was a failed upload attempt" will
+be returned, and no upload will happen.
+
+Properties:
+
+- Config: replace_existing_draft
+- Env Var: RCLONE_PROTONDRIVE_REPLACE_EXISTING_DRAFT
+- Type: bool
+- Default: false
+
+--protondrive-enable-caching
+
+Caches the files and folders metadata to reduce API calls
+
+Notice: If you are mounting ProtonDrive as a VFS, please disable this
+feature, as the current implementation doesn't update or clear the cache
+when there are external changes.
+
+The files and folders on ProtonDrive are represented as links with
+keyrings, which can be cached to improve performance and be friendly to
+the API server.
+
+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.
+
+Properties:
+
+- Config: enable_caching
+- Env Var: RCLONE_PROTONDRIVE_ENABLE_CACHING
+- Type: bool
+- Default: true
+
+--protondrive-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_PROTONDRIVE_DESCRIPTION
+- Type: string
+- Required: false
+
+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
+
+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
+
+ rclone config
+
+This will guide you through an interactive setup process. To
+authenticate you will need the URL of your server, your email (or
+username) and your password.
+
+ No remotes found, make a new one?
+ n) New remote
+ s) Set configuration password
+ q) Quit config
+ n/s/q> n
+ name> seafile
+ 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 / Seafile
+ \ "seafile"
+ [snip]
+ Storage> seafile
+ ** See help for seafile backend at: https://rclone.org/seafile/ **
+
+ URL of seafile 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 cloud.seafile.com
+ \ "https://cloud.seafile.com/"
+ url> http://my.seafile.server/
+ User name (usually email address)
+ Enter a string value. Press Enter for the default ("").
+ user> me@example.com
+ Password
+ y) Yes type in my own password
+ g) Generate random password
+ n) No leave this optional password blank (default)
+ y/g> y
+ Enter the password:
+ password:
+ Confirm the password:
+ password:
+ Two-factor authentication ('true' if the account has 2FA enabled)
+ Enter a boolean value (true or false). Press Enter for the default ("false").
+ 2fa> false
+ Name of the library. Leave blank to access all non-encrypted libraries.
+ Enter a string value. Press Enter for the default ("").
+ library>
+ Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
+ y) Yes type in my own password
+ g) Generate random password
+ n) No leave this optional password blank (default)
+ y/g/n> n
+ Edit advanced config? (y/n)
+ y) Yes
+ n) No (default)
+ y/n> n
+ Remote config
+ Two-factor authentication is not enabled on this account.
+ --------------------
+ [seafile]
+ type = seafile
+ url = http://my.seafile.server/
+ user = me@example.com
+ pass = *** ENCRYPTED ***
+ 2fa = false
+ --------------------
+ y) Yes this is OK (default)
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
+
+This remote is called seafile. It's pointing to the root of your seafile
+server and can now be used like this:
+
+See all libraries
+
+ rclone lsd seafile:
+
+Create a new library
+
+ rclone mkdir seafile:library
+
+List the contents of a library
+
+ rclone ls seafile:library
+
+Sync /home/local/directory to the remote library, deleting any excess
+files in the library.
+
+ rclone sync --interactive /home/local/directory seafile:library
+
+Configuration in library mode
+
+Here's an example of a configuration in library mode with a user that
+has the two-factor authentication enabled. Your 2FA code will be asked
+at the end of the configuration, and will attempt to authenticate you:
+
+ No remotes found, make a new one?
+ n) New remote
+ s) Set configuration password
+ q) Quit config
+ n/s/q> n
+ name> seafile
+ 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 / Seafile
+ \ "seafile"
+ [snip]
+ Storage> seafile
+ ** See help for seafile backend at: https://rclone.org/seafile/ **
+
+ URL of seafile 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 cloud.seafile.com
+ \ "https://cloud.seafile.com/"
+ url> http://my.seafile.server/
+ User name (usually email address)
+ Enter a string value. Press Enter for the default ("").
+ user> me@example.com
+ Password
+ y) Yes type in my own password
+ g) Generate random password
+ n) No leave this optional password blank (default)
+ y/g> y
+ Enter the password:
+ password:
+ Confirm the password:
+ password:
+ Two-factor authentication ('true' if the account has 2FA enabled)
+ Enter a boolean value (true or false). Press Enter for the default ("false").
+ 2fa> true
+ Name of the library. Leave blank to access all non-encrypted libraries.
+ Enter a string value. Press Enter for the default ("").
+ library> My Library
+ Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
+ y) Yes type in my own password
+ g) Generate random password
+ n) No leave this optional password blank (default)
+ y/g/n> n
+ Edit advanced config? (y/n)
+ y) Yes
+ n) No (default)
+ y/n> n
+ Remote config
+ Two-factor authentication: please enter your 2FA code
+ 2fa code> 123456
+ Authenticating...
+ Success!
+ --------------------
+ [seafile]
+ type = seafile
+ url = http://my.seafile.server/
+ user = me@example.com
+ pass =
+ 2fa = true
+ library = My Library
+ --------------------
+ y) Yes this is OK (default)
+ e) Edit this remote
+ d) Delete this remote
+ y/e/d> y
+
+You'll notice your password is blank in the configuration. It's because
+we only need the password to authenticate you once.
+
+You specified My Library during the configuration. The root of the
+remote is pointing at the root of the library My Library:
+
+See all files in the library:
+
+ rclone lsd seafile:
+
+Create a new directory inside the library
+
+ rclone mkdir seafile:directory
+
+List the contents of a directory
+
+ 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
+
+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
+
+In addition to the default restricted characters set the following
+characters are also replaced:
+
+ Character Value Replacement
+ ----------- ------- -------------
+ / 0x2F /
+ " 0x22 "
+ \ 0x5C \
+
+Invalid UTF-8 bytes will also be replaced, as they can't be used in JSON
+strings.
+
+Seafile and rclone link
+
+Rclone supports generating share links for non-encrypted libraries only.
+They can either be for a file or a directory:
+
+ rclone link seafile:seafile-tutorial.doc
+ http://my.seafile.server/f/fdcd8a2f93f84b8b90f4/
+
+or if run on a directory you will get:
+
+ rclone link seafile:dir
+ http://my.seafile.server/d/9ea2455f6f55478bbb0d/
+
+Please note a share link is unique for each file or directory. If you
+run a link command on a file/dir that has already been shared, you will
+get the exact same link.
+
+Compatibility
+
+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
+
+Here are the Standard options specific to seafile (seafile).
+
+--seafile-url
+
+URL of seafile host to connect to.
+
+Properties:
+
+- Config: url
+- Env Var: RCLONE_SEAFILE_URL
+- Type: string
+- Required: true
+- Examples:
+ - "https://cloud.seafile.com/"
+ - Connect to cloud.seafile.com.
+
+--seafile-user
+
+User name (usually email address).
+
+Properties:
+
+- Config: user
+- Env Var: RCLONE_SEAFILE_USER
+- Type: string
+- Required: true
+
+--seafile-pass
+
+Password.
+
+NB Input to this must be obscured - see rclone obscure.
+
+Properties:
+
+- Config: pass
+- Env Var: RCLONE_SEAFILE_PASS
+- Type: string
+- Required: false
+
+--seafile-2fa
+
+Two-factor authentication ('true' if the account has 2FA enabled).
+
+Properties:
+
+- Config: 2fa
+- Env Var: RCLONE_SEAFILE_2FA
+- Type: bool
+- Default: false
+
+--seafile-library
+
+Name of the library.
+
+Leave blank to access all non-encrypted libraries.
+
+Properties:
+
+- Config: library
+- Env Var: RCLONE_SEAFILE_LIBRARY
+- Type: string
+- Required: false
+
+--seafile-library-key
+
+Library password (for encrypted libraries only).
+
+Leave blank if you pass it through the command line.
+
+NB Input to this must be obscured - see rclone obscure.
+
+Properties:
+
+- Config: library_key
+- Env Var: RCLONE_SEAFILE_LIBRARY_KEY
+- Type: string
+- Required: false
+
+--seafile-auth-token
+
+Authentication token.
+
+Properties:
+
+- Config: auth_token
+- Env Var: RCLONE_SEAFILE_AUTH_TOKEN
+- Type: string
+- Required: false
+
+Advanced options
+
+Here are the Advanced options specific to seafile (seafile).
+
+--seafile-create-library
+
+Should rclone create a library if it doesn't exist.
+
+Properties:
+
+- Config: create_library
+- Env Var: RCLONE_SEAFILE_CREATE_LIBRARY
+- Type: bool
+- Default: false
+
+--seafile-encoding
+
+The encoding for the backend.
+
+See the encoding section in the overview for more info.
+
+Properties:
+
+- Config: encoding
+- Env Var: RCLONE_SEAFILE_ENCODING
+- Type: Encoding
+- Default: Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8
+
+--seafile-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SEAFILE_DESCRIPTION
+- Type: string
+- Required: false
+
+SFTP
+
+SFTP is the Secure (or SSH) File Transfer Protocol.
+
+The SFTP backend can be used with a number of different providers:
+
+- Hetzner Storage Box
+- rsync.net
+
+SFTP runs over SSH v2 and is installed as standard with most modern SSH
+installations.
+
+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. For example, rclone lsd remote:
+would list the home directory of the user configured in the rclone
+remote config (i.e /home/sftpuser). However, rclone lsd remote:/ would
+list the root directory for remote machine (i.e. /)
+
+Note that some SFTP servers will need the leading / - Synology is a good
+example of this. rsync.net and Hetzner, on the other hand, requires
+users to OMIT the leading /.
+
+Note that by default rclone will try to execute shell commands on the
+server, see shell access considerations.
+
+Configuration
+
+Here is an example of making an SFTP 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
+ name> remote
+ Type of storage to configure.
+ Choose a number from below, or type in your own value
+ [snip]
+ XX / SSH/SFTP
+ \ "sftp"
+ [snip]
+ Storage> sftp
+ SSH host to connect to
+ Choose a number from below, or type in your own value
+ 1 / Connect to example.com
+ \ "example.com"
+ host> example.com
+ SSH username
+ Enter a string value. Press Enter for the default ("$USER").
+ user> sftpuser
+ SSH port number
+ Enter a signed integer. Press Enter for the default (22).
+ port>
+ SSH password, leave blank to use ssh-agent.
+ y) Yes type in my own password
+ g) Generate random password
+ n) No leave this optional password blank
+ y/g/n> n
+ Path to unencrypted PEM-encoded private key file, leave blank to use ssh-agent.
+ key_file>
+ Remote config
+ --------------------
+ [remote]
+ host = example.com
+ user = sftpuser
+ port =
+ pass =
+ key_file =
+ --------------------
+ 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 directories in the home directory
+
+ rclone lsd remote:
+
+See all directories in the root directory
+
+ 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
+
+Mount the remote path /srv/www-data/ to the local path /mnt/www-data
+
+ rclone mount remote:/srv/www-data/ /mnt/www-data
+
+SSH Authentication
+
+The SFTP remote supports three authentication methods:
+
+- Password
+- Key file, including certificate signed keys
+- ssh-agent
+
+Key files should be PEM-encoded private key files. For instance
+/home/$USER/.ssh/id_rsa. Only unencrypted OpenSSH or PEM encrypted files
+are supported.
+
+The key file can be specified in either an external file (key_file) or
+contained within the rclone config file (key_pem). If using key_pem in
+the config file, the entry should be on a single line with new line (''
+or '') separating lines. i.e.
+
+ key_pem = -----BEGIN RSA PRIVATE KEY-----\nMaMbaIXtE\n0gAMbMbaSsd\nMbaass\n-----END RSA PRIVATE KEY-----
+
+This will generate it correctly for key_pem for use in the config:
+
+ awk '{printf "%s\\n", $0}' < ~/.ssh/id_rsa
+
+If you don't specify pass, key_file, or key_pem or ask_password then
+rclone will attempt to contact an ssh-agent. You can also specify
+key_use_agent to force the usage of an ssh-agent. In this case key_file
+or key_pem can also be specified to force the usage of a specific key in
+the ssh-agent.
+
+Using an ssh-agent is the only way to load encrypted OpenSSH keys at the
+moment.
+
+If you set the ask_password option, rclone will prompt for a password
+when needed and no password has been configured.
+
+Certificate-signed keys
+
+With traditional key-based authentication, you configure your private
+key only, and the public key built into it will be used during the
+authentication process.
+
+If you have a certificate you may use it to sign your public key,
+creating a separate SSH user certificate that should be used instead of
+the plain public key extracted from the private key. Then you must
+provide the path to the user certificate public key file in pubkey_file.
+
+Note: This is not the traditional public key paired with your private
+key, typically saved as /home/$USER/.ssh/id_rsa.pub. Setting this path
+in pubkey_file will not work.
+
+Example:
+
+ [remote]
+ type = sftp
+ host = example.com
+ user = sftpuser
+ key_file = ~/id_rsa
+ pubkey_file = ~/id_rsa-cert.pub
+
+If you concatenate a cert with a private key then you can specify the
+merged file in both places.
+
+Note: the cert must come first in the file. e.g.
- ```
cat id_rsa-cert.pub id_rsa > merged_key
- ```
- ### Host key validation
+Host key validation
- By default rclone will not check the server's host key for validation. This
- can allow an attacker to replace a server with their own and if you use
- password authentication then this can lead to that password being exposed.
+By default rclone will not check the server's host key for validation.
+This can allow an attacker to replace a server with their own and if you
+use password authentication then this can lead to that password being
+exposed.
- Host key matching, using standard `known_hosts` files can be turned on by
- enabling the `known_hosts_file` option. This can point to the file maintained
- by `OpenSSH` or can point to a unique file.
+Host key matching, using standard known_hosts files can be turned on by
+enabling the known_hosts_file option. This can point to the file
+maintained by OpenSSH or can point to a unique file.
- e.g. using the OpenSSH `known_hosts` file:
+e.g. using the OpenSSH known_hosts file:
- ```
[remote]
type = sftp
host = example.com
@@ -43244,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
@@ -43861,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
@@ -44010,6 +49014,17 @@ Properties:
- Type: bool
- Default: false
+--sftp-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SFTP_DESCRIPTION
+- Type: string
+- Required: false
+
Limitations
On some SFTP servers (e.g. Synology) the paths are different for SSH and
@@ -44290,8 +49305,25 @@ Properties:
- Default:
Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot
+--smb-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SMB_DESCRIPTION
+- Type: string
+- Required: false
+
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.
@@ -44575,6 +49607,22 @@ Properties:
- Type: string
- Required: false
+Advanced options
+
+Here are the Advanced options specific to storj (Storj Decentralized
+Cloud Storage).
+
+--storj-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_STORJ_DESCRIPTION
+- Type: string
+- Required: false
+
Usage
Paths are specified as remote:bucket (or remote: for the lsf command.)
@@ -44982,6 +50030,17 @@ Properties:
- Type: Encoding
- Default: Slash,Ctl,InvalidUtf8,Dot
+--sugarsync-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_SUGARSYNC_DESCRIPTION
+- Type: string
+- Required: false
+
Limitations
rclone about is not supported by the SugarSync backend. Backends without
@@ -44995,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
@@ -45138,6 +50459,17 @@ Properties:
- Default:
Slash,LtGt,DoubleQuote,BackQuote,Del,Ctl,LeftSpace,InvalidUtf8,Dot
+--uptobox-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_UPTOBOX_DESCRIPTION
+- Type: string
+- Required: false
+
Limitations
Uptobox will delete inactive files that have not been accessed in 60
@@ -45504,6 +50836,17 @@ Properties:
- Type: SizeSuffix
- Default: 1Gi
+--union-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_UNION_DESCRIPTION
+- Type: string
+- Required: false
+
Metadata
Any metadata supported by the underlying remote is read and written.
@@ -45782,6 +51125,39 @@ Properties:
- Type: SizeSuffix
- Default: 10Mi
+--webdav-owncloud-exclude-shares
+
+Exclude ownCloud shares
+
+Properties:
+
+- Config: owncloud_exclude_shares
+- Env Var: RCLONE_WEBDAV_OWNCLOUD_EXCLUDE_SHARES
+- 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.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_WEBDAV_DESCRIPTION
+- Type: string
+- Required: false
+
Provider notes
See below for notes on specific providers.
@@ -46165,6 +51541,17 @@ Properties:
- Type: Encoding
- Default: Slash,Del,Ctl,InvalidUtf8,Dot
+--yandex-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_YANDEX_DESCRIPTION
+- Type: string
+- Required: false
+
Limitations
When uploading very large files (bigger than about 5 GiB) you will need
@@ -46412,6 +51799,17 @@ Properties:
- Type: Encoding
- Default: Del,Ctl,InvalidUtf8
+--zoho-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_ZOHO_DESCRIPTION
+- Type: string
+- Required: false
+
Setting up your own client_id
For Zoho we advise you to set up your own client_id. To do so you have
@@ -46651,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
@@ -46669,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
@@ -46685,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
@@ -46953,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.
@@ -46966,6 +52411,17 @@ Properties:
- Type: Encoding
- Default: Slash,Dot
+--local-description
+
+Description of the remote.
+
+Properties:
+
+- Config: description
+- Env Var: RCLONE_LOCAL_DESCRIPTION
+- Type: string
+- Required: false
+
Metadata
Depending on which OS is in use the local backend may return only some
@@ -46977,6 +52433,8 @@ 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.
+
Here are the possible system metadata items for the local backend.
---------------------------------------------------------------------------------------------------
@@ -47039,6 +52497,559 @@ 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
+
+- Major features
+ - Rclone will now sync directory modification times if the backend
+ supports it.
+ - This can be disabled with --no-update-dir-modtime
+ - See the overview and look for the D flags in the ModTime
+ column to see which backends support it.
+ - Rclone will now sync directory metadata if the backend supports
+ it when -M/--metadata is in use.
+ - See the overview and look for the D flags in the Metadata
+ column to see which backends support it.
+ - Bisync has received many updates see below for more details or
+ bisync's changelog
+- Removed backends
+ - amazonclouddrive: Remove Amazon Drive backend code and docs
+ (Nick Craig-Wood)
+- New Features
+ - backend
+ - Add description field for all backends (Paul Stern)
+ - build
+ - Update to go1.22 and make go1.20 the minimum required
+ version (Nick Craig-Wood)
+ - Fix CVE-2024-24786 by upgrading google.golang.org/protobuf
+ (Nick Craig-Wood)
+ - check: Respect --no-unicode-normalization and --ignore-case-sync
+ for --checkfile (nielash)
+ - cmd: Much improved shell auto completion which reduces the size
+ of the completion file and works faster (Nick Craig-Wood)
+ - doc updates (albertony, ben-ba, Eli, emyarod, huajin tong, Jack
+ Provance, kapitainsky, keongalvin, Nick Craig-Wood, nielash,
+ rarspace01, rzitzer, Tera, Vincent Murphy)
+ - fs: Add more detailed logging for file includes/excludes (Kyle
+ Reynolds)
+ - lsf
+ - Add --time-format flag (nielash)
+ - Make metadata appear for directories (Nick Craig-Wood)
+ - lsjson: Make metadata appear for directories (Nick Craig-Wood)
+ - rc
+ - Add srcFs and dstFs to core/stats and core/transferred stats
+ (Nick Craig-Wood)
+ - Add operations/hashsum to the rc as rclone hashsum
+ equivalent (Nick Craig-Wood)
+ - Add config/paths to the rc as rclone config paths equivalent
+ (Nick Craig-Wood)
+ - sync
+ - Optionally report list of synced paths to file (nielash)
+ - Implement directory sync for mod times and metadata (Nick
+ Craig-Wood)
+ - Don't set directory modtimes if already set (nielash)
+ - Don't sync directory modtimes from backends which don't have
+ directories (Nick Craig-Wood)
+- Bug Fixes
+ - backend
+ - Make backends which use oauth implement the Shutdown and
+ shutdown the oauth properly (rkonfj)
+ - bisync
+ - Handle unicode and case normalization consistently (nielash)
+ - Partial uploads known issue on local/ftp/sftp has been
+ resolved (unless using --inplace) (nielash)
+ - Fixed handling of unicode normalization and case
+ insensitivity, support for --fix-case, --ignore-case-sync,
+ --no-unicode-normalization (nielash)
+ - Bisync no longer fails to find the correct listing file when
+ configs are overridden with backend-specific flags.
+ (nielash)
+ - nfsmount
+ - Fix exit after external unmount (nielash)
+ - Fix --volname being ignored (nielash)
+ - operations
+ - Fix renaming a file on macOS (nielash)
+ - Fix case-insensitive moves in operations.Move (nielash)
+ - Fix TestCaseInsensitiveMoveFileDryRun on chunker integration
+ tests (nielash)
+ - Fix TestMkdirModTime test (Nick Craig-Wood)
+ - Fix TestSetDirModTime for backends with SetDirModTime but
+ not Metadata (Nick Craig-Wood)
+ - Fix typo in log messages (nielash)
+ - serve nfs: Fix writing files via Finder on macOS (nielash)
+ - serve restic: Fix error handling (Michael Eischer)
+ - serve webdav: Fix --baseurl without leading / (Nick Craig-Wood)
+ - stats: Fix race between ResetCounters and stopAverageLoop called
+ from time.AfterFunc (Nick Craig-Wood)
+ - sync
+ - --fix-case flag to rename case insensitive dest (nielash)
+ - Use operations.DirMove instead of sync.MoveDir for
+ --fix-case (nielash)
+ - systemd: Fix detection and switch to the coreos package
+ everywhere rather than having 2 separate libraries (Anagh Kumar
+ Baranwal)
+- Mount
+ - Fix macOS not noticing errors with --daemon (Nick Craig-Wood)
+ - Notice daemon dying much quicker (Nick Craig-Wood)
+- VFS
+ - Fix unicode normalization on macOS (nielash)
+- Bisync
+ - Copies and deletes are now handled in one operation instead of
+ two (nielash)
+ - --track-renames and --backup-dir are now supported (nielash)
+ - Final listings are now generated from sync results, to avoid
+ needing to re-list (nielash)
+ - Bisync is now much more resilient to changes that happen during
+ a bisync run, and far less prone to critical errors / undetected
+ changes (nielash)
+ - Bisync is now capable of rolling a file listing back in cases of
+ uncertainty, essentially marking the file as needing to be
+ rechecked next time. (nielash)
+ - A few basic terminal colors are now supported, controllable with
+ --color (AUTO|NEVER|ALWAYS) (nielash)
+ - Initial listing snapshots of Path1 and Path2 are now generated
+ concurrently, using the same "march" infrastructure as check and
+ sync, for performance improvements and less risk of error.
+ (nielash)
+ - --resync is now much more efficient (especially for users of
+ --create-empty-src-dirs) (nielash)
+ - Google Docs (and other files of unknown size) are now supported
+ (with the same options as in sync) (nielash)
+ - Equality checks before a sync conflict rename now fall back to
+ cryptcheck (when possible) or --download, (nielash) instead of
+ of --size-only, when check is not available.
+ - Bisync now fully supports comparing based on any combination of
+ size, modtime, and checksum, lifting the prior restriction on
+ backends without modtime support. (nielash)
+ - Bisync now supports a "Graceful Shutdown" mode to cleanly cancel
+ a run early without requiring --resync. (nielash)
+ - New --recover flag allows robust recovery in the event of
+ interruptions, without requiring --resync. (nielash)
+ - A new --max-lock setting allows lock files to automatically
+ renew and expire, for better automatic recovery when a run is
+ interrupted. (nielash)
+ - Bisync now supports auto-resolving sync conflicts and
+ customizing rename behavior with new --conflict-resolve,
+ --conflict-loser, and --conflict-suffix flags. (nielash)
+ - A new --resync-mode flag allows more control over which version
+ of a file gets kept during a --resync. (nielash)
+ - Bisync now supports --retries and --retries-sleep (when
+ --resilient is set.) (nielash)
+ - Clarify file operation directions in dry-run logs (Kyle
+ Reynolds)
+- Local
+ - Fix cleanRootPath on Windows after go1.21.4 stdlib update
+ (nielash)
+ - Implement setting modification time on directories (nielash)
+ - Implement modtime and metadata for directories (Nick Craig-Wood)
+ - Fix setting of btime on directories on Windows (Nick Craig-Wood)
+ - Delete backend implementation of Purge to speed up and make
+ stats (Nick Craig-Wood)
+ - Support metadata setting and mapping on server side Move (Nick
+ Craig-Wood)
+- Cache
+ - Implement setting modification time on directories (if supported
+ by wrapped remote) (nielash)
+ - Implement setting metadata on directories (Nick Craig-Wood)
+- Crypt
+ - Implement setting modification time on directories (if supported
+ by wrapped remote) (nielash)
+ - Implement setting metadata on directories (Nick Craig-Wood)
+ - Improve handling of undecryptable file names (nielash)
+ - Add missing error check spotted by linter (Nick Craig-Wood)
+- Azure Blob
+ - Implement --azureblob-delete-snapshots (Nick Craig-Wood)
+- B2
+ - Clarify exactly what --b2-download-auth-duration does in the
+ docs (Nick Craig-Wood)
+- Chunker
+ - Implement setting modification time on directories (if supported
+ by wrapped remote) (nielash)
+ - Implement setting metadata on directories (Nick Craig-Wood)
+- Combine
+ - Implement setting modification time on directories (if supported
+ by wrapped remote) (nielash)
+ - Implement setting metadata on directories (Nick Craig-Wood)
+ - Fix directory metadata error on upstream root (nielash)
+ - Fix directory move across upstreams (nielash)
+- Compress
+ - Implement setting modification time on directories (if supported
+ by wrapped remote) (nielash)
+ - Implement setting metadata on directories (Nick Craig-Wood)
+- Drive
+ - Implement setting modification time on directories (nielash)
+ - Implement modtime and metadata setting for directories (Nick
+ Craig-Wood)
+ - Support metadata setting and mapping on server side Move,Copy
+ (Nick Craig-Wood)
+- FTP
+ - Fix mkdir with rsftp which is returning the wrong code (Nick
+ Craig-Wood)
+- Hasher
+ - Implement setting modification time on directories (if supported
+ by wrapped remote) (nielash)
+ - Implement setting metadata on directories (Nick Craig-Wood)
+ - Fix error from trying to stop an already-stopped db (nielash)
+ - Look for cached hash if passed hash unexpectedly blank (nielash)
+- Imagekit
+ - Updated docs and web content (Harshit Budhraja)
+ - Updated overview - supported operations (Harshit Budhraja)
+- Mega
+ - Fix panic with go1.22 (Nick Craig-Wood)
+- Netstorage
+ - Fix Root to return correct directory when pointing to a file
+ (Nick Craig-Wood)
+- Onedrive
+ - Add metadata support (nielash)
+- Opendrive
+ - Fix moving file/folder within the same parent dir (nielash)
+- Oracle Object Storage
+ - Support backend restore command (Nikhil Ahuja)
+ - Support workload identity authentication for OKE (Anders
+ Swanson)
+- Protondrive
+ - Fix encoding of Root method (Nick Craig-Wood)
+- Quatrix
+ - Fix Content-Range header (Volodymyr)
+ - Add option to skip project folders (Oksana Zhykina)
+ - Fix Root to return correct directory when pointing to a file
+ (Nick Craig-Wood)
+- S3
+ - Add --s3-version-deleted to show delete markers in listings when
+ using versions. (Nick Craig-Wood)
+ - Add IPv6 support with option --s3-use-dual-stack (Anthony
+ Metzidis)
+ - Copy parts in parallel when doing chunked server side copy (Nick
+ Craig-Wood)
+ - GCS provider: fix server side copy of files bigger than 5G (Nick
+ Craig-Wood)
+ - Support metadata setting and mapping on server side Copy (Nick
+ Craig-Wood)
+- Seafile
+ - Fix download/upload error when FILE_SERVER_ROOT is relative
+ (DanielEgbers)
+ - Fix Root to return correct directory when pointing to a file
+ (Nick Craig-Wood)
+- SFTP
+ - Implement setting modification time on directories (nielash)
+ - Set directory modtimes update on write flag (Nick Craig-Wood)
+ - Shorten wait delay for external ssh binaries now that we are
+ using go1.20 (Nick Craig-Wood)
+- Swift
+ - Avoid unnecessary container versioning check (Joe Cai)
+- Union
+ - Implement setting modification time on directories (if supported
+ by wrapped remote) (nielash)
+ - Implement setting metadata on directories (Nick Craig-Wood)
+- WebDAV
+ - Reduce priority of chunks upload log (Gabriel Ramos)
+ - owncloud: Add config owncloud_exclude_shares which allows to
+ exclude shared files and folders when listing remote resources
+ (Thomas Müller)
+
+v1.65.2 - 2024-01-24
+
+See commits
+
+- Bug Fixes
+ - build: bump github.com/cloudflare/circl from 1.3.6 to 1.3.7
+ (dependabot)
+ - docs updates (Nick Craig-Wood, kapitainsky, nielash, Tera,
+ Harshit Budhraja)
+- VFS
+ - Fix stale data when using --vfs-cache-mode full (Nick
+ Craig-Wood)
+- Azure Blob
+ - IMPORTANT Fix data corruption bug - see #7590 (Nick Craig-Wood)
+
+v1.65.1 - 2024-01-08
+
+See commits
+
+- Bug Fixes
+ - build
+ - Bump golang.org/x/crypto to fix ssh terrapin CVE-2023-48795
+ (dependabot)
+ - Update to go1.21.5 to fix Windows path problems (Nick
+ Craig-Wood)
+ - Fix docker build on arm/v6 (Nick Craig-Wood)
+ - install.sh: fix harmless error message on install (Nick
+ Craig-Wood)
+ - accounting: fix stats to show server side transfers (Nick
+ Craig-Wood)
+ - doc fixes (albertony, ben-ba, Eli Orzitzer, emyarod, keongalvin,
+ rarspace01)
+ - nfsmount: Compile for all unix oses, add --sudo and fix
+ error/option handling (Nick Craig-Wood)
+ - operations: Fix files moved by rclone move not being counted as
+ transfers (Nick Craig-Wood)
+ - oauthutil: Avoid panic when *token and *ts.token are the same
+ (rkonfj)
+ - serve s3: Fix listing oddities (Nick Craig-Wood)
+- VFS
+ - Note that --vfs-refresh runs in the background (Nick Craig-Wood)
+- Azurefiles
+ - Fix storage base url (Oksana)
+- Crypt
+ - Fix rclone move a file over itself deleting the file (Nick
+ Craig-Wood)
+- Chunker
+ - Fix rclone move a file over itself deleting the file (Nick
+ Craig-Wood)
+- Compress
+ - Fix rclone move a file over itself deleting the file (Nick
+ Craig-Wood)
+- Dropbox
+ - Fix used space on dropbox team accounts (Nick Craig-Wood)
+- FTP
+ - Fix multi-thread copy (WeidiDeng)
+- Googlephotos
+ - Fix nil pointer exception when batch failed (Nick Craig-Wood)
+- Hasher
+ - Fix rclone move a file over itself deleting the file (Nick
+ Craig-Wood)
+ - Fix invalid memory address error when MaxAge == 0 (nielash)
+- Onedrive
+ - Fix error listing: unknown object type (Nick Craig-Wood)
+ - Fix "unauthenticated: Unauthenticated" errors when uploading
+ (Nick Craig-Wood)
+- Oracleobjectstorage
+ - Fix object storage endpoint for custom endpoints (Manoj Ghosh)
+ - Multipart copy create bucket if it doesn't exist. (Manoj Ghosh)
+- Protondrive
+ - Fix CVE-2023-45286 / GHSA-xwh9-gc39-5298 (Nick Craig-Wood)
+- S3
+ - Fix crash if no UploadId in multipart upload (Nick Craig-Wood)
+- Smb
+ - Fix shares not listed by updating go-smb2 (halms)
+- Union
+ - Fix rclone move a file over itself deleting the file (Nick
+ Craig-Wood)
+
v1.65.0 - 2023-11-26
See commits
@@ -53501,10 +59512,12 @@ Bugs and Limitations
Limitations
-Directory timestamps aren't preserved
+Directory timestamps aren't preserved on some backends
-Rclone doesn't currently preserve the timestamps of directories. This is
-because rclone only really considers objects when syncing.
+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
@@ -53598,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.
@@ -53850,7 +59863,7 @@ email addresses removed from here need to be added to bin/.ignore-emails to make
- Scott McGillivray scott.mcgillivray@gmail.com
- Bjørn Erik Pedersen bjorn.erik.pedersen@gmail.com
- Lukas Loesche lukas@mesosphere.io
-- emyarod allllaboutyou@gmail.com
+- emyarod emyarod@users.noreply.github.com
- T.C. Ferguson tcf909@gmail.com
- Brandur brandur@mutelight.org
- Dario Giovannetti dev@dariogiovannetti.net
@@ -54184,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
@@ -54607,6 +60620,66 @@ email addresses removed from here need to be added to bin/.ignore-emails to make
- Alen Šiljak dev@alensiljak.eu.org
- 你知道未来吗 rkonfj@gmail.com
- Abhinav Dhiman 8640877+ahnv@users.noreply.github.com
+- halms 7513146+halms@users.noreply.github.com
+- ben-ba benjamin.brauner@gmx.de
+- Eli Orzitzer e_orz@yahoo.com
+- Anthony Metzidis anthony.metzidis@gmail.com
+- emyarod afw5059@gmail.com
+- keongalvin keongalvin@gmail.com
+- rarspace01 rarspace01@users.noreply.github.com
+- Paul Stern paulstern45@gmail.com
+- Nikhil Ahuja nikhilahuja@live.com
+- Harshit Budhraja 52413945+harshit-budhraja@users.noreply.github.com
+- Tera 24725862+teraa@users.noreply.github.com
+- Kyle Reynolds kylereynoldsdev@gmail.com
+- Michael Eischer michael.eischer@gmx.de
+- Thomas Müller 1005065+DeepDiver1975@users.noreply.github.com
+- DanielEgbers 27849724+DanielEgbers@users.noreply.github.com
+- Jack Provance 49460795+njprov@users.noreply.github.com
+- Gabriel Ramos 109390599+gabrielramos02@users.noreply.github.com
+- Dan McArdle d@nmcardle.com
+- 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 3503a91fb..4a9d2240f 100644
--- a/Makefile
+++ b/Makefile
@@ -36,13 +36,14 @@ ifdef BETA_SUBDIR
endif
BETA_PATH := $(BRANCH_PATH)$(TAG)$(BETA_SUBDIR)
BETA_URL := https://beta.rclone.org/$(BETA_PATH)/
-BETA_UPLOAD_ROOT := memstore:beta-rclone-org
+BETA_UPLOAD_ROOT := beta.rclone.org:
BETA_UPLOAD := $(BETA_UPLOAD_ROOT)/$(BETA_PATH)
# Pass in GOTAGS=xyz on the make command line to set build tags
ifdef GOTAGS
BUILDTAGS=-tags "$(GOTAGS)"
LINTTAGS=--build-tags "$(GOTAGS)"
endif
+LDFLAGS=--ldflags "-s -X github.com/rclone/rclone/fs.Version=$(TAG)"
.PHONY: rclone test_all vars version
@@ -50,7 +51,7 @@ rclone:
ifeq ($(GO_OS),windows)
go run bin/resource_windows.go -version $(TAG) -syso resource_windows_`go env GOARCH`.syso
endif
- go build -v --ldflags "-s -X github.com/rclone/rclone/fs.Version=$(TAG)" $(BUILDTAGS) $(BUILD_ARGS)
+ go build -v $(LDFLAGS) $(BUILDTAGS) $(BUILD_ARGS)
ifeq ($(GO_OS),windows)
rm resource_windows_`go env GOARCH`.syso
endif
@@ -59,7 +60,7 @@ endif
mv -v `go env GOPATH`/bin/rclone`go env GOEXE`.new `go env GOPATH`/bin/rclone`go env GOEXE`
test_all:
- go install --ldflags "-s -X github.com/rclone/rclone/fs.Version=$(TAG)" $(BUILDTAGS) $(BUILD_ARGS) github.com/rclone/rclone/fstest/test_all
+ go install $(LDFLAGS) $(BUILDTAGS) $(BUILD_ARGS) github.com/rclone/rclone/fstest/test_all
vars:
@echo SHELL="'$(SHELL)'"
@@ -87,13 +88,13 @@ test: rclone test_all
# Quick test
quicktest:
- RCLONE_CONFIG="/notfound" go test $(BUILDTAGS) ./...
+ RCLONE_CONFIG="/notfound" go test $(LDFLAGS) $(BUILDTAGS) ./...
racequicktest:
- RCLONE_CONFIG="/notfound" go test $(BUILDTAGS) -cpu=2 -race ./...
+ RCLONE_CONFIG="/notfound" go test $(LDFLAGS) $(BUILDTAGS) -cpu=2 -race ./...
compiletest:
- RCLONE_CONFIG="/notfound" go test $(BUILDTAGS) -run XXX ./...
+ RCLONE_CONFIG="/notfound" go test $(LDFLAGS) $(BUILDTAGS) -run XXX ./...
# Do source code quality checks
check: rclone
@@ -167,7 +168,7 @@ website:
@if grep -R "raw HTML omitted" docs/public ; then echo "ERROR: found unescaped HTML - fix the markdown source" ; fi
upload_website: website
- rclone -v sync docs/public memstore:www-rclone-org
+ rclone -v sync docs/public www.rclone.org:
upload_test_website: website
rclone -P sync docs/public test-rclone-org:
@@ -194,8 +195,8 @@ check_sign:
cd build && gpg --verify SHA256SUMS && gpg --decrypt SHA256SUMS | sha256sum -c
upload:
- rclone -P copy build/ memstore:downloads-rclone-org/$(TAG)
- rclone lsf build --files-only --include '*.{zip,deb,rpm}' --include version.txt | xargs -i bash -c 'i={}; j="$$i"; [[ $$i =~ (.*)(-v[0-9\.]+-)(.*) ]] && j=$${BASH_REMATCH[1]}-current-$${BASH_REMATCH[3]}; rclone copyto -v "memstore:downloads-rclone-org/$(TAG)/$$i" "memstore:downloads-rclone-org/$$j"'
+ rclone -P copy build/ downloads.rclone.org:/$(TAG)
+ rclone lsf build --files-only --include '*.{zip,deb,rpm}' --include version.txt | xargs -i bash -c 'i={}; j="$$i"; [[ $$i =~ (.*)(-v[0-9\.]+-)(.*) ]] && j=$${BASH_REMATCH[1]}-current-$${BASH_REMATCH[3]}; rclone copyto -v "downloads.rclone.org:/$(TAG)/$$i" "downloads.rclone.org:/$$j"'
upload_github:
./bin/upload-github $(TAG)
@@ -205,7 +206,7 @@ cross: doc
beta:
go run bin/cross-compile.go $(BUILD_FLAGS) $(BUILDTAGS) $(BUILD_ARGS) $(TAG)
- rclone -v copy build/ memstore:pub-rclone-org/$(TAG)
+ rclone -v copy build/ pub.rclone.org:/$(TAG)
@echo Beta release ready at https://pub.rclone.org/$(TAG)/
log_since_last_release:
@@ -218,18 +219,18 @@ ci_upload:
sudo chown -R $$USER build
find build -type l -delete
gzip -r9v build
- ./rclone --config bin/travis.rclone.conf -v copy build/ $(BETA_UPLOAD)/testbuilds
+ ./rclone --no-check-dest --config bin/ci.rclone.conf -v copy build/ $(BETA_UPLOAD)/testbuilds
ifeq ($(or $(BRANCH_PATH),$(RELEASE_TAG)),)
- ./rclone --config bin/travis.rclone.conf -v copy build/ $(BETA_UPLOAD_ROOT)/test/testbuilds-latest
+ ./rclone --no-check-dest --config bin/ci.rclone.conf -v copy build/ $(BETA_UPLOAD_ROOT)/test/testbuilds-latest
endif
@echo Beta release ready at $(BETA_URL)/testbuilds
ci_beta:
git log $(LAST_TAG).. > /tmp/git-log.txt
go run bin/cross-compile.go -release beta-latest -git-log /tmp/git-log.txt $(BUILD_FLAGS) $(BUILDTAGS) $(BUILD_ARGS) $(TAG)
- rclone --config bin/travis.rclone.conf -v copy --exclude '*beta-latest*' build/ $(BETA_UPLOAD)
+ rclone --no-check-dest --config bin/ci.rclone.conf -v copy --exclude '*beta-latest*' build/ $(BETA_UPLOAD)
ifeq ($(or $(BRANCH_PATH),$(RELEASE_TAG)),)
- rclone --config bin/travis.rclone.conf -v copy --include '*beta-latest*' --include version.txt build/ $(BETA_UPLOAD_ROOT)$(BETA_SUBDIR)
+ rclone --no-check-dest --config bin/ci.rclone.conf -v copy --include '*beta-latest*' --include version.txt build/ $(BETA_UPLOAD_ROOT)$(BETA_SUBDIR)
endif
@echo Beta release ready at $(BETA_URL)
@@ -238,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/README.md b/README.md
index ddd94d53a..557adb80d 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,23 @@
+
+
+
[
](https://rclone.org/#gh-light-mode-only)
[
](https://rclone.org/#gh-dark-mode-only)
-[
](https://www.warp.dev/?utm_source=github&utm_medium=referral&utm_campaign=rclone_20231103#gh-light-mode-only)
-[
](https://www.warp.dev/?utm_source=github&utm_medium=referral&utm_campaign=rclone_20231103#gh-dark-mode-only)
[Website](https://rclone.org) |
[Documentation](https://rclone.org/docs/) |
@@ -39,7 +55,9 @@ Rclone *("rsync for cloud storage")* is a command-line program to sync files and
* Dropbox [:page_facing_up:](https://rclone.org/dropbox/)
* Enterprise File Fabric [:page_facing_up:](https://rclone.org/filefabric/)
* Fastmail Files [:page_facing_up:](https://rclone.org/webdav/#fastmail-files)
+ * Files.com [:page_facing_up:](https://rclone.org/filescom/)
* FTP [:page_facing_up:](https://rclone.org/ftp/)
+ * GoFile [:page_facing_up:](https://rclone.org/gofile/)
* Google Cloud Storage [:page_facing_up:](https://rclone.org/googlecloudstorage/)
* Google Drive [:page_facing_up:](https://rclone.org/drive/)
* Google Photos [:page_facing_up:](https://rclone.org/googlephotos/)
@@ -57,6 +75,7 @@ Rclone *("rsync for cloud storage")* is a command-line program to sync files and
* Liara Object Storage [:page_facing_up:](https://rclone.org/s3/#liara-object-storage)
* Linkbox [:page_facing_up:](https://rclone.org/linkbox)
* Linode Object Storage [:page_facing_up:](https://rclone.org/s3/#linode)
+ * Magalu Object Storage [:page_facing_up:](https://rclone.org/s3/#magalu)
* Mail.ru Cloud [:page_facing_up:](https://rclone.org/mailru/)
* Memset Memstore [:page_facing_up:](https://rclone.org/swift/)
* Mega [:page_facing_up:](https://rclone.org/mega/)
@@ -76,6 +95,7 @@ Rclone *("rsync for cloud storage")* is a command-line program to sync files and
* pCloud [:page_facing_up:](https://rclone.org/pcloud/)
* Petabox [:page_facing_up:](https://rclone.org/s3/#petabox)
* PikPak [:page_facing_up:](https://rclone.org/pikpak/)
+ * Pixeldrain [:page_facing_up:](https://rclone.org/pixeldrain/)
* premiumize.me [:page_facing_up:](https://rclone.org/premiumizeme/)
* put.io [:page_facing_up:](https://rclone.org/putio/)
* Proton Drive [:page_facing_up:](https://rclone.org/protondrive/)
@@ -94,6 +114,7 @@ Rclone *("rsync for cloud storage")* is a command-line program to sync files and
* SugarSync [:page_facing_up:](https://rclone.org/sugarsync/)
* Synology C2 Object Storage [:page_facing_up:](https://rclone.org/s3/#synology-c2)
* Tencent Cloud Object Storage (COS) [:page_facing_up:](https://rclone.org/s3/#tencent-cos)
+ * Uloz.to [:page_facing_up:](https://rclone.org/ulozto/)
* Wasabi [:page_facing_up:](https://rclone.org/s3/#wasabi)
* WebDAV [:page_facing_up:](https://rclone.org/webdav/)
* Yandex Disk [:page_facing_up:](https://rclone.org/yandex/)
diff --git a/RELEASE.md b/RELEASE.md
index 71e5b7918..0ac43ea82 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -37,18 +37,44 @@ This file describes how to make the various kinds of releases
## Update dependencies
-Early in the next release cycle update the dependencies
+Early in the next release cycle update the dependencies.
* Review any pinned packages in go.mod and remove if possible
- * make updatedirect
- * make GOTAGS=cmount
- * make compiletest
- * git commit -a -v
- * make update
- * make GOTAGS=cmount
- * make compiletest
+ * `make updatedirect`
+ * `make GOTAGS=cmount`
+ * `make compiletest`
+ * Fix anything which doesn't compile at this point and commit changes here
+ * `git commit -a -v -m "build: update all dependencies"`
+
+If the `make updatedirect` upgrades the version of go in the `go.mod`
+then go to manual mode. `go1.20` here is the lowest supported version
+in the `go.mod`.
+
+```
+go list -m -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' all > /tmp/potential-upgrades
+go get -d $(cat /tmp/potential-upgrades)
+go mod tidy -go=1.20 -compat=1.20
+```
+
+If the `go mod tidy` fails use the output from it to remove the
+package which can't be upgraded from `/tmp/potential-upgrades` when
+done
+
+```
+git co go.mod go.sum
+```
+
+And try again.
+
+Optionally upgrade the direct and indirect dependencies. This is very
+likely to fail if the manual method was used abve - in that case
+ignore it as it is too time consuming to fix.
+
+ * `make update`
+ * `make GOTAGS=cmount`
+ * `make compiletest`
* roll back any updates which didn't compile
- * git commit -a -v --amend
+ * `git commit -a -v --amend`
* **NB** watch out for this changing the default go version in `go.mod`
Note that `make update` updates all direct and indirect dependencies
@@ -57,6 +83,9 @@ doing that so it may be necessary to roll back dependencies to the
version specified by `make updatedirect` in order to get rclone to
build.
+Once it compiles locally, push it on a test branch and commit fixes
+until the tests pass.
+
## Tidy beta
At some point after the release run
diff --git a/VERSION b/VERSION
index 0cff9236f..6640f481f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-v1.66.0
+v1.68.0
diff --git a/backend/alias/alias_internal_test.go b/backend/alias/alias_internal_test.go
index 4e3c842af..18312eb02 100644
--- a/backend/alias/alias_internal_test.go
+++ b/backend/alias/alias_internal_test.go
@@ -23,8 +23,8 @@ func prepare(t *testing.T, root string) {
configfile.Install()
// Configure the remote
- config.FileSet(remoteName, "type", "alias")
- config.FileSet(remoteName, "remote", root)
+ config.FileSetValue(remoteName, "type", "alias")
+ config.FileSetValue(remoteName, "remote", root)
}
func TestNewFS(t *testing.T) {
@@ -81,10 +81,12 @@ func TestNewFS(t *testing.T) {
for i, gotEntry := range gotEntries {
what := fmt.Sprintf("%s, entry=%d", what, i)
wantEntry := test.entries[i]
+ _, isDir := gotEntry.(fs.Directory)
require.Equal(t, wantEntry.remote, gotEntry.Remote(), what)
- require.Equal(t, wantEntry.size, gotEntry.Size(), what)
- _, isDir := gotEntry.(fs.Directory)
+ if !isDir {
+ require.Equal(t, wantEntry.size, gotEntry.Size(), what)
+ }
require.Equal(t, wantEntry.isDir, isDir, what)
}
}
diff --git a/backend/all/all.go b/backend/all/all.go
index e90877eda..a9191c98d 100644
--- a/backend/all/all.go
+++ b/backend/all/all.go
@@ -17,7 +17,9 @@ import (
_ "github.com/rclone/rclone/backend/dropbox"
_ "github.com/rclone/rclone/backend/fichier"
_ "github.com/rclone/rclone/backend/filefabric"
+ _ "github.com/rclone/rclone/backend/filescom"
_ "github.com/rclone/rclone/backend/ftp"
+ _ "github.com/rclone/rclone/backend/gofile"
_ "github.com/rclone/rclone/backend/googlecloudstorage"
_ "github.com/rclone/rclone/backend/googlephotos"
_ "github.com/rclone/rclone/backend/hasher"
@@ -39,6 +41,7 @@ import (
_ "github.com/rclone/rclone/backend/oracleobjectstorage"
_ "github.com/rclone/rclone/backend/pcloud"
_ "github.com/rclone/rclone/backend/pikpak"
+ _ "github.com/rclone/rclone/backend/pixeldrain"
_ "github.com/rclone/rclone/backend/premiumizeme"
_ "github.com/rclone/rclone/backend/protondrive"
_ "github.com/rclone/rclone/backend/putio"
@@ -53,6 +56,7 @@ import (
_ "github.com/rclone/rclone/backend/storj"
_ "github.com/rclone/rclone/backend/sugarsync"
_ "github.com/rclone/rclone/backend/swift"
+ _ "github.com/rclone/rclone/backend/ulozto"
_ "github.com/rclone/rclone/backend/union"
_ "github.com/rclone/rclone/backend/uptobox"
_ "github.com/rclone/rclone/backend/webdav"
diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go
index 36bd50e30..358886404 100644
--- a/backend/azureblob/azureblob.go
+++ b/backend/azureblob/azureblob.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !solaris && !js
-// +build !plan9,!solaris,!js
// Package azureblob provides an interface to the Microsoft Azure blob object storage system
package azureblob
@@ -712,10 +711,11 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
ClientOptions: policyClientOptions,
}
- // Here we auth by setting one of cred, sharedKeyCred or f.svc
+ // Here we auth by setting one of cred, sharedKeyCred, f.svc or anonymous
var (
cred azcore.TokenCredential
sharedKeyCred *service.SharedKeyCredential
+ anonymous = false
)
switch {
case opt.EnvAuth:
@@ -875,6 +875,9 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
if err != nil {
return nil, fmt.Errorf("failed to acquire MSI token: %w", err)
}
+ case opt.Account != "":
+ // Anonymous access
+ anonymous = true
default:
return nil, errors.New("no authentication method configured")
}
@@ -904,6 +907,12 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
if err != nil {
return nil, fmt.Errorf("create client failed: %w", err)
}
+ } else if anonymous {
+ // Anonymous public access
+ f.svc, err = service.NewClientWithNoCredential(opt.Endpoint, &clientOpt)
+ if err != nil {
+ return nil, fmt.Errorf("create public client failed: %w", err)
+ }
}
}
if f.svc == nil {
@@ -1089,7 +1098,7 @@ func (f *Fs) list(ctx context.Context, containerName, directory, prefix string,
isDirectory := isDirectoryMarker(*file.Properties.ContentLength, file.Metadata, remote)
if isDirectory {
// Don't insert the root directory
- if remote == directory {
+ if remote == f.opt.Enc.ToStandardPath(directory) {
continue
}
// process directory markers as directories
@@ -2085,7 +2094,6 @@ func (w *azChunkWriter) WriteChunk(ctx context.Context, chunkNumber int, reader
return 0, nil
}
md5sum := m.Sum(nil)
- transactionalMD5 := md5sum[:]
// increment the blockID and save the blocks for finalize
var binaryBlockID [8]byte // block counter as LSB first 8 bytes
@@ -2108,7 +2116,7 @@ func (w *azChunkWriter) WriteChunk(ctx context.Context, chunkNumber int, reader
}
options := blockblob.StageBlockOptions{
// Specify the transactional md5 for the body, to be validated by the service.
- TransactionalValidation: blob.TransferValidationTypeMD5(transactionalMD5),
+ TransactionalValidation: blob.TransferValidationTypeMD5(md5sum),
}
_, err = w.ui.blb.StageBlock(ctx, blockID, &readSeekCloser{Reader: reader, Seeker: reader}, &options)
if err != nil {
diff --git a/backend/azureblob/azureblob_internal_test.go b/backend/azureblob/azureblob_internal_test.go
index 2479c3624..f1606cdc3 100644
--- a/backend/azureblob/azureblob_internal_test.go
+++ b/backend/azureblob/azureblob_internal_test.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !solaris && !js
-// +build !plan9,!solaris,!js
package azureblob
diff --git a/backend/azureblob/azureblob_test.go b/backend/azureblob/azureblob_test.go
index 7caf51233..1d498bb82 100644
--- a/backend/azureblob/azureblob_test.go
+++ b/backend/azureblob/azureblob_test.go
@@ -1,7 +1,6 @@
// Test AzureBlob filesystem interface
//go:build !plan9 && !solaris && !js
-// +build !plan9,!solaris,!js
package azureblob
diff --git a/backend/azureblob/azureblob_unsupported.go b/backend/azureblob/azureblob_unsupported.go
index 369d6e367..50fcea34c 100644
--- a/backend/azureblob/azureblob_unsupported.go
+++ b/backend/azureblob/azureblob_unsupported.go
@@ -2,6 +2,6 @@
// about "no buildable Go source files "
//go:build plan9 || solaris || js
-// +build plan9 solaris js
+// Package azureblob provides an interface to the Microsoft Azure blob object storage system
package azureblob
diff --git a/backend/azurefiles/azurefiles.go b/backend/azurefiles/azurefiles.go
index 95275f6d7..0cae6620f 100644
--- a/backend/azurefiles/azurefiles.go
+++ b/backend/azurefiles/azurefiles.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
// Package azurefiles provides an interface to Microsoft Azure Files
package azurefiles
@@ -1036,12 +1035,10 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
if _, createErr := fc.Create(ctx, size, nil); createErr != nil {
return fmt.Errorf("update: unable to create file: %w", createErr)
}
- } else {
+ } else if size != o.Size() {
// Resize the file if needed
- if size != o.Size() {
- if _, resizeErr := fc.Resize(ctx, size, nil); resizeErr != nil {
- return fmt.Errorf("update: unable to resize while trying to update: %w ", resizeErr)
- }
+ if _, resizeErr := fc.Resize(ctx, size, nil); resizeErr != nil {
+ return fmt.Errorf("update: unable to resize while trying to update: %w ", resizeErr)
}
}
diff --git a/backend/azurefiles/azurefiles_internal_test.go b/backend/azurefiles/azurefiles_internal_test.go
index b123ad730..77e0156cc 100644
--- a/backend/azurefiles/azurefiles_internal_test.go
+++ b/backend/azurefiles/azurefiles_internal_test.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
package azurefiles
diff --git a/backend/azurefiles/azurefiles_test.go b/backend/azurefiles/azurefiles_test.go
index d8091fa49..987d08494 100644
--- a/backend/azurefiles/azurefiles_test.go
+++ b/backend/azurefiles/azurefiles_test.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
package azurefiles
diff --git a/backend/azurefiles/azurefiles_unsupported.go b/backend/azurefiles/azurefiles_unsupported.go
index 1674e8f20..d2723e62f 100644
--- a/backend/azurefiles/azurefiles_unsupported.go
+++ b/backend/azurefiles/azurefiles_unsupported.go
@@ -2,6 +2,6 @@
// about "no buildable Go source files "
//go:build plan9 || js
-// +build plan9 js
+// Package azurefiles provides an interface to Microsoft Azure Files
package azurefiles
diff --git a/backend/b2/api/types_test.go b/backend/b2/api/types_test.go
index 6074de017..f350745fc 100644
--- a/backend/b2/api/types_test.go
+++ b/backend/b2/api/types_test.go
@@ -42,11 +42,11 @@ func TestTimestampIsZero(t *testing.T) {
}
func TestTimestampEqual(t *testing.T) {
- assert.False(t, emptyT.Equal(emptyT))
+ assert.False(t, emptyT.Equal(emptyT)) //nolint:gocritic // Don't include gocritic when running golangci-lint to avoid dupArg: suspicious method call with the same argument and receiver
assert.False(t, t0.Equal(emptyT))
assert.False(t, emptyT.Equal(t0))
assert.False(t, t0.Equal(t1))
assert.False(t, t1.Equal(t0))
- assert.True(t, t0.Equal(t0))
- assert.True(t, t1.Equal(t1))
+ assert.True(t, t0.Equal(t0)) //nolint:gocritic // Don't include gocritic when running golangci-lint to avoid dupArg: suspicious method call with the same argument and receiver
+ assert.True(t, t1.Equal(t1)) //nolint:gocritic // Don't include gocritic when running golangci-lint to avoid dupArg: suspicious method call with the same argument and receiver
}
diff --git a/backend/b2/b2.go b/backend/b2/b2.go
index 50413cc03..a71f9e43c 100644
--- a/backend/b2/b2.go
+++ b/backend/b2/b2.go
@@ -60,6 +60,7 @@ const (
defaultChunkSize = 96 * fs.Mebi
defaultUploadCutoff = 200 * fs.Mebi
largeFileCopyCutoff = 4 * fs.Gibi // 5E9 is the max
+ defaultMaxAge = 24 * time.Hour
)
// Globals
@@ -101,7 +102,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).`,
Default: "",
Hide: fs.OptionHideConfigurator,
Advanced: true,
@@ -243,7 +244,7 @@ See: [rclone backend lifecycle](#lifecycle) for setting lifecycles after bucket
Name: config.ConfigEncoding,
Help: config.ConfigEncodingHelp,
Advanced: true,
- // See: https://www.backblaze.com/b2/docs/files.html
+ // See: https://www.backblaze.com/docs/cloud-storage-files
// Encode invalid UTF-8 bytes as json doesn't handle them properly.
// FIXME: allow /, but not leading, trailing or double
Default: (encoder.Display |
@@ -298,13 +299,14 @@ type Fs struct {
// Object describes a b2 object
type Object struct {
- fs *Fs // what this object is part of
- remote string // The remote path
- id string // b2 id of the file
- modTime time.Time // The modified time of the object if known
- sha1 string // SHA-1 hash if known
- size int64 // Size of the object
- mimeType string // Content-Type of the object
+ fs *Fs // what this object is part of
+ remote string // The remote path
+ id string // b2 id of the file
+ modTime time.Time // The modified time of the object if known
+ sha1 string // SHA-1 hash if known
+ size int64 // Size of the object
+ mimeType string // Content-Type of the object
+ meta map[string]string // The object metadata if known - may be nil - with lower case keys
}
// ------------------------------------------------------------
@@ -362,7 +364,7 @@ var retryErrorCodes = []int{
504, // Gateway Time-out
}
-// shouldRetryNoAuth returns a boolean as to whether this resp and err
+// shouldRetryNoReauth returns a boolean as to whether this resp and err
// deserve to be retried. It returns the err as a convenience
func (f *Fs) shouldRetryNoReauth(ctx context.Context, resp *http.Response, err error) (bool, error) {
if fserrors.ContextError(ctx, &err) {
@@ -1248,7 +1250,7 @@ func (f *Fs) deleteByID(ctx context.Context, ID, Name string) error {
// if oldOnly is true then it deletes only non current files.
//
// Implemented here so we can make sure we delete old versions.
-func (f *Fs) purge(ctx context.Context, dir string, oldOnly bool) error {
+func (f *Fs) purge(ctx context.Context, dir string, oldOnly bool, deleteHidden bool, deleteUnfinished bool, maxAge time.Duration) error {
bucket, directory := f.split(dir)
if bucket == "" {
return errors.New("can't purge from root")
@@ -1266,7 +1268,7 @@ func (f *Fs) purge(ctx context.Context, dir string, oldOnly bool) error {
}
}
var isUnfinishedUploadStale = func(timestamp api.Timestamp) bool {
- return time.Since(time.Time(timestamp)).Hours() > 24
+ return time.Since(time.Time(timestamp)) > maxAge
}
// Delete Config.Transfers in parallel
@@ -1289,6 +1291,21 @@ func (f *Fs) purge(ctx context.Context, dir string, oldOnly bool) error {
}
}()
}
+ if oldOnly {
+ if deleteHidden && deleteUnfinished {
+ fs.Infof(f, "cleaning bucket %q of all hidden files, and pending multipart uploads older than %v", bucket, maxAge)
+ } else if deleteHidden {
+ fs.Infof(f, "cleaning bucket %q of all hidden files", bucket)
+ } else if deleteUnfinished {
+ fs.Infof(f, "cleaning bucket %q of pending multipart uploads older than %v", bucket, maxAge)
+ } else {
+ fs.Errorf(f, "cleaning bucket %q of nothing. This should never happen!", bucket)
+ return nil
+ }
+ } else {
+ fs.Infof(f, "cleaning bucket %q of all files", bucket)
+ }
+
last := ""
checkErr(f.list(ctx, bucket, directory, f.rootDirectory, f.rootBucket == "", true, 0, true, false, func(remote string, object *api.File, isDirectory bool) error {
if !isDirectory {
@@ -1299,14 +1316,14 @@ func (f *Fs) purge(ctx context.Context, dir string, oldOnly bool) error {
tr := accounting.Stats(ctx).NewCheckingTransfer(oi, "checking")
if oldOnly && last != remote {
// Check current version of the file
- if object.Action == "hide" {
+ if deleteHidden && object.Action == "hide" {
fs.Debugf(remote, "Deleting current version (id %q) as it is a hide marker", object.ID)
toBeDeleted <- object
- } else if object.Action == "start" && isUnfinishedUploadStale(object.UploadTimestamp) {
+ } else if deleteUnfinished && object.Action == "start" && isUnfinishedUploadStale(object.UploadTimestamp) {
fs.Debugf(remote, "Deleting current version (id %q) as it is a start marker (upload started at %s)", object.ID, time.Time(object.UploadTimestamp).Local())
toBeDeleted <- object
} else {
- fs.Debugf(remote, "Not deleting current version (id %q) %q", object.ID, object.Action)
+ fs.Debugf(remote, "Not deleting current version (id %q) %q dated %v (%v ago)", object.ID, object.Action, time.Time(object.UploadTimestamp).Local(), time.Since(time.Time(object.UploadTimestamp)))
}
} else {
fs.Debugf(remote, "Deleting (id %q)", object.ID)
@@ -1328,12 +1345,17 @@ func (f *Fs) purge(ctx context.Context, dir string, oldOnly bool) error {
// Purge deletes all the files and directories including the old versions.
func (f *Fs) Purge(ctx context.Context, dir string) error {
- return f.purge(ctx, dir, false)
+ return f.purge(ctx, dir, false, false, false, defaultMaxAge)
}
-// CleanUp deletes all the hidden files.
+// CleanUp deletes all hidden files and pending multipart uploads older than 24 hours.
func (f *Fs) CleanUp(ctx context.Context) error {
- return f.purge(ctx, "", true)
+ return f.purge(ctx, "", true, true, true, defaultMaxAge)
+}
+
+// cleanUp deletes all hidden files and/or pending multipart uploads older than the specified age.
+func (f *Fs) cleanUp(ctx context.Context, deleteHidden bool, deleteUnfinished bool, maxAge time.Duration) (err error) {
+ return f.purge(ctx, "", true, deleteHidden, deleteUnfinished, maxAge)
}
// copy does a server-side copy from dstObj <- srcObj
@@ -1545,7 +1567,7 @@ func (o *Object) Size() int64 {
//
// Make sure it is lower case.
//
-// Remove unverified prefix - see https://www.backblaze.com/b2/docs/uploading.html
+// Remove unverified prefix - see https://www.backblaze.com/docs/cloud-storage-upload-files-with-the-native-api
// Some tools (e.g. Cyberduck) use this
func cleanSHA1(sha1 string) string {
const unverified = "unverified:"
@@ -1572,7 +1594,14 @@ func (o *Object) decodeMetaDataRaw(ID, SHA1 string, Size int64, UploadTimestamp
o.size = Size
// Use the UploadTimestamp if can't get file info
o.modTime = time.Time(UploadTimestamp)
- return o.parseTimeString(Info[timeKey])
+ err = o.parseTimeString(Info[timeKey])
+ if err != nil {
+ return err
+ }
+ // For now, just set "mtime" in metadata
+ o.meta = make(map[string]string, 1)
+ o.meta["mtime"] = o.modTime.Format(time.RFC3339Nano)
+ return nil
}
// decodeMetaData sets the metadata in the object from an api.File
@@ -1674,6 +1703,16 @@ func timeString(modTime time.Time) string {
return strconv.FormatInt(modTime.UnixNano()/1e6, 10)
}
+// parseTimeStringHelper converts a decimal string number of milliseconds
+// elapsed since January 1, 1970 UTC into a time.Time
+func parseTimeStringHelper(timeString string) (time.Time, error) {
+ unixMilliseconds, err := strconv.ParseInt(timeString, 10, 64)
+ if err != nil {
+ return time.Time{}, err
+ }
+ return time.Unix(unixMilliseconds/1e3, (unixMilliseconds%1e3)*1e6).UTC(), nil
+}
+
// parseTimeString converts a decimal string number of milliseconds
// elapsed since January 1, 1970 UTC into a time.Time and stores it in
// the modTime variable.
@@ -1681,12 +1720,12 @@ func (o *Object) parseTimeString(timeString string) (err error) {
if timeString == "" {
return nil
}
- unixMilliseconds, err := strconv.ParseInt(timeString, 10, 64)
+ modTime, err := parseTimeStringHelper(timeString)
if err != nil {
fs.Debugf(o, "Failed to parse mod time string %q: %v", timeString, err)
return nil
}
- o.modTime = time.Unix(unixMilliseconds/1e3, (unixMilliseconds%1e3)*1e6).UTC()
+ o.modTime = modTime
return nil
}
@@ -1763,14 +1802,14 @@ func (file *openFile) Close() (err error) {
// Check to see we read the correct number of bytes
if file.o.Size() != file.bytes {
- return fmt.Errorf("object corrupted on transfer - length mismatch (want %d got %d)", file.o.Size(), file.bytes)
+ return fmt.Errorf("corrupted on transfer: lengths differ want %d vs got %d", file.o.Size(), file.bytes)
}
// Check the SHA1
receivedSHA1 := file.o.sha1
calculatedSHA1 := fmt.Sprintf("%x", file.hash.Sum(nil))
if receivedSHA1 != "" && receivedSHA1 != calculatedSHA1 {
- return fmt.Errorf("object corrupted on transfer - SHA1 mismatch (want %q got %q)", receivedSHA1, calculatedSHA1)
+ return fmt.Errorf("corrupted on transfer: SHA1 hashes differ want %q vs got %q", receivedSHA1, calculatedSHA1)
}
return nil
@@ -1840,6 +1879,14 @@ func (o *Object) getOrHead(ctx context.Context, method string, options []fs.Open
ContentType: resp.Header.Get("Content-Type"),
Info: Info,
}
+
+ // Embryonic metadata support - just mtime
+ o.meta = make(map[string]string, 1)
+ modTime, err := parseTimeStringHelper(info.Info[timeKey])
+ if err == nil {
+ o.meta["mtime"] = modTime.Format(time.RFC3339Nano)
+ }
+
// When reading files from B2 via cloudflare using
// --b2-download-url cloudflare strips the Content-Length
// headers (presumably so it can inject stuff) so use the old
@@ -1937,7 +1984,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
if err == nil {
fs.Debugf(o, "File is big enough for chunked streaming")
- up, err := o.fs.newLargeUpload(ctx, o, in, src, o.fs.opt.ChunkSize, false, nil)
+ up, err := o.fs.newLargeUpload(ctx, o, in, src, o.fs.opt.ChunkSize, false, nil, options...)
if err != nil {
o.fs.putRW(rw)
return err
@@ -1969,7 +2016,10 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
return o.decodeMetaDataFileInfo(up.info)
}
- modTime := src.ModTime(ctx)
+ modTime, err := o.getModTime(ctx, src, options)
+ if err != nil {
+ return err
+ }
calculatedSha1, _ := src.Hash(ctx, hash.SHA1)
if calculatedSha1 == "" {
@@ -2074,6 +2124,36 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
return o.decodeMetaDataFileInfo(&response)
}
+// Get modTime from the source; if --metadata is set, fetch the src metadata and get it from there.
+// When metadata support is added to b2, this method will need a more generic name
+func (o *Object) getModTime(ctx context.Context, src fs.ObjectInfo, options []fs.OpenOption) (time.Time, error) {
+ modTime := src.ModTime(ctx)
+
+ // Fetch metadata if --metadata is in use
+ meta, err := fs.GetMetadataOptions(ctx, o.fs, src, options)
+ if err != nil {
+ return time.Time{}, fmt.Errorf("failed to read metadata from source object: %w", err)
+ }
+ // merge metadata into request and user metadata
+ for k, v := range meta {
+ k = strings.ToLower(k)
+ // For now, the only metadata we're concerned with is "mtime"
+ switch k {
+ case "mtime":
+ // mtime in meta overrides source ModTime
+ metaModTime, err := time.Parse(time.RFC3339Nano, v)
+ if err != nil {
+ fs.Debugf(o, "failed to parse metadata %s: %q: %v", k, v, err)
+ } else {
+ modTime = metaModTime
+ }
+ default:
+ // Do nothing for now
+ }
+ }
+ return modTime, nil
+}
+
// OpenChunkWriter returns the chunk size and a ChunkWriter
//
// Pass in the remote and the src object
@@ -2105,7 +2185,7 @@ func (f *Fs) OpenChunkWriter(ctx context.Context, remote string, src fs.ObjectIn
Concurrency: o.fs.opt.UploadConcurrency,
//LeavePartsOnError: o.fs.opt.LeavePartsOnError,
}
- up, err := f.newLargeUpload(ctx, o, nil, src, f.opt.ChunkSize, false, nil)
+ up, err := f.newLargeUpload(ctx, o, nil, src, f.opt.ChunkSize, false, nil, options...)
return info, up, err
}
@@ -2243,8 +2323,56 @@ func (f *Fs) lifecycleCommand(ctx context.Context, name string, arg []string, op
return bucket.LifecycleRules, nil
}
+var cleanupHelp = fs.CommandHelp{
+ Name: "cleanup",
+ Short: "Remove unfinished large file uploads.",
+ Long: `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.
+`,
+ Opts: map[string]string{
+ "max-age": "Max age of upload to delete",
+ },
+}
+
+func (f *Fs) cleanupCommand(ctx context.Context, name string, arg []string, opt map[string]string) (out interface{}, err error) {
+ maxAge := defaultMaxAge
+ if opt["max-age"] != "" {
+ maxAge, err = fs.ParseDuration(opt["max-age"])
+ if err != nil {
+ return nil, fmt.Errorf("bad max-age: %w", err)
+ }
+ }
+ return nil, f.cleanUp(ctx, false, true, maxAge)
+}
+
+var cleanupHiddenHelp = fs.CommandHelp{
+ Name: "cleanup-hidden",
+ Short: "Remove old versions of files.",
+ Long: `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
+`,
+}
+
+func (f *Fs) cleanupHiddenCommand(ctx context.Context, name string, arg []string, opt map[string]string) (out interface{}, err error) {
+ return nil, f.cleanUp(ctx, true, false, 0)
+}
+
var commandHelp = []fs.CommandHelp{
lifecycleHelp,
+ cleanupHelp,
+ cleanupHiddenHelp,
}
// Command the backend to run a named command
@@ -2260,6 +2388,10 @@ func (f *Fs) Command(ctx context.Context, name string, arg []string, opt map[str
switch name {
case "lifecycle":
return f.lifecycleCommand(ctx, name, arg, opt)
+ case "cleanup":
+ return f.cleanupCommand(ctx, name, arg, opt)
+ case "cleanup-hidden":
+ return f.cleanupHiddenCommand(ctx, name, arg, opt)
default:
return nil, fs.ErrorCommandNotFound
}
diff --git a/backend/b2/b2_internal_test.go b/backend/b2/b2_internal_test.go
index 8253ca167..e6bd8b404 100644
--- a/backend/b2/b2_internal_test.go
+++ b/backend/b2/b2_internal_test.go
@@ -1,15 +1,29 @@
package b2
import (
+ "context"
+ "crypto/sha1"
+ "fmt"
+ "path"
+ "strings"
"testing"
"time"
+ "github.com/rclone/rclone/backend/b2/api"
+ "github.com/rclone/rclone/fs"
+ "github.com/rclone/rclone/fs/cache"
+ "github.com/rclone/rclone/fs/hash"
"github.com/rclone/rclone/fstest"
"github.com/rclone/rclone/fstest/fstests"
+ "github.com/rclone/rclone/lib/bucket"
+ "github.com/rclone/rclone/lib/random"
+ "github.com/rclone/rclone/lib/version"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
// Test b2 string encoding
-// https://www.backblaze.com/b2/docs/string_encoding.html
+// https://www.backblaze.com/docs/cloud-storage-native-api-string-encoding
var encodeTest = []struct {
fullyEncoded string
@@ -170,9 +184,303 @@ func TestParseTimeString(t *testing.T) {
}
+// Return a map of the headers in the options with keys stripped of the "x-bz-info-" prefix
+func OpenOptionToMetaData(options []fs.OpenOption) map[string]string {
+ var headers = make(map[string]string)
+ for _, option := range options {
+ k, v := option.Header()
+ k = strings.ToLower(k)
+ if strings.HasPrefix(k, headerPrefix) {
+ headers[k[len(headerPrefix):]] = v
+ }
+ }
+
+ return headers
+}
+
+func (f *Fs) internalTestMetadata(t *testing.T, size string, uploadCutoff string, chunkSize string) {
+ what := fmt.Sprintf("Size%s/UploadCutoff%s/ChunkSize%s", size, uploadCutoff, chunkSize)
+ t.Run(what, func(t *testing.T) {
+ ctx := context.Background()
+
+ ss := fs.SizeSuffix(0)
+ err := ss.Set(size)
+ require.NoError(t, err)
+ original := random.String(int(ss))
+
+ contents := fstest.Gz(t, original)
+ mimeType := "text/html"
+
+ if chunkSize != "" {
+ ss := fs.SizeSuffix(0)
+ err := ss.Set(chunkSize)
+ require.NoError(t, err)
+ _, err = f.SetUploadChunkSize(ss)
+ require.NoError(t, err)
+ }
+
+ if uploadCutoff != "" {
+ ss := fs.SizeSuffix(0)
+ err := ss.Set(uploadCutoff)
+ require.NoError(t, err)
+ _, err = f.SetUploadCutoff(ss)
+ require.NoError(t, err)
+ }
+
+ item := fstest.NewItem("test-metadata", contents, fstest.Time("2001-05-06T04:05:06.499Z"))
+ btime := time.Now()
+ metadata := fs.Metadata{
+ // Just mtime for now - limit to milliseconds since x-bz-info-src_last_modified_millis can't support any
+
+ "mtime": "2009-05-06T04:05:06.499Z",
+ }
+
+ // Need to specify HTTP options with the header prefix since they are passed as-is
+ options := []fs.OpenOption{
+ &fs.HTTPOption{Key: "X-Bz-Info-a", Value: "1"},
+ &fs.HTTPOption{Key: "X-Bz-Info-b", Value: "2"},
+ }
+
+ obj := fstests.PutTestContentsMetadata(ctx, t, f, &item, true, contents, true, mimeType, metadata, options...)
+ defer func() {
+ assert.NoError(t, obj.Remove(ctx))
+ }()
+ o := obj.(*Object)
+ gotMetadata, err := o.getMetaData(ctx)
+ require.NoError(t, err)
+
+ // X-Bz-Info-a & X-Bz-Info-b
+ optMetadata := OpenOptionToMetaData(options)
+ for k, v := range optMetadata {
+ got := gotMetadata.Info[k]
+ assert.Equal(t, v, got, k)
+ }
+
+ // mtime
+ for k, v := range metadata {
+ got := o.meta[k]
+ assert.Equal(t, v, got, k)
+ }
+
+ assert.Equal(t, mimeType, gotMetadata.ContentType, "Content-Type")
+
+ // Modification time from the x-bz-info-src_last_modified_millis header
+ var mtime api.Timestamp
+ err = mtime.UnmarshalJSON([]byte(gotMetadata.Info[timeKey]))
+ if err != nil {
+ fs.Debugf(o, "Bad "+timeHeader+" header: %v", err)
+ }
+ assert.Equal(t, item.ModTime, time.Time(mtime), "Modification time")
+
+ // Upload time
+ gotBtime := time.Time(gotMetadata.UploadTimestamp)
+ dt := gotBtime.Sub(btime)
+ assert.True(t, dt < time.Minute && dt > -time.Minute, fmt.Sprintf("btime more than 1 minute out want %v got %v delta %v", btime, gotBtime, dt))
+
+ t.Run("GzipEncoding", func(t *testing.T) {
+ // Test that the gzipped file we uploaded can be
+ // downloaded
+ checkDownload := func(wantContents string, wantSize int64, wantHash string) {
+ gotContents := fstests.ReadObject(ctx, t, o, -1)
+ assert.Equal(t, wantContents, gotContents)
+ assert.Equal(t, wantSize, o.Size())
+ gotHash, err := o.Hash(ctx, hash.SHA1)
+ require.NoError(t, err)
+ assert.Equal(t, wantHash, gotHash)
+ }
+
+ t.Run("NoDecompress", func(t *testing.T) {
+ checkDownload(contents, int64(len(contents)), sha1Sum(t, contents))
+ })
+ })
+ })
+}
+
+func (f *Fs) InternalTestMetadata(t *testing.T) {
+ // 1 kB regular file
+ f.internalTestMetadata(t, "1kiB", "", "")
+
+ // 10 MiB large file
+ f.internalTestMetadata(t, "10MiB", "6MiB", "6MiB")
+}
+
+func sha1Sum(t *testing.T, s string) string {
+ hash := sha1.Sum([]byte(s))
+ return fmt.Sprintf("%x", hash)
+}
+
+// This is adapted from the s3 equivalent.
+func (f *Fs) InternalTestVersions(t *testing.T) {
+ ctx := context.Background()
+
+ // Small pause to make the LastModified different since AWS
+ // only seems to track them to 1 second granularity
+ time.Sleep(2 * time.Second)
+
+ // Create an object
+ const dirName = "versions"
+ const fileName = dirName + "/" + "test-versions.txt"
+ contents := random.String(100)
+ item := fstest.NewItem(fileName, contents, fstest.Time("2001-05-06T04:05:06.499999999Z"))
+ obj := fstests.PutTestContents(ctx, t, f, &item, contents, true)
+ defer func() {
+ assert.NoError(t, obj.Remove(ctx))
+ }()
+ objMetadata, err := obj.(*Object).getMetaData(ctx)
+ require.NoError(t, err)
+
+ // Small pause
+ time.Sleep(2 * time.Second)
+
+ // Remove it
+ assert.NoError(t, obj.Remove(ctx))
+
+ // Small pause to make the LastModified different since AWS only seems to track them to 1 second granularity
+ time.Sleep(2 * time.Second)
+
+ // And create it with different size and contents
+ newContents := random.String(101)
+ newItem := fstest.NewItem(fileName, newContents, fstest.Time("2002-05-06T04:05:06.499999999Z"))
+ newObj := fstests.PutTestContents(ctx, t, f, &newItem, newContents, true)
+ newObjMetadata, err := newObj.(*Object).getMetaData(ctx)
+ require.NoError(t, err)
+
+ t.Run("Versions", func(t *testing.T) {
+ // Set --b2-versions for this test
+ f.opt.Versions = true
+ defer func() {
+ f.opt.Versions = false
+ }()
+
+ // Read the contents
+ entries, err := f.List(ctx, dirName)
+ require.NoError(t, err)
+ tests := 0
+ var fileNameVersion string
+ for _, entry := range entries {
+ t.Log(entry)
+ remote := entry.Remote()
+ if remote == fileName {
+ t.Run("ReadCurrent", func(t *testing.T) {
+ assert.Equal(t, newContents, fstests.ReadObject(ctx, t, entry.(fs.Object), -1))
+ })
+ tests++
+ } else if versionTime, p := version.Remove(remote); !versionTime.IsZero() && p == fileName {
+ t.Run("ReadVersion", func(t *testing.T) {
+ assert.Equal(t, contents, fstests.ReadObject(ctx, t, entry.(fs.Object), -1))
+ })
+ assert.WithinDuration(t, time.Time(objMetadata.UploadTimestamp), versionTime, time.Second, "object time must be with 1 second of version time")
+ fileNameVersion = remote
+ tests++
+ }
+ }
+ assert.Equal(t, 2, tests, "object missing from listing")
+
+ // Check we can read the object with a version suffix
+ t.Run("NewObject", func(t *testing.T) {
+ o, err := f.NewObject(ctx, fileNameVersion)
+ require.NoError(t, err)
+ require.NotNil(t, o)
+ assert.Equal(t, int64(100), o.Size(), o.Remote())
+ })
+
+ // Check we can make a NewFs from that object with a version suffix
+ t.Run("NewFs", func(t *testing.T) {
+ newPath := bucket.Join(fs.ConfigStringFull(f), fileNameVersion)
+ // Make sure --b2-versions is set in the config of the new remote
+ fs.Debugf(nil, "oldPath = %q", newPath)
+ lastColon := strings.LastIndex(newPath, ":")
+ require.True(t, lastColon >= 0)
+ newPath = newPath[:lastColon] + ",versions" + newPath[lastColon:]
+ fs.Debugf(nil, "newPath = %q", newPath)
+ fNew, err := cache.Get(ctx, newPath)
+ // This should return pointing to a file
+ require.Equal(t, fs.ErrorIsFile, err)
+ require.NotNil(t, fNew)
+ // With the directory above
+ assert.Equal(t, dirName, path.Base(fs.ConfigStringFull(fNew)))
+ })
+ })
+
+ t.Run("VersionAt", func(t *testing.T) {
+ // We set --b2-version-at for this test so make sure we reset it at the end
+ defer func() {
+ f.opt.VersionAt = fs.Time{}
+ }()
+
+ var (
+ firstObjectTime = time.Time(objMetadata.UploadTimestamp)
+ secondObjectTime = time.Time(newObjMetadata.UploadTimestamp)
+ )
+
+ for _, test := range []struct {
+ what string
+ at time.Time
+ want []fstest.Item
+ wantErr error
+ wantSize int64
+ }{
+ {
+ what: "Before",
+ at: firstObjectTime.Add(-time.Second),
+ want: fstests.InternalTestFiles,
+ wantErr: fs.ErrorObjectNotFound,
+ },
+ {
+ what: "AfterOne",
+ at: firstObjectTime.Add(time.Second),
+ want: append([]fstest.Item{item}, fstests.InternalTestFiles...),
+ wantSize: 100,
+ },
+ {
+ what: "AfterDelete",
+ at: secondObjectTime.Add(-time.Second),
+ want: fstests.InternalTestFiles,
+ wantErr: fs.ErrorObjectNotFound,
+ },
+ {
+ what: "AfterTwo",
+ at: secondObjectTime.Add(time.Second),
+ want: append([]fstest.Item{newItem}, fstests.InternalTestFiles...),
+ wantSize: 101,
+ },
+ } {
+ t.Run(test.what, func(t *testing.T) {
+ f.opt.VersionAt = fs.Time(test.at)
+ t.Run("List", func(t *testing.T) {
+ fstest.CheckListing(t, f, test.want)
+ })
+ // b2 NewObject doesn't work with VersionAt
+ //t.Run("NewObject", func(t *testing.T) {
+ // gotObj, gotErr := f.NewObject(ctx, fileName)
+ // assert.Equal(t, test.wantErr, gotErr)
+ // if gotErr == nil {
+ // assert.Equal(t, test.wantSize, gotObj.Size())
+ // }
+ //})
+ })
+ }
+ })
+
+ t.Run("Cleanup", func(t *testing.T) {
+ require.NoError(t, f.cleanUp(ctx, true, false, 0))
+ items := append([]fstest.Item{newItem}, fstests.InternalTestFiles...)
+ fstest.CheckListing(t, f, items)
+ // Set --b2-versions for this test
+ f.opt.Versions = true
+ defer func() {
+ f.opt.Versions = false
+ }()
+ fstest.CheckListing(t, f, items)
+ })
+
+ // Purge gets tested later
+}
+
// -run TestIntegration/FsMkdir/FsPutFiles/Internal
func (f *Fs) InternalTest(t *testing.T) {
- // Internal tests go here
+ t.Run("Metadata", f.InternalTestMetadata)
+ t.Run("Versions", f.InternalTestVersions)
}
var _ fstests.InternalTester = (*Fs)(nil)
diff --git a/backend/b2/upload.go b/backend/b2/upload.go
index 777852b1a..287466eaa 100644
--- a/backend/b2/upload.go
+++ b/backend/b2/upload.go
@@ -1,6 +1,6 @@
// Upload large files for b2
//
-// Docs - https://www.backblaze.com/b2/docs/large_files.html
+// Docs - https://www.backblaze.com/docs/cloud-storage-large-files
package b2
@@ -91,7 +91,7 @@ type largeUpload struct {
// newLargeUpload starts an upload of object o from in with metadata in src
//
// If newInfo is set then metadata from that will be used instead of reading it from src
-func (f *Fs) newLargeUpload(ctx context.Context, o *Object, in io.Reader, src fs.ObjectInfo, defaultChunkSize fs.SizeSuffix, doCopy bool, newInfo *api.File) (up *largeUpload, err error) {
+func (f *Fs) newLargeUpload(ctx context.Context, o *Object, in io.Reader, src fs.ObjectInfo, defaultChunkSize fs.SizeSuffix, doCopy bool, newInfo *api.File, options ...fs.OpenOption) (up *largeUpload, err error) {
size := src.Size()
parts := 0
chunkSize := defaultChunkSize
@@ -104,11 +104,6 @@ func (f *Fs) newLargeUpload(ctx context.Context, o *Object, in io.Reader, src fs
parts++
}
}
-
- opts := rest.Opts{
- Method: "POST",
- Path: "/b2_start_large_file",
- }
bucket, bucketPath := o.split()
bucketID, err := f.getBucketID(ctx, bucket)
if err != nil {
@@ -118,12 +113,27 @@ func (f *Fs) newLargeUpload(ctx context.Context, o *Object, in io.Reader, src fs
BucketID: bucketID,
Name: f.opt.Enc.FromStandardPath(bucketPath),
}
+ optionsToSend := make([]fs.OpenOption, 0, len(options))
if newInfo == nil {
- modTime := src.ModTime(ctx)
+ modTime, err := o.getModTime(ctx, src, options)
+ if err != nil {
+ return nil, err
+ }
+
request.ContentType = fs.MimeType(ctx, src)
request.Info = map[string]string{
timeKey: timeString(modTime),
}
+ // Custom upload headers - remove header prefix since they are sent in the body
+ for _, option := range options {
+ k, v := option.Header()
+ k = strings.ToLower(k)
+ if strings.HasPrefix(k, headerPrefix) {
+ request.Info[k[len(headerPrefix):]] = v
+ } else {
+ optionsToSend = append(optionsToSend, option)
+ }
+ }
// Set the SHA1 if known
if !o.fs.opt.DisableCheckSum || doCopy {
if calculatedSha1, err := src.Hash(ctx, hash.SHA1); err == nil && calculatedSha1 != "" {
@@ -134,6 +144,11 @@ func (f *Fs) newLargeUpload(ctx context.Context, o *Object, in io.Reader, src fs
request.ContentType = newInfo.ContentType
request.Info = newInfo.Info
}
+ opts := rest.Opts{
+ Method: "POST",
+ Path: "/b2_start_large_file",
+ Options: optionsToSend,
+ }
var response api.StartLargeFileResponse
err = f.pacer.Call(func() (bool, error) {
resp, err := f.srv.CallJSON(ctx, &opts, &request, &response)
diff --git a/backend/cache/cache.go b/backend/cache/cache.go
index 828744c47..cb4e0e62b 100644
--- a/backend/cache/cache.go
+++ b/backend/cache/cache.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
// Package cache implements a virtual provider to cache existing remotes.
package cache
@@ -410,18 +409,16 @@ func NewFs(ctx context.Context, name, rootPath string, m configmap.Mapper) (fs.F
if err != nil {
return nil, fmt.Errorf("failed to connect to the Plex API %v: %w", opt.PlexURL, err)
}
- } else {
- if opt.PlexPassword != "" && opt.PlexUsername != "" {
- decPass, err := obscure.Reveal(opt.PlexPassword)
- if err != nil {
- decPass = opt.PlexPassword
- }
- f.plexConnector, err = newPlexConnector(f, opt.PlexURL, opt.PlexUsername, decPass, opt.PlexInsecure, func(token string) {
- m.Set("plex_token", token)
- })
- if err != nil {
- return nil, fmt.Errorf("failed to connect to the Plex API %v: %w", opt.PlexURL, err)
- }
+ } else if opt.PlexPassword != "" && opt.PlexUsername != "" {
+ decPass, err := obscure.Reveal(opt.PlexPassword)
+ if err != nil {
+ decPass = opt.PlexPassword
+ }
+ f.plexConnector, err = newPlexConnector(f, opt.PlexURL, opt.PlexUsername, decPass, opt.PlexInsecure, func(token string) {
+ m.Set("plex_token", token)
+ })
+ if err != nil {
+ return nil, fmt.Errorf("failed to connect to the Plex API %v: %w", opt.PlexURL, err)
}
}
}
diff --git a/backend/cache/cache_internal_test.go b/backend/cache/cache_internal_test.go
index d7ee0fba2..3bbf46647 100644
--- a/backend/cache/cache_internal_test.go
+++ b/backend/cache/cache_internal_test.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js && !race
-// +build !plan9,!js,!race
package cache_test
@@ -30,10 +29,11 @@ import (
"github.com/rclone/rclone/fs/config"
"github.com/rclone/rclone/fs/config/configmap"
"github.com/rclone/rclone/fs/object"
+ "github.com/rclone/rclone/fs/operations"
"github.com/rclone/rclone/fstest"
"github.com/rclone/rclone/fstest/testy"
"github.com/rclone/rclone/lib/random"
- "github.com/rclone/rclone/vfs/vfsflags"
+ "github.com/rclone/rclone/vfs/vfscommon"
"github.com/stretchr/testify/require"
)
@@ -123,10 +123,10 @@ func TestInternalListRootAndInnerRemotes(t *testing.T) {
/* TODO: is this testing something?
func TestInternalVfsCache(t *testing.T) {
- vfsflags.Opt.DirCacheTime = time.Second * 30
+ vfscommon.Opt.DirCacheTime = time.Second * 30
testSize := int64(524288000)
- vfsflags.Opt.CacheMode = vfs.CacheModeWrites
+ vfscommon.Opt.CacheMode = vfs.CacheModeWrites
id := "tiuufo"
rootFs, boltDb := runInstance.newCacheFs(t, remoteName, id, true, true, nil, map[string]string{"writes": "true", "info_age": "1h"})
defer runInstance.cleanupFs(t, rootFs, boltDb)
@@ -338,7 +338,7 @@ func TestInternalCachedUpdatedContentMatches(t *testing.T) {
func TestInternalWrappedWrittenContentMatches(t *testing.T) {
id := fmt.Sprintf("tiwwcm%v", time.Now().Unix())
- vfsflags.Opt.DirCacheTime = time.Second
+ vfscommon.Opt.DirCacheTime = fs.Duration(time.Second)
rootFs, _ := runInstance.newCacheFs(t, remoteName, id, true, true, nil)
if runInstance.rootIsCrypt {
t.Skip("test skipped with crypt remote")
@@ -368,7 +368,7 @@ func TestInternalWrappedWrittenContentMatches(t *testing.T) {
func TestInternalLargeWrittenContentMatches(t *testing.T) {
id := fmt.Sprintf("tilwcm%v", time.Now().Unix())
- vfsflags.Opt.DirCacheTime = time.Second
+ vfscommon.Opt.DirCacheTime = fs.Duration(time.Second)
rootFs, _ := runInstance.newCacheFs(t, remoteName, id, true, true, nil)
if runInstance.rootIsCrypt {
t.Skip("test skipped with crypt remote")
@@ -417,7 +417,7 @@ func TestInternalWrappedFsChangeNotSeen(t *testing.T) {
if runInstance.rootIsCrypt {
data2, err = base64.StdEncoding.DecodeString(cryptedText3Base64)
require.NoError(t, err)
- expectedSize = expectedSize + 1 // FIXME newline gets in, likely test data issue
+ expectedSize++ // FIXME newline gets in, likely test data issue
} else {
data2 = []byte("test content")
}
@@ -708,7 +708,7 @@ func TestInternalMaxChunkSizeRespected(t *testing.T) {
func TestInternalExpiredEntriesRemoved(t *testing.T) {
id := fmt.Sprintf("tieer%v", time.Now().Unix())
- vfsflags.Opt.DirCacheTime = time.Second * 4 // needs to be lower than the defined
+ vfscommon.Opt.DirCacheTime = fs.Duration(time.Second * 4) // needs to be lower than the defined
rootFs, _ := runInstance.newCacheFs(t, remoteName, id, true, true, nil)
cfs, err := runInstance.getCacheFs(rootFs)
require.NoError(t, err)
@@ -743,7 +743,7 @@ func TestInternalExpiredEntriesRemoved(t *testing.T) {
}
func TestInternalBug2117(t *testing.T) {
- vfsflags.Opt.DirCacheTime = time.Second * 10
+ vfscommon.Opt.DirCacheTime = fs.Duration(time.Second * 10)
id := fmt.Sprintf("tib2117%v", time.Now().Unix())
rootFs, _ := runInstance.newCacheFs(t, remoteName, id, false, true, map[string]string{"info_age": "72h", "chunk_clean_interval": "15m"})
@@ -850,8 +850,8 @@ func (r *run) encryptRemoteIfNeeded(t *testing.T, remote string) string {
func (r *run) newCacheFs(t *testing.T, remote, id string, needRemote, purge bool, flags map[string]string) (fs.Fs, *cache.Persistent) {
fstest.Initialise()
remoteExists := false
- for _, s := range config.FileSections() {
- if s == remote {
+ for _, s := range config.GetRemotes() {
+ if s.Name == remote {
remoteExists = true
}
}
@@ -875,12 +875,12 @@ func (r *run) newCacheFs(t *testing.T, remote, id string, needRemote, purge bool
cacheRemote := remote
if !remoteExists {
localRemote := remote + "-local"
- config.FileSet(localRemote, "type", "local")
- config.FileSet(localRemote, "nounc", "true")
+ config.FileSetValue(localRemote, "type", "local")
+ config.FileSetValue(localRemote, "nounc", "true")
m.Set("type", "cache")
m.Set("remote", localRemote+":"+filepath.Join(os.TempDir(), localRemote))
} else {
- remoteType := config.FileGet(remote, "type")
+ remoteType := config.GetValue(remote, "type")
if remoteType == "" {
t.Skipf("skipped due to invalid remote type for %v", remote)
return nil, nil
@@ -891,14 +891,14 @@ func (r *run) newCacheFs(t *testing.T, remote, id string, needRemote, purge bool
m.Set("password", cryptPassword1)
m.Set("password2", cryptPassword2)
}
- remoteRemote := config.FileGet(remote, "remote")
+ remoteRemote := config.GetValue(remote, "remote")
if remoteRemote == "" {
t.Skipf("skipped due to invalid remote wrapper for %v", remote)
return nil, nil
}
remoteRemoteParts := strings.Split(remoteRemote, ":")
remoteWrapping := remoteRemoteParts[0]
- remoteType := config.FileGet(remoteWrapping, "type")
+ remoteType := config.GetValue(remoteWrapping, "type")
if remoteType != "cache" {
t.Skipf("skipped due to invalid remote type for %v: '%v'", remoteWrapping, remoteType)
return nil, nil
@@ -935,8 +935,7 @@ func (r *run) newCacheFs(t *testing.T, remote, id string, needRemote, purge bool
}
if purge {
- _ = f.Features().Purge(context.Background(), "")
- require.NoError(t, err)
+ _ = operations.Purge(context.Background(), f, "")
}
err = f.Mkdir(context.Background(), "")
require.NoError(t, err)
@@ -949,7 +948,7 @@ func (r *run) newCacheFs(t *testing.T, remote, id string, needRemote, purge bool
}
func (r *run) cleanupFs(t *testing.T, f fs.Fs) {
- err := f.Features().Purge(context.Background(), "")
+ err := operations.Purge(context.Background(), f, "")
require.NoError(t, err)
cfs, err := r.getCacheFs(f)
require.NoError(t, err)
@@ -1193,7 +1192,7 @@ func (r *run) updateData(t *testing.T, rootFs fs.Fs, src, data, append string) e
func (r *run) cleanSize(t *testing.T, size int64) int64 {
if r.rootIsCrypt {
denominator := int64(65536 + 16)
- size = size - 32
+ size -= 32
quotient := size / denominator
remainder := size % denominator
return (quotient*65536 + remainder - 16)
diff --git a/backend/cache/cache_test.go b/backend/cache/cache_test.go
index 594149596..764a1489a 100644
--- a/backend/cache/cache_test.go
+++ b/backend/cache/cache_test.go
@@ -1,7 +1,6 @@
// Test Cache filesystem interface
//go:build !plan9 && !js && !race
-// +build !plan9,!js,!race
package cache_test
@@ -16,10 +15,11 @@ import (
// TestIntegration runs integration tests against the remote
func TestIntegration(t *testing.T) {
fstests.Run(t, &fstests.Opt{
- RemoteName: "TestCache:",
- NilObject: (*cache.Object)(nil),
- UnimplementableFsMethods: []string{"PublicLink", "OpenWriterAt", "OpenChunkWriter"},
- UnimplementableObjectMethods: []string{"MimeType", "ID", "GetTier", "SetTier", "Metadata"},
- SkipInvalidUTF8: true, // invalid UTF-8 confuses the cache
+ RemoteName: "TestCache:",
+ NilObject: (*cache.Object)(nil),
+ UnimplementableFsMethods: []string{"PublicLink", "OpenWriterAt", "OpenChunkWriter", "DirSetModTime", "MkdirMetadata"},
+ UnimplementableObjectMethods: []string{"MimeType", "ID", "GetTier", "SetTier", "Metadata", "SetMetadata"},
+ UnimplementableDirectoryMethods: []string{"Metadata", "SetMetadata", "SetModTime"},
+ SkipInvalidUTF8: true, // invalid UTF-8 confuses the cache
})
}
diff --git a/backend/cache/cache_unsupported.go b/backend/cache/cache_unsupported.go
index a14a7beaa..8c94aaf26 100644
--- a/backend/cache/cache_unsupported.go
+++ b/backend/cache/cache_unsupported.go
@@ -2,6 +2,6 @@
// about "no buildable Go source files "
//go:build plan9 || js
-// +build plan9 js
+// Package cache implements a virtual provider to cache existing remotes.
package cache
diff --git a/backend/cache/cache_upload_test.go b/backend/cache/cache_upload_test.go
index d0246740a..0a3e5d297 100644
--- a/backend/cache/cache_upload_test.go
+++ b/backend/cache/cache_upload_test.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js && !race
-// +build !plan9,!js,!race
package cache_test
diff --git a/backend/cache/directory.go b/backend/cache/directory.go
index ab4ea9112..5c45db9c7 100644
--- a/backend/cache/directory.go
+++ b/backend/cache/directory.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
package cache
diff --git a/backend/cache/handle.go b/backend/cache/handle.go
index a7a1497e1..11772eb6e 100644
--- a/backend/cache/handle.go
+++ b/backend/cache/handle.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
package cache
@@ -119,7 +118,7 @@ func (r *Handle) startReadWorkers() {
r.scaleWorkers(totalWorkers)
}
-// scaleOutWorkers will increase the worker pool count by the provided amount
+// scaleWorkers will increase the worker pool count by the provided amount
func (r *Handle) scaleWorkers(desired int) {
current := r.workers
if current == desired {
@@ -209,7 +208,7 @@ func (r *Handle) getChunk(chunkStart int64) ([]byte, error) {
offset := chunkStart % int64(r.cacheFs().opt.ChunkSize)
// we align the start offset of the first chunk to a likely chunk in the storage
- chunkStart = chunkStart - offset
+ chunkStart -= offset
r.queueOffset(chunkStart)
found := false
@@ -328,7 +327,7 @@ func (r *Handle) Seek(offset int64, whence int) (int64, error) {
chunkStart := r.offset - (r.offset % int64(r.cacheFs().opt.ChunkSize))
if chunkStart >= int64(r.cacheFs().opt.ChunkSize) {
- chunkStart = chunkStart - int64(r.cacheFs().opt.ChunkSize)
+ chunkStart -= int64(r.cacheFs().opt.ChunkSize)
}
r.queueOffset(chunkStart)
@@ -416,10 +415,8 @@ func (w *worker) run() {
continue
}
}
- } else {
- if w.r.storage().HasChunk(w.r.cachedObject, chunkStart) {
- continue
- }
+ } else if w.r.storage().HasChunk(w.r.cachedObject, chunkStart) {
+ continue
}
chunkEnd := chunkStart + int64(w.r.cacheFs().opt.ChunkSize)
diff --git a/backend/cache/object.go b/backend/cache/object.go
index 8dc072017..87c292804 100644
--- a/backend/cache/object.go
+++ b/backend/cache/object.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
package cache
diff --git a/backend/cache/plex.go b/backend/cache/plex.go
index 8d57ecb17..040a665ef 100644
--- a/backend/cache/plex.go
+++ b/backend/cache/plex.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
package cache
diff --git a/backend/cache/storage_memory.go b/backend/cache/storage_memory.go
index 25ac3bb62..2b2acf8f4 100644
--- a/backend/cache/storage_memory.go
+++ b/backend/cache/storage_memory.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
package cache
diff --git a/backend/cache/storage_persistent.go b/backend/cache/storage_persistent.go
index ac8fdfd57..590c50468 100644
--- a/backend/cache/storage_persistent.go
+++ b/backend/cache/storage_persistent.go
@@ -1,5 +1,4 @@
//go:build !plan9 && !js
-// +build !plan9,!js
package cache
diff --git a/backend/cache/utils_test.go b/backend/cache/utils_test.go
index c02d86ce9..9f85b0155 100644
--- a/backend/cache/utils_test.go
+++ b/backend/cache/utils_test.go
@@ -1,3 +1,6 @@
+//go:build !plan9 && !js
+// +build !plan9,!js
+
package cache
import bolt "go.etcd.io/bbolt"
diff --git a/backend/chunker/chunker.go b/backend/chunker/chunker.go
index baf4656ed..7b1df95c1 100644
--- a/backend/chunker/chunker.go
+++ b/backend/chunker/chunker.go
@@ -29,6 +29,7 @@ import (
"github.com/rclone/rclone/fs/fspath"
"github.com/rclone/rclone/fs/hash"
"github.com/rclone/rclone/fs/operations"
+ "github.com/rclone/rclone/lib/encoder"
)
// Chunker's composite files have one or more chunks
@@ -101,8 +102,10 @@ var (
//
// And still chunker's primary function is to chunk large files
// rather than serve as a generic metadata container.
-const maxMetadataSize = 1023
-const maxMetadataSizeWritten = 255
+const (
+ maxMetadataSize = 1023
+ maxMetadataSizeWritten = 255
+)
// Current/highest supported metadata format.
const metadataVersion = 2
@@ -305,7 +308,6 @@ func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs,
root: rpath,
opt: *opt,
}
- cache.PinUntilFinalized(f.base, f)
f.dirSort = true // processEntries requires that meta Objects prerun data chunks atm.
if err := f.configure(opt.NameFormat, opt.MetaFormat, opt.HashType, opt.Transactions); err != nil {
@@ -317,13 +319,15 @@ func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs,
// i.e. `rpath` does not exist in the wrapped remote, but chunker
// detects a composite file because it finds the first chunk!
// (yet can't satisfy fstest.CheckListing, will ignore)
- if err == nil && !f.useMeta && strings.Contains(rpath, "/") {
+ if err == nil && !f.useMeta {
firstChunkPath := f.makeChunkName(remotePath, 0, "", "")
- _, testErr := cache.Get(ctx, baseName+firstChunkPath)
+ newBase, testErr := cache.Get(ctx, baseName+firstChunkPath)
if testErr == fs.ErrorIsFile {
+ f.base = newBase
err = testErr
}
}
+ cache.PinUntilFinalized(f.base, f)
// Correct root if definitely pointing to a file
if err == fs.ErrorIsFile {
@@ -338,13 +342,18 @@ func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs,
// Note 2: features.Fill() points features.PutStream to our PutStream,
// but features.Mask() will nullify it if wrappedFs does not have it.
f.features = (&fs.Features{
- CaseInsensitive: true,
- DuplicateFiles: true,
- ReadMimeType: false, // Object.MimeType not supported
- WriteMimeType: true,
- BucketBased: true,
- CanHaveEmptyDirectories: true,
- ServerSideAcrossConfigs: true,
+ CaseInsensitive: true,
+ DuplicateFiles: true,
+ ReadMimeType: false, // Object.MimeType not supported
+ WriteMimeType: true,
+ BucketBased: true,
+ CanHaveEmptyDirectories: true,
+ ServerSideAcrossConfigs: true,
+ ReadDirMetadata: true,
+ WriteDirMetadata: true,
+ WriteDirSetModTime: true,
+ UserDirMetadata: true,
+ DirModTimeUpdatesOnWrite: true,
}).Fill(ctx, f).Mask(ctx, baseFs).WrapsFs(f, baseFs)
f.features.Disable("ListR") // Recursive listing may cause chunker skip files
@@ -821,8 +830,7 @@ func (f *Fs) processEntries(ctx context.Context, origEntries fs.DirEntries, dirP
}
case fs.Directory:
isSubdir[entry.Remote()] = true
- wrapDir := fs.NewDirCopy(ctx, entry)
- wrapDir.SetRemote(entry.Remote())
+ wrapDir := fs.NewDirWrapper(entry.Remote(), entry)
tempEntries = append(tempEntries, wrapDir)
default:
if f.opt.FailHard {
@@ -955,6 +963,11 @@ func (f *Fs) scanObject(ctx context.Context, remote string, quickScan bool) (fs.
}
if caseInsensitive {
sameMain = strings.EqualFold(mainRemote, remote)
+ if sameMain && f.base.Features().IsLocal {
+ // on local, make sure the EqualFold still holds true when accounting for encoding.
+ // sometimes paths with special characters will only normalize the same way in Standard Encoding.
+ sameMain = strings.EqualFold(encoder.OS.FromStandardPath(mainRemote), encoder.OS.FromStandardPath(remote))
+ }
} else {
sameMain = mainRemote == remote
}
@@ -968,13 +981,13 @@ func (f *Fs) scanObject(ctx context.Context, remote string, quickScan bool) (fs.
}
continue
}
- //fs.Debugf(f, "%q belongs to %q as chunk %d", entryRemote, mainRemote, chunkNo)
+ // fs.Debugf(f, "%q belongs to %q as chunk %d", entryRemote, mainRemote, chunkNo)
if err := o.addChunk(entry, chunkNo); err != nil {
return nil, err
}
}
- if o.main == nil && (o.chunks == nil || len(o.chunks) == 0) {
+ if o.main == nil && len(o.chunks) == 0 {
// Scanning hasn't found data chunks with conforming names.
if f.useMeta || quickScan {
// Metadata is required but absent and there are no chunks.
@@ -1130,8 +1143,8 @@ func (o *Object) readXactID(ctx context.Context) (xactID string, err error) {
// put implements Put, PutStream, PutUnchecked, Update
func (f *Fs) put(
ctx context.Context, in io.Reader, src fs.ObjectInfo, remote string, options []fs.OpenOption,
- basePut putFn, action string, target fs.Object) (obj fs.Object, err error) {
-
+ basePut putFn, action string, target fs.Object,
+) (obj fs.Object, err error) {
// Perform consistency checks
if err := f.forbidChunk(src, remote); err != nil {
return nil, fmt.Errorf("%s refused: %w", action, err)
@@ -1571,6 +1584,14 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {
return f.base.Mkdir(ctx, dir)
}
+// MkdirMetadata makes the root directory of the Fs object
+func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata) (fs.Directory, error) {
+ if do := f.base.Features().MkdirMetadata; do != nil {
+ return do(ctx, dir, metadata)
+ }
+ return nil, fs.ErrorNotImplemented
+}
+
// Rmdir removes the directory (container, bucket) if empty
//
// Return an error if it doesn't exist or isn't empty
@@ -1888,6 +1909,14 @@ func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string
return do(ctx, srcFs.base, srcRemote, dstRemote)
}
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ if do := f.base.Features().DirSetModTime; do != nil {
+ return do(ctx, dir, modTime)
+ }
+ return fs.ErrorNotImplemented
+}
+
// CleanUp the trash in the Fs
//
// Implement this if you have a way of emptying the trash or
@@ -1936,7 +1965,7 @@ func (f *Fs) ChangeNotify(ctx context.Context, notifyFunc func(string, fs.EntryT
return
}
wrappedNotifyFunc := func(path string, entryType fs.EntryType) {
- //fs.Debugf(f, "ChangeNotify: path %q entryType %d", path, entryType)
+ // fs.Debugf(f, "ChangeNotify: path %q entryType %d", path, entryType)
if entryType == fs.EntryObject {
mainPath, _, _, xactID := f.parseChunkName(path)
metaXactID := ""
@@ -2548,6 +2577,8 @@ var (
_ fs.Copier = (*Fs)(nil)
_ fs.Mover = (*Fs)(nil)
_ fs.DirMover = (*Fs)(nil)
+ _ fs.DirSetModTimer = (*Fs)(nil)
+ _ fs.MkdirMetadataer = (*Fs)(nil)
_ fs.PutUncheckeder = (*Fs)(nil)
_ fs.PutStreamer = (*Fs)(nil)
_ fs.CleanUpper = (*Fs)(nil)
diff --git a/backend/chunker/chunker_test.go b/backend/chunker/chunker_test.go
index d5ce656dd..9f6efbd33 100644
--- a/backend/chunker/chunker_test.go
+++ b/backend/chunker/chunker_test.go
@@ -36,6 +36,7 @@ func TestIntegration(t *testing.T) {
"GetTier",
"SetTier",
"Metadata",
+ "SetMetadata",
},
UnimplementableFsMethods: []string{
"PublicLink",
diff --git a/backend/combine/combine.go b/backend/combine/combine.go
index 74384fb48..d1036ae3a 100644
--- a/backend/combine/combine.go
+++ b/backend/combine/combine.go
@@ -222,18 +222,23 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (outFs fs
}
// check features
var features = (&fs.Features{
- CaseInsensitive: true,
- DuplicateFiles: false,
- ReadMimeType: true,
- WriteMimeType: true,
- CanHaveEmptyDirectories: true,
- BucketBased: true,
- SetTier: true,
- GetTier: true,
- ReadMetadata: true,
- WriteMetadata: true,
- UserMetadata: true,
- PartialUploads: true,
+ CaseInsensitive: true,
+ DuplicateFiles: false,
+ ReadMimeType: true,
+ WriteMimeType: true,
+ CanHaveEmptyDirectories: true,
+ BucketBased: true,
+ SetTier: true,
+ GetTier: true,
+ ReadMetadata: true,
+ WriteMetadata: true,
+ UserMetadata: true,
+ ReadDirMetadata: true,
+ WriteDirMetadata: true,
+ WriteDirSetModTime: true,
+ UserDirMetadata: true,
+ DirModTimeUpdatesOnWrite: true,
+ PartialUploads: true,
}).Fill(ctx, f)
canMove := true
for _, u := range f.upstreams {
@@ -440,6 +445,32 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {
return u.f.Mkdir(ctx, uRemote)
}
+// MkdirMetadata makes the root directory of the Fs object
+func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata) (fs.Directory, error) {
+ u, uRemote, err := f.findUpstream(dir)
+ if err != nil {
+ return nil, err
+ }
+ do := u.f.Features().MkdirMetadata
+ if do == nil {
+ return nil, fs.ErrorNotImplemented
+ }
+ newDir, err := do(ctx, uRemote, metadata)
+ if err != nil {
+ return nil, err
+ }
+ entries := fs.DirEntries{newDir}
+ entries, err = u.wrapEntries(ctx, entries)
+ if err != nil {
+ return nil, err
+ }
+ newDir, ok := entries[0].(fs.Directory)
+ if !ok {
+ return nil, fmt.Errorf("internal error: expecting %T to be fs.Directory", entries[0])
+ }
+ return newDir, nil
+}
+
// purge the upstream or fallback to a slow way
func (u *upstream) purge(ctx context.Context, dir string) (err error) {
if do := u.f.Features().Purge; do != nil {
@@ -755,12 +786,11 @@ func (u *upstream) wrapEntries(ctx context.Context, entries fs.DirEntries) (fs.D
case fs.Object:
entries[i] = u.newObject(x)
case fs.Directory:
- newDir := fs.NewDirCopy(ctx, x)
- newPath, err := u.pathAdjustment.do(newDir.Remote())
+ newPath, err := u.pathAdjustment.do(x.Remote())
if err != nil {
return nil, err
}
- newDir.SetRemote(newPath)
+ newDir := fs.NewDirWrapper(newPath, x)
entries[i] = newDir
default:
return nil, fmt.Errorf("unknown entry type %T", entry)
@@ -783,7 +813,7 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
if f.root == "" && dir == "" {
entries = make(fs.DirEntries, 0, len(f.upstreams))
for combineDir := range f.upstreams {
- d := fs.NewDir(combineDir, f.when)
+ d := fs.NewLimitedDirWrapper(combineDir, fs.NewDir(combineDir, f.when))
entries = append(entries, d)
}
return entries, nil
@@ -965,6 +995,22 @@ func (f *Fs) MergeDirs(ctx context.Context, dirs []fs.Directory) error {
return do(ctx, uDirs)
}
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ u, uDir, err := f.findUpstream(dir)
+ if err != nil {
+ return err
+ }
+ if uDir == "" {
+ fs.Debugf(dir, "Can't set modtime on upstream root. skipping.")
+ return nil
+ }
+ if do := u.f.Features().DirSetModTime; do != nil {
+ return do(ctx, uDir, modTime)
+ }
+ return fs.ErrorNotImplemented
+}
+
// CleanUp the trash in the Fs
//
// Implement this if you have a way of emptying the trash or
@@ -1073,6 +1119,17 @@ func (o *Object) Metadata(ctx context.Context) (fs.Metadata, error) {
return do.Metadata(ctx)
}
+// SetMetadata sets metadata for an Object
+//
+// It should return fs.ErrorNotImplemented if it can't set metadata
+func (o *Object) SetMetadata(ctx context.Context, metadata fs.Metadata) error {
+ do, ok := o.Object.(fs.SetMetadataer)
+ if !ok {
+ return fs.ErrorNotImplemented
+ }
+ return do.SetMetadata(ctx, metadata)
+}
+
// SetTier performs changing storage tier of the Object if
// multiple storage classes supported
func (o *Object) SetTier(tier string) error {
@@ -1099,6 +1156,8 @@ var (
_ fs.PublicLinker = (*Fs)(nil)
_ fs.PutUncheckeder = (*Fs)(nil)
_ fs.MergeDirser = (*Fs)(nil)
+ _ fs.DirSetModTimer = (*Fs)(nil)
+ _ fs.MkdirMetadataer = (*Fs)(nil)
_ fs.CleanUpper = (*Fs)(nil)
_ fs.OpenWriterAter = (*Fs)(nil)
_ fs.FullObject = (*Object)(nil)
diff --git a/backend/compress/compress.go b/backend/compress/compress.go
index b477512e7..d632b815d 100644
--- a/backend/compress/compress.go
+++ b/backend/compress/compress.go
@@ -38,6 +38,7 @@ import (
const (
initialChunkSize = 262144 // Initial and max sizes of chunks when reading parts of the file. Currently
maxChunkSize = 8388608 // at 256 KiB and 8 MiB.
+ chunkStreams = 0 // Streams to use for reading
bufferSize = 8388608
heuristicBytes = 1048576
@@ -183,18 +184,23 @@ func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs,
// the features here are ones we could support, and they are
// ANDed with the ones from wrappedFs
f.features = (&fs.Features{
- CaseInsensitive: true,
- DuplicateFiles: false,
- ReadMimeType: false,
- WriteMimeType: false,
- GetTier: true,
- SetTier: true,
- BucketBased: true,
- CanHaveEmptyDirectories: true,
- ReadMetadata: true,
- WriteMetadata: true,
- UserMetadata: true,
- PartialUploads: true,
+ CaseInsensitive: true,
+ DuplicateFiles: false,
+ ReadMimeType: false,
+ WriteMimeType: false,
+ GetTier: true,
+ SetTier: true,
+ BucketBased: true,
+ CanHaveEmptyDirectories: true,
+ ReadMetadata: true,
+ WriteMetadata: true,
+ UserMetadata: true,
+ ReadDirMetadata: true,
+ WriteDirMetadata: true,
+ WriteDirSetModTime: true,
+ UserDirMetadata: true,
+ DirModTimeUpdatesOnWrite: true,
+ PartialUploads: true,
}).Fill(ctx, f).Mask(ctx, wrappedFs).WrapsFs(f, wrappedFs)
// We support reading MIME types no matter the wrapped fs
f.features.ReadMimeType = true
@@ -450,7 +456,7 @@ func (f *Fs) verifyObjectHash(ctx context.Context, o fs.Object, hasher *hash.Mul
if err != nil {
fs.Errorf(o, "Failed to remove corrupted object: %v", err)
}
- return fmt.Errorf("corrupted on transfer: %v compressed hashes differ %q vs %q", ht, srcHash, dstHash)
+ return fmt.Errorf("corrupted on transfer: %v compressed hashes differ src(%s) %q vs dst(%s) %q", ht, f.Fs, srcHash, o.Fs(), dstHash)
}
return nil
}
@@ -784,6 +790,14 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {
return f.Fs.Mkdir(ctx, dir)
}
+// MkdirMetadata makes the root directory of the Fs object
+func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata) (fs.Directory, error) {
+ if do := f.Fs.Features().MkdirMetadata; do != nil {
+ return do(ctx, dir, metadata)
+ }
+ return nil, fs.ErrorNotImplemented
+}
+
// Rmdir removes the directory (container, bucket) if empty
//
// Return an error if it doesn't exist or isn't empty
@@ -927,6 +941,14 @@ func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string
return do(ctx, srcFs.Fs, srcRemote, dstRemote)
}
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ if do := f.Fs.Features().DirSetModTime; do != nil {
+ return do(ctx, dir, modTime)
+ }
+ return fs.ErrorNotImplemented
+}
+
// CleanUp the trash in the Fs
//
// Implement this if you have a way of emptying the trash or
@@ -1265,6 +1287,17 @@ func (o *Object) Metadata(ctx context.Context) (fs.Metadata, error) {
return do.Metadata(ctx)
}
+// SetMetadata sets metadata for an Object
+//
+// It should return fs.ErrorNotImplemented if it can't set metadata
+func (o *Object) SetMetadata(ctx context.Context, metadata fs.Metadata) error {
+ do, ok := o.Object.(fs.SetMetadataer)
+ if !ok {
+ return fs.ErrorNotImplemented
+ }
+ return do.SetMetadata(ctx, metadata)
+}
+
// Hash returns the selected checksum of the file
// If no checksum is available it returns ""
func (o *Object) Hash(ctx context.Context, ht hash.Type) (string, error) {
@@ -1330,7 +1363,7 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (rc io.Read
}
}
// Get a chunkedreader for the wrapped object
- chunkedReader := chunkedreader.New(ctx, o.Object, initialChunkSize, maxChunkSize)
+ chunkedReader := chunkedreader.New(ctx, o.Object, initialChunkSize, maxChunkSize, chunkStreams)
// Get file handle
var file io.Reader
if offset != 0 {
@@ -1497,6 +1530,8 @@ var (
_ fs.Copier = (*Fs)(nil)
_ fs.Mover = (*Fs)(nil)
_ fs.DirMover = (*Fs)(nil)
+ _ fs.DirSetModTimer = (*Fs)(nil)
+ _ fs.MkdirMetadataer = (*Fs)(nil)
_ fs.PutStreamer = (*Fs)(nil)
_ fs.CleanUpper = (*Fs)(nil)
_ fs.UnWrapper = (*Fs)(nil)
diff --git a/backend/crypt/cipher.go b/backend/crypt/cipher.go
index d0f8a658e..4fd529175 100644
--- a/backend/crypt/cipher.go
+++ b/backend/crypt/cipher.go
@@ -329,7 +329,7 @@ func (c *Cipher) obfuscateSegment(plaintext string) string {
for _, runeValue := range plaintext {
dir += int(runeValue)
}
- dir = dir % 256
+ dir %= 256
// We'll use this number to store in the result filename...
var result bytes.Buffer
@@ -450,7 +450,7 @@ func (c *Cipher) deobfuscateSegment(ciphertext string) (string, error) {
if pos >= 26 {
pos -= 6
}
- pos = pos - thisdir
+ pos -= thisdir
if pos < 0 {
pos += 52
}
@@ -888,7 +888,7 @@ func (fh *decrypter) fillBuffer() (err error) {
fs.Errorf(nil, "crypt: ignoring: %v", ErrorEncryptedBadBlock)
// Zero out the bad block and continue
for i := range (*fh.buf)[:n] {
- (*fh.buf)[i] = 0
+ fh.buf[i] = 0
}
}
fh.bufIndex = 0
diff --git a/backend/crypt/crypt.go b/backend/crypt/crypt.go
index 54b1335dc..2303c0851 100644
--- a/backend/crypt/crypt.go
+++ b/backend/crypt/crypt.go
@@ -130,6 +130,16 @@ trying to recover an encrypted file with errors and it is desired to
recover as much of the file as possible.`,
Default: false,
Advanced: true,
+ }, {
+ Name: "strict_names",
+ Help: `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.`,
+ Default: false,
+ Advanced: true,
}, {
Name: "filename_encoding",
Help: `How to encode the encrypted filename to text string.
@@ -263,19 +273,24 @@ func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs,
// the features here are ones we could support, and they are
// ANDed with the ones from wrappedFs
f.features = (&fs.Features{
- CaseInsensitive: !cipher.dirNameEncrypt || cipher.NameEncryptionMode() == NameEncryptionOff,
- DuplicateFiles: true,
- ReadMimeType: false, // MimeTypes not supported with crypt
- WriteMimeType: false,
- BucketBased: true,
- CanHaveEmptyDirectories: true,
- SetTier: true,
- GetTier: true,
- ServerSideAcrossConfigs: opt.ServerSideAcrossConfigs,
- ReadMetadata: true,
- WriteMetadata: true,
- UserMetadata: true,
- PartialUploads: true,
+ CaseInsensitive: !cipher.dirNameEncrypt || cipher.NameEncryptionMode() == NameEncryptionOff,
+ DuplicateFiles: true,
+ ReadMimeType: false, // MimeTypes not supported with crypt
+ WriteMimeType: false,
+ BucketBased: true,
+ CanHaveEmptyDirectories: true,
+ SetTier: true,
+ GetTier: true,
+ ServerSideAcrossConfigs: opt.ServerSideAcrossConfigs,
+ ReadMetadata: true,
+ WriteMetadata: true,
+ UserMetadata: true,
+ ReadDirMetadata: true,
+ WriteDirMetadata: true,
+ WriteDirSetModTime: true,
+ UserDirMetadata: true,
+ DirModTimeUpdatesOnWrite: true,
+ PartialUploads: true,
}).Fill(ctx, f).Mask(ctx, wrappedFs).WrapsFs(f, wrappedFs)
return f, err
@@ -294,6 +309,7 @@ type Options struct {
PassBadBlocks bool `config:"pass_bad_blocks"`
FilenameEncoding string `config:"filename_encoding"`
Suffix string `config:"suffix"`
+ StrictNames bool `config:"strict_names"`
}
// Fs represents a wrapped fs.Fs
@@ -328,45 +344,64 @@ func (f *Fs) String() string {
}
// Encrypt an object file name to entries.
-func (f *Fs) add(entries *fs.DirEntries, obj fs.Object) {
+func (f *Fs) add(entries *fs.DirEntries, obj fs.Object) error {
remote := obj.Remote()
decryptedRemote, err := f.cipher.DecryptFileName(remote)
if err != nil {
- fs.Debugf(remote, "Skipping undecryptable file name: %v", err)
- return
+ if f.opt.StrictNames {
+ return fmt.Errorf("%s: undecryptable file name detected: %v", remote, err)
+ }
+ fs.Logf(remote, "Skipping undecryptable file name: %v", err)
+ return nil
}
if f.opt.ShowMapping {
fs.Logf(decryptedRemote, "Encrypts to %q", remote)
}
*entries = append(*entries, f.newObject(obj))
+ return nil
}
// Encrypt a directory file name to entries.
-func (f *Fs) addDir(ctx context.Context, entries *fs.DirEntries, dir fs.Directory) {
+func (f *Fs) addDir(ctx context.Context, entries *fs.DirEntries, dir fs.Directory) error {
remote := dir.Remote()
decryptedRemote, err := f.cipher.DecryptDirName(remote)
if err != nil {
- fs.Debugf(remote, "Skipping undecryptable dir name: %v", err)
- return
+ if f.opt.StrictNames {
+ return fmt.Errorf("%s: undecryptable dir name detected: %v", remote, err)
+ }
+ fs.Logf(remote, "Skipping undecryptable dir name: %v", err)
+ return nil
}
if f.opt.ShowMapping {
fs.Logf(decryptedRemote, "Encrypts to %q", remote)
}
*entries = append(*entries, f.newDir(ctx, dir))
+ return nil
}
// Encrypt some directory entries. This alters entries returning it as newEntries.
func (f *Fs) encryptEntries(ctx context.Context, entries fs.DirEntries) (newEntries fs.DirEntries, err error) {
newEntries = entries[:0] // in place filter
+ errors := 0
+ var firsterr error
for _, entry := range entries {
switch x := entry.(type) {
case fs.Object:
- f.add(&newEntries, x)
+ err = f.add(&newEntries, x)
case fs.Directory:
- f.addDir(ctx, &newEntries, x)
+ err = f.addDir(ctx, &newEntries, x)
default:
return nil, fmt.Errorf("unknown object type %T", entry)
}
+ if err != nil {
+ errors++
+ if firsterr == nil {
+ firsterr = err
+ }
+ }
+ }
+ if firsterr != nil {
+ return nil, fmt.Errorf("there were %v undecryptable name errors. first error: %v", errors, firsterr)
}
return newEntries, nil
}
@@ -485,7 +520,7 @@ func (f *Fs) put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options [
if err != nil {
fs.Errorf(o, "Failed to remove corrupted object: %v", err)
}
- return nil, fmt.Errorf("corrupted on transfer: %v encrypted hash differ src %q vs dst %q", ht, srcHash, dstHash)
+ return nil, fmt.Errorf("corrupted on transfer: %v encrypted hashes differ src(%s) %q vs dst(%s) %q", ht, f.Fs, srcHash, o.Fs(), dstHash)
}
fs.Debugf(src, "%v = %s OK", ht, srcHash)
}
@@ -520,6 +555,37 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {
return f.Fs.Mkdir(ctx, f.cipher.EncryptDirName(dir))
}
+// MkdirMetadata makes the root directory of the Fs object
+func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata) (fs.Directory, error) {
+ do := f.Fs.Features().MkdirMetadata
+ if do == nil {
+ return nil, fs.ErrorNotImplemented
+ }
+ newDir, err := do(ctx, f.cipher.EncryptDirName(dir), metadata)
+ if err != nil {
+ return nil, err
+ }
+ var entries = make(fs.DirEntries, 0, 1)
+ err = f.addDir(ctx, &entries, newDir)
+ if err != nil {
+ return nil, err
+ }
+ newDir, ok := entries[0].(fs.Directory)
+ if !ok {
+ return nil, fmt.Errorf("internal error: expecting %T to be fs.Directory", entries[0])
+ }
+ return newDir, nil
+}
+
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ do := f.Fs.Features().DirSetModTime
+ if do == nil {
+ return fs.ErrorNotImplemented
+ }
+ return do(ctx, f.cipher.EncryptDirName(dir), modTime)
+}
+
// Rmdir removes the directory (container, bucket) if empty
//
// Return an error if it doesn't exist or isn't empty
@@ -761,7 +827,7 @@ func (f *Fs) MergeDirs(ctx context.Context, dirs []fs.Directory) error {
}
out := make([]fs.Directory, len(dirs))
for i, dir := range dirs {
- out[i] = fs.NewDirCopy(ctx, dir).SetRemote(f.cipher.EncryptDirName(dir.Remote()))
+ out[i] = fs.NewDirWrapper(f.cipher.EncryptDirName(dir.Remote()), dir)
}
return do(ctx, out)
}
@@ -997,14 +1063,14 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
// newDir returns a dir with the Name decrypted
func (f *Fs) newDir(ctx context.Context, dir fs.Directory) fs.Directory {
- newDir := fs.NewDirCopy(ctx, dir)
remote := dir.Remote()
decryptedRemote, err := f.cipher.DecryptDirName(remote)
if err != nil {
fs.Debugf(remote, "Undecryptable dir name: %v", err)
} else {
- newDir.SetRemote(decryptedRemote)
+ remote = decryptedRemote
}
+ newDir := fs.NewDirWrapper(remote, dir)
return newDir
}
@@ -1182,6 +1248,17 @@ func (o *Object) Metadata(ctx context.Context) (fs.Metadata, error) {
return do.Metadata(ctx)
}
+// SetMetadata sets metadata for an Object
+//
+// It should return fs.ErrorNotImplemented if it can't set metadata
+func (o *Object) SetMetadata(ctx context.Context, metadata fs.Metadata) error {
+ do, ok := o.Object.(fs.SetMetadataer)
+ if !ok {
+ return fs.ErrorNotImplemented
+ }
+ return do.SetMetadata(ctx, metadata)
+}
+
// MimeType returns the content type of the Object if
// known, or "" if not
//
@@ -1207,6 +1284,8 @@ var (
_ fs.Abouter = (*Fs)(nil)
_ fs.Wrapper = (*Fs)(nil)
_ fs.MergeDirser = (*Fs)(nil)
+ _ fs.DirSetModTimer = (*Fs)(nil)
+ _ fs.MkdirMetadataer = (*Fs)(nil)
_ fs.DirCacheFlusher = (*Fs)(nil)
_ fs.ChangeNotifier = (*Fs)(nil)
_ fs.PublicLinker = (*Fs)(nil)
diff --git a/backend/drive/drive.go b/backend/drive/drive.go
index 88e2b7253..3feef0ef2 100644
--- a/backend/drive/drive.go
+++ b/backend/drive/drive.go
@@ -151,6 +151,7 @@ func (rwChoices) Choices() []fs.BitsChoicesInfo {
{Bit: uint64(rwOff), Name: "off"},
{Bit: uint64(rwRead), Name: "read"},
{Bit: uint64(rwWrite), Name: "write"},
+ {Bit: uint64(rwFailOK), Name: "failok"},
}
}
@@ -160,6 +161,7 @@ type rwChoice = fs.Bits[rwChoices]
const (
rwRead rwChoice = 1 << iota
rwWrite
+ rwFailOK
rwOff rwChoice = 0
)
@@ -173,6 +175,9 @@ var rwExamples = fs.OptionExamples{{
}, {
Value: rwWrite.String(),
Help: "Write the value only",
+}, {
+ Value: rwFailOK.String(),
+ Help: "If writing fails log errors only, don't fail the transfer",
}, {
Value: (rwRead | rwWrite).String(),
Help: "Read and Write the value.",
@@ -287,7 +292,10 @@ func init() {
},
MetadataInfo: &fs.MetadataInfo{
System: systemMetadataInfo,
- Help: `User metadata is stored in the properties field of the drive object.`,
+ Help: `User metadata is stored in the properties field of the drive object.
+
+Metadata is supported on files and directories.
+`,
},
Options: append(driveOAuthOptions(), []fs.Option{{
Name: "scope",
@@ -870,6 +878,11 @@ type Object struct {
v2Download bool // generate v2 download link ondemand
}
+// Directory describes a drive directory
+type Directory struct {
+ baseObject
+}
+
// ------------------------------------------------------------
// Name of the remote (as passed into NewFs)
@@ -1374,15 +1387,20 @@ func newFs(ctx context.Context, name, path string, m configmap.Mapper) (*Fs, err
}
f.isTeamDrive = opt.TeamDriveID != ""
f.features = (&fs.Features{
- DuplicateFiles: true,
- ReadMimeType: true,
- WriteMimeType: true,
- CanHaveEmptyDirectories: true,
- ServerSideAcrossConfigs: opt.ServerSideAcrossConfigs,
- FilterAware: true,
- ReadMetadata: true,
- WriteMetadata: true,
- UserMetadata: true,
+ DuplicateFiles: true,
+ ReadMimeType: true,
+ WriteMimeType: true,
+ CanHaveEmptyDirectories: true,
+ ServerSideAcrossConfigs: opt.ServerSideAcrossConfigs,
+ FilterAware: true,
+ ReadMetadata: true,
+ WriteMetadata: true,
+ UserMetadata: true,
+ ReadDirMetadata: true,
+ WriteDirMetadata: true,
+ WriteDirSetModTime: true,
+ UserDirMetadata: true,
+ DirModTimeUpdatesOnWrite: false, // FIXME need to check!
}).Fill(ctx, f)
// Create a new authorized Drive client.
@@ -1729,26 +1747,72 @@ func (f *Fs) FindLeaf(ctx context.Context, pathID, leaf string) (pathIDOut strin
return pathIDOut, found, err
}
-// CreateDir makes a directory with pathID as parent and name leaf
-func (f *Fs) CreateDir(ctx context.Context, pathID, leaf string) (newID string, err error) {
+// createDir makes a directory with pathID as parent and name leaf with optional metadata
+func (f *Fs) createDir(ctx context.Context, pathID, leaf string, metadata fs.Metadata) (info *drive.File, err error) {
leaf = f.opt.Enc.FromStandardName(leaf)
- // fmt.Println("Making", path)
- // Define the metadata for the directory we are going to create.
pathID = actualID(pathID)
createInfo := &drive.File{
- Name: leaf,
- Description: leaf,
- MimeType: driveFolderType,
- Parents: []string{pathID},
+ Name: leaf,
+ MimeType: driveFolderType,
+ Parents: []string{pathID},
+ }
+ var updateMetadata updateMetadataFn
+ if len(metadata) > 0 {
+ updateMetadata, err = f.updateMetadata(ctx, createInfo, metadata, true)
+ if err != nil {
+ return nil, fmt.Errorf("create dir: failed to update metadata: %w", err)
+ }
}
- var info *drive.File
err = f.pacer.Call(func() (bool, error) {
info, err = f.svc.Files.Create(createInfo).
- Fields("id").
+ Fields(f.getFileFields(ctx)).
SupportsAllDrives(true).
Context(ctx).Do()
return f.shouldRetry(ctx, err)
})
+ if err != nil {
+ return nil, err
+ }
+ if updateMetadata != nil {
+ err = updateMetadata(ctx, info)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return info, nil
+}
+
+// updateDir updates an existing a directory with the metadata passed in
+func (f *Fs) updateDir(ctx context.Context, dirID string, metadata fs.Metadata) (info *drive.File, err error) {
+ if len(metadata) == 0 {
+ return f.getFile(ctx, dirID, f.getFileFields(ctx))
+ }
+ dirID = actualID(dirID)
+ updateInfo := &drive.File{}
+ updateMetadata, err := f.updateMetadata(ctx, updateInfo, metadata, true)
+ if err != nil {
+ return nil, fmt.Errorf("update dir: failed to update metadata from source object: %w", err)
+ }
+ err = f.pacer.Call(func() (bool, error) {
+ info, err = f.svc.Files.Update(dirID, updateInfo).
+ Fields(f.getFileFields(ctx)).
+ SupportsAllDrives(true).
+ Context(ctx).Do()
+ return f.shouldRetry(ctx, err)
+ })
+ if err != nil {
+ return nil, err
+ }
+ err = updateMetadata(ctx, info)
+ if err != nil {
+ return nil, err
+ }
+ return info, nil
+}
+
+// CreateDir makes a directory with pathID as parent and name leaf
+func (f *Fs) CreateDir(ctx context.Context, pathID, leaf string) (newID string, err error) {
+ info, err := f.createDir(ctx, pathID, leaf, nil)
if err != nil {
return "", err
}
@@ -1859,7 +1923,7 @@ func (f *Fs) findExportFormatByMimeType(ctx context.Context, itemMimeType string
return "", "", isDocument
}
-// findExportFormatByMimeType works out the optimum export settings
+// findExportFormat works out the optimum export settings
// for the given drive.File.
//
// Look through the exportExtensions and find the first format that can be
@@ -2155,13 +2219,13 @@ func (f *Fs) ListR(ctx context.Context, dir string, callback fs.ListRCallback) (
case in <- job:
default:
overflow = append(overflow, job)
- wg.Add(-1)
+ wg.Done()
}
}
// Send the entry to the caller, queueing any directories as new jobs
cb := func(entry fs.DirEntry) error {
- if d, isDir := entry.(*fs.Dir); isDir {
+ if d, isDir := entry.(fs.Directory); isDir {
job := listREntry{actualID(d.ID()), d.Remote()}
sendJob(job)
}
@@ -2338,11 +2402,11 @@ func (f *Fs) itemToDirEntry(ctx context.Context, remote string, item *drive.File
if item.ResourceKey != "" {
f.dirResourceKeys.Store(item.Id, item.ResourceKey)
}
- when, _ := time.Parse(timeFormatIn, item.ModifiedTime)
- d := fs.NewDir(remote, when).SetID(item.Id)
- if len(item.Parents) > 0 {
- d.SetParentID(item.Parents[0])
+ baseObject, err := f.newBaseObject(ctx, remote, item)
+ if err != nil {
+ return nil, err
}
+ d := &Directory{baseObject: baseObject}
return d, nil
case f.opt.AuthOwnerOnly && !isAuthOwned(item):
// ignore object
@@ -2370,7 +2434,6 @@ func (f *Fs) createFileInfo(ctx context.Context, remote string, modTime time.Tim
// Define the metadata for the file we are going to create.
createInfo := &drive.File{
Name: leaf,
- Description: leaf,
Parents: []string{directoryID},
ModifiedTime: modTime.Format(timeFormatOut),
}
@@ -2535,6 +2598,59 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {
return err
}
+// MkdirMetadata makes the directory passed in as dir.
+//
+// It shouldn't return an error if it already exists.
+//
+// If the metadata is not nil it is set.
+//
+// It returns the directory that was created.
+func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata) (fs.Directory, error) {
+ var info *drive.File
+ dirID, err := f.dirCache.FindDir(ctx, dir, false)
+ if err == fs.ErrorDirNotFound {
+ // Directory does not exist so create it
+ var leaf, parentID string
+ leaf, parentID, err = f.dirCache.FindPath(ctx, dir, true)
+ if err != nil {
+ return nil, err
+ }
+ info, err = f.createDir(ctx, parentID, leaf, metadata)
+ } else if err == nil {
+ // Directory exists and needs updating
+ info, err = f.updateDir(ctx, dirID, metadata)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // Convert the info into a directory entry
+ entry, err := f.itemToDirEntry(ctx, dir, info)
+ if err != nil {
+ return nil, err
+ }
+ dirEntry, ok := entry.(fs.Directory)
+ if !ok {
+ return nil, fmt.Errorf("internal error: expecting %T to be an fs.Directory", entry)
+ }
+
+ return dirEntry, nil
+}
+
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ dirID, err := f.dirCache.FindDir(ctx, dir, false)
+ if err != nil {
+ return err
+ }
+ o := baseObject{
+ fs: f,
+ remote: dir,
+ id: dirID,
+ }
+ return o.SetModTime(ctx, modTime)
+}
+
// delete a file or directory unconditionally by ID
func (f *Fs) delete(ctx context.Context, id string, useTrash bool) error {
return f.pacer.Call(func() (bool, error) {
@@ -2678,6 +2794,12 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
createInfo.Description = ""
}
+ // Adjust metadata if required
+ updateMetadata, err := f.fetchAndUpdateMetadata(ctx, src, fs.MetadataAsOpenOptions(ctx), createInfo, false)
+ if err != nil {
+ return nil, err
+ }
+
// get the ID of the thing to copy
// copy the contents if CopyShortcutContent
// else copy the shortcut only
@@ -2691,7 +2813,7 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
var info *drive.File
err = f.pacer.Call(func() (bool, error) {
copy := f.svc.Files.Copy(id, createInfo).
- Fields(partialFields).
+ Fields(f.getFileFields(ctx)).
SupportsAllDrives(true).
KeepRevisionForever(f.opt.KeepRevisionForever)
srcObj.addResourceKey(copy.Header())
@@ -2711,7 +2833,7 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
// FIXME remove this when google fixes the problem!
if isDoc {
// A short sleep is needed here in order to make the
- // change effective, without it is is ignored. This is
+ // change effective, without it is ignored. This is
// probably some eventual consistency nastiness.
sleepTime := 2 * time.Second
fs.Debugf(f, "Sleeping for %v before setting the modtime to work around drive bug - see #4517", sleepTime)
@@ -2727,6 +2849,11 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
fs.Errorf(existingObject, "Failed to remove existing object after copy: %v", err)
}
}
+ // Finalise metadata
+ err = updateMetadata(ctx, info)
+ if err != nil {
+ return nil, err
+ }
return newObject, nil
}
@@ -2900,13 +3027,19 @@ func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object,
dstParents := strings.Join(dstInfo.Parents, ",")
dstInfo.Parents = nil
+ // Adjust metadata if required
+ updateMetadata, err := f.fetchAndUpdateMetadata(ctx, src, fs.MetadataAsOpenOptions(ctx), dstInfo, true)
+ if err != nil {
+ return nil, err
+ }
+
// Do the move
var info *drive.File
err = f.pacer.Call(func() (bool, error) {
info, err = f.svc.Files.Update(shortcutID(srcObj.id), dstInfo).
RemoveParents(srcParentID).
AddParents(dstParents).
- Fields(partialFields).
+ Fields(f.getFileFields(ctx)).
SupportsAllDrives(true).
Context(ctx).Do()
return f.shouldRetry(ctx, err)
@@ -2915,6 +3048,11 @@ func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object,
return nil, err
}
+ // Finalise metadata
+ err = updateMetadata(ctx, info)
+ if err != nil {
+ return nil, err
+ }
return f.newObjectWithInfo(ctx, remote, info)
}
@@ -3420,6 +3558,50 @@ func (f *Fs) copyID(ctx context.Context, id, dest string) (err error) {
return nil
}
+func (f *Fs) query(ctx context.Context, query string) (entries []*drive.File, err error) {
+ list := f.svc.Files.List()
+ if query != "" {
+ list.Q(query)
+ }
+
+ if f.opt.ListChunk > 0 {
+ list.PageSize(f.opt.ListChunk)
+ }
+ list.SupportsAllDrives(true)
+ list.IncludeItemsFromAllDrives(true)
+ if f.isTeamDrive && !f.opt.SharedWithMe {
+ list.DriveId(f.opt.TeamDriveID)
+ list.Corpora("drive")
+ }
+ // If using appDataFolder then need to add Spaces
+ if f.rootFolderID == "appDataFolder" {
+ list.Spaces("appDataFolder")
+ }
+
+ fields := fmt.Sprintf("files(%s),nextPageToken,incompleteSearch", f.getFileFields(ctx))
+
+ var results []*drive.File
+ for {
+ var files *drive.FileList
+ err = f.pacer.Call(func() (bool, error) {
+ files, err = list.Fields(googleapi.Field(fields)).Context(ctx).Do()
+ return f.shouldRetry(ctx, err)
+ })
+ if err != nil {
+ return nil, fmt.Errorf("failed to execute query: %w", err)
+ }
+ if files.IncompleteSearch {
+ fs.Errorf(f, "search result INCOMPLETE")
+ }
+ results = append(results, files.Files...)
+ if files.NextPageToken == "" {
+ break
+ }
+ list.PageToken(files.NextPageToken)
+ }
+ return results, nil
+}
+
var commandHelp = []fs.CommandHelp{{
Name: "get",
Short: "Get command for fetching the drive config parameters",
@@ -3570,6 +3752,47 @@ Use the --interactive/-i or --dry-run flag to see what would be copied before co
}, {
Name: "importformats",
Short: "Dump the import formats for debug purposes",
+}, {
+ Name: "query",
+ Short: "List files using Google Drive query language",
+ Long: `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"
+ }
+ ]`,
}}
// Command the backend to run a named command
@@ -3687,6 +3910,17 @@ func (f *Fs) Command(ctx context.Context, name string, arg []string, opt map[str
return f.exportFormats(ctx), nil
case "importformats":
return f.importFormats(ctx), nil
+ case "query":
+ if len(arg) == 1 {
+ query := arg[0]
+ var results, err = f.query(ctx, query)
+ if err != nil {
+ return nil, fmt.Errorf("failed to execute query: %q, error: %w", query, err)
+ }
+ return results, nil
+ } else {
+ return nil, errors.New("need a query argument")
+ }
default:
return nil, fs.ErrorCommandNotFound
}
@@ -3731,7 +3965,7 @@ func (o *Object) Hash(ctx context.Context, t hash.Type) (string, error) {
return "", hash.ErrUnsupported
}
func (o *baseObject) Hash(ctx context.Context, t hash.Type) (string, error) {
- if t != hash.MD5 {
+ if t != hash.MD5 && t != hash.SHA1 && t != hash.SHA256 {
return "", hash.ErrUnsupported
}
return "", nil
@@ -4193,6 +4427,37 @@ func (o *linkObject) ext() string {
return o.baseObject.remote[len(o.baseObject.remote)-o.extLen:]
}
+// Items returns the count of items in this directory or this
+// directory and subdirectories if known, -1 for unknown
+func (d *Directory) Items() int64 {
+ return -1
+}
+
+// SetMetadata sets metadata for a Directory
+//
+// It should return fs.ErrorNotImplemented if it can't set metadata
+func (d *Directory) SetMetadata(ctx context.Context, metadata fs.Metadata) error {
+ info, err := d.fs.updateDir(ctx, d.id, metadata)
+ if err != nil {
+ return fmt.Errorf("failed to update directory info: %w", err)
+ }
+ // Update directory from info returned
+ baseObject, err := d.fs.newBaseObject(ctx, d.remote, info)
+ if err != nil {
+ return fmt.Errorf("failed to process directory info: %w", err)
+ }
+ d.baseObject = baseObject
+ return err
+}
+
+// Hash does nothing on a directory
+//
+// This method is implemented with the incorrect type signature to
+// stop the Directory type asserting to fs.Object or fs.ObjectInfo
+func (d *Directory) Hash() {
+ // Does nothing
+}
+
// templates for document link files
const (
urlTemplate = `[InternetShortcut]{{"\r"}}
@@ -4242,6 +4507,8 @@ var (
_ fs.PublicLinker = (*Fs)(nil)
_ fs.ListRer = (*Fs)(nil)
_ fs.MergeDirser = (*Fs)(nil)
+ _ fs.DirSetModTimer = (*Fs)(nil)
+ _ fs.MkdirMetadataer = (*Fs)(nil)
_ fs.Abouter = (*Fs)(nil)
_ fs.Object = (*Object)(nil)
_ fs.MimeTyper = (*Object)(nil)
@@ -4256,4 +4523,8 @@ var (
_ fs.MimeTyper = (*linkObject)(nil)
_ fs.IDer = (*linkObject)(nil)
_ fs.ParentIDer = (*linkObject)(nil)
+ _ fs.Directory = (*Directory)(nil)
+ _ fs.SetModTimer = (*Directory)(nil)
+ _ fs.SetMetadataer = (*Directory)(nil)
+ _ fs.ParentIDer = (*Directory)(nil)
)
diff --git a/backend/drive/drive_internal_test.go b/backend/drive/drive_internal_test.go
index c2e6da05b..998d9ba43 100644
--- a/backend/drive/drive_internal_test.go
+++ b/backend/drive/drive_internal_test.go
@@ -524,12 +524,49 @@ func (f *Fs) InternalTestCopyID(t *testing.T) {
})
}
+// TestIntegration/FsMkdir/FsPutFiles/Internal/Query
+func (f *Fs) InternalTestQuery(t *testing.T) {
+ ctx := context.Background()
+ var err error
+ t.Run("BadQuery", func(t *testing.T) {
+ _, err = f.query(ctx, "this is a bad query")
+ require.Error(t, err)
+ assert.Contains(t, err.Error(), "failed to execute query")
+ })
+
+ t.Run("NoMatch", func(t *testing.T) {
+ results, err := f.query(ctx, fmt.Sprintf("name='%s' and name!='%s'", existingSubDir, existingSubDir))
+ require.NoError(t, err)
+ assert.Len(t, results, 0)
+ })
+
+ t.Run("GoodQuery", func(t *testing.T) {
+ pathSegments := strings.Split(existingFile, "/")
+ var parent string
+ for _, item := range pathSegments {
+ // the file name contains ' characters which must be escaped
+ escapedItem := f.opt.Enc.FromStandardName(item)
+ escapedItem = strings.ReplaceAll(escapedItem, `\`, `\\`)
+ escapedItem = strings.ReplaceAll(escapedItem, `'`, `\'`)
+
+ results, err := f.query(ctx, fmt.Sprintf("%strashed=false and name='%s'", parent, escapedItem))
+ require.NoError(t, err)
+ require.True(t, len(results) > 0)
+ for _, result := range results {
+ assert.True(t, len(result.Id) > 0)
+ assert.Equal(t, result.Name, item)
+ }
+ parent = fmt.Sprintf("'%s' in parents and ", results[0].Id)
+ }
+ })
+}
+
// TestIntegration/FsMkdir/FsPutFiles/Internal/AgeQuery
func (f *Fs) InternalTestAgeQuery(t *testing.T) {
// Check set up for filtering
assert.True(t, f.Features().FilterAware)
- opt := &filter.Opt{}
+ opt := &filter.Options{}
err := opt.MaxAge.Set("1h")
assert.NoError(t, err)
flt, err := filter.NewFilter(opt)
@@ -611,6 +648,7 @@ func (f *Fs) InternalTest(t *testing.T) {
t.Run("Shortcuts", f.InternalTestShortcuts)
t.Run("UnTrash", f.InternalTestUnTrash)
t.Run("CopyID", f.InternalTestCopyID)
+ t.Run("Query", f.InternalTestQuery)
t.Run("AgeQuery", f.InternalTestAgeQuery)
t.Run("ShouldRetry", f.InternalTestShouldRetry)
}
diff --git a/backend/drive/metadata.go b/backend/drive/metadata.go
index ab2ae94d0..c8afa7f8d 100644
--- a/backend/drive/metadata.go
+++ b/backend/drive/metadata.go
@@ -9,6 +9,8 @@ import (
"sync"
"github.com/rclone/rclone/fs"
+ "github.com/rclone/rclone/fs/fserrors"
+ "github.com/rclone/rclone/lib/errcount"
"golang.org/x/sync/errgroup"
drive "google.golang.org/api/drive/v3"
"google.golang.org/api/googleapi"
@@ -37,7 +39,7 @@ var systemMetadataInfo = map[string]fs.MetadataHelp{
Example: "true",
},
"writers-can-share": {
- Help: "Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.",
+ Help: "Whether users with only writer permission can modify the file's permissions. Not populated and ignored when setting for items in shared drives.",
Type: "boolean",
Example: "false",
},
@@ -135,23 +137,30 @@ func (f *Fs) getPermission(ctx context.Context, fileID, permissionID string, use
// Set the permissions on the info
func (f *Fs) setPermissions(ctx context.Context, info *drive.File, permissions []*drive.Permission) (err error) {
+ errs := errcount.New()
for _, perm := range permissions {
if perm.Role == "owner" {
// ignore owner permissions - these are set with owner
continue
}
cleanPermissionForWrite(perm)
- err = f.pacer.Call(func() (bool, error) {
- _, err = f.svc.Permissions.Create(info.Id, perm).
+ err := f.pacer.Call(func() (bool, error) {
+ _, err := f.svc.Permissions.Create(info.Id, perm).
SupportsAllDrives(true).
+ SendNotificationEmail(false).
Context(ctx).Do()
return f.shouldRetry(ctx, err)
})
if err != nil {
- return fmt.Errorf("failed to set permission: %w", err)
+ fs.Errorf(f, "Failed to set permission %s for %q: %v", perm.Role, perm.EmailAddress, err)
+ errs.Add(err)
}
}
- return nil
+ err = errs.Err("failed to set permission")
+ if err != nil {
+ err = fserrors.NoRetryError(err)
+ }
+ return err
}
// Clean attributes from permissions which we can't write
@@ -253,7 +262,7 @@ func (f *Fs) setLabels(ctx context.Context, info *drive.File, labels []*drive.La
return f.shouldRetry(ctx, err)
})
if err != nil {
- return fmt.Errorf("failed to set owner: %w", err)
+ return fmt.Errorf("failed to set labels: %w", err)
}
return nil
}
@@ -363,6 +372,7 @@ func (o *baseObject) parseMetadata(ctx context.Context, info *drive.File) (err e
// shared drives.
if o.fs.isTeamDrive && !info.HasAugmentedPermissions {
// Don't process permissions if there aren't any specifically set
+ fs.Debugf(o, "Ignoring %d permissions and %d permissionIds as is shared drive with hasAugmentedPermissions false", len(info.Permissions), len(info.PermissionIds))
info.Permissions = nil
info.PermissionIds = nil
}
@@ -527,8 +537,12 @@ func (f *Fs) updateMetadata(ctx context.Context, updateInfo *drive.File, meta fs
return nil, err
}
case "writers-can-share":
- if err := parseBool(&updateInfo.WritersCanShare); err != nil {
- return nil, err
+ if !f.isTeamDrive {
+ if err := parseBool(&updateInfo.WritersCanShare); err != nil {
+ return nil, err
+ }
+ } else {
+ fs.Debugf(f, "Ignoring %s=%s as can't set on shared drives", k, v)
}
case "viewed-by-me":
// Can't write this
@@ -540,7 +554,12 @@ func (f *Fs) updateMetadata(ctx context.Context, updateInfo *drive.File, meta fs
}
// Can't set Owner on upload so need to set afterwards
callbackFns = append(callbackFns, func(ctx context.Context, info *drive.File) error {
- return f.setOwner(ctx, info, v)
+ err := f.setOwner(ctx, info, v)
+ if err != nil && f.opt.MetadataOwner.IsSet(rwFailOK) {
+ fs.Errorf(f, "Ignoring error as failok is set: %v", err)
+ return nil
+ }
+ return err
})
case "permissions":
if !f.opt.MetadataPermissions.IsSet(rwWrite) {
@@ -553,7 +572,13 @@ func (f *Fs) updateMetadata(ctx context.Context, updateInfo *drive.File, meta fs
}
// Can't set Permissions on upload so need to set afterwards
callbackFns = append(callbackFns, func(ctx context.Context, info *drive.File) error {
- return f.setPermissions(ctx, info, perms)
+ err := f.setPermissions(ctx, info, perms)
+ if err != nil && f.opt.MetadataPermissions.IsSet(rwFailOK) {
+ // We've already logged the permissions errors individually here
+ fs.Debugf(f, "Ignoring error as failok is set: %v", err)
+ return nil
+ }
+ return err
})
case "labels":
if !f.opt.MetadataLabels.IsSet(rwWrite) {
@@ -566,7 +591,12 @@ func (f *Fs) updateMetadata(ctx context.Context, updateInfo *drive.File, meta fs
}
// Can't set Labels on upload so need to set afterwards
callbackFns = append(callbackFns, func(ctx context.Context, info *drive.File) error {
- return f.setLabels(ctx, info, labels)
+ err := f.setLabels(ctx, info, labels)
+ if err != nil && f.opt.MetadataLabels.IsSet(rwFailOK) {
+ fs.Errorf(f, "Ignoring error as failok is set: %v", err)
+ return nil
+ }
+ return err
})
case "folder-color-rgb":
updateInfo.FolderColorRgb = v
diff --git a/backend/dropbox/dropbox.go b/backend/dropbox/dropbox.go
index 235e121be..f2f1fc852 100644
--- a/backend/dropbox/dropbox.go
+++ b/backend/dropbox/dropbox.go
@@ -216,7 +216,10 @@ 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.`,
+shared folder.
+
+See also --dropbox-root-namespace for an alternative way to work with shared
+folders.`,
Default: false,
Advanced: true,
}, {
@@ -237,6 +240,11 @@ shared folder.`,
encoder.EncodeDel |
encoder.EncodeRightSpace |
encoder.EncodeInvalidUtf8,
+ }, {
+ Name: "root_namespace",
+ Help: "Specify a different Dropbox namespace ID to use as the root for all paths.",
+ Default: "",
+ Advanced: true,
}}...), defaultBatcherOptions.FsOptions("For full info see [the main docs](https://rclone.org/dropbox/#batch-mode)\n\n")...),
})
}
@@ -253,6 +261,7 @@ type Options struct {
AsyncBatch bool `config:"async_batch"`
PacerMinSleep fs.Duration `config:"pacer_min_sleep"`
Enc encoder.MultiEncoder `config:"encoding"`
+ RootNsid string `config:"root_namespace"`
}
// Fs represents a remote dropbox server
@@ -377,7 +386,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
oldToken = strings.TrimSpace(oldToken)
if ok && oldToken != "" && oldToken[0] != '{' {
fs.Infof(name, "Converting token to new format")
- newToken := fmt.Sprintf(`{"access_token":"%s","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}`, oldToken)
+ newToken := fmt.Sprintf(`{"access_token":%q,"token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}`, oldToken)
err := config.SetValueAndSave(name, config.ConfigToken, newToken)
if err != nil {
return nil, fmt.Errorf("NewFS convert token: %w", err)
@@ -502,8 +511,11 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
f.features.Fill(ctx, f)
- // If root starts with / then use the actual root
- if strings.HasPrefix(root, "/") {
+ if f.opt.RootNsid != "" {
+ f.ns = f.opt.RootNsid
+ fs.Debugf(f, "Overriding root namespace to %q", f.ns)
+ } else if strings.HasPrefix(root, "/") {
+ // If root starts with / then use the actual root
var acc *users.FullAccount
err = f.pacer.Call(func() (bool, error) {
acc, err = f.users.GetCurrentAccount()
@@ -644,7 +656,7 @@ func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) {
return f.newObjectWithInfo(ctx, remote, nil)
}
-// listSharedFoldersApi lists all available shared folders mounted and not mounted
+// listSharedFolders lists all available shared folders mounted and not mounted
// we'll need the id later so we have to return them in original format
func (f *Fs) listSharedFolders(ctx context.Context) (entries fs.DirEntries, err error) {
started := false
diff --git a/backend/filescom/filescom.go b/backend/filescom/filescom.go
new file mode 100644
index 000000000..b14c8cff6
--- /dev/null
+++ b/backend/filescom/filescom.go
@@ -0,0 +1,912 @@
+// Package filescom provides an interface to the Files.com
+// object storage system.
+package filescom
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "path"
+ "strings"
+ "time"
+
+ files_sdk "github.com/Files-com/files-sdk-go/v3"
+ "github.com/Files-com/files-sdk-go/v3/bundle"
+ "github.com/Files-com/files-sdk-go/v3/file"
+ file_migration "github.com/Files-com/files-sdk-go/v3/filemigration"
+ "github.com/Files-com/files-sdk-go/v3/folder"
+ "github.com/Files-com/files-sdk-go/v3/session"
+ "github.com/rclone/rclone/fs"
+ "github.com/rclone/rclone/fs/config"
+ "github.com/rclone/rclone/fs/config/configmap"
+ "github.com/rclone/rclone/fs/config/configstruct"
+ "github.com/rclone/rclone/fs/config/obscure"
+ "github.com/rclone/rclone/fs/fserrors"
+ "github.com/rclone/rclone/fs/fshttp"
+ "github.com/rclone/rclone/fs/hash"
+ "github.com/rclone/rclone/lib/encoder"
+ "github.com/rclone/rclone/lib/pacer"
+)
+
+/*
+Run of rclone info
+stringNeedsEscaping = []rune{
+ '/', '\x00'
+}
+maxFileLength = 512 // for 1 byte unicode characters
+maxFileLength = 512 // for 2 byte unicode characters
+maxFileLength = 512 // for 3 byte unicode characters
+maxFileLength = 512 // for 4 byte unicode characters
+canWriteUnnormalized = true
+canReadUnnormalized = true
+canReadRenormalized = true
+canStream = true
+*/
+
+const (
+ minSleep = 10 * time.Millisecond
+ maxSleep = 2 * time.Second
+ decayConstant = 2 // bigger for slower decay, exponential
+
+ folderNotEmpty = "processing-failure/folder-not-empty"
+)
+
+// Register with Fs
+func init() {
+ fs.Register(&fs.RegInfo{
+ Name: "filescom",
+ Description: "Files.com",
+ NewFs: NewFs,
+ Options: []fs.Option{
+ {
+ Name: "site",
+ Help: "Your site subdomain (e.g. mysite) or custom domain (e.g. myfiles.customdomain.com).",
+ }, {
+ Name: "username",
+ Help: "The username used to authenticate with Files.com.",
+ }, {
+ Name: "password",
+ Help: "The password used to authenticate with Files.com.",
+ IsPassword: true,
+ }, {
+ Name: "api_key",
+ Help: "The API key used to authenticate with Files.com.",
+ Advanced: true,
+ Sensitive: true,
+ }, {
+ Name: config.ConfigEncoding,
+ Help: config.ConfigEncodingHelp,
+ Advanced: true,
+ Default: (encoder.Display |
+ encoder.EncodeBackSlash |
+ encoder.EncodeRightSpace |
+ encoder.EncodeRightCrLfHtVt |
+ encoder.EncodeInvalidUtf8),
+ }},
+ })
+}
+
+// Options defines the configuration for this backend
+type Options struct {
+ Site string `config:"site"`
+ Username string `config:"username"`
+ Password string `config:"password"`
+ APIKey string `config:"api_key"`
+ Enc encoder.MultiEncoder `config:"encoding"`
+}
+
+// Fs represents a remote files.com server
+type Fs struct {
+ name string // name of this remote
+ root string // the path we are working on
+ opt Options // parsed options
+ features *fs.Features // optional features
+ fileClient *file.Client // the connection to the file API
+ folderClient *folder.Client // the connection to the folder API
+ migrationClient *file_migration.Client // the connection to the file migration API
+ bundleClient *bundle.Client // the connection to the bundle API
+ pacer *fs.Pacer // pacer for API calls
+}
+
+// Object describes a files object
+//
+// Will definitely have info but maybe not meta
+type Object struct {
+ fs *Fs // what this object is part of
+ remote string // The remote path
+ size int64 // size of the object
+ crc32 string // CRC32 of the object content
+ md5 string // MD5 of the object content
+ mimeType string // Content-Type of the object
+ modTime time.Time // modification time of the object
+}
+
+// ------------------------------------------------------------
+
+// Name of the remote (as passed into NewFs)
+func (f *Fs) Name() string {
+ return f.name
+}
+
+// Root of the remote (as passed into NewFs)
+func (f *Fs) Root() string {
+ return f.root
+}
+
+// String converts this Fs to a string
+func (f *Fs) String() string {
+ return fmt.Sprintf("files root '%s'", f.root)
+}
+
+// Features returns the optional features of this Fs
+func (f *Fs) Features() *fs.Features {
+ return f.features
+}
+
+// Encode remote and turn it into an absolute path in the share
+func (f *Fs) absPath(remote string) string {
+ return f.opt.Enc.FromStandardPath(path.Join(f.root, remote))
+}
+
+// retryErrorCodes is a slice of error codes that we will retry
+var retryErrorCodes = []int{
+ 429, // Too Many Requests.
+ 500, // Internal Server Error
+ 502, // Bad Gateway
+ 503, // Service Unavailable
+ 504, // Gateway Timeout
+ 509, // Bandwidth Limit Exceeded
+}
+
+// shouldRetry returns a boolean as to whether this err deserves to be
+// retried. It returns the err as a convenience
+func shouldRetry(ctx context.Context, err error) (bool, error) {
+ if fserrors.ContextError(ctx, &err) {
+ return false, err
+ }
+
+ if apiErr, ok := err.(files_sdk.ResponseError); ok {
+ for _, e := range retryErrorCodes {
+ if apiErr.HttpCode == e {
+ fs.Debugf(nil, "Retrying API error %v", err)
+ return true, err
+ }
+ }
+ }
+
+ return fserrors.ShouldRetry(err), err
+}
+
+// readMetaDataForPath reads the metadata from the path
+func (f *Fs) readMetaDataForPath(ctx context.Context, path string) (info *files_sdk.File, err error) {
+ params := files_sdk.FileFindParams{
+ Path: f.absPath(path),
+ }
+
+ var file files_sdk.File
+ err = f.pacer.Call(func() (bool, error) {
+ file, err = f.fileClient.Find(params, files_sdk.WithContext(ctx))
+ return shouldRetry(ctx, err)
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return &file, nil
+}
+
+// NewFs constructs an Fs from the path, container:path
+func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, error) {
+ // Parse config into Options struct
+ opt := new(Options)
+ err := configstruct.Set(m, opt)
+ if err != nil {
+ return nil, err
+ }
+
+ root = strings.Trim(root, "/")
+
+ config, err := newClientConfig(ctx, opt)
+ if err != nil {
+ return nil, err
+ }
+
+ f := &Fs{
+ name: name,
+ root: root,
+ opt: *opt,
+ fileClient: &file.Client{Config: config},
+ folderClient: &folder.Client{Config: config},
+ migrationClient: &file_migration.Client{Config: config},
+ bundleClient: &bundle.Client{Config: config},
+ pacer: fs.NewPacer(ctx, pacer.NewDefault(pacer.MinSleep(minSleep), pacer.MaxSleep(maxSleep), pacer.DecayConstant(decayConstant))),
+ }
+ f.features = (&fs.Features{
+ CaseInsensitive: true,
+ CanHaveEmptyDirectories: true,
+ ReadMimeType: true,
+ DirModTimeUpdatesOnWrite: true,
+ }).Fill(ctx, f)
+
+ if f.root != "" {
+ info, err := f.readMetaDataForPath(ctx, "")
+ if err == nil && !info.IsDir() {
+ f.root = path.Dir(f.root)
+ if f.root == "." {
+ f.root = ""
+ }
+ return f, fs.ErrorIsFile
+ }
+ }
+
+ return f, err
+}
+
+func newClientConfig(ctx context.Context, opt *Options) (config files_sdk.Config, err error) {
+ if opt.Site != "" {
+ config.Subdomain = opt.Site
+
+ _, err = url.Parse(config.Endpoint())
+ if err != nil {
+ config.Subdomain = ""
+ config.EndpointOverride = opt.Site
+
+ _, err = url.Parse(config.Endpoint())
+ if err != nil {
+ err = fmt.Errorf("invalid domain or subdomain: %v", opt.Site)
+ return
+ }
+ }
+ }
+
+ config = config.Init().SetCustomClient(fshttp.NewClient(ctx))
+
+ if opt.APIKey != "" {
+ config.APIKey = opt.APIKey
+ return
+ }
+
+ if opt.Username == "" {
+ err = errors.New("username not found")
+ return
+ }
+ if opt.Password == "" {
+ err = errors.New("password not found")
+ return
+ }
+ opt.Password, err = obscure.Reveal(opt.Password)
+ if err != nil {
+ return
+ }
+
+ sessionClient := session.Client{Config: config}
+ params := files_sdk.SessionCreateParams{
+ Username: opt.Username,
+ Password: opt.Password,
+ }
+
+ thisSession, err := sessionClient.Create(params, files_sdk.WithContext(ctx))
+ if err != nil {
+ err = fmt.Errorf("couldn't create session: %w", err)
+ return
+ }
+
+ config.SessionId = thisSession.Id
+ return
+}
+
+// Return an Object from a path
+//
+// If it can't be found it returns the error fs.ErrorObjectNotFound.
+func (f *Fs) newObjectWithInfo(ctx context.Context, remote string, file *files_sdk.File) (fs.Object, error) {
+ o := &Object{
+ fs: f,
+ remote: remote,
+ }
+ var err error
+ if file != nil {
+ err = o.setMetaData(file)
+ } else {
+ err = o.readMetaData(ctx) // reads info and meta, returning an error
+ }
+ if err != nil {
+ return nil, err
+ }
+ return o, nil
+}
+
+// NewObject finds the Object at remote. If it can't be found
+// it returns the error fs.ErrorObjectNotFound.
+func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) {
+ return f.newObjectWithInfo(ctx, remote, nil)
+}
+
+// List the objects and directories in dir into entries. The
+// entries can be returned in any order but should be for a
+// complete directory.
+//
+// dir should be "" to list the root, and should not have
+// trailing slashes.
+//
+// This should return ErrDirNotFound if the directory isn't
+// found.
+func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error) {
+ var it *folder.Iter
+ params := files_sdk.FolderListForParams{
+ Path: f.absPath(dir),
+ }
+
+ err = f.pacer.Call(func() (bool, error) {
+ it, err = f.folderClient.ListFor(params, files_sdk.WithContext(ctx))
+ return shouldRetry(ctx, err)
+ })
+ if err != nil {
+ return nil, fmt.Errorf("couldn't list files: %w", err)
+ }
+
+ for it.Next() {
+ item := ptr(it.File())
+ remote := f.opt.Enc.ToStandardPath(item.DisplayName)
+ remote = path.Join(dir, remote)
+ if remote == dir {
+ continue
+ }
+
+ item, err = f.readMetaDataForPath(ctx, remote)
+ if err != nil {
+ if files_sdk.IsNotExist(err) {
+ continue
+ }
+
+ return nil, err
+ }
+
+ if item.IsDir() {
+ d := fs.NewDir(remote, item.ModTime())
+ entries = append(entries, d)
+ } else {
+ o, err := f.newObjectWithInfo(ctx, remote, item)
+ if err != nil {
+ return nil, err
+ }
+ entries = append(entries, o)
+ }
+ }
+ err = it.Err()
+ if files_sdk.IsNotExist(err) {
+ return nil, fs.ErrorDirNotFound
+ }
+ return
+}
+
+// Creates from the parameters passed in a half finished Object which
+// must have setMetaData called on it
+//
+// Returns the object and error.
+//
+// Used to create new objects
+func (f *Fs) createObject(ctx context.Context, remote string) (o *Object, err error) {
+ // Create the directory for the object if it doesn't exist
+ err = f.mkParentDir(ctx, remote)
+ if err != nil {
+ return
+ }
+ // Temporary Object under construction
+ o = &Object{
+ fs: f,
+ remote: remote,
+ }
+ return o, nil
+}
+
+// Put the object
+//
+// Copy the reader in to the new object which is returned.
+//
+// The new object may have been created if an error is returned
+func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) {
+ // Temporary Object under construction
+ fs := &Object{
+ fs: f,
+ remote: src.Remote(),
+ }
+ return fs, fs.Update(ctx, in, src, options...)
+}
+
+// PutStream uploads to the remote path with the modTime given of indeterminate size
+func (f *Fs) PutStream(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) {
+ return f.Put(ctx, in, src, options...)
+}
+
+func (f *Fs) mkdir(ctx context.Context, path string) error {
+ if path == "" || path == "." {
+ return nil
+ }
+
+ params := files_sdk.FolderCreateParams{
+ Path: path,
+ MkdirParents: ptr(true),
+ }
+
+ err := f.pacer.Call(func() (bool, error) {
+ _, err := f.folderClient.Create(params, files_sdk.WithContext(ctx))
+ return shouldRetry(ctx, err)
+ })
+ if files_sdk.IsExist(err) {
+ return nil
+ }
+ return err
+}
+
+// Make the parent directory of remote
+func (f *Fs) mkParentDir(ctx context.Context, remote string) error {
+ return f.mkdir(ctx, path.Dir(f.absPath(remote)))
+}
+
+// Mkdir creates the container if it doesn't exist
+func (f *Fs) Mkdir(ctx context.Context, dir string) error {
+ return f.mkdir(ctx, f.absPath(dir))
+}
+
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ o := Object{
+ fs: f,
+ remote: dir,
+ }
+ return o.SetModTime(ctx, modTime)
+}
+
+// purgeCheck removes the root directory, if check is set then it
+// refuses to do so if it has anything in
+func (f *Fs) purgeCheck(ctx context.Context, dir string, check bool) error {
+ path := f.absPath(dir)
+ if path == "" || path == "." {
+ return errors.New("can't purge root directory")
+ }
+
+ params := files_sdk.FileDeleteParams{
+ Path: path,
+ Recursive: ptr(!check),
+ }
+
+ err := f.pacer.Call(func() (bool, error) {
+ err := f.fileClient.Delete(params, files_sdk.WithContext(ctx))
+ // Allow for eventual consistency deletion of child objects.
+ if isFolderNotEmpty(err) {
+ return true, err
+ }
+ return shouldRetry(ctx, err)
+ })
+ if err != nil {
+ if files_sdk.IsNotExist(err) {
+ return fs.ErrorDirNotFound
+ } else if isFolderNotEmpty(err) {
+ return fs.ErrorDirectoryNotEmpty
+ }
+
+ return fmt.Errorf("rmdir failed: %w", err)
+ }
+ return nil
+}
+
+// Rmdir deletes the root folder
+//
+// Returns an error if it isn't empty
+func (f *Fs) Rmdir(ctx context.Context, dir string) error {
+ return f.purgeCheck(ctx, dir, true)
+}
+
+// Precision return the precision of this Fs
+func (f *Fs) Precision() time.Duration {
+ return time.Second
+}
+
+// Copy src to this remote using server-side copy operations.
+//
+// This is stored with the remote path given.
+//
+// It returns the destination Object and a possible error.
+//
+// Will only be called if src.Fs().Name() == f.Name()
+//
+// If it isn't possible then return fs.ErrorCantCopy
+func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (dstObj fs.Object, err error) {
+ srcObj, ok := src.(*Object)
+ if !ok {
+ fs.Debugf(src, "Can't copy - not same remote type")
+ return nil, fs.ErrorCantCopy
+ }
+ err = srcObj.readMetaData(ctx)
+ if err != nil {
+ return
+ }
+
+ srcPath := srcObj.fs.absPath(srcObj.remote)
+ dstPath := f.absPath(remote)
+ if strings.EqualFold(srcPath, dstPath) {
+ return nil, fmt.Errorf("can't copy %q -> %q as are same name when lowercase", srcPath, dstPath)
+ }
+
+ // Create temporary object
+ dstObj, err = f.createObject(ctx, remote)
+ if err != nil {
+ return
+ }
+
+ // Copy the object
+ params := files_sdk.FileCopyParams{
+ Path: srcPath,
+ Destination: dstPath,
+ Overwrite: ptr(true),
+ }
+
+ var action files_sdk.FileAction
+ err = f.pacer.Call(func() (bool, error) {
+ action, err = f.fileClient.Copy(params, files_sdk.WithContext(ctx))
+ return shouldRetry(ctx, err)
+ })
+ if err != nil {
+ return
+ }
+
+ err = f.waitForAction(ctx, action, "copy")
+ if err != nil {
+ return
+ }
+
+ err = dstObj.SetModTime(ctx, srcObj.modTime)
+ return
+}
+
+// Purge deletes all the files and the container
+//
+// Optional interface: Only implement this if you have a way of
+// deleting all the files quicker than just running Remove() on the
+// result of List()
+func (f *Fs) Purge(ctx context.Context, dir string) error {
+ return f.purgeCheck(ctx, dir, false)
+}
+
+// move a file or folder
+func (f *Fs) move(ctx context.Context, src *Fs, srcRemote string, dstRemote string) (info *files_sdk.File, err error) {
+ // Move the object
+ params := files_sdk.FileMoveParams{
+ Path: src.absPath(srcRemote),
+ Destination: f.absPath(dstRemote),
+ }
+
+ var action files_sdk.FileAction
+ err = f.pacer.Call(func() (bool, error) {
+ action, err = f.fileClient.Move(params, files_sdk.WithContext(ctx))
+ return shouldRetry(ctx, err)
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ err = f.waitForAction(ctx, action, "move")
+ if err != nil {
+ return nil, err
+ }
+
+ info, err = f.readMetaDataForPath(ctx, dstRemote)
+ return
+}
+
+func (f *Fs) waitForAction(ctx context.Context, action files_sdk.FileAction, operation string) (err error) {
+ var migration files_sdk.FileMigration
+ err = f.pacer.Call(func() (bool, error) {
+ migration, err = f.migrationClient.Wait(action, func(migration files_sdk.FileMigration) {
+ // noop
+ }, files_sdk.WithContext(ctx))
+ return shouldRetry(ctx, err)
+ })
+ if err == nil && migration.Status != "completed" {
+ return fmt.Errorf("%v did not complete successfully: %v", operation, migration.Status)
+ }
+ return
+}
+
+// Move src to this remote using server-side move operations.
+//
+// This is stored with the remote path given.
+//
+// It returns the destination Object and a possible error.
+//
+// Will only be called if src.Fs().Name() == f.Name()
+//
+// If it isn't possible then return fs.ErrorCantMove
+func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object, error) {
+ srcObj, ok := src.(*Object)
+ if !ok {
+ fs.Debugf(src, "Can't move - not same remote type")
+ return nil, fs.ErrorCantMove
+ }
+
+ // Create temporary object
+ dstObj, err := f.createObject(ctx, remote)
+ if err != nil {
+ return nil, err
+ }
+
+ // Do the move
+ info, err := f.move(ctx, srcObj.fs, srcObj.remote, dstObj.remote)
+ if err != nil {
+ return nil, err
+ }
+
+ err = dstObj.setMetaData(info)
+ if err != nil {
+ return nil, err
+ }
+ return dstObj, nil
+}
+
+// DirMove moves src, srcRemote to this remote at dstRemote
+// using server-side move operations.
+//
+// Will only be called if src.Fs().Name() == f.Name()
+//
+// If it isn't possible then return fs.ErrorCantDirMove
+//
+// If destination exists then return fs.ErrorDirExists
+func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string) (err error) {
+ srcFs, ok := src.(*Fs)
+ if !ok {
+ fs.Debugf(srcFs, "Can't move directory - not same remote type")
+ return fs.ErrorCantDirMove
+ }
+
+ // Check if destination exists
+ _, err = f.readMetaDataForPath(ctx, dstRemote)
+ if err == nil {
+ return fs.ErrorDirExists
+ }
+
+ // Create temporary object
+ dstObj, err := f.createObject(ctx, dstRemote)
+ if err != nil {
+ return
+ }
+
+ // Do the move
+ _, err = f.move(ctx, srcFs, srcRemote, dstObj.remote)
+ return
+}
+
+// PublicLink adds a "readable by anyone with link" permission on the given file or folder.
+func (f *Fs) PublicLink(ctx context.Context, remote string, expire fs.Duration, unlink bool) (url string, err error) {
+ params := files_sdk.BundleCreateParams{
+ Paths: []string{f.absPath(remote)},
+ }
+ if expire < fs.DurationOff {
+ params.ExpiresAt = ptr(time.Now().Add(time.Duration(expire)))
+ }
+
+ var bundle files_sdk.Bundle
+ err = f.pacer.Call(func() (bool, error) {
+ bundle, err = f.bundleClient.Create(params, files_sdk.WithContext(ctx))
+ return shouldRetry(ctx, err)
+ })
+
+ url = bundle.Url
+ return
+}
+
+// Hashes returns the supported hash sets.
+func (f *Fs) Hashes() hash.Set {
+ return hash.NewHashSet(hash.CRC32, hash.MD5)
+}
+
+// ------------------------------------------------------------
+
+// Fs returns the parent Fs
+func (o *Object) Fs() fs.Info {
+ return o.fs
+}
+
+// Return a string version
+func (o *Object) String() string {
+ if o == nil {
+ return ""
+ }
+ return o.remote
+}
+
+// Remote returns the remote path
+func (o *Object) Remote() string {
+ return o.remote
+}
+
+// Hash returns the MD5 of an object returning a lowercase hex string
+func (o *Object) Hash(ctx context.Context, t hash.Type) (string, error) {
+ switch t {
+ case hash.CRC32:
+ if o.crc32 == "" {
+ return "", nil
+ }
+ return fmt.Sprintf("%08s", o.crc32), nil
+ case hash.MD5:
+ return o.md5, nil
+ }
+ return "", hash.ErrUnsupported
+}
+
+// Size returns the size of an object in bytes
+func (o *Object) Size() int64 {
+ return o.size
+}
+
+// setMetaData sets the metadata from info
+func (o *Object) setMetaData(file *files_sdk.File) error {
+ o.modTime = file.ModTime()
+
+ if !file.IsDir() {
+ o.size = file.Size
+ o.crc32 = file.Crc32
+ o.md5 = file.Md5
+ o.mimeType = file.MimeType
+ }
+
+ return nil
+}
+
+// readMetaData gets the metadata if it hasn't already been fetched
+//
+// it also sets the info
+func (o *Object) readMetaData(ctx context.Context) (err error) {
+ file, err := o.fs.readMetaDataForPath(ctx, o.remote)
+ if err != nil {
+ if files_sdk.IsNotExist(err) {
+ return fs.ErrorObjectNotFound
+ }
+ return err
+ }
+ if file.IsDir() {
+ return fs.ErrorIsDir
+ }
+ return o.setMetaData(file)
+}
+
+// ModTime returns the modification time of the object
+//
+// It attempts to read the objects mtime and if that isn't present the
+// LastModified returned in the http headers
+func (o *Object) ModTime(ctx context.Context) time.Time {
+ return o.modTime
+}
+
+// SetModTime sets the modification time of the local fs object
+func (o *Object) SetModTime(ctx context.Context, modTime time.Time) (err error) {
+ params := files_sdk.FileUpdateParams{
+ Path: o.fs.absPath(o.remote),
+ ProvidedMtime: &modTime,
+ }
+
+ var file files_sdk.File
+ err = o.fs.pacer.Call(func() (bool, error) {
+ file, err = o.fs.fileClient.Update(params, files_sdk.WithContext(ctx))
+ return shouldRetry(ctx, err)
+ })
+ if err != nil {
+ return err
+ }
+ return o.setMetaData(&file)
+}
+
+// Storable returns a boolean showing whether this object storable
+func (o *Object) Storable() bool {
+ return true
+}
+
+// Open an object for read
+func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.ReadCloser, err error) {
+ // Offset and Count for range download
+ var offset, count int64
+ fs.FixRangeOption(options, o.size)
+ for _, option := range options {
+ switch x := option.(type) {
+ case *fs.RangeOption:
+ offset, count = x.Decode(o.size)
+ if count < 0 {
+ count = o.size - offset
+ }
+ case *fs.SeekOption:
+ offset = x.Offset
+ count = o.size - offset
+ default:
+ if option.Mandatory() {
+ fs.Logf(o, "Unsupported mandatory option: %v", option)
+ }
+ }
+ }
+
+ params := files_sdk.FileDownloadParams{
+ Path: o.fs.absPath(o.remote),
+ }
+
+ headers := &http.Header{}
+ headers.Set("Range", fmt.Sprintf("bytes=%v-%v", offset, offset+count-1))
+ err = o.fs.pacer.Call(func() (bool, error) {
+ _, err = o.fs.fileClient.Download(
+ params,
+ files_sdk.WithContext(ctx),
+ files_sdk.RequestHeadersOption(headers),
+ files_sdk.ResponseBodyOption(func(closer io.ReadCloser) error {
+ in = closer
+ return err
+ }),
+ )
+ return shouldRetry(ctx, err)
+ })
+ return
+}
+
+// Returns a pointer to t - useful for returning pointers to constants
+func ptr[T any](t T) *T {
+ return &t
+}
+
+func isFolderNotEmpty(err error) bool {
+ var re files_sdk.ResponseError
+ ok := errors.As(err, &re)
+ return ok && re.Type == folderNotEmpty
+}
+
+// Update the object with the contents of the io.Reader, modTime and size
+//
+// If existing is set then it updates the object rather than creating a new one.
+//
+// The new object may have been created if an error is returned.
+func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error {
+ uploadOpts := []file.UploadOption{
+ file.UploadWithContext(ctx),
+ file.UploadWithReader(in),
+ file.UploadWithDestinationPath(o.fs.absPath(o.remote)),
+ file.UploadWithProvidedMtime(src.ModTime(ctx)),
+ }
+
+ err := o.fs.pacer.Call(func() (bool, error) {
+ err := o.fs.fileClient.Upload(uploadOpts...)
+ return shouldRetry(ctx, err)
+ })
+ if err != nil {
+ return err
+ }
+
+ return o.readMetaData(ctx)
+}
+
+// Remove an object
+func (o *Object) Remove(ctx context.Context) error {
+ params := files_sdk.FileDeleteParams{
+ Path: o.fs.absPath(o.remote),
+ }
+
+ return o.fs.pacer.Call(func() (bool, error) {
+ err := o.fs.fileClient.Delete(params, files_sdk.WithContext(ctx))
+ return shouldRetry(ctx, err)
+ })
+}
+
+// MimeType of an Object if known, "" otherwise
+func (o *Object) MimeType(ctx context.Context) string {
+ return o.mimeType
+}
+
+// Check the interfaces are satisfied
+var (
+ _ fs.Fs = (*Fs)(nil)
+ _ fs.Purger = (*Fs)(nil)
+ _ fs.PutStreamer = (*Fs)(nil)
+ _ fs.Copier = (*Fs)(nil)
+ _ fs.Mover = (*Fs)(nil)
+ _ fs.DirMover = (*Fs)(nil)
+ _ fs.PublicLinker = (*Fs)(nil)
+ _ fs.Object = (*Object)(nil)
+ _ fs.MimeTyper = (*Object)(nil)
+)
diff --git a/backend/filescom/filescom_test.go b/backend/filescom/filescom_test.go
new file mode 100644
index 000000000..b79121e53
--- /dev/null
+++ b/backend/filescom/filescom_test.go
@@ -0,0 +1,17 @@
+// Test Files filesystem interface
+package filescom_test
+
+import (
+ "testing"
+
+ "github.com/rclone/rclone/backend/filescom"
+ "github.com/rclone/rclone/fstest/fstests"
+)
+
+// TestIntegration runs integration tests against the remote
+func TestIntegration(t *testing.T) {
+ fstests.Run(t, &fstests.Opt{
+ RemoteName: "TestFilesCom:",
+ NilObject: (*filescom.Object)(nil),
+ })
+}
diff --git a/backend/ftp/ftp.go b/backend/ftp/ftp.go
index 6c7e7b105..75f6e9cdb 100644
--- a/backend/ftp/ftp.go
+++ b/backend/ftp/ftp.go
@@ -85,7 +85,7 @@ to an encrypted one. Cannot be used in combination with implicit FTPS.`,
Default: false,
}, {
Name: "concurrency",
- Help: strings.Replace(`Maximum number of FTP simultaneous connections, 0 for unlimited.
+ Help: strings.ReplaceAll(`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.
@@ -99,7 +99,7 @@ maximum of |--checkers| and |--transfers|.
So for |concurrency 3| you'd use |--checkers 2 --transfers 2
--check-first| or |--checkers 1 --transfers 1|.
-`, "|", "`", -1),
+`, "|", "`"),
Default: 0,
Advanced: true,
}, {
diff --git a/backend/gofile/api/types.go b/backend/gofile/api/types.go
new file mode 100644
index 000000000..4799687d0
--- /dev/null
+++ b/backend/gofile/api/types.go
@@ -0,0 +1,311 @@
+// Package api has type definitions for gofile
+//
+// Converted from the API docs with help from https://mholt.github.io/json-to-go/
+package api
+
+import (
+ "fmt"
+ "time"
+)
+
+const (
+ // 2017-05-03T07:26:10-07:00
+ timeFormat = `"` + time.RFC3339 + `"`
+)
+
+// Time represents date and time information for the
+// gofile API, by using RFC3339
+type Time time.Time
+
+// MarshalJSON turns a Time into JSON (in UTC)
+func (t *Time) MarshalJSON() (out []byte, err error) {
+ timeString := (*time.Time)(t).Format(timeFormat)
+ return []byte(timeString), nil
+}
+
+// UnmarshalJSON turns JSON into a Time
+func (t *Time) UnmarshalJSON(data []byte) error {
+ newT, err := time.Parse(timeFormat, string(data))
+ if err != nil {
+ return err
+ }
+ *t = Time(newT)
+ return nil
+}
+
+// Error is returned from gofile when things go wrong
+type Error struct {
+ Status string `json:"status"`
+}
+
+// Error returns a string for the error and satisfies the error interface
+func (e Error) Error() string {
+ out := fmt.Sprintf("Error %q", e.Status)
+ return out
+}
+
+// IsError returns true if there is an error
+func (e Error) IsError() bool {
+ return e.Status != "ok"
+}
+
+// Err returns err if not nil, or e if IsError or nil
+func (e Error) Err(err error) error {
+ if err != nil {
+ return err
+ }
+ if e.IsError() {
+ return e
+ }
+ return nil
+}
+
+// Check Error satisfies the error interface
+var _ error = (*Error)(nil)
+
+// Types of things in Item
+const (
+ ItemTypeFolder = "folder"
+ ItemTypeFile = "file"
+)
+
+// Item describes a folder or a file as returned by /contents
+type Item struct {
+ ID string `json:"id"`
+ ParentFolder string `json:"parentFolder"`
+ Type string `json:"type"`
+ Name string `json:"name"`
+ Size int64 `json:"size"`
+ Code string `json:"code"`
+ CreateTime int64 `json:"createTime"`
+ ModTime int64 `json:"modTime"`
+ Link string `json:"link"`
+ MD5 string `json:"md5"`
+ MimeType string `json:"mimetype"`
+ ChildrenCount int `json:"childrenCount"`
+ DirectLinks map[string]*DirectLink `json:"directLinks"`
+ //Public bool `json:"public"`
+ //ServerSelected string `json:"serverSelected"`
+ //Thumbnail string `json:"thumbnail"`
+ //DownloadCount int `json:"downloadCount"`
+ //TotalDownloadCount int64 `json:"totalDownloadCount"`
+ //TotalSize int64 `json:"totalSize"`
+ //ChildrenIDs []string `json:"childrenIds"`
+ Children map[string]*Item `json:"children"`
+}
+
+// ToNativeTime converts a go time to a native time
+func ToNativeTime(t time.Time) int64 {
+ return t.Unix()
+}
+
+// FromNativeTime converts native time to a go time
+func FromNativeTime(t int64) time.Time {
+ return time.Unix(t, 0)
+}
+
+// DirectLink describes a direct link to a file so it can be
+// downloaded by third parties.
+type DirectLink struct {
+ ExpireTime int64 `json:"expireTime"`
+ SourceIpsAllowed []any `json:"sourceIpsAllowed"`
+ DomainsAllowed []any `json:"domainsAllowed"`
+ Auth []any `json:"auth"`
+ IsReqLink bool `json:"isReqLink"`
+ DirectLink string `json:"directLink"`
+}
+
+// Contents is returned from the /contents call
+type Contents struct {
+ Error
+ Data struct {
+ Item
+ } `json:"data"`
+ Metadata Metadata `json:"metadata"`
+}
+
+// Metadata is returned when paging is in use
+type Metadata struct {
+ TotalCount int `json:"totalCount"`
+ TotalPages int `json:"totalPages"`
+ Page int `json:"page"`
+ PageSize int `json:"pageSize"`
+ HasNextPage bool `json:"hasNextPage"`
+}
+
+// AccountsGetID is the result of /accounts/getid
+type AccountsGetID struct {
+ Error
+ Data struct {
+ ID string `json:"id"`
+ } `json:"data"`
+}
+
+// Stats of storage and traffic
+type Stats struct {
+ FolderCount int64 `json:"folderCount"`
+ FileCount int64 `json:"fileCount"`
+ Storage int64 `json:"storage"`
+ TrafficDirectGenerated int64 `json:"trafficDirectGenerated"`
+ TrafficReqDownloaded int64 `json:"trafficReqDownloaded"`
+ TrafficWebDownloaded int64 `json:"trafficWebDownloaded"`
+}
+
+// AccountsGet is the result of /accounts/{id}
+type AccountsGet struct {
+ Error
+ Data struct {
+ ID string `json:"id"`
+ Email string `json:"email"`
+ Tier string `json:"tier"`
+ PremiumType string `json:"premiumType"`
+ Token string `json:"token"`
+ RootFolder string `json:"rootFolder"`
+ SubscriptionProvider string `json:"subscriptionProvider"`
+ SubscriptionEndDate int `json:"subscriptionEndDate"`
+ SubscriptionLimitDirectTraffic int64 `json:"subscriptionLimitDirectTraffic"`
+ SubscriptionLimitStorage int64 `json:"subscriptionLimitStorage"`
+ StatsCurrent Stats `json:"statsCurrent"`
+ // StatsHistory map[int]map[int]map[int]Stats `json:"statsHistory"`
+ } `json:"data"`
+}
+
+// CreateFolderRequest is the input to /contents/createFolder
+type CreateFolderRequest struct {
+ ParentFolderID string `json:"parentFolderId"`
+ FolderName string `json:"folderName"`
+ ModTime int64 `json:"modTime,omitempty"`
+}
+
+// CreateFolderResponse is the output from /contents/createFolder
+type CreateFolderResponse struct {
+ Error
+ Data Item `json:"data"`
+}
+
+// DeleteRequest is the input to DELETE /contents
+type DeleteRequest struct {
+ ContentsID string `json:"contentsId"` // comma separated list of IDs
+}
+
+// DeleteResponse is the input to DELETE /contents
+type DeleteResponse struct {
+ Error
+ Data map[string]Error
+}
+
+// Server is an upload server
+type Server struct {
+ Name string `json:"name"`
+ Zone string `json:"zone"`
+}
+
+// String returns a string representation of the Server
+func (s *Server) String() string {
+ return fmt.Sprintf("%s (%s)", s.Name, s.Zone)
+}
+
+// Root returns the root URL for the server
+func (s *Server) Root() string {
+ return fmt.Sprintf("https://%s.gofile.io/", s.Name)
+}
+
+// URL returns the upload URL for the server
+func (s *Server) URL() string {
+ return fmt.Sprintf("https://%s.gofile.io/contents/uploadfile", s.Name)
+}
+
+// ServersResponse is the output from /servers
+type ServersResponse struct {
+ Error
+ Data struct {
+ Servers []Server `json:"servers"`
+ } `json:"data"`
+}
+
+// UploadResponse is returned by POST /contents/uploadfile
+type UploadResponse struct {
+ Error
+ Data Item `json:"data"`
+}
+
+// DirectLinksRequest specifies the parameters for the direct link
+type DirectLinksRequest struct {
+ ExpireTime int64 `json:"expireTime,omitempty"`
+ SourceIpsAllowed []any `json:"sourceIpsAllowed,omitempty"`
+ DomainsAllowed []any `json:"domainsAllowed,omitempty"`
+ Auth []any `json:"auth,omitempty"`
+}
+
+// DirectLinksResult is returned from POST /contents/{id}/directlinks
+type DirectLinksResult struct {
+ Error
+ Data struct {
+ ExpireTime int64 `json:"expireTime"`
+ SourceIpsAllowed []any `json:"sourceIpsAllowed"`
+ DomainsAllowed []any `json:"domainsAllowed"`
+ Auth []any `json:"auth"`
+ IsReqLink bool `json:"isReqLink"`
+ ID string `json:"id"`
+ DirectLink string `json:"directLink"`
+ } `json:"data"`
+}
+
+// UpdateItemRequest describes the updates to be done to an item for PUT /contents/{id}/update
+//
+// The Value of the attribute to define :
+// For Attribute "name" : The name of the content (file or folder)
+// For Attribute "description" : The description displayed on the download page (folder only)
+// For Attribute "tags" : A comma-separated list of tags (folder only)
+// For Attribute "public" : either true or false (folder only)
+// For Attribute "expiry" : A unix timestamp of the expiration date (folder only)
+// For Attribute "password" : The password to set (folder only)
+type UpdateItemRequest struct {
+ Attribute string `json:"attribute"`
+ Value any `json:"attributeValue"`
+}
+
+// UpdateItemResponse is returned by PUT /contents/{id}/update
+type UpdateItemResponse struct {
+ Error
+ Data Item `json:"data"`
+}
+
+// MoveRequest is the input to /contents/move
+type MoveRequest struct {
+ FolderID string `json:"folderId"`
+ ContentsID string `json:"contentsId"` // comma separated list of IDs
+}
+
+// MoveResponse is returned by POST /contents/move
+type MoveResponse struct {
+ Error
+ Data map[string]struct {
+ Error
+ Item `json:"data"`
+ } `json:"data"`
+}
+
+// CopyRequest is the input to /contents/copy
+type CopyRequest struct {
+ FolderID string `json:"folderId"`
+ ContentsID string `json:"contentsId"` // comma separated list of IDs
+}
+
+// CopyResponse is returned by POST /contents/copy
+type CopyResponse struct {
+ Error
+ Data map[string]struct {
+ Error
+ Item `json:"data"`
+ } `json:"data"`
+}
+
+// UploadServerStatus is returned when fetching the root of an upload server
+type UploadServerStatus struct {
+ Error
+ Data struct {
+ Server string `json:"server"`
+ Test string `json:"test"`
+ } `json:"data"`
+}
diff --git a/backend/gofile/gofile.go b/backend/gofile/gofile.go
new file mode 100644
index 000000000..4b009e8cb
--- /dev/null
+++ b/backend/gofile/gofile.go
@@ -0,0 +1,1633 @@
+// Package gofile provides an interface to the Gofile
+// object storage system.
+package gofile
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "math/rand"
+ "net/http"
+ "net/url"
+ "path"
+ "strconv"
+ "strings"
+ "sync"
+ "time"
+
+ "github.com/rclone/rclone/backend/gofile/api"
+ "github.com/rclone/rclone/fs"
+ "github.com/rclone/rclone/fs/config"
+ "github.com/rclone/rclone/fs/config/configmap"
+ "github.com/rclone/rclone/fs/config/configstruct"
+ "github.com/rclone/rclone/fs/fserrors"
+ "github.com/rclone/rclone/fs/fshttp"
+ "github.com/rclone/rclone/fs/hash"
+ "github.com/rclone/rclone/fs/walk"
+ "github.com/rclone/rclone/lib/dircache"
+ "github.com/rclone/rclone/lib/encoder"
+ "github.com/rclone/rclone/lib/pacer"
+ "github.com/rclone/rclone/lib/rest"
+)
+
+const (
+ minSleep = 10 * time.Millisecond
+ maxSleep = 20 * time.Second
+ decayConstant = 1 // bigger for slower decay, exponential
+ rootURL = "https://api.gofile.io"
+ serversExpiry = 60 * time.Second // check for new upload servers this often
+ serversActive = 2 // choose this many closest upload servers to use
+ rateLimitSleep = 5 * time.Second // penalise a goroutine by this long for making a rate limit error
+ maxDepth = 4 // in ListR recursive list this deep (maximum is 16)
+)
+
+/*
+ // TestGoFile{sb0-v}
+stringNeedsEscaping = []rune{
+ '!', '*', '.', '/', ':', '<', '>', '?', '\"', '\\', '\a', '\b', '\f', '\n', '\r', '\t', '\v', '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', '\x7f', '\xbf', '\xfe', '|'
+}
+maxFileLength = 255 // for 1 byte unicode characters
+maxFileLength = 255 // for 2 byte unicode characters
+maxFileLength = 255 // for 3 byte unicode characters
+maxFileLength = 255 // for 4 byte unicode characters
+canWriteUnnormalized = true
+canReadUnnormalized = true
+canReadRenormalized = false
+canStream = true
+base32768isOK = false // make sure maxFileLength for 2 byte unicode chars is the same as for 1 byte characters
+*/
+
+// Register with Fs
+func init() {
+ fs.Register(&fs.RegInfo{
+ Name: "gofile",
+ Description: "Gofile",
+ NewFs: NewFs,
+ Options: []fs.Option{{
+ Name: "access_token",
+ Help: `API Access token
+
+You can get this from the web control panel.`,
+ Sensitive: true,
+ }, {
+ Name: "root_folder_id",
+ Help: `ID of the root folder
+
+Leave this blank normally, rclone will fill it in automatically.
+
+If you want rclone to be restricted to a particular folder you can
+fill it in - see the docs for more info.
+`,
+ Default: "",
+ Advanced: true,
+ Sensitive: true,
+ }, {
+ Name: "account_id",
+ Help: `Account ID
+
+Leave this blank normally, rclone will fill it in automatically.
+`,
+ Default: "",
+ Advanced: true,
+ Sensitive: true,
+ }, {
+ Name: "list_chunk",
+ Help: `Number of items to list in each call`,
+ Default: 1000,
+ Advanced: true,
+ }, {
+ Name: config.ConfigEncoding,
+ Help: config.ConfigEncodingHelp,
+ Advanced: true,
+ Default: (encoder.Display | // Slash Control Delete Dot
+ encoder.EncodeDoubleQuote |
+ encoder.EncodeAsterisk |
+ encoder.EncodeColon |
+ encoder.EncodeLtGt |
+ encoder.EncodeQuestion |
+ encoder.EncodeBackSlash |
+ encoder.EncodePipe |
+ encoder.EncodeExclamation |
+ encoder.EncodeLeftPeriod |
+ encoder.EncodeRightPeriod |
+ encoder.EncodeInvalidUtf8),
+ }},
+ })
+}
+
+// Options defines the configuration for this backend
+type Options struct {
+ AccessToken string `config:"access_token"`
+ RootFolderID string `config:"root_folder_id"`
+ AccountID string `config:"account_id"`
+ ListChunk int `config:"list_chunk"`
+ Enc encoder.MultiEncoder `config:"encoding"`
+}
+
+// Fs represents a remote gofile
+type Fs struct {
+ name string // name of this remote
+ root string // the path we are working on
+ opt Options // parsed options
+ features *fs.Features // optional features
+ srv *rest.Client // the connection to the server
+ dirCache *dircache.DirCache // Map of directory path to directory id
+ pacer *fs.Pacer // pacer for API calls
+ serversMu *sync.Mutex // protect the servers info below
+ servers []api.Server // upload servers we can use
+ serversChecked time.Time // time the servers were refreshed
+}
+
+// Object describes a gofile object
+//
+// The full set of metadata will always be present
+type Object struct {
+ fs *Fs // what this object is part of
+ remote string // The remote path
+ size int64 // size of the object
+ modTime time.Time // modification time of the object
+ id string // ID of the object
+ dirID string // ID of the object's directory
+ mimeType string // mime type of the object
+ md5 string // MD5 of the object content
+ url string // where to download this object
+}
+
+// Directory describes a gofile directory
+type Directory struct {
+ Object
+ items int64 // number of items in the directory
+}
+
+// ------------------------------------------------------------
+
+// Name of the remote (as passed into NewFs)
+func (f *Fs) Name() string {
+ return f.name
+}
+
+// Root of the remote (as passed into NewFs)
+func (f *Fs) Root() string {
+ return f.root
+}
+
+// String converts this Fs to a string
+func (f *Fs) String() string {
+ return fmt.Sprintf("gofile root '%s'", f.root)
+}
+
+// Features returns the optional features of this Fs
+func (f *Fs) Features() *fs.Features {
+ return f.features
+}
+
+// parsePath parses a gofile 'url'
+func parsePath(path string) (root string) {
+ root = strings.Trim(path, "/")
+ return
+}
+
+// retryErrorCodes is a slice of error codes that we will retry
+var retryErrorCodes = []int{
+ 429, // Too Many Requests.
+ 500, // Internal Server Error
+ 502, // Bad Gateway
+ 503, // Service Unavailable
+ 504, // Gateway Timeout
+ 509, // Bandwidth Limit Exceeded
+}
+
+// Return true if the api error has the status given
+func isAPIErr(err error, status string) bool {
+ var apiErr api.Error
+ if errors.As(err, &apiErr) {
+ return apiErr.Status == status
+ }
+ return false
+}
+
+// shouldRetry returns a boolean as to whether this resp and err
+// deserve to be retried. It returns the err as a convenience
+func shouldRetry(ctx context.Context, resp *http.Response, err error) (bool, error) {
+ if fserrors.ContextError(ctx, &err) {
+ return false, err
+ }
+ if isAPIErr(err, "error-rateLimit") {
+ // Give an immediate penalty to rate limits
+ fs.Debugf(nil, "Rate limited, sleep for %v", rateLimitSleep)
+ time.Sleep(rateLimitSleep)
+ //return true, pacer.RetryAfterError(err, 2*time.Second)
+ return true, err
+ }
+ return fserrors.ShouldRetry(err) || fserrors.ShouldRetryHTTP(resp, retryErrorCodes), err
+}
+
+// readMetaDataForPath reads the metadata from the path
+func (f *Fs) readMetaDataForPath(ctx context.Context, path string) (info *api.Item, err error) {
+ // defer log.Trace(f, "path=%q", path)("info=%+v, err=%v", &info, &err)
+ leaf, directoryID, err := f.dirCache.FindPath(ctx, path, false)
+ if err != nil {
+ if err == fs.ErrorDirNotFound {
+ return nil, fs.ErrorObjectNotFound
+ }
+ return nil, err
+ }
+
+ found, err := f.listAll(ctx, directoryID, false, true, leaf, func(item *api.Item) bool {
+ if item.Name == leaf {
+ info = item
+ return true
+ }
+ return false
+ })
+ if err != nil {
+ return nil, err
+ }
+ if !found {
+ return nil, fs.ErrorObjectNotFound
+ }
+ return info, nil
+}
+
+// readMetaDataForID reads the metadata for the ID given
+func (f *Fs) readMetaDataForID(ctx context.Context, id string) (info *api.Item, err error) {
+ opts := rest.Opts{
+ Method: "GET",
+ Path: "/contents/" + id,
+ Parameters: url.Values{
+ "page": {"1"},
+ "pageSize": {"1"}, // not interested in children so just ask for 1
+ },
+ }
+ var result api.Contents
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err := f.srv.CallJSON(ctx, &opts, nil, &result)
+ // Retry not found errors - when looking for an ID it should really exist
+ if isAPIErr(err, "error-notFound") {
+ return true, err
+ }
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return nil, fmt.Errorf("failed to get item info: %w", err)
+ }
+ return &result.Data.Item, nil
+}
+
+// errorHandler parses a non 2xx error response into an error
+func errorHandler(resp *http.Response) error {
+ body, err := rest.ReadBody(resp)
+ if err != nil {
+ fs.Debugf(nil, "Couldn't read error out of body: %v", err)
+ body = nil
+ }
+ // Decode error response if there was one - they can be blank
+ var errResponse api.Error
+ if len(body) > 0 {
+ err = json.Unmarshal(body, &errResponse)
+ if err != nil {
+ fs.Debugf(nil, "Couldn't decode error response: %v", err)
+ }
+ }
+ if errResponse.Status == "" {
+ errResponse.Status = fmt.Sprintf("%s (%d): %s", resp.Status, resp.StatusCode, string(body))
+ }
+ return errResponse
+}
+
+// NewFs constructs an Fs from the path, container:path
+func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, error) {
+ // Parse config into Options struct
+ opt := new(Options)
+ err := configstruct.Set(m, opt)
+ if err != nil {
+ return nil, err
+ }
+
+ root = parsePath(root)
+
+ client := fshttp.NewClient(ctx)
+
+ f := &Fs{
+ name: name,
+ root: root,
+ opt: *opt,
+ srv: rest.NewClient(client).SetRoot(rootURL),
+ pacer: fs.NewPacer(ctx, pacer.NewDefault(pacer.MinSleep(minSleep), pacer.MaxSleep(maxSleep), pacer.DecayConstant(decayConstant))),
+ serversMu: new(sync.Mutex),
+ }
+ f.features = (&fs.Features{
+ CaseInsensitive: false,
+ CanHaveEmptyDirectories: true,
+ DuplicateFiles: true,
+ ReadMimeType: true,
+ WriteMimeType: false,
+ WriteDirSetModTime: true,
+ DirModTimeUpdatesOnWrite: true,
+ }).Fill(ctx, f)
+ f.srv.SetErrorHandler(errorHandler)
+ f.srv.SetHeader("Authorization", "Bearer "+f.opt.AccessToken)
+
+ // Read account ID if not present
+ err = f.readAccountID(ctx, m)
+ if err != nil {
+ return nil, err
+ }
+
+ // Read Root Folder ID if not present
+ err = f.readRootFolderID(ctx, m)
+ if err != nil {
+ return nil, err
+ }
+
+ // Get rootFolderID
+ rootID := f.opt.RootFolderID
+ f.dirCache = dircache.New(root, rootID, f)
+
+ // Find the current root
+ err = f.dirCache.FindRoot(ctx, false)
+ if err != nil {
+ // Assume it is a file
+ newRoot, remote := dircache.SplitPath(root)
+ tempF := *f
+ tempF.dirCache = dircache.New(newRoot, rootID, &tempF)
+ tempF.root = newRoot
+ // Make new Fs which is the parent
+ err = tempF.dirCache.FindRoot(ctx, false)
+ if err != nil {
+ // No root so return old f
+ return f, nil
+ }
+ _, err := tempF.newObjectWithInfo(ctx, remote, nil)
+ if err != nil {
+ if err == fs.ErrorObjectNotFound {
+ // File doesn't exist so return old f
+ return f, nil
+ }
+ return nil, err
+ }
+ f.features.Fill(ctx, &tempF)
+ // XXX: update the old f here instead of returning tempF, since
+ // `features` were already filled with functions having *f as a receiver.
+ // See https://github.com/rclone/rclone/issues/2182
+ f.dirCache = tempF.dirCache
+ f.root = tempF.root
+ // return an error with an fs which points to the parent
+ return f, fs.ErrorIsFile
+ }
+ return f, nil
+}
+
+// Read the AccountID into f.opt if not set and cache in the config file as account_id
+func (f *Fs) readAccountID(ctx context.Context, m configmap.Mapper) (err error) {
+ if f.opt.AccountID != "" {
+ return nil
+ }
+ opts := rest.Opts{
+ Method: "GET",
+ Path: "/accounts/getid",
+ }
+ var result api.AccountsGetID
+ var resp *http.Response
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, nil, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return fmt.Errorf("failed to read account ID: %w", err)
+ }
+ f.opt.AccountID = result.Data.ID
+ m.Set("account_id", f.opt.AccountID)
+ return nil
+}
+
+// Read the Accounts info
+func (f *Fs) getAccounts(ctx context.Context) (result *api.AccountsGet, err error) {
+ opts := rest.Opts{
+ Method: "GET",
+ Path: "/accounts/" + f.opt.AccountID,
+ }
+ result = new(api.AccountsGet)
+ var resp *http.Response
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, nil, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return nil, fmt.Errorf("failed to read accountd info: %w", err)
+ }
+ return result, nil
+}
+
+// Read the RootFolderID into f.opt if not set and cache in the config file as root_folder_id
+func (f *Fs) readRootFolderID(ctx context.Context, m configmap.Mapper) (err error) {
+ if f.opt.RootFolderID != "" {
+ return nil
+ }
+ result, err := f.getAccounts(ctx)
+ if err != nil {
+ return err
+ }
+ f.opt.RootFolderID = result.Data.RootFolder
+ m.Set("root_folder_id", f.opt.RootFolderID)
+ return nil
+}
+
+// Find the top n servers measured by response time
+func (f *Fs) bestServers(ctx context.Context, servers []api.Server, n int) (newServers []api.Server) {
+ ctx, cancel := context.WithDeadline(ctx, time.Now().Add(10*time.Second))
+ defer cancel()
+
+ if n > len(servers) {
+ n = len(servers)
+ }
+ results := make(chan int, len(servers))
+
+ // Test how long the servers take to respond
+ for i := range servers {
+ i := i // for closure
+ go func() {
+ opts := rest.Opts{
+ Method: "GET",
+ RootURL: servers[i].Root(),
+ }
+ var result api.UploadServerStatus
+ start := time.Now()
+ _, err := f.srv.CallJSON(ctx, &opts, nil, &result)
+ ping := time.Since(start)
+ err = result.Err(err)
+ if err != nil {
+ results <- -1 // send a -ve number on error
+ return
+ }
+ fs.Debugf(nil, "Upload server %v responded in %v", &servers[i], ping)
+ results <- i
+ }()
+ }
+
+ // Wait for n servers to respond
+ newServers = make([]api.Server, 0, n)
+ for range servers {
+ i := <-results
+ if i >= 0 {
+ newServers = append(newServers, servers[i])
+ }
+ if len(newServers) >= n {
+ break
+ }
+ }
+ return newServers
+}
+
+// Clear all the upload servers - call on an error
+func (f *Fs) clearServers() {
+ f.serversMu.Lock()
+ defer f.serversMu.Unlock()
+
+ fs.Debugf(f, "Clearing upload servers")
+ f.servers = nil
+}
+
+// Gets an upload server
+func (f *Fs) getServer(ctx context.Context) (server *api.Server, err error) {
+ f.serversMu.Lock()
+ defer f.serversMu.Unlock()
+
+ if len(f.servers) == 0 || time.Since(f.serversChecked) >= serversExpiry {
+ opts := rest.Opts{
+ Method: "GET",
+ Path: "/servers",
+ }
+ var result api.ServersResponse
+ var resp *http.Response
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, nil, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ if len(f.servers) == 0 {
+ return nil, fmt.Errorf("failed to read upload servers: %w", err)
+ }
+ fs.Errorf(f, "failed to read new upload servers: %v", err)
+ } else {
+ // Find the top servers measured by response time
+ f.servers = f.bestServers(ctx, result.Data.Servers, serversActive)
+ f.serversChecked = time.Now()
+ }
+ }
+
+ if len(f.servers) == 0 {
+ return nil, errors.New("no upload servers found")
+ }
+
+ // Pick a server at random since we've already found the top ones
+ i := rand.Intn(len(f.servers))
+ return &f.servers[i], nil
+}
+
+// rootSlash returns root with a slash on if it is empty, otherwise empty string
+func (f *Fs) rootSlash() string {
+ if f.root == "" {
+ return f.root
+ }
+ return f.root + "/"
+}
+
+// Return an Object from a path
+//
+// If it can't be found it returns the error fs.ErrorObjectNotFound.
+func (f *Fs) newObjectWithInfo(ctx context.Context, remote string, info *api.Item) (fs.Object, error) {
+ o := &Object{
+ fs: f,
+ remote: remote,
+ }
+ var err error
+ if info != nil {
+ // Set info
+ err = o.setMetaData(info)
+ } else {
+ err = o.readMetaData(ctx) // reads info and meta, returning an error
+ }
+ if err != nil {
+ return nil, err
+ }
+ return o, nil
+}
+
+// NewObject finds the Object at remote. If it can't be found
+// it returns the error fs.ErrorObjectNotFound.
+func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) {
+ return f.newObjectWithInfo(ctx, remote, nil)
+}
+
+// FindLeaf finds a directory of name leaf in the folder with ID pathID
+func (f *Fs) FindLeaf(ctx context.Context, pathID, leaf string) (pathIDOut string, found bool, err error) {
+ // Find the leaf in pathID
+ found, err = f.listAll(ctx, pathID, true, false, leaf, func(item *api.Item) bool {
+ if item.Name == leaf {
+ pathIDOut = item.ID
+ return true
+ }
+ return false
+ })
+ return pathIDOut, found, err
+}
+
+// createDir makes a directory with pathID as parent and name leaf and modTime
+func (f *Fs) createDir(ctx context.Context, pathID, leaf string, modTime time.Time) (item *api.Item, err error) {
+ var resp *http.Response
+ var result api.CreateFolderResponse
+ opts := rest.Opts{
+ Method: "POST",
+ Path: "/contents/createFolder",
+ }
+ mkdir := api.CreateFolderRequest{
+ FolderName: f.opt.Enc.FromStandardName(leaf),
+ ParentFolderID: pathID,
+ ModTime: api.ToNativeTime(modTime),
+ }
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, &mkdir, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return nil, fmt.Errorf("failed to create folder: %w", err)
+ }
+ return &result.Data, nil
+}
+
+// CreateDir makes a directory with pathID as parent and name leaf
+func (f *Fs) CreateDir(ctx context.Context, pathID, leaf string) (newID string, err error) {
+ // fs.Debugf(f, "CreateDir(%q, %q)\n", pathID, leaf)
+ item, err := f.createDir(ctx, pathID, leaf, time.Now())
+ if err != nil {
+ return "", err
+ }
+ return item.ID, nil
+}
+
+// list the objects into the function supplied
+//
+// If directories is set it only sends directories
+// User function to process a File item from listAll
+//
+// Should return true to finish processing
+type listAllFn func(*api.Item) bool
+
+// Lists the directory required calling the user function on each item found
+//
+// If name is set then the server will limit the returned items to those
+// with that name.
+//
+// If the user fn ever returns true then it early exits with found = true
+func (f *Fs) listAll(ctx context.Context, dirID string, directoriesOnly bool, filesOnly bool, name string, fn listAllFn) (found bool, err error) {
+ opts := rest.Opts{
+ Method: "GET",
+ Path: "/contents/" + dirID,
+ Parameters: url.Values{},
+ }
+ if name != "" {
+ opts.Parameters.Add("contentname", f.opt.Enc.FromStandardName(name))
+ }
+ page := 1
+OUTER:
+ for {
+ opts.Parameters.Set("page", strconv.Itoa(page))
+ opts.Parameters.Set("pageSize", strconv.Itoa(f.opt.ListChunk))
+ var result api.Contents
+ var resp *http.Response
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, nil, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ if isAPIErr(err, "error-notFound") {
+ return found, fs.ErrorDirNotFound
+ }
+ return found, fmt.Errorf("couldn't list files: %w", err)
+ }
+ for id, item := range result.Data.Children {
+ _ = id
+ if item.Type == api.ItemTypeFolder {
+ if filesOnly {
+ continue
+ }
+ } else if item.Type == api.ItemTypeFile {
+ if directoriesOnly {
+ continue
+ }
+ } else {
+ fs.Debugf(f, "Ignoring %q - unknown type %q", item.Name, item.Type)
+ continue
+ }
+ item.Name = f.opt.Enc.ToStandardName(item.Name)
+ if fn(item) {
+ found = true
+ break OUTER
+ }
+ }
+ if !result.Metadata.HasNextPage {
+ break
+ }
+ page += 1
+ }
+ return found, err
+}
+
+// Convert a list item into a DirEntry
+func (f *Fs) itemToDirEntry(ctx context.Context, remote string, info *api.Item) (entry fs.DirEntry, err error) {
+ if info.Type == api.ItemTypeFolder {
+ // cache the directory ID for later lookups
+ f.dirCache.Put(remote, info.ID)
+ d := &Directory{
+ Object: Object{
+ fs: f,
+ remote: remote,
+ },
+ items: int64(info.ChildrenCount),
+ }
+ d.setMetaDataAny(info)
+ entry = d
+ } else if info.Type == api.ItemTypeFile {
+ entry, err = f.newObjectWithInfo(ctx, remote, info)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return entry, nil
+}
+
+// List the objects and directories in dir into entries. The
+// entries can be returned in any order but should be for a
+// complete directory.
+//
+// dir should be "" to list the root, and should not have
+// trailing slashes.
+//
+// This should return ErrDirNotFound if the directory isn't
+// found.
+func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error) {
+ directoryID, err := f.dirCache.FindDir(ctx, dir, false)
+ if err != nil {
+ return nil, err
+ }
+ var iErr error
+ _, err = f.listAll(ctx, directoryID, false, false, "", func(info *api.Item) bool {
+ remote := path.Join(dir, info.Name)
+ entry, err := f.itemToDirEntry(ctx, remote, info)
+ if err != nil {
+ iErr = err
+ return true
+ }
+ entries = append(entries, entry)
+ return false
+ })
+ if err != nil {
+ return nil, err
+ }
+ if iErr != nil {
+ return nil, iErr
+ }
+ return entries, nil
+}
+
+// implementation of ListR
+func (f *Fs) listR(ctx context.Context, dir string, list *walk.ListRHelper) (err error) {
+ directoryID, err := f.dirCache.FindDir(ctx, dir, false)
+ if err != nil {
+ return err
+ }
+ opts := rest.Opts{
+ Method: "GET",
+ Path: "/contents/" + directoryID,
+ Parameters: url.Values{"maxdepth": {strconv.Itoa(maxDepth)}},
+ }
+ page := 1
+ for {
+ opts.Parameters.Set("page", strconv.Itoa(page))
+ opts.Parameters.Set("pageSize", strconv.Itoa(f.opt.ListChunk))
+ var result api.Contents
+ var resp *http.Response
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, nil, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ if isAPIErr(err, "error-notFound") {
+ return fs.ErrorDirNotFound
+ }
+ return fmt.Errorf("couldn't recursively list files: %w", err)
+ }
+ // Result.Data.Item now contains a recursive listing so we will have to decode recursively
+ var decode func(string, *api.Item) error
+ decode = func(dir string, dirItem *api.Item) error {
+ // If we have ChildrenCount but no Children this means the recursion stopped here
+ if dirItem.ChildrenCount > 0 && len(dirItem.Children) == 0 {
+ return f.listR(ctx, dir, list)
+ }
+ for _, item := range dirItem.Children {
+ if item.Type != api.ItemTypeFolder && item.Type != api.ItemTypeFile {
+ fs.Debugf(f, "Ignoring %q - unknown type %q", item.Name, item.Type)
+ continue
+ }
+ item.Name = f.opt.Enc.ToStandardName(item.Name)
+ remote := path.Join(dir, item.Name)
+ entry, err := f.itemToDirEntry(ctx, remote, item)
+ if err != nil {
+ return err
+ }
+ err = list.Add(entry)
+ if err != nil {
+ return err
+ }
+ if item.Type == api.ItemTypeFolder {
+ err := decode(remote, item)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+ err = decode(dir, &result.Data.Item)
+ if err != nil {
+ return err
+ }
+ if !result.Metadata.HasNextPage {
+ break
+ }
+ page += 1
+ }
+ return err
+}
+
+// ListR lists the objects and directories of the Fs starting
+// from dir recursively into out.
+//
+// dir should be "" to start from the root, and should not
+// have trailing slashes.
+//
+// This should return ErrDirNotFound if the directory isn't
+// found.
+//
+// It should call callback for each tranche of entries read.
+// These need not be returned in any particular order. If
+// callback returns an error then the listing will stop
+// immediately.
+//
+// Don't implement this unless you have a more efficient way
+// of listing recursively than doing a directory traversal.
+func (f *Fs) ListR(ctx context.Context, dir string, callback fs.ListRCallback) (err error) {
+ list := walk.NewListRHelper(callback)
+ err = f.listR(ctx, dir, list)
+ if err != nil {
+ return err
+ }
+ return list.Flush()
+}
+
+// Creates from the parameters passed in a half finished Object which
+// must have setMetaData called on it
+//
+// Returns the object, leaf, directoryID and error.
+//
+// Used to create new objects
+func (f *Fs) createObject(ctx context.Context, remote string, modTime time.Time, size int64) (o *Object, leaf string, directoryID string, err error) {
+ // Create the directory for the object if it doesn't exist
+ leaf, directoryID, err = f.dirCache.FindPath(ctx, remote, true)
+ if err != nil {
+ return
+ }
+ // Temporary Object under construction
+ o = &Object{
+ fs: f,
+ remote: remote,
+ }
+ return o, leaf, directoryID, nil
+}
+
+// Put the object
+//
+// Copy the reader in to the new object which is returned.
+//
+// The new object may have been created if an error is returned
+func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) {
+ existingObj, err := f.NewObject(ctx, src.Remote())
+ switch err {
+ case nil:
+ return existingObj, existingObj.Update(ctx, in, src, options...)
+ case fs.ErrorObjectNotFound:
+ // Not found so create it
+ return f.PutUnchecked(ctx, in, src, options...)
+ default:
+ return nil, err
+ }
+}
+
+// PutStream uploads to the remote path with the modTime given of indeterminate size
+func (f *Fs) PutStream(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) {
+ return f.Put(ctx, in, src, options...)
+}
+
+// PutUnchecked the object into the container
+//
+// This will produce a duplicate if the object already exists.
+//
+// Copy the reader in to the new object which is returned.
+//
+// The new object may have been created if an error is returned
+func (f *Fs) PutUnchecked(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) {
+ remote := src.Remote()
+ size := src.Size()
+ modTime := src.ModTime(ctx)
+
+ o, _, _, err := f.createObject(ctx, remote, modTime, size)
+ if err != nil {
+ return nil, err
+ }
+ return o, o.Update(ctx, in, src, options...)
+}
+
+// Mkdir creates the container if it doesn't exist
+func (f *Fs) Mkdir(ctx context.Context, dir string) error {
+ _, err := f.dirCache.FindDir(ctx, dir, true)
+ return err
+}
+
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ dirID, err := f.dirCache.FindDir(ctx, dir, false)
+ if err != nil {
+ return err
+ }
+ _, err = f.setModTime(ctx, dirID, modTime)
+ return err
+}
+
+// deleteObject removes an object by ID
+func (f *Fs) deleteObject(ctx context.Context, id string) error {
+ opts := rest.Opts{
+ Method: "DELETE",
+ Path: "/contents/",
+ }
+ request := api.DeleteRequest{
+ ContentsID: id,
+ }
+ var result api.DeleteResponse
+ err := f.pacer.Call(func() (bool, error) {
+ resp, err := f.srv.CallJSON(ctx, &opts, &request, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return fmt.Errorf("failed to delete item: %w", err)
+ }
+ // Check the individual result codes also
+ for _, err := range result.Data {
+ if err.IsError() {
+ return fmt.Errorf("failed to delete item: %w", err)
+ }
+ }
+ return nil
+}
+
+// purgeCheck removes the root directory, if check is set then it
+// refuses to do so if it has anything in
+func (f *Fs) purgeCheck(ctx context.Context, dir string, check bool) error {
+ root := path.Join(f.root, dir)
+ if root == "" {
+ return errors.New("can't purge root directory")
+ }
+ dc := f.dirCache
+ rootID, err := dc.FindDir(ctx, dir, false)
+ if err != nil {
+ return err
+ }
+
+ // Check to see if there is contents in the directory
+ if check {
+ found, err := f.listAll(ctx, rootID, false, false, "", func(item *api.Item) bool {
+ return true
+ })
+ if err != nil {
+ return err
+ }
+ if found {
+ return fs.ErrorDirectoryNotEmpty
+ }
+ }
+
+ // Delete the directory
+ err = f.deleteObject(ctx, rootID)
+ if err != nil {
+ return err
+ }
+
+ f.dirCache.FlushDir(dir)
+ return nil
+}
+
+// Rmdir deletes the root folder
+//
+// Returns an error if it isn't empty
+func (f *Fs) Rmdir(ctx context.Context, dir string) error {
+ return f.purgeCheck(ctx, dir, true)
+}
+
+// Precision return the precision of this Fs
+func (f *Fs) Precision() time.Duration {
+ return time.Second
+}
+
+// Purge deletes all the files and the container
+//
+// Optional interface: Only implement this if you have a way of
+// deleting all the files quicker than just running Remove() on the
+// result of List()
+func (f *Fs) Purge(ctx context.Context, dir string) error {
+ return f.purgeCheck(ctx, dir, false)
+}
+
+// About gets quota information
+func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) {
+ result, err := f.getAccounts(ctx)
+ if err != nil {
+ return nil, err
+ }
+ used := result.Data.StatsCurrent.Storage
+ files := result.Data.StatsCurrent.FileCount
+ total := result.Data.SubscriptionLimitStorage
+ usage = &fs.Usage{
+ Used: fs.NewUsageValue(used), // bytes in use
+ Total: fs.NewUsageValue(total), // bytes total
+ Free: fs.NewUsageValue(total - used), // bytes free
+ Objects: fs.NewUsageValue(files), // total objects
+ }
+ return usage, nil
+}
+
+// patch an attribute on an object to value
+func (f *Fs) patch(ctx context.Context, id, attribute string, value any) (item *api.Item, err error) {
+ var resp *http.Response
+ var request = api.UpdateItemRequest{
+ Attribute: attribute,
+ Value: value,
+ }
+ var result api.UpdateItemResponse
+ opts := rest.Opts{
+ Method: "PUT",
+ Path: "/contents/" + id + "/update",
+ }
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, &request, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return nil, fmt.Errorf("failed to patch item %q to %v: %w", attribute, value, err)
+ }
+ return &result.Data, nil
+}
+
+// rename a file or a folder
+func (f *Fs) rename(ctx context.Context, id, newLeaf string) (item *api.Item, err error) {
+ return f.patch(ctx, id, "name", f.opt.Enc.FromStandardName(newLeaf))
+}
+
+// setModTime sets the modification time of a file or folder
+func (f *Fs) setModTime(ctx context.Context, id string, modTime time.Time) (item *api.Item, err error) {
+ return f.patch(ctx, id, "modTime", api.ToNativeTime(modTime))
+}
+
+// move a file or a folder to a new directory
+func (f *Fs) move(ctx context.Context, id, newDirID string) (item *api.Item, err error) {
+ var resp *http.Response
+ var request = api.MoveRequest{
+ FolderID: newDirID,
+ ContentsID: id,
+ }
+ var result api.MoveResponse
+ opts := rest.Opts{
+ Method: "PUT",
+ Path: "/contents/move",
+ }
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, &request, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return nil, fmt.Errorf("failed to move item: %w", err)
+ }
+ itemResult, ok := result.Data[id]
+ if !ok || itemResult.Item.ID == "" {
+ return nil, errors.New("failed to read result of move")
+ }
+ return &itemResult.Item, nil
+}
+
+// move and rename a file or folder to directoryID with leaf
+func (f *Fs) moveTo(ctx context.Context, id, srcLeaf, dstLeaf, srcDirectoryID, dstDirectoryID string) (info *api.Item, err error) {
+ // Can have duplicates so don't have to be careful here
+
+ // Rename if required
+ if srcLeaf != dstLeaf {
+ info, err = f.rename(ctx, id, dstLeaf)
+ if err != nil {
+ return nil, err
+ }
+ }
+ // Move if required
+ if srcDirectoryID != dstDirectoryID {
+ info, err = f.move(ctx, id, dstDirectoryID)
+ if err != nil {
+ return nil, err
+ }
+ }
+ if info == nil {
+ return f.readMetaDataForID(ctx, id)
+ }
+ return info, nil
+}
+
+// Move src to this remote using server-side move operations.
+//
+// This is stored with the remote path given.
+//
+// It returns the destination Object and a possible error.
+//
+// Will only be called if src.Fs().Name() == f.Name()
+//
+// If it isn't possible then return fs.ErrorCantMove
+func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object, error) {
+ srcObj, ok := src.(*Object)
+ if !ok {
+ fs.Debugf(src, "Can't move - not same remote type")
+ return nil, fs.ErrorCantMove
+ }
+
+ // Create temporary object
+ dstObj, dstLeaf, dstDirectoryID, err := f.createObject(ctx, remote, srcObj.modTime, srcObj.size)
+ if err != nil {
+ return nil, err
+ }
+
+ // Do the move
+ info, err := f.moveTo(ctx, srcObj.id, path.Base(srcObj.remote), dstLeaf, srcObj.dirID, dstDirectoryID)
+ if err != nil {
+ return nil, err
+ }
+
+ err = dstObj.setMetaData(info)
+ if err != nil {
+ return nil, err
+ }
+ return dstObj, nil
+}
+
+// DirMove moves src, srcRemote to this remote at dstRemote
+// using server-side move operations.
+//
+// Will only be called if src.Fs().Name() == f.Name()
+//
+// If it isn't possible then return fs.ErrorCantDirMove
+//
+// If destination exists then return fs.ErrorDirExists
+func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string) error {
+ srcFs, ok := src.(*Fs)
+ if !ok {
+ fs.Debugf(srcFs, "Can't move directory - not same remote type")
+ return fs.ErrorCantDirMove
+ }
+
+ srcID, srcDirectoryID, srcLeaf, dstDirectoryID, dstLeaf, err := f.dirCache.DirMove(ctx, srcFs.dirCache, srcFs.root, srcRemote, f.root, dstRemote)
+ if err != nil {
+ return err
+ }
+
+ // Do the move
+ _, err = f.moveTo(ctx, srcID, srcLeaf, dstLeaf, srcDirectoryID, dstDirectoryID)
+ if err != nil {
+ return err
+ }
+ srcFs.dirCache.FlushDir(srcRemote)
+ return nil
+}
+
+// copy a file or a folder to a new directory
+func (f *Fs) copy(ctx context.Context, id, newDirID string) (item *api.Item, err error) {
+ var resp *http.Response
+ var request = api.CopyRequest{
+ FolderID: newDirID,
+ ContentsID: id,
+ }
+ var result api.CopyResponse
+ opts := rest.Opts{
+ Method: "POST",
+ Path: "/contents/copy",
+ }
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, &request, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return nil, fmt.Errorf("failed to copy item: %w", err)
+ }
+ itemResult, ok := result.Data[id]
+ if !ok || itemResult.Item.ID == "" {
+ return nil, errors.New("failed to read result of copy")
+ }
+ return &itemResult.Item, nil
+}
+
+// copy and rename a file or folder to directoryID with leaf
+func (f *Fs) copyTo(ctx context.Context, srcID, srcLeaf, dstLeaf, dstDirectoryID string) (info *api.Item, err error) {
+ // Can have duplicates so don't have to be careful here
+
+ // Copy to dstDirectoryID first
+ info, err = f.copy(ctx, srcID, dstDirectoryID)
+ if err != nil {
+ return nil, err
+ }
+
+ // Rename if required
+ if srcLeaf != dstLeaf {
+ info, err = f.rename(ctx, info.ID, dstLeaf)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return info, nil
+}
+
+// Copy src to this remote using server-side copy operations.
+//
+// This is stored with the remote path given.
+//
+// It returns the destination Object and a possible error.
+//
+// Will only be called if src.Fs().Name() == f.Name()
+//
+// If it isn't possible then return fs.ErrorCantCopy
+func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object, error) {
+ srcObj, ok := src.(*Object)
+ if !ok {
+ fs.Debugf(src, "Can't copy - not same remote type")
+ return nil, fs.ErrorCantCopy
+ }
+ srcLeaf := path.Base(srcObj.remote)
+
+ srcPath := srcObj.fs.rootSlash() + srcObj.remote
+ dstPath := f.rootSlash() + remote
+ if srcPath == dstPath {
+ return nil, fmt.Errorf("can't copy %q -> %q as are same name", srcPath, dstPath)
+ }
+
+ // Create temporary object
+ dstObj, dstLeaf, dstDirectoryID, err := f.createObject(ctx, remote, srcObj.modTime, srcObj.size)
+ if err != nil {
+ return nil, err
+ }
+
+ // Copy the object
+ info, err := f.copyTo(ctx, srcObj.id, srcLeaf, dstLeaf, dstDirectoryID)
+ if err != nil {
+ return nil, err
+ }
+ err = dstObj.setMetaData(info)
+ if err != nil {
+ return nil, err
+ }
+
+ // Reset the modification time as copy does not preserve it
+ err = dstObj.SetModTime(ctx, srcObj.modTime)
+ if err != nil {
+ return nil, err
+ }
+
+ return dstObj, nil
+}
+
+// unLink a file or directory
+func (f *Fs) unLink(ctx context.Context, remote string, id string, info *api.Item) (err error) {
+ if info == nil {
+ info, err = f.readMetaDataForID(ctx, id)
+ if err != nil {
+ return err
+ }
+ }
+ for linkID, link := range info.DirectLinks {
+ fs.Debugf(remote, "Removing direct link %s", link.DirectLink)
+ opts := rest.Opts{
+ Method: "DELETE",
+ Path: "/contents/" + id + "/directlinks/" + linkID,
+ }
+ var result api.Error
+ err := f.pacer.Call(func() (bool, error) {
+ resp, err := f.srv.CallJSON(ctx, &opts, nil, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return fmt.Errorf("failed to unlink: %s", link.DirectLink)
+ }
+ }
+ return nil
+}
+
+// PublicLink adds a "readable by anyone with link" permission on the given file or folder.
+func (f *Fs) PublicLink(ctx context.Context, remote string, expire fs.Duration, unlink bool) (string, error) {
+ id, err := f.dirCache.FindDir(ctx, remote, false)
+ var info *api.Item
+ if err == nil {
+ fs.Debugf(f, "attempting to share directory '%s'", remote)
+ } else {
+ fs.Debugf(f, "attempting to share single file '%s'", remote)
+ info, err = f.readMetaDataForPath(ctx, remote)
+ if err != nil {
+ return "", err
+ }
+ id = info.ID
+ }
+ if unlink {
+ return "", f.unLink(ctx, remote, id, info)
+ }
+ var resp *http.Response
+ var request api.DirectLinksRequest
+ var result api.DirectLinksResult
+ opts := rest.Opts{
+ Method: "POST",
+ Path: "/contents/" + id + "/directlinks",
+ }
+ if expire != fs.DurationOff {
+ when := time.Now().Add(time.Duration(expire))
+ fs.Debugf(f, "Link expires at %v (duration %v)", when, expire)
+ request.ExpireTime = api.ToNativeTime(when)
+ }
+ err = f.pacer.Call(func() (bool, error) {
+ resp, err = f.srv.CallJSON(ctx, &opts, &request, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ return "", fmt.Errorf("failed to create direct link: %w", err)
+ }
+ return result.Data.DirectLink, err
+}
+
+// DirCacheFlush resets the directory cache - used in testing as an
+// optional interface
+func (f *Fs) DirCacheFlush() {
+ f.dirCache.ResetRoot()
+}
+
+// Hashes returns the supported hash sets.
+func (f *Fs) Hashes() hash.Set {
+ return hash.Set(hash.MD5)
+}
+
+// MergeDirs merges the contents of all the directories passed
+// in into the first one and rmdirs the other directories.
+func (f *Fs) MergeDirs(ctx context.Context, dirs []fs.Directory) error {
+ if len(dirs) < 2 {
+ return nil
+ }
+ dstDir := dirs[0]
+ for _, srcDir := range dirs[1:] {
+ // list the objects
+ infos := []*api.Item{}
+ _, err := f.listAll(ctx, srcDir.ID(), false, false, "", func(info *api.Item) bool {
+ infos = append(infos, info)
+ return false
+ })
+ if err != nil {
+ return fmt.Errorf("MergeDirs list failed on %v: %w", srcDir, err)
+ }
+ // move them into place
+ for _, info := range infos {
+ fs.Infof(srcDir, "merging %q", info.Name)
+ // Move the file into the destination
+ _, err = f.move(ctx, info.ID, dstDir.ID())
+ if err != nil {
+ return fmt.Errorf("MergeDirs move failed on %q in %v: %w", info.Name, srcDir, err)
+ }
+ }
+ // rmdir the now empty source directory
+ fs.Infof(srcDir, "removing empty directory")
+ err = f.deleteObject(ctx, srcDir.ID())
+ if err != nil {
+ return fmt.Errorf("MergeDirs move failed to rmdir %q: %w", srcDir, err)
+ }
+ }
+ return nil
+}
+
+// ------------------------------------------------------------
+
+// Fs returns the parent Fs
+func (o *Object) Fs() fs.Info {
+ return o.fs
+}
+
+// Return a string version
+func (o *Object) String() string {
+ if o == nil {
+ return ""
+ }
+ return o.remote
+}
+
+// Remote returns the remote path
+func (o *Object) Remote() string {
+ return o.remote
+}
+
+// Hash returns the SHA-1 of an object returning a lowercase hex string
+func (o *Object) Hash(ctx context.Context, t hash.Type) (string, error) {
+ if t != hash.MD5 {
+ return "", hash.ErrUnsupported
+ }
+ return o.md5, nil
+}
+
+// Size returns the size of an object in bytes
+func (o *Object) Size() int64 {
+ return o.size
+}
+
+// setMetaDataAny sets the metadata from info but doesn't check the type
+func (o *Object) setMetaDataAny(info *api.Item) {
+ o.size = info.Size
+ o.modTime = api.FromNativeTime(info.ModTime)
+ o.id = info.ID
+ o.dirID = info.ParentFolder
+ o.mimeType = info.MimeType
+ o.md5 = info.MD5
+ o.url = info.Link
+}
+
+// setMetaData sets the metadata from info
+func (o *Object) setMetaData(info *api.Item) (err error) {
+ if info.Type == api.ItemTypeFolder {
+ return fs.ErrorIsDir
+ }
+ if info.Type != api.ItemTypeFile {
+ return fmt.Errorf("%q is %q: %w", o.remote, info.Type, fs.ErrorNotAFile)
+ }
+ if info.ID == "" {
+ return fmt.Errorf("ID not found in response")
+ }
+ o.setMetaDataAny(info)
+ return nil
+}
+
+// readMetaData gets the metadata unconditionally as we expect Object
+// to always have the full set of metadata
+func (o *Object) readMetaData(ctx context.Context) (err error) {
+ var info *api.Item
+ if o.id != "" {
+ info, err = o.fs.readMetaDataForID(ctx, o.id)
+ } else {
+ info, err = o.fs.readMetaDataForPath(ctx, o.remote)
+ }
+ if err != nil {
+ if isAPIErr(err, "error-notFound") {
+ return fs.ErrorObjectNotFound
+ }
+ return err
+ }
+ return o.setMetaData(info)
+}
+
+// ModTime returns the modification time of the object
+//
+// It attempts to read the objects mtime and if that isn't present the
+// LastModified returned in the http headers
+func (o *Object) ModTime(ctx context.Context) time.Time {
+ return o.modTime
+}
+
+// SetModTime sets the modification time of the local fs object
+func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error {
+ info, err := o.fs.setModTime(ctx, o.id, modTime)
+ if err != nil {
+ return err
+ }
+ return o.setMetaData(info)
+}
+
+// Storable returns a boolean showing whether this object storable
+func (o *Object) Storable() bool {
+ return true
+}
+
+// Open an object for read
+func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.ReadCloser, err error) {
+ if o.id == "" {
+ return nil, errors.New("can't download - no id")
+ }
+ fs.FixRangeOption(options, o.size)
+ var resp *http.Response
+ opts := rest.Opts{
+ Method: "GET",
+ RootURL: o.url,
+ Options: options,
+ // Workaround for bug in content servers - no longer needed
+ // ExtraHeaders: map[string]string{
+ // "Cookie": "accountToken=" + o.fs.opt.AccessToken,
+ // },
+ }
+
+ err = o.fs.pacer.Call(func() (bool, error) {
+ resp, err = o.fs.srv.Call(ctx, &opts)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err != nil {
+ return nil, err
+ }
+ return resp.Body, err
+}
+
+// Update the object with the contents of the io.Reader, modTime and size
+//
+// If existing is set then it updates the object rather than creating a new one.
+//
+// The new object may have been created if an error is returned.
+func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (err error) {
+ remote := o.Remote()
+ modTime := src.ModTime(ctx)
+
+ // Create the directory for the object if it doesn't exist
+ leaf, directoryID, err := o.fs.dirCache.FindPath(ctx, remote, true)
+ if err != nil {
+ return err
+ }
+
+ // Find an upload server
+ server, err := o.fs.getServer(ctx)
+ if err != nil {
+ return err
+ }
+ fs.Debugf(o, "Using upload server %v", server)
+
+ // If the file exists, delete it after a successful upload
+ if o.id != "" {
+ id := o.id
+ o.id = ""
+ defer func() {
+ if err != nil {
+ return
+ }
+ fs.Debugf(o, "Removing old object on successful upload")
+ deleteErr := o.fs.deleteObject(ctx, id)
+ if deleteErr != nil {
+ err = fmt.Errorf("failed to delete existing object: %w", deleteErr)
+ }
+ }()
+ }
+
+ // Do the upload
+ var resp *http.Response
+ var result api.UploadResponse
+ opts := rest.Opts{
+ Method: "POST",
+ Body: in,
+ MultipartParams: url.Values{
+ "folderId": {directoryID},
+ "modTime": {strconv.FormatInt(modTime.Unix(), 10)},
+ },
+ MultipartContentName: "file",
+ MultipartFileName: o.fs.opt.Enc.FromStandardName(leaf),
+ RootURL: server.URL(),
+ Options: options,
+ }
+ err = o.fs.pacer.CallNoRetry(func() (bool, error) {
+ resp, err = o.fs.srv.CallJSON(ctx, &opts, nil, &result)
+ return shouldRetry(ctx, resp, err)
+ })
+ if err = result.Err(err); err != nil {
+ if isAPIErr(err, "error-freespace") {
+ fs.Errorf(o, "Upload server out of space - need to retry upload")
+ }
+ o.fs.clearServers()
+ return fmt.Errorf("failed to upload file: %w", err)
+ }
+ return o.setMetaData(&result.Data)
+}
+
+// Remove an object
+func (o *Object) Remove(ctx context.Context) error {
+ return o.fs.deleteObject(ctx, o.id)
+}
+
+// ID returns the ID of the Object if known, or "" if not
+func (o *Object) ID() string {
+ return o.id
+}
+
+// MimeType returns the content type of the Object if known, or "" if not
+func (o *Object) MimeType(ctx context.Context) string {
+ return o.mimeType
+}
+
+// ParentID returns the ID of the Object parent if known, or "" if not
+func (o *Object) ParentID() string {
+ return o.dirID
+}
+
+// setMetaData sets the metadata from info for a directory
+func (d *Directory) setMetaData(info *api.Item) (err error) {
+ if info.Type == api.ItemTypeFile {
+ return fs.ErrorIsFile
+ }
+ if info.Type != api.ItemTypeFolder {
+ return fmt.Errorf("%q is not a directory (type %q)", d.remote, info.Type)
+ }
+ if info.ID == "" {
+ return fmt.Errorf("ID not found in response")
+ }
+ d.setMetaDataAny(info)
+ return nil
+}
+
+// SetModTime sets the modification time of the directory
+func (d *Directory) SetModTime(ctx context.Context, modTime time.Time) error {
+ info, err := d.fs.setModTime(ctx, d.id, modTime)
+ if err != nil {
+ return err
+ }
+ return d.setMetaData(info)
+}
+
+// Items returns the count of items in this directory or this
+// directory and subdirectories if known, -1 for unknown
+func (d *Directory) Items() int64 {
+ return d.items
+}
+
+// Hash does nothing on a directory
+//
+// This method is implemented with the incorrect type signature to
+// stop the Directory type asserting to fs.Object or fs.ObjectInfo
+func (d *Directory) Hash() {
+ // Does nothing
+}
+
+// Check the interfaces are satisfied
+var (
+ _ fs.Fs = (*Fs)(nil)
+ _ fs.Purger = (*Fs)(nil)
+ _ fs.PutStreamer = (*Fs)(nil)
+ _ fs.Copier = (*Fs)(nil)
+ _ fs.Abouter = (*Fs)(nil)
+ _ fs.Mover = (*Fs)(nil)
+ _ fs.DirMover = (*Fs)(nil)
+ _ fs.DirCacheFlusher = (*Fs)(nil)
+ _ fs.PublicLinker = (*Fs)(nil)
+ _ fs.MergeDirser = (*Fs)(nil)
+ _ fs.DirSetModTimer = (*Fs)(nil)
+ _ fs.ListRer = (*Fs)(nil)
+ _ fs.Object = (*Object)(nil)
+ _ fs.IDer = (*Object)(nil)
+ _ fs.MimeTyper = (*Object)(nil)
+ _ fs.Directory = (*Directory)(nil)
+ _ fs.SetModTimer = (*Directory)(nil)
+ _ fs.ParentIDer = (*Directory)(nil)
+)
diff --git a/backend/gofile/gofile_test.go b/backend/gofile/gofile_test.go
new file mode 100644
index 000000000..2f8816e61
--- /dev/null
+++ b/backend/gofile/gofile_test.go
@@ -0,0 +1,17 @@
+// Test Gofile filesystem interface
+package gofile_test
+
+import (
+ "testing"
+
+ "github.com/rclone/rclone/backend/gofile"
+ "github.com/rclone/rclone/fstest/fstests"
+)
+
+// TestIntegration runs integration tests against the remote
+func TestIntegration(t *testing.T) {
+ fstests.Run(t, &fstests.Opt{
+ RemoteName: "TestGoFile:",
+ NilObject: (*gofile.Object)(nil),
+ })
+}
diff --git a/backend/googlecloudstorage/googlecloudstorage.go b/backend/googlecloudstorage/googlecloudstorage.go
index 1d1bffaee..07f589ab8 100644
--- a/backend/googlecloudstorage/googlecloudstorage.go
+++ b/backend/googlecloudstorage/googlecloudstorage.go
@@ -697,7 +697,7 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck
// is this a directory marker?
if isDirectory {
// Don't insert the root directory
- if remote == directory {
+ if remote == f.opt.Enc.ToStandardPath(directory) {
continue
}
// process directory markers as directories
diff --git a/backend/googlephotos/googlephotos.go b/backend/googlephotos/googlephotos.go
index ecb0f9c35..ebae7ebb2 100644
--- a/backend/googlephotos/googlephotos.go
+++ b/backend/googlephotos/googlephotos.go
@@ -620,9 +620,7 @@ func (f *Fs) listDir(ctx context.Context, prefix string, filter api.SearchFilter
if err != nil {
return err
}
- if entry != nil {
- entries = append(entries, entry)
- }
+ entries = append(entries, entry)
return nil
})
if err != nil {
diff --git a/backend/googlephotos/pattern.go b/backend/googlephotos/pattern.go
index fc84f4a0e..fbd6d58fb 100644
--- a/backend/googlephotos/pattern.go
+++ b/backend/googlephotos/pattern.go
@@ -38,7 +38,7 @@ type dirPattern struct {
toEntries func(ctx context.Context, f lister, prefix string, match []string) (fs.DirEntries, error)
}
-// dirPatters is a slice of all the directory patterns
+// dirPatterns is a slice of all the directory patterns
type dirPatterns []dirPattern
// patterns describes the layout of the google photos backend file system.
diff --git a/backend/hasher/hasher.go b/backend/hasher/hasher.go
index a6e83039f..3cd75a5c7 100644
--- a/backend/hasher/hasher.go
+++ b/backend/hasher/hasher.go
@@ -164,16 +164,21 @@ func NewFs(ctx context.Context, fsname, rpath string, cmap configmap.Mapper) (fs
}
stubFeatures := &fs.Features{
- CanHaveEmptyDirectories: true,
- IsLocal: true,
- ReadMimeType: true,
- WriteMimeType: true,
- SetTier: true,
- GetTier: true,
- ReadMetadata: true,
- WriteMetadata: true,
- UserMetadata: true,
- PartialUploads: true,
+ CanHaveEmptyDirectories: true,
+ IsLocal: true,
+ ReadMimeType: true,
+ WriteMimeType: true,
+ SetTier: true,
+ GetTier: true,
+ ReadMetadata: true,
+ WriteMetadata: true,
+ UserMetadata: true,
+ ReadDirMetadata: true,
+ WriteDirMetadata: true,
+ WriteDirSetModTime: true,
+ UserDirMetadata: true,
+ DirModTimeUpdatesOnWrite: true,
+ PartialUploads: true,
}
f.features = stubFeatures.Fill(ctx, f).Mask(ctx, f.Fs).WrapsFs(f, f.Fs)
@@ -341,6 +346,22 @@ func (f *Fs) MergeDirs(ctx context.Context, dirs []fs.Directory) error {
return errors.New("MergeDirs not supported")
}
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ if do := f.Fs.Features().DirSetModTime; do != nil {
+ return do(ctx, dir, modTime)
+ }
+ return fs.ErrorNotImplemented
+}
+
+// MkdirMetadata makes the root directory of the Fs object
+func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata) (fs.Directory, error) {
+ if do := f.Fs.Features().MkdirMetadata; do != nil {
+ return do(ctx, dir, metadata)
+ }
+ return nil, fs.ErrorNotImplemented
+}
+
// DirCacheFlush resets the directory cache - used in testing
// as an optional interface
func (f *Fs) DirCacheFlush() {
@@ -418,7 +439,7 @@ func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string
// Shutdown the backend, closing any background tasks and any cached connections.
func (f *Fs) Shutdown(ctx context.Context) (err error) {
- if f.db != nil {
+ if f.db != nil && !f.db.IsStopped() {
err = f.db.Stop(false)
}
if do := f.Fs.Features().Shutdown; do != nil {
@@ -514,6 +535,17 @@ func (o *Object) Metadata(ctx context.Context) (fs.Metadata, error) {
return do.Metadata(ctx)
}
+// SetMetadata sets metadata for an Object
+//
+// It should return fs.ErrorNotImplemented if it can't set metadata
+func (o *Object) SetMetadata(ctx context.Context, metadata fs.Metadata) error {
+ do, ok := o.Object.(fs.SetMetadataer)
+ if !ok {
+ return fs.ErrorNotImplemented
+ }
+ return do.SetMetadata(ctx, metadata)
+}
+
// Check the interfaces are satisfied
var (
_ fs.Fs = (*Fs)(nil)
@@ -530,6 +562,8 @@ var (
_ fs.Abouter = (*Fs)(nil)
_ fs.Wrapper = (*Fs)(nil)
_ fs.MergeDirser = (*Fs)(nil)
+ _ fs.DirSetModTimer = (*Fs)(nil)
+ _ fs.MkdirMetadataer = (*Fs)(nil)
_ fs.DirCacheFlusher = (*Fs)(nil)
_ fs.ChangeNotifier = (*Fs)(nil)
_ fs.PublicLinker = (*Fs)(nil)
diff --git a/backend/hasher/object.go b/backend/hasher/object.go
index ef6349b0f..1003807c8 100644
--- a/backend/hasher/object.go
+++ b/backend/hasher/object.go
@@ -71,7 +71,14 @@ func (o *Object) Hash(ctx context.Context, hashType hash.Type) (hashVal string,
f := o.f
if f.passHashes.Contains(hashType) {
fs.Debugf(o, "pass %s", hashType)
- return o.Object.Hash(ctx, hashType)
+ hashVal, err = o.Object.Hash(ctx, hashType)
+ if hashVal != "" {
+ return hashVal, err
+ }
+ if err != nil {
+ fs.Debugf(o, "error passing %s: %v", hashType, err)
+ }
+ fs.Debugf(o, "passed %s is blank -- trying other methods", hashType)
}
if !f.suppHashes.Contains(hashType) {
fs.Debugf(o, "unsupp %s", hashType)
diff --git a/backend/hdfs/fs.go b/backend/hdfs/fs.go
index dfe98bbd4..7a309d608 100644
--- a/backend/hdfs/fs.go
+++ b/backend/hdfs/fs.go
@@ -1,5 +1,4 @@
//go:build !plan9
-// +build !plan9
package hdfs
@@ -150,7 +149,7 @@ func (f *Fs) Root() string {
// String returns a description of the FS
func (f *Fs) String() string {
- return fmt.Sprintf("hdfs://%s", f.opt.Namenode)
+ return fmt.Sprintf("hdfs://%s/%s", f.opt.Namenode, f.root)
}
// Features returns the optional features of this Fs
@@ -210,7 +209,8 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
fs: f,
remote: remote,
size: x.Size(),
- modTime: x.ModTime()})
+ modTime: x.ModTime(),
+ })
}
}
return entries, nil
diff --git a/backend/hdfs/hdfs.go b/backend/hdfs/hdfs.go
index 312aa1e5c..87d85e633 100644
--- a/backend/hdfs/hdfs.go
+++ b/backend/hdfs/hdfs.go
@@ -1,5 +1,4 @@
//go:build !plan9
-// +build !plan9
// Package hdfs provides an interface to the HDFS storage system.
package hdfs
diff --git a/backend/hdfs/hdfs_test.go b/backend/hdfs/hdfs_test.go
index cb2ff6c22..edbb62330 100644
--- a/backend/hdfs/hdfs_test.go
+++ b/backend/hdfs/hdfs_test.go
@@ -1,7 +1,6 @@
// Test HDFS filesystem interface
//go:build !plan9
-// +build !plan9
package hdfs_test
diff --git a/backend/hdfs/hdfs_unsupported.go b/backend/hdfs/hdfs_unsupported.go
index afa686adb..a14c7725c 100644
--- a/backend/hdfs/hdfs_unsupported.go
+++ b/backend/hdfs/hdfs_unsupported.go
@@ -2,6 +2,6 @@
// about "no buildable Go source files "
//go:build plan9
-// +build plan9
+// Package hdfs provides an interface to the HDFS storage system.
package hdfs
diff --git a/backend/hdfs/object.go b/backend/hdfs/object.go
index a2c2c1087..d6d25297f 100644
--- a/backend/hdfs/object.go
+++ b/backend/hdfs/object.go
@@ -1,5 +1,4 @@
//go:build !plan9
-// +build !plan9
package hdfs
diff --git a/backend/http/http.go b/backend/http/http.go
index 862376d4f..ce03bb9bd 100644
--- a/backend/http/http.go
+++ b/backend/http/http.go
@@ -89,6 +89,10 @@ 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.`,
Default: false,
Advanced: true,
+ }, {
+ Name: "no_escape",
+ Help: "Do not escape URL metacharacters in path names.",
+ Default: false,
}},
}
fs.Register(fsi)
@@ -100,6 +104,7 @@ type Options struct {
NoSlash bool `config:"no_slash"`
NoHead bool `config:"no_head"`
Headers fs.CommaSepList `config:"headers"`
+ NoEscape bool `config:"no_escape"`
}
// Fs stores the interface to the remote HTTP files
@@ -326,6 +331,11 @@ func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) {
// Join's the remote onto the base URL
func (f *Fs) url(remote string) string {
+ if f.opt.NoEscape {
+ // Directly concatenate without escaping, no_escape behavior
+ return f.endpointURL + remote
+ }
+ // Default behavior
return f.endpointURL + rest.URLPathEscape(remote)
}
diff --git a/backend/imagekit/client/url.go b/backend/imagekit/client/url.go
index 4589c525d..18738d1e9 100644
--- a/backend/imagekit/client/url.go
+++ b/backend/imagekit/client/url.go
@@ -56,7 +56,7 @@ func (ik *ImageKit) URL(params URLParam) (string, error) {
var expires = strconv.FormatInt(now+params.ExpireSeconds, 10)
var path = strings.Replace(resultURL, endpoint, "", 1)
- path = path + expires
+ path += expires
mac := hmac.New(sha1.New, []byte(ik.PrivateKey))
mac.Write([]byte(path))
signature := hex.EncodeToString(mac.Sum(nil))
diff --git a/backend/jottacloud/jottacloud.go b/backend/jottacloud/jottacloud.go
index 6fb68b289..04e4bca10 100644
--- a/backend/jottacloud/jottacloud.go
+++ b/backend/jottacloud/jottacloud.go
@@ -1487,16 +1487,38 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
return nil, fs.ErrorCantMove
}
- err := f.mkParentDir(ctx, remote)
+ meta, err := fs.GetMetadataOptions(ctx, f, src, fs.MetadataAsOpenOptions(ctx))
if err != nil {
return nil, err
}
+
+ if err := f.mkParentDir(ctx, remote); err != nil {
+ return nil, err
+ }
info, err := f.copyOrMove(ctx, "cp", srcObj.filePath(), remote)
- // if destination was a trashed file then after a successful copy the copied file is still in trash (bug in api?)
- if err == nil && bool(info.Deleted) && !f.opt.TrashedOnly && info.State == "COMPLETED" {
- fs.Debugf(src, "Server-side copied to trashed destination, restoring")
- info, err = f.createOrUpdate(ctx, remote, srcObj.createTime, srcObj.modTime, srcObj.size, srcObj.md5)
+ if err == nil {
+ var createTime time.Time
+ var createTimeMeta bool
+ var modTime time.Time
+ var modTimeMeta bool
+ if meta != nil {
+ createTime, createTimeMeta = srcObj.parseFsMetadataTime(meta, "btime")
+ if !createTimeMeta {
+ createTime = srcObj.createTime
+ }
+ modTime, modTimeMeta = srcObj.parseFsMetadataTime(meta, "mtime")
+ if !modTimeMeta {
+ modTime = srcObj.modTime
+ }
+ }
+ if bool(info.Deleted) && !f.opt.TrashedOnly && info.State == "COMPLETED" {
+ // Workaround necessary when destination was a trashed file, to avoid the copied file also being in trash (bug in api?)
+ fs.Debugf(src, "Server-side copied to trashed destination, restoring")
+ info, err = f.createOrUpdate(ctx, remote, createTime, modTime, info.Size, info.MD5)
+ } else if createTimeMeta || modTimeMeta {
+ info, err = f.createOrUpdate(ctx, remote, createTime, modTime, info.Size, info.MD5)
+ }
}
if err != nil {
@@ -1523,12 +1545,30 @@ func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object,
return nil, fs.ErrorCantMove
}
- err := f.mkParentDir(ctx, remote)
+ meta, err := fs.GetMetadataOptions(ctx, f, src, fs.MetadataAsOpenOptions(ctx))
if err != nil {
return nil, err
}
+
+ if err := f.mkParentDir(ctx, remote); err != nil {
+ return nil, err
+ }
info, err := f.copyOrMove(ctx, "mv", srcObj.filePath(), remote)
+ if err != nil && meta != nil {
+ createTime, createTimeMeta := srcObj.parseFsMetadataTime(meta, "btime")
+ if !createTimeMeta {
+ createTime = srcObj.createTime
+ }
+ modTime, modTimeMeta := srcObj.parseFsMetadataTime(meta, "mtime")
+ if !modTimeMeta {
+ modTime = srcObj.modTime
+ }
+ if createTimeMeta || modTimeMeta {
+ info, err = f.createOrUpdate(ctx, remote, createTime, modTime, info.Size, info.MD5)
+ }
+ }
+
if err != nil {
return nil, fmt.Errorf("couldn't move file: %w", err)
}
@@ -1786,6 +1826,20 @@ func (o *Object) readMetaData(ctx context.Context, force bool) (err error) {
return o.setMetaData(info)
}
+// parseFsMetadataTime parses a time string from fs.Metadata with key
+func (o *Object) parseFsMetadataTime(m fs.Metadata, key string) (t time.Time, ok bool) {
+ value, ok := m[key]
+ if ok {
+ var err error
+ t, err = time.Parse(time.RFC3339Nano, value) // metadata stores RFC3339Nano timestamps
+ if err != nil {
+ fs.Debugf(o, "failed to parse metadata %s: %q: %v", key, value, err)
+ ok = false
+ }
+ }
+ return t, ok
+}
+
// ModTime returns the modification time of the object
//
// It attempts to read the objects mtime and if that isn't present the
@@ -1957,21 +2011,11 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
var createdTime string
var modTime string
if meta != nil {
- if v, ok := meta["btime"]; ok {
- t, err := time.Parse(time.RFC3339Nano, v) // metadata stores RFC3339Nano timestamps
- if err != nil {
- fs.Debugf(o, "failed to parse metadata btime: %q: %v", v, err)
- } else {
- createdTime = api.Rfc3339Time(t).String() // jottacloud api wants RFC3339 timestamps
- }
+ if t, ok := o.parseFsMetadataTime(meta, "btime"); ok {
+ createdTime = api.Rfc3339Time(t).String() // jottacloud api wants RFC3339 timestamps
}
- if v, ok := meta["mtime"]; ok {
- t, err := time.Parse(time.RFC3339Nano, v)
- if err != nil {
- fs.Debugf(o, "failed to parse metadata mtime: %q: %v", v, err)
- } else {
- modTime = api.Rfc3339Time(t).String()
- }
+ if t, ok := o.parseFsMetadataTime(meta, "mtime"); ok {
+ modTime = api.Rfc3339Time(t).String()
}
}
if modTime == "" { // prefer mtime in meta as Modified time, fallback to source ModTime
diff --git a/backend/jottacloud/jottacloud_internal_test.go b/backend/jottacloud/jottacloud_internal_test.go
index f77a3f291..db9d6a157 100644
--- a/backend/jottacloud/jottacloud_internal_test.go
+++ b/backend/jottacloud/jottacloud_internal_test.go
@@ -59,7 +59,7 @@ func (f *Fs) InternalTestMetadata(t *testing.T) {
//"utime" - read-only
//"content-type" - read-only
}
- obj := fstests.PutTestContentsMetadata(ctx, t, f, &item, contents, true, "text/html", metadata)
+ obj := fstests.PutTestContentsMetadata(ctx, t, f, &item, false, contents, true, "text/html", metadata)
defer func() {
assert.NoError(t, obj.Remove(ctx))
}()
diff --git a/backend/koofr/koofr.go b/backend/koofr/koofr.go
index e71fb4168..34fc9ea0d 100644
--- a/backend/koofr/koofr.go
+++ b/backend/koofr/koofr.go
@@ -67,13 +67,13 @@ func init() {
Sensitive: true,
}, {
Name: "password",
- Help: "Your password for rclone (generate one at https://app.koofr.net/app/admin/preferences/password).",
+ Help: "Your password for rclone generate one at https://app.koofr.net/app/admin/preferences/password.",
Provider: "koofr",
IsPassword: true,
Required: true,
}, {
Name: "password",
- Help: "Your password for rclone (generate one at https://storage.rcs-rds.ro/app/admin/preferences/password).",
+ Help: "Your password for rclone generate one at https://storage.rcs-rds.ro/app/admin/preferences/password.",
Provider: "digistorage",
IsPassword: true,
Required: true,
diff --git a/backend/linkbox/linkbox.go b/backend/linkbox/linkbox.go
index 75445ea72..cc2ac3d16 100644
--- a/backend/linkbox/linkbox.go
+++ b/backend/linkbox/linkbox.go
@@ -36,7 +36,7 @@ import (
)
const (
- maxEntitiesPerPage = 1024
+ maxEntitiesPerPage = 1000
minSleep = 200 * time.Millisecond
maxSleep = 2 * time.Second
pacerBurst = 1
@@ -219,7 +219,8 @@ type listAllFn func(*entity) bool
// Search is a bit fussy about which characters match
//
// If the name doesn't match this then do an dir list instead
-var searchOK = regexp.MustCompile(`^[a-zA-Z0-9_ .]+$`)
+// N.B.: Linkbox doesn't support search by name that is longer than 50 chars
+var searchOK = regexp.MustCompile(`^[a-zA-Z0-9_ -.]{1,50}$`)
// Lists the directory required calling the user function on each item found
//
@@ -238,6 +239,7 @@ func (f *Fs) listAll(ctx context.Context, dirID string, name string, fn listAllF
// If name isn't good then do an unbounded search
name = ""
}
+
OUTER:
for numberOfEntities == maxEntitiesPerPage {
pageNumber++
@@ -258,7 +260,6 @@ OUTER:
err = getUnmarshaledResponse(ctx, f, opts, &responseResult)
if err != nil {
return false, fmt.Errorf("getting files failed: %w", err)
-
}
numberOfEntities = len(responseResult.SearchData.Entities)
diff --git a/backend/linkbox/linkbox_test.go b/backend/linkbox/linkbox_test.go
index aa03c79ca..d9b448c0c 100644
--- a/backend/linkbox/linkbox_test.go
+++ b/backend/linkbox/linkbox_test.go
@@ -13,5 +13,7 @@ func TestIntegration(t *testing.T) {
fstests.Run(t, &fstests.Opt{
RemoteName: "TestLinkbox:",
NilObject: (*linkbox.Object)(nil),
+ // Linkbox doesn't support leading dots for files
+ SkipLeadingDot: true,
})
}
diff --git a/backend/local/about_unix.go b/backend/local/about_unix.go
index 86f28d74f..f8dce54e4 100644
--- a/backend/local/about_unix.go
+++ b/backend/local/about_unix.go
@@ -1,5 +1,4 @@
//go:build darwin || dragonfly || freebsd || linux
-// +build darwin dragonfly freebsd linux
package local
@@ -24,9 +23,9 @@ func (f *Fs) About(ctx context.Context) (*fs.Usage, error) {
}
bs := int64(s.Bsize) // nolint: unconvert
usage := &fs.Usage{
- Total: fs.NewUsageValue(bs * int64(s.Blocks)), // quota of bytes that can be used
- Used: fs.NewUsageValue(bs * int64(s.Blocks-s.Bfree)), // bytes in use
- Free: fs.NewUsageValue(bs * int64(s.Bavail)), // bytes which can be uploaded before reaching the quota
+ Total: fs.NewUsageValue(bs * int64(s.Blocks)), //nolint: unconvert // quota of bytes that can be used
+ Used: fs.NewUsageValue(bs * int64(s.Blocks-s.Bfree)), //nolint: unconvert // bytes in use
+ Free: fs.NewUsageValue(bs * int64(s.Bavail)), //nolint: unconvert // bytes which can be uploaded before reaching the quota
}
return usage, nil
}
diff --git a/backend/local/about_windows.go b/backend/local/about_windows.go
index f4fba6195..1d4ab338e 100644
--- a/backend/local/about_windows.go
+++ b/backend/local/about_windows.go
@@ -1,5 +1,4 @@
//go:build windows
-// +build windows
package local
diff --git a/backend/local/clone_darwin.go b/backend/local/clone_darwin.go
new file mode 100644
index 000000000..d3410ed60
--- /dev/null
+++ b/backend/local/clone_darwin.go
@@ -0,0 +1,82 @@
+//go:build darwin && cgo
+
+// Package local provides a filesystem interface
+package local
+
+import (
+ "context"
+ "fmt"
+ "runtime"
+
+ "github.com/go-darwin/apfs"
+ "github.com/rclone/rclone/fs"
+)
+
+// Copy src to this remote using server-side copy operations.
+//
+// # This is stored with the remote path given
+//
+// # It returns the destination Object and a possible error
+//
+// Will only be called if src.Fs().Name() == f.Name()
+//
+// If it isn't possible then return fs.ErrorCantCopy
+func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object, error) {
+ if runtime.GOOS != "darwin" || f.opt.TranslateSymlinks || f.opt.NoClone {
+ return nil, fs.ErrorCantCopy
+ }
+ srcObj, ok := src.(*Object)
+ if !ok {
+ fs.Debugf(src, "Can't clone - not same remote type")
+ return nil, fs.ErrorCantCopy
+ }
+
+ // Fetch metadata if --metadata is in use
+ meta, err := fs.GetMetadataOptions(ctx, f, src, fs.MetadataAsOpenOptions(ctx))
+ if err != nil {
+ return nil, fmt.Errorf("copy: failed to read metadata: %w", err)
+ }
+
+ // Create destination
+ dstObj := f.newObject(remote)
+ err = dstObj.mkdirAll()
+ if err != nil {
+ return nil, err
+ }
+
+ err = Clone(srcObj.path, f.localPath(remote))
+ if err != nil {
+ return nil, err
+ }
+ fs.Debugf(remote, "server-side cloned!")
+
+ // Set metadata if --metadata is in use
+ if meta != nil {
+ err = dstObj.writeMetadata(meta)
+ if err != nil {
+ return nil, fmt.Errorf("copy: failed to set metadata: %w", err)
+ }
+ }
+
+ return f.NewObject(ctx, remote)
+}
+
+// Clone uses APFS cloning if possible, otherwise falls back to copying (with full metadata preservation)
+// note that this is closely related to unix.Clonefile(src, dst, unix.CLONE_NOFOLLOW) but not 100% identical
+// https://opensource.apple.com/source/copyfile/copyfile-173.40.2/copyfile.c.auto.html
+func Clone(src, dst string) error {
+ state := apfs.CopyFileStateAlloc()
+ defer func() {
+ if err := apfs.CopyFileStateFree(state); err != nil {
+ fs.Errorf(dst, "free state error: %v", err)
+ }
+ }()
+ cloned, err := apfs.CopyFile(src, dst, state, apfs.COPYFILE_CLONE)
+ fs.Debugf(dst, "isCloned: %v, error: %v", cloned, err)
+ return err
+}
+
+// Check the interfaces are satisfied
+var (
+ _ fs.Copier = &Fs{}
+)
diff --git a/backend/local/fadvise_other.go b/backend/local/fadvise_other.go
index 9bf2f6260..c07a7d01c 100644
--- a/backend/local/fadvise_other.go
+++ b/backend/local/fadvise_other.go
@@ -1,5 +1,4 @@
//go:build !linux
-// +build !linux
package local
diff --git a/backend/local/fadvise_unix.go b/backend/local/fadvise_unix.go
index 14bbb6b04..f463e017c 100644
--- a/backend/local/fadvise_unix.go
+++ b/backend/local/fadvise_unix.go
@@ -1,5 +1,4 @@
//go:build linux
-// +build linux
package local
diff --git a/backend/local/lchtimes.go b/backend/local/lchtimes.go
index 97f3b1be1..c8f03ef46 100644
--- a/backend/local/lchtimes.go
+++ b/backend/local/lchtimes.go
@@ -1,5 +1,4 @@
//go:build windows || plan9 || js
-// +build windows plan9 js
package local
diff --git a/backend/local/lchtimes_unix.go b/backend/local/lchtimes_unix.go
index 478829159..96889db47 100644
--- a/backend/local/lchtimes_unix.go
+++ b/backend/local/lchtimes_unix.go
@@ -1,5 +1,4 @@
//go:build !windows && !plan9 && !js
-// +build !windows,!plan9,!js
package local
diff --git a/backend/local/local.go b/backend/local/local.go
index 832390d5a..1a96d8036 100644
--- a/backend/local/local.go
+++ b/backend/local/local.go
@@ -32,9 +32,32 @@ import (
)
// Constants
-const devUnset = 0xdeadbeefcafebabe // a device id meaning it is unset
-const linkSuffix = ".rclonelink" // The suffix added to a translated symbolic link
-const useReadDir = (runtime.GOOS == "windows" || runtime.GOOS == "plan9") // these OSes read FileInfos directly
+const (
+ devUnset = 0xdeadbeefcafebabe // a device id meaning it is unset
+ linkSuffix = ".rclonelink" // The suffix added to a translated symbolic link
+ useReadDir = (runtime.GOOS == "windows" || runtime.GOOS == "plan9") // these OSes read FileInfos directly
+)
+
+// timeType allows the user to choose what exactly ModTime() returns
+type timeType = fs.Enum[timeTypeChoices]
+
+const (
+ mTime timeType = iota
+ aTime
+ bTime
+ cTime
+)
+
+type timeTypeChoices struct{}
+
+func (timeTypeChoices) Choices() []string {
+ return []string{
+ mTime: "mtime",
+ aTime: "atime",
+ bTime: "btime",
+ cTime: "ctime",
+ }
+}
// Register with Fs
func init() {
@@ -53,43 +76,50 @@ netbsd, macOS and Solaris. It is **not** supported on Windows yet
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.
`,
},
- Options: []fs.Option{{
- Name: "nounc",
- Help: "Disable UNC (long path names) conversion on Windows.",
- Default: false,
- Advanced: runtime.GOOS != "windows",
- Examples: []fs.OptionExample{{
- Value: "true",
- Help: "Disables long file names.",
- }},
- }, {
- Name: "copy_links",
- Help: "Follow symlinks and copy the pointed to item.",
- Default: false,
- NoPrefix: true,
- ShortOpt: "L",
- Advanced: true,
- }, {
- Name: "links",
- Help: "Translate symlinks to/from regular files with a '" + linkSuffix + "' extension.",
- Default: false,
- NoPrefix: true,
- ShortOpt: "l",
- Advanced: true,
- }, {
- Name: "skip_links",
- Help: `Don't warn about skipped symlinks.
+ Options: []fs.Option{
+ {
+ Name: "nounc",
+ Help: "Disable UNC (long path names) conversion on Windows.",
+ Default: false,
+ Advanced: runtime.GOOS != "windows",
+ Examples: []fs.OptionExample{{
+ Value: "true",
+ Help: "Disables long file names.",
+ }},
+ },
+ {
+ Name: "copy_links",
+ Help: "Follow symlinks and copy the pointed to item.",
+ Default: false,
+ NoPrefix: true,
+ ShortOpt: "L",
+ Advanced: true,
+ },
+ {
+ Name: "links",
+ Help: "Translate symlinks to/from regular files with a '" + linkSuffix + "' extension.",
+ Default: false,
+ NoPrefix: true,
+ ShortOpt: "l",
+ Advanced: true,
+ },
+ {
+ Name: "skip_links",
+ Help: `Don't warn about skipped symlinks.
This flag disables warning messages on skipped symlinks or junction
points, as you explicitly acknowledge that they should be skipped.`,
- Default: false,
- NoPrefix: true,
- Advanced: true,
- }, {
- Name: "zero_size_links",
- Help: `Assume the Stat size of links is zero (and read them instead) (deprecated).
+ Default: false,
+ NoPrefix: true,
+ Advanced: true,
+ },
+ {
+ Name: "zero_size_links",
+ Help: `Assume the Stat size of links is zero (and read them instead) (deprecated).
Rclone used to use the Stat size of links as the link size, but this fails in quite a few places:
@@ -99,11 +129,12 @@ Rclone used to use the Stat size of links as the link size, but this fails in qu
So rclone now always reads the link.
`,
- Default: false,
- Advanced: true,
- }, {
- Name: "unicode_normalization",
- Help: `Apply unicode NFC normalization to paths and filenames.
+ Default: false,
+ Advanced: true,
+ },
+ {
+ Name: "unicode_normalization",
+ Help: `Apply unicode NFC normalization to paths and filenames.
This flag can be used to normalize file names into unicode NFC form
that are read from the local filesystem.
@@ -117,11 +148,12 @@ some OSes.
Note that rclone compares filenames with unicode normalization in the sync
routine so this flag shouldn't normally be used.`,
- Default: false,
- Advanced: true,
- }, {
- Name: "no_check_updated",
- Help: `Don't check to see if the files change during upload.
+ Default: false,
+ Advanced: true,
+ },
+ {
+ Name: "no_check_updated",
+ Help: `Don't check to see if the files change during upload.
Normally rclone checks the size and modification time of files as they
are being uploaded and aborts with a message which starts "can't copy -
@@ -152,71 +184,137 @@ directory listing (where the initial stat value comes from on Windows)
and when stat is called on them directly. Other copy tools always use
the direct stat value and setting this flag will disable that.
`,
- Default: false,
- Advanced: true,
- }, {
- Name: "one_file_system",
- Help: "Don't cross filesystem boundaries (unix/macOS only).",
- Default: false,
- NoPrefix: true,
- ShortOpt: "x",
- Advanced: true,
- }, {
- Name: "case_sensitive",
- Help: `Force the filesystem to report itself as case sensitive.
+ Default: false,
+ Advanced: true,
+ },
+ {
+ Name: "one_file_system",
+ Help: "Don't cross filesystem boundaries (unix/macOS only).",
+ Default: false,
+ NoPrefix: true,
+ ShortOpt: "x",
+ Advanced: true,
+ },
+ {
+ Name: "case_sensitive",
+ Help: `Force the filesystem to report itself as case sensitive.
Normally the local backend declares itself as case insensitive on
Windows/macOS and case sensitive for everything else. Use this flag
to override the default choice.`,
- Default: false,
- Advanced: true,
- }, {
- Name: "case_insensitive",
- Help: `Force the filesystem to report itself as case insensitive.
+ Default: false,
+ Advanced: true,
+ },
+ {
+ Name: "case_insensitive",
+ Help: `Force the filesystem to report itself as case insensitive.
Normally the local backend declares itself as case insensitive on
Windows/macOS and case sensitive for everything else. Use this flag
to override the default choice.`,
- Default: false,
- Advanced: true,
- }, {
- Name: "no_preallocate",
- Help: `Disable preallocation of disk space for transferred files.
+ Default: false,
+ Advanced: true,
+ },
+ {
+ Name: "no_clone",
+ Help: `Disable reflink cloning for server-side copies.
+
+Normally, for local-to-local transfers, rclone will "clone" the file when
+possible, and fall back to "copying" only when cloning is not supported.
+
+Cloning creates a shallow copy (or "reflink") which initially shares blocks with
+the original file. Unlike a "hardlink", the two files are independent and
+neither will affect the other if subsequently modified.
+
+Cloning is usually preferable to copying, as it is much faster and is
+deduplicated by default (i.e. having two identical files does not consume more
+storage than having just one.) However, for use cases where data redundancy is
+preferable, --local-no-clone can be used to disable cloning and force "deep" copies.
+
+Currently, cloning is only supported when using APFS on macOS (support for other
+platforms may be added in the future.)`,
+ Default: false,
+ Advanced: true,
+ },
+ {
+ Name: "no_preallocate",
+ Help: `Disable preallocation of disk space for transferred files.
Preallocation of disk space helps prevent filesystem fragmentation.
However, some virtual filesystem layers (such as Google Drive File
Stream) may incorrectly set the actual file size equal to the
preallocated space, causing checksum and file size checks to fail.
Use this flag to disable preallocation.`,
- Default: false,
- Advanced: true,
- }, {
- Name: "no_sparse",
- Help: `Disable sparse files for multi-thread downloads.
+ Default: false,
+ Advanced: true,
+ },
+ {
+ Name: "no_sparse",
+ Help: `Disable sparse files for multi-thread downloads.
On Windows platforms rclone will make sparse files when doing
multi-thread downloads. This avoids long pauses on large files where
the OS zeros the file. However sparse files may be undesirable as they
cause disk fragmentation and can be slow to work with.`,
- Default: false,
- Advanced: true,
- }, {
- Name: "no_set_modtime",
- Help: `Disable setting modtime.
+ Default: false,
+ Advanced: true,
+ },
+ {
+ Name: "no_set_modtime",
+ Help: `Disable setting modtime.
Normally rclone updates modification time of files after they are done
uploading. This can cause permissions issues on Linux platforms when
the user rclone is running as does not own the file uploaded, such as
when copying to a CIFS mount owned by another user. If this option is
enabled, rclone will no longer update the modtime after copying a file.`,
- Default: false,
- Advanced: true,
- }, {
- Name: config.ConfigEncoding,
- Help: config.ConfigEncodingHelp,
- Advanced: true,
- Default: encoder.OS,
- }},
+ Default: false,
+ Advanced: true,
+ },
+ {
+ Name: "time_type",
+ Help: `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.
+`,
+ Default: mTime,
+ Advanced: true,
+ Examples: []fs.OptionExample{{
+ Value: mTime.String(),
+ Help: "The last modification time.",
+ }, {
+ Value: aTime.String(),
+ Help: "The last access time.",
+ }, {
+ Value: bTime.String(),
+ Help: "The creation time.",
+ }, {
+ Value: cTime.String(),
+ Help: "The last status change time.",
+ }},
+ },
+ {
+ Name: config.ConfigEncoding,
+ Help: config.ConfigEncodingHelp,
+ Advanced: true,
+ Default: encoder.OS,
+ },
+ },
}
fs.Register(fsi)
}
@@ -235,7 +333,9 @@ type Options struct {
NoPreAllocate bool `config:"no_preallocate"`
NoSparse bool `config:"no_sparse"`
NoSetModTime bool `config:"no_set_modtime"`
+ TimeType timeType `config:"time_type"`
Enc encoder.MultiEncoder `config:"encoding"`
+ NoClone bool `config:"no_clone"`
}
// Fs represents a local filesystem rooted at root
@@ -270,6 +370,11 @@ type Object struct {
translatedLink bool // Is this object a translated link
}
+// Directory represents a local filesystem directory
+type Directory struct {
+ Object
+}
+
// ------------------------------------------------------------
var (
@@ -301,19 +406,28 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
}
f.root = cleanRootPath(root, f.opt.NoUNC, f.opt.Enc)
f.features = (&fs.Features{
- CaseInsensitive: f.caseInsensitive(),
- CanHaveEmptyDirectories: true,
- IsLocal: true,
- SlowHash: true,
- ReadMetadata: true,
- WriteMetadata: true,
- UserMetadata: xattrSupported, // can only R/W general purpose metadata if xattrs are supported
- FilterAware: true,
- PartialUploads: true,
+ CaseInsensitive: f.caseInsensitive(),
+ CanHaveEmptyDirectories: true,
+ IsLocal: true,
+ SlowHash: true,
+ ReadMetadata: true,
+ WriteMetadata: true,
+ ReadDirMetadata: true,
+ WriteDirMetadata: true,
+ WriteDirSetModTime: true,
+ UserDirMetadata: xattrSupported, // can only R/W general purpose metadata if xattrs are supported
+ DirModTimeUpdatesOnWrite: true,
+ UserMetadata: xattrSupported, // can only R/W general purpose metadata if xattrs are supported
+ FilterAware: true,
+ PartialUploads: true,
}).Fill(ctx, f)
if opt.FollowSymlinks {
f.lstat = os.Stat
}
+ if opt.NoClone {
+ // Disable server-side copy when --local-no-clone is set
+ f.features.Copy = nil
+ }
// Check to see if this points to a file
fi, err := f.lstat(f.root)
@@ -453,6 +567,15 @@ func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) {
return f.newObjectWithInfo(remote, nil)
}
+// Create new directory object from the info passed in
+func (f *Fs) newDirectory(dir string, fi os.FileInfo) *Directory {
+ o := f.newObject(dir)
+ o.setMetadata(fi)
+ return &Directory{
+ Object: *o,
+ }
+}
+
// List the objects and directories in dir into entries. The
// entries can be returned in any order but should be for a
// complete directory.
@@ -563,7 +686,7 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
// Ignore directories which are symlinks. These are junction points under windows which
// are kind of a souped up symlink. Unix doesn't have directories which are symlinks.
if (mode&os.ModeSymlink) == 0 && f.dev == readDevice(fi, f.opt.OneFileSystem) {
- d := fs.NewDir(newRemote, fi.ModTime())
+ d := f.newDirectory(newRemote, fi)
entries = append(entries, d)
}
} else {
@@ -643,6 +766,58 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {
return nil
}
+// DirSetModTime sets the directory modtime for dir
+func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error {
+ o := Object{
+ fs: f,
+ remote: dir,
+ path: f.localPath(dir),
+ }
+ return o.SetModTime(ctx, modTime)
+}
+
+// MkdirMetadata makes the directory passed in as dir.
+//
+// It shouldn't return an error if it already exists.
+//
+// If the metadata is not nil it is set.
+//
+// It returns the directory that was created.
+func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata) (fs.Directory, error) {
+ // Find and or create the directory
+ localPath := f.localPath(dir)
+ fi, err := f.lstat(localPath)
+ if errors.Is(err, os.ErrNotExist) {
+ err := f.Mkdir(ctx, dir)
+ if err != nil {
+ return nil, fmt.Errorf("mkdir metadata: failed make directory: %w", err)
+ }
+ fi, err = f.lstat(localPath)
+ if err != nil {
+ return nil, fmt.Errorf("mkdir metadata: failed to read info: %w", err)
+ }
+ } else if err != nil {
+ return nil, err
+ }
+
+ // Create directory object
+ d := f.newDirectory(dir, fi)
+
+ // Set metadata on the directory object if provided
+ if metadata != nil {
+ err = d.writeMetadata(metadata)
+ if err != nil {
+ return nil, fmt.Errorf("failed to set metadata on directory: %w", err)
+ }
+ // Re-read info now we have finished setting stuff
+ err = d.lstat()
+ if err != nil {
+ return nil, fmt.Errorf("mkdir metadata: failed to re-read info: %w", err)
+ }
+ }
+ return d, nil
+}
+
// Rmdir removes the directory
//
// If it isn't empty it will return an error
@@ -720,27 +895,6 @@ func (f *Fs) readPrecision() (precision time.Duration) {
return
}
-// Purge deletes all the files in the directory
-//
-// Optional interface: Only implement this if you have a way of
-// deleting all the files quicker than just running Remove() on the
-// result of List()
-func (f *Fs) Purge(ctx context.Context, dir string) error {
- dir = f.localPath(dir)
- fi, err := f.lstat(dir)
- if err != nil {
- // already purged
- if os.IsNotExist(err) {
- return fs.ErrorDirNotFound
- }
- return err
- }
- if !fi.Mode().IsDir() {
- return fmt.Errorf("can't purge non directory: %q", dir)
- }
- return os.RemoveAll(dir)
-}
-
// Move src to this remote using server-side move operations.
//
// This is stored with the remote path given.
@@ -780,6 +934,12 @@ func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object,
return nil, err
}
+ // Fetch metadata if --metadata is in use
+ meta, err := fs.GetMetadataOptions(ctx, f, src, fs.MetadataAsOpenOptions(ctx))
+ if err != nil {
+ return nil, fmt.Errorf("move: failed to read metadata: %w", err)
+ }
+
// Do the move
err = os.Rename(srcObj.path, dstObj.path)
if os.IsNotExist(err) {
@@ -795,6 +955,12 @@ func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object,
return nil, fs.ErrorCantMove
}
+ // Set metadata if --metadata is in use
+ err = dstObj.writeMetadata(meta)
+ if err != nil {
+ return nil, fmt.Errorf("move: failed to set metadata: %w", err)
+ }
+
// Update the info
err = dstObj.lstat()
if err != nil {
@@ -1068,7 +1234,7 @@ func (file *localOpenFile) Read(p []byte) (n int, err error) {
if oldsize != fi.Size() {
return 0, fserrors.NoLowLevelRetryError(fmt.Errorf("can't copy - source file is being updated (size changed from %d to %d)", oldsize, fi.Size()))
}
- if !oldtime.Equal(fi.ModTime()) {
+ if !oldtime.Equal(readTime(file.o.fs.opt.TimeType, fi)) {
return 0, fserrors.NoLowLevelRetryError(fmt.Errorf("can't copy - source file is being updated (mod time changed from %v to %v)", oldtime, fi.ModTime()))
}
}
@@ -1364,7 +1530,7 @@ func (o *Object) setMetadata(info os.FileInfo) {
}
o.fs.objectMetaMu.Lock()
o.size = info.Size()
- o.modTime = info.ModTime()
+ o.modTime = readTime(o.fs.opt.TimeType, info)
o.mode = info.Mode()
o.fs.objectMetaMu.Unlock()
// Read the size of the link.
@@ -1433,45 +1599,109 @@ func (o *Object) writeMetadata(metadata fs.Metadata) (err error) {
return err
}
-func cleanRootPath(s string, noUNC bool, enc encoder.MultiEncoder) string {
- if runtime.GOOS != "windows" || !strings.HasPrefix(s, "\\") {
- if !filepath.IsAbs(s) {
- s2, err := filepath.Abs(s)
- if err == nil {
- s = s2
- }
- } else {
- s = filepath.Clean(s)
- }
+// SetMetadata sets metadata for an Object
+//
+// It should return fs.ErrorNotImplemented if it can't set metadata
+func (o *Object) SetMetadata(ctx context.Context, metadata fs.Metadata) error {
+ err := o.writeMetadata(metadata)
+ if err != nil {
+ return fmt.Errorf("SetMetadata failed on Object: %w", err)
}
+ // Re-read info now we have finished setting stuff
+ return o.lstat()
+}
+
+func cleanRootPath(s string, noUNC bool, enc encoder.MultiEncoder) string {
+ var vol string
if runtime.GOOS == "windows" {
- s = filepath.ToSlash(s)
- vol := filepath.VolumeName(s)
+ vol = filepath.VolumeName(s)
if vol == `\\?` && len(s) >= 6 {
// `\\?\C:`
vol = s[:6]
}
- s = vol + enc.FromStandardPath(s[len(vol):])
- s = filepath.FromSlash(s)
- if !noUNC {
- // Convert to UNC
- s = file.UNCPath(s)
- }
- return s
+ s = s[len(vol):]
+ }
+ // Don't use FromStandardPath. Make sure Dot (`.`, `..`) as name will not be reencoded
+ // Take care of the case Standard: ././‛. (the first dot means current directory)
+ if enc != encoder.Standard {
+ s = filepath.ToSlash(s)
+ parts := strings.Split(s, "/")
+ encoded := make([]string, len(parts))
+ changed := false
+ for i, p := range parts {
+ if (p == ".") || (p == "..") {
+ encoded[i] = p
+ continue
+ }
+ part := enc.FromStandardName(p)
+ changed = changed || part != p
+ encoded[i] = part
+ }
+ if changed {
+ s = strings.Join(encoded, "/")
+ }
+ s = filepath.FromSlash(s)
+ }
+ if runtime.GOOS == "windows" {
+ s = vol + s
+ }
+ s2, err := filepath.Abs(s)
+ if err == nil {
+ s = s2
+ }
+ if !noUNC {
+ // Convert to UNC. It does nothing on non windows platforms.
+ s = file.UNCPath(s)
}
- s = enc.FromStandardPath(s)
return s
}
+// Items returns the count of items in this directory or this
+// directory and subdirectories if known, -1 for unknown
+func (d *Directory) Items() int64 {
+ return -1
+}
+
+// ID returns the internal ID of this directory if known, or
+// "" otherwise
+func (d *Directory) ID() string {
+ return ""
+}
+
+// SetMetadata sets metadata for a Directory
+//
+// It should return fs.ErrorNotImplemented if it can't set metadata
+func (d *Directory) SetMetadata(ctx context.Context, metadata fs.Metadata) error {
+ err := d.writeMetadata(metadata)
+ if err != nil {
+ return fmt.Errorf("SetMetadata failed on Directory: %w", err)
+ }
+ // Re-read info now we have finished setting stuff
+ return d.lstat()
+}
+
+// Hash does nothing on a directory
+//
+// This method is implemented with the incorrect type signature to
+// stop the Directory type asserting to fs.Object or fs.ObjectInfo
+func (d *Directory) Hash() {
+ // Does nothing
+}
+
// Check the interfaces are satisfied
var (
- _ fs.Fs = &Fs{}
- _ fs.Purger = &Fs{}
- _ fs.PutStreamer = &Fs{}
- _ fs.Mover = &Fs{}
- _ fs.DirMover = &Fs{}
- _ fs.Commander = &Fs{}
- _ fs.OpenWriterAter = &Fs{}
- _ fs.Object = &Object{}
- _ fs.Metadataer = &Object{}
+ _ fs.Fs = &Fs{}
+ _ fs.PutStreamer = &Fs{}
+ _ fs.Mover = &Fs{}
+ _ fs.DirMover = &Fs{}
+ _ fs.Commander = &Fs{}
+ _ fs.OpenWriterAter = &Fs{}
+ _ fs.DirSetModTimer = &Fs{}
+ _ fs.MkdirMetadataer = &Fs{}
+ _ fs.Object = &Object{}
+ _ fs.Metadataer = &Object{}
+ _ fs.SetMetadataer = &Object{}
+ _ fs.Directory = &Directory{}
+ _ fs.SetModTimer = &Directory{}
+ _ fs.SetMetadataer = &Directory{}
)
diff --git a/backend/local/local_internal_test.go b/backend/local/local_internal_test.go
index 06e47bed2..82447fa6e 100644
--- a/backend/local/local_internal_test.go
+++ b/backend/local/local_internal_test.go
@@ -76,6 +76,24 @@ func TestUpdatingCheck(t *testing.T) {
}
+// Test corrupted on transfer
+// should error due to size/hash mismatch
+func TestVerifyCopy(t *testing.T) {
+ t.Skip("FIXME this test is unreliable")
+ r := fstest.NewRun(t)
+ filePath := "sub dir/local test"
+ r.WriteFile(filePath, "some content", time.Now())
+ src, err := r.Flocal.NewObject(context.Background(), filePath)
+ require.NoError(t, err)
+ src.(*Object).fs.opt.NoCheckUpdated = true
+
+ for i := 0; i < 100; i++ {
+ go r.WriteFile(src.Remote(), fmt.Sprintf("some new content %d", i), src.ModTime(context.Background()))
+ }
+ _, err = operations.Copy(context.Background(), r.Fremote, nil, filePath+"2", src)
+ assert.Error(t, err)
+}
+
func TestSymlink(t *testing.T) {
ctx := context.Background()
r := fstest.NewRun(t)
diff --git a/backend/local/metadata.go b/backend/local/metadata.go
index 097abedf1..7ab69af30 100644
--- a/backend/local/metadata.go
+++ b/backend/local/metadata.go
@@ -2,6 +2,7 @@ package local
import (
"fmt"
+ "math"
"os"
"runtime"
"strconv"
@@ -72,12 +73,12 @@ func (o *Object) parseMetadataInt(m fs.Metadata, key string, base int) (result i
value, ok := m[key]
if ok {
var err error
- result64, err := strconv.ParseInt(value, base, 64)
+ parsed, err := strconv.ParseInt(value, base, 0)
if err != nil {
fs.Debugf(o, "failed to parse metadata %s: %q: %v", key, value, err)
ok = false
}
- result = int(result64)
+ result = int(parsed)
}
return result, ok
}
@@ -128,9 +129,14 @@ func (o *Object) writeMetadataToFile(m fs.Metadata) (outErr error) {
}
mode, hasMode := o.parseMetadataInt(m, "mode", 8)
if hasMode {
- err = os.Chmod(o.path, os.FileMode(mode))
- if err != nil {
- outErr = fmt.Errorf("failed to change permissions: %w", err)
+ if mode >= 0 {
+ umode := uint(mode)
+ if umode <= math.MaxUint32 {
+ err = os.Chmod(o.path, os.FileMode(umode))
+ if err != nil {
+ outErr = fmt.Errorf("failed to change permissions: %w", err)
+ }
+ }
}
}
// FIXME not parsing rdev yet
diff --git a/backend/local/metadata_bsd.go b/backend/local/metadata_bsd.go
index c4c90d226..cd5976eaa 100644
--- a/backend/local/metadata_bsd.go
+++ b/backend/local/metadata_bsd.go
@@ -1,16 +1,34 @@
//go:build darwin || freebsd || netbsd
-// +build darwin freebsd netbsd
package local
import (
"fmt"
+ "os"
"syscall"
"time"
"github.com/rclone/rclone/fs"
)
+// Read the time specified from the os.FileInfo
+func readTime(t timeType, fi os.FileInfo) time.Time {
+ stat, ok := fi.Sys().(*syscall.Stat_t)
+ if !ok {
+ fs.Debugf(nil, "didn't return Stat_t as expected")
+ return fi.ModTime()
+ }
+ switch t {
+ case aTime:
+ return time.Unix(stat.Atimespec.Unix())
+ case bTime:
+ return time.Unix(stat.Birthtimespec.Unix())
+ case cTime:
+ return time.Unix(stat.Ctimespec.Unix())
+ }
+ return fi.ModTime()
+}
+
// Read the metadata from the file into metadata where possible
func (o *Object) readMetadataFromFile(m *fs.Metadata) (err error) {
info, err := o.fs.lstat(o.path)
diff --git a/backend/local/metadata_linux.go b/backend/local/metadata_linux.go
index 47294adba..dc0b1d233 100644
--- a/backend/local/metadata_linux.go
+++ b/backend/local/metadata_linux.go
@@ -1,12 +1,13 @@
//go:build linux
-// +build linux
package local
import (
"fmt"
+ "os"
"runtime"
"sync"
+ "syscall"
"time"
"github.com/rclone/rclone/fs"
@@ -18,6 +19,22 @@ var (
readMetadataFromFileFn func(o *Object, m *fs.Metadata) (err error)
)
+// Read the time specified from the os.FileInfo
+func readTime(t timeType, fi os.FileInfo) time.Time {
+ stat, ok := fi.Sys().(*syscall.Stat_t)
+ if !ok {
+ fs.Debugf(nil, "didn't return Stat_t as expected")
+ return fi.ModTime()
+ }
+ switch t {
+ case aTime:
+ return time.Unix(stat.Atim.Unix())
+ case cTime:
+ return time.Unix(stat.Ctim.Unix())
+ }
+ return fi.ModTime()
+}
+
// Read the metadata from the file into metadata where possible
func (o *Object) readMetadataFromFile(m *fs.Metadata) (err error) {
statxCheckOnce.Do(func() {
diff --git a/backend/local/metadata_other.go b/backend/local/metadata_other.go
index f2ce80956..dc6a5a736 100644
--- a/backend/local/metadata_other.go
+++ b/backend/local/metadata_other.go
@@ -1,14 +1,20 @@
-//go:build plan9 || js
-// +build plan9 js
+//go:build dragonfly || plan9 || js
package local
import (
"fmt"
+ "os"
+ "time"
"github.com/rclone/rclone/fs"
)
+// Read the time specified from the os.FileInfo
+func readTime(t timeType, fi os.FileInfo) time.Time {
+ return fi.ModTime()
+}
+
// Read the metadata from the file into metadata where possible
func (o *Object) readMetadataFromFile(m *fs.Metadata) (err error) {
info, err := o.fs.lstat(o.path)
diff --git a/backend/local/metadata_unix.go b/backend/local/metadata_unix.go
index 48bf7faa3..d1695ad7c 100644
--- a/backend/local/metadata_unix.go
+++ b/backend/local/metadata_unix.go
@@ -1,16 +1,32 @@
//go:build openbsd || solaris
-// +build openbsd solaris
package local
import (
"fmt"
+ "os"
"syscall"
"time"
"github.com/rclone/rclone/fs"
)
+// Read the time specified from the os.FileInfo
+func readTime(t timeType, fi os.FileInfo) time.Time {
+ stat, ok := fi.Sys().(*syscall.Stat_t)
+ if !ok {
+ fs.Debugf(nil, "didn't return Stat_t as expected")
+ return fi.ModTime()
+ }
+ switch t {
+ case aTime:
+ return time.Unix(stat.Atim.Unix())
+ case cTime:
+ return time.Unix(stat.Ctim.Unix())
+ }
+ return fi.ModTime()
+}
+
// Read the metadata from the file into metadata where possible
func (o *Object) readMetadataFromFile(m *fs.Metadata) (err error) {
info, err := o.fs.lstat(o.path)
diff --git a/backend/local/metadata_windows.go b/backend/local/metadata_windows.go
index b2588953e..00fad75ba 100644
--- a/backend/local/metadata_windows.go
+++ b/backend/local/metadata_windows.go
@@ -1,16 +1,32 @@
//go:build windows
-// +build windows
package local
import (
"fmt"
+ "os"
"syscall"
"time"
"github.com/rclone/rclone/fs"
)
+// Read the time specified from the os.FileInfo
+func readTime(t timeType, fi os.FileInfo) time.Time {
+ stat, ok := fi.Sys().(*syscall.Win32FileAttributeData)
+ if !ok {
+ fs.Debugf(nil, "didn't return Win32FileAttributeData as expected")
+ return fi.ModTime()
+ }
+ switch t {
+ case aTime:
+ return time.Unix(0, stat.LastAccessTime.Nanoseconds())
+ case bTime:
+ return time.Unix(0, stat.CreationTime.Nanoseconds())
+ }
+ return fi.ModTime()
+}
+
// Read the metadata from the file into metadata where possible
func (o *Object) readMetadataFromFile(m *fs.Metadata) (err error) {
info, err := o.fs.lstat(o.path)
diff --git a/backend/local/read_device_other.go b/backend/local/read_device_other.go
index a5a455d0c..3455ab346 100644
--- a/backend/local/read_device_other.go
+++ b/backend/local/read_device_other.go
@@ -1,7 +1,6 @@
// Device reading functions
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
package local
diff --git a/backend/local/read_device_unix.go b/backend/local/read_device_unix.go
index 3297194b3..ab7fecbee 100644
--- a/backend/local/read_device_unix.go
+++ b/backend/local/read_device_unix.go
@@ -1,7 +1,6 @@
// Device reading functions
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package local
diff --git a/backend/local/remove_other.go b/backend/local/remove_other.go
index b0deeeec8..25a19eedf 100644
--- a/backend/local/remove_other.go
+++ b/backend/local/remove_other.go
@@ -1,5 +1,4 @@
//go:build !windows
-// +build !windows
package local
diff --git a/backend/local/remove_windows.go b/backend/local/remove_windows.go
index 989c75805..70d65b63e 100644
--- a/backend/local/remove_windows.go
+++ b/backend/local/remove_windows.go
@@ -1,18 +1,13 @@
//go:build windows
-// +build windows
package local
import (
"os"
- "syscall"
"time"
"github.com/rclone/rclone/fs"
-)
-
-const (
- ERROR_SHARING_VIOLATION syscall.Errno = 32
+ "golang.org/x/sys/windows"
)
// Removes name, retrying on a sharing violation
@@ -28,7 +23,7 @@ func remove(name string) (err error) {
if !ok {
break
}
- if pathErr.Err != ERROR_SHARING_VIOLATION {
+ if pathErr.Err != windows.ERROR_SHARING_VIOLATION {
break
}
fs.Logf(name, "Remove detected sharing violation - retry %d/%d sleeping %v", i+1, maxTries, sleepTime)
diff --git a/backend/local/setbtime.go b/backend/local/setbtime.go
index 5d2c462ee..5c946348f 100644
--- a/backend/local/setbtime.go
+++ b/backend/local/setbtime.go
@@ -1,5 +1,4 @@
//go:build !windows
-// +build !windows
package local
diff --git a/backend/local/setbtime_windows.go b/backend/local/setbtime_windows.go
index adb9efa3a..510a4da6a 100644
--- a/backend/local/setbtime_windows.go
+++ b/backend/local/setbtime_windows.go
@@ -1,10 +1,8 @@
//go:build windows
-// +build windows
package local
import (
- "os"
"syscall"
"time"
)
@@ -13,7 +11,13 @@ const haveSetBTime = true
// setBTime sets the birth time of the file passed in
func setBTime(name string, btime time.Time) (err error) {
- h, err := syscall.Open(name, os.O_RDWR, 0755)
+ pathp, err := syscall.UTF16PtrFromString(name)
+ if err != nil {
+ return err
+ }
+ h, err := syscall.CreateFile(pathp,
+ syscall.FILE_WRITE_ATTRIBUTES, syscall.FILE_SHARE_WRITE, nil,
+ syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS, 0)
if err != nil {
return err
}
diff --git a/backend/local/symlink.go b/backend/local/symlink.go
index c55fb50a2..bdce264c7 100644
--- a/backend/local/symlink.go
+++ b/backend/local/symlink.go
@@ -1,5 +1,4 @@
//go:build !windows && !plan9 && !js
-// +build !windows,!plan9,!js
package local
diff --git a/backend/local/symlink_other.go b/backend/local/symlink_other.go
index 2b942c6fc..2d5bcab07 100644
--- a/backend/local/symlink_other.go
+++ b/backend/local/symlink_other.go
@@ -1,5 +1,4 @@
//go:build windows || plan9 || js
-// +build windows plan9 js
package local
diff --git a/backend/local/xattr.go b/backend/local/xattr.go
index fec0e4e7b..e34dc02ad 100644
--- a/backend/local/xattr.go
+++ b/backend/local/xattr.go
@@ -1,5 +1,4 @@
//go:build !openbsd && !plan9
-// +build !openbsd,!plan9
package local
diff --git a/backend/local/xattr_unsupported.go b/backend/local/xattr_unsupported.go
index 88455939a..20c86d07a 100644
--- a/backend/local/xattr_unsupported.go
+++ b/backend/local/xattr_unsupported.go
@@ -1,7 +1,7 @@
-//go:build openbsd || plan9
-// +build openbsd plan9
-
// The pkg/xattr module doesn't compile for openbsd or plan9
+
+//go:build openbsd || plan9
+
package local
import "github.com/rclone/rclone/fs"
diff --git a/backend/mailru/mailru.go b/backend/mailru/mailru.go
index b1cb6e775..d92a5290c 100644
--- a/backend/mailru/mailru.go
+++ b/backend/mailru/mailru.go
@@ -46,8 +46,8 @@ import (
// Global constants
const (
- minSleepPacer = 10 * time.Millisecond
- maxSleepPacer = 2 * time.Second
+ minSleepPacer = 100 * time.Millisecond
+ maxSleepPacer = 5 * time.Second
decayConstPacer = 2 // bigger for slower decay, exponential
metaExpirySec = 20 * 60 // meta server expiration time
serverExpirySec = 3 * 60 // download server expiration time
diff --git a/backend/memory/memory.go b/backend/memory/memory.go
index 80fc321f9..48cc9678b 100644
--- a/backend/memory/memory.go
+++ b/backend/memory/memory.go
@@ -38,8 +38,7 @@ func init() {
}
// Options defines the configuration for this backend
-type Options struct {
-}
+type Options struct{}
// Fs represents a remote memory server
type Fs struct {
@@ -297,7 +296,7 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck
slash := strings.IndexRune(localPath, '/')
if slash >= 0 {
// send a directory if have a slash
- dir := directory + localPath[:slash]
+ dir := strings.TrimPrefix(directory, f.rootDirectory+"/") + localPath[:slash]
if addBucket {
dir = path.Join(bucket, dir)
}
@@ -385,10 +384,22 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
func (f *Fs) ListR(ctx context.Context, dir string, callback fs.ListRCallback) (err error) {
bucket, directory := f.split(dir)
list := walk.NewListRHelper(callback)
+ entries := fs.DirEntries{}
listR := func(bucket, directory, prefix string, addBucket bool) error {
- return f.list(ctx, bucket, directory, prefix, addBucket, true, func(remote string, entry fs.DirEntry, isDirectory bool) error {
- return list.Add(entry)
+ err = f.list(ctx, bucket, directory, prefix, addBucket, true, func(remote string, entry fs.DirEntry, isDirectory bool) error {
+ entries = append(entries, entry) // can't list.Add here -- could deadlock
+ return nil
})
+ if err != nil {
+ return err
+ }
+ for _, entry := range entries {
+ err = list.Add(entry)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
}
if bucket == "" {
entries, err := f.listBuckets(ctx)
@@ -482,7 +493,8 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
if od == nil {
return nil, fs.ErrorObjectNotFound
}
- buckets.updateObjectData(dstBucket, dstPath, od)
+ odCopy := *od
+ buckets.updateObjectData(dstBucket, dstPath, &odCopy)
return f.NewObject(ctx, remote)
}
diff --git a/backend/memory/memory_internal_test.go b/backend/memory/memory_internal_test.go
new file mode 100644
index 000000000..fe8db1f57
--- /dev/null
+++ b/backend/memory/memory_internal_test.go
@@ -0,0 +1,40 @@
+package memory
+
+import (
+ "context"
+ "fmt"
+ "testing"
+
+ _ "github.com/rclone/rclone/backend/local"
+ "github.com/rclone/rclone/fs/operations"
+ "github.com/rclone/rclone/fstest"
+ "github.com/rclone/rclone/fstest/fstests"
+ "github.com/stretchr/testify/require"
+)
+
+var t1 = fstest.Time("2001-02-03T04:05:06.499999999Z")
+
+// InternalTest dispatches all internal tests
+func (f *Fs) InternalTest(t *testing.T) {
+ t.Run("PurgeListDeadlock", func(t *testing.T) {
+ testPurgeListDeadlock(t)
+ })
+}
+
+// test that Purge fallback does not result in deadlock from concurrently listing and removing
+func testPurgeListDeadlock(t *testing.T) {
+ ctx := context.Background()
+ r := fstest.NewRunIndividual(t)
+ r.Mkdir(ctx, r.Fremote)
+ r.Fremote.Features().Disable("Purge") // force fallback-purge
+
+ // make a lot of files to prevent it from finishing too quickly
+ for i := 0; i < 100; i++ {
+ dst := "file" + fmt.Sprint(i) + ".txt"
+ r.WriteObject(ctx, dst, "hello", t1)
+ }
+
+ require.NoError(t, operations.Purge(ctx, r.Fremote, ""))
+}
+
+var _ fstests.InternalTester = (*Fs)(nil)
diff --git a/backend/netstorage/netstorage.go b/backend/netstorage/netstorage.go
index d5a0e9c6b..8e0426171 100755
--- a/backend/netstorage/netstorage.go
+++ b/backend/netstorage/netstorage.go
@@ -15,6 +15,7 @@ import (
"math/rand"
"net/http"
"net/url"
+ "path"
"strconv"
"strings"
"sync"
@@ -260,6 +261,11 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
case fs.ErrorObjectNotFound:
return f, nil
case fs.ErrorIsFile:
+ // Correct root if definitely pointing to a file
+ f.root = path.Dir(f.root)
+ if f.root == "." || f.root == "/" {
+ f.root = ""
+ }
// Fs points to the parent directory
return f, err
default:
@@ -437,7 +443,7 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
}
URL := f.url(dir)
- files, err := f.netStorageDirRequest(ctx, dir, URL)
+ files, err := f.netStorageDirRequest(ctx, URL)
if err != nil {
return nil, err
}
@@ -917,16 +923,14 @@ func (f *Fs) netStorageStatRequest(ctx context.Context, URL string, directory bo
entrywanted := (directory && files[i].Type == "dir") ||
(!directory && files[i].Type != "dir")
if entrywanted {
- filestamp := files[0]
- files[0] = files[i]
- files[i] = filestamp
+ files[0], files[i] = files[i], files[0]
}
}
return files, nil
}
// netStorageDirRequest performs a NetStorage dir request
-func (f *Fs) netStorageDirRequest(ctx context.Context, dir string, URL string) ([]File, error) {
+func (f *Fs) netStorageDirRequest(ctx context.Context, URL string) ([]File, error) {
const actionHeader = "version=1&action=dir&format=xml&encoding=utf-8"
statResp := &Stat{}
if _, err := f.callBackend(ctx, URL, "GET", actionHeader, false, statResp, nil); err != nil {
diff --git a/backend/onedrive/api/types.go b/backend/onedrive/api/types.go
index c8e7a5fd1..0332f1c12 100644
--- a/backend/onedrive/api/types.go
+++ b/backend/onedrive/api/types.go
@@ -7,7 +7,7 @@ import (
)
const (
- timeFormat = `"` + time.RFC3339 + `"`
+ timeFormat = `"` + "2006-01-02T15:04:05.999Z" + `"`
// PackageTypeOneNote is the package type value for OneNote files
PackageTypeOneNote = "oneNote"
@@ -40,17 +40,22 @@ var _ error = (*Error)(nil)
// Identity represents an identity of an actor. For example, and actor
// can be a user, device, or application.
type Identity struct {
- DisplayName string `json:"displayName"`
- ID string `json:"id"`
+ DisplayName string `json:"displayName,omitempty"`
+ ID string `json:"id,omitempty"`
+ Email string `json:"email,omitempty"` // not officially documented, but seems to sometimes exist
+ LoginName string `json:"loginName,omitempty"` // SharePoint only
}
// IdentitySet is a keyed collection of Identity objects. It is used
// to represent a set of identities associated with various events for
// an item, such as created by or last modified by.
type IdentitySet struct {
- User Identity `json:"user"`
- Application Identity `json:"application"`
- Device Identity `json:"device"`
+ User Identity `json:"user,omitempty"`
+ Application Identity `json:"application,omitempty"`
+ Device Identity `json:"device,omitempty"`
+ Group Identity `json:"group,omitempty"`
+ SiteGroup Identity `json:"siteGroup,omitempty"` // The SharePoint group associated with this action. Optional.
+ SiteUser Identity `json:"siteUser,omitempty"` // The SharePoint user associated with this action. Optional.
}
// Quota groups storage space quota-related information on OneDrive into a single structure.
@@ -150,16 +155,15 @@ type FileFacet struct {
// facet can be used to specify the last modified date or created date
// of the item as it was on the local device.
type FileSystemInfoFacet struct {
- CreatedDateTime Timestamp `json:"createdDateTime"` // The UTC date and time the file was created on a client.
- LastModifiedDateTime Timestamp `json:"lastModifiedDateTime"` // The UTC date and time the file was last modified on a client.
+ CreatedDateTime Timestamp `json:"createdDateTime,omitempty"` // The UTC date and time the file was created on a client.
+ LastModifiedDateTime Timestamp `json:"lastModifiedDateTime,omitempty"` // The UTC date and time the file was last modified on a client.
}
// DeletedFacet indicates that the item on OneDrive has been
// deleted. In this version of the API, the presence (non-null) of the
// facet value indicates that the file was deleted. A null (or
// missing) value indicates that the file is not deleted.
-type DeletedFacet struct {
-}
+type DeletedFacet struct{}
// PackageFacet indicates that a DriveItem is the top level item
// in a "package" or a collection of items that should be treated as a collection instead of individual items.
@@ -168,31 +172,143 @@ type PackageFacet struct {
Type string `json:"type"`
}
+// SharedType indicates a DriveItem has been shared with others. The resource includes information about how the item is shared.
+// If a Driveitem has a non-null shared facet, the item has been shared.
+type SharedType struct {
+ Owner IdentitySet `json:"owner,omitempty"` // The identity of the owner of the shared item. Read-only.
+ Scope string `json:"scope,omitempty"` // Indicates the scope of how the item is shared: anonymous, organization, or users. Read-only.
+ SharedBy IdentitySet `json:"sharedBy,omitempty"` // The identity of the user who shared the item. Read-only.
+ SharedDateTime Timestamp `json:"sharedDateTime,omitempty"` // The UTC date and time when the item was shared. Read-only.
+}
+
+// SharingInvitationType groups invitation-related data items into a single structure.
+type SharingInvitationType struct {
+ Email string `json:"email,omitempty"` // The email address provided for the recipient of the sharing invitation. Read-only.
+ InvitedBy *IdentitySet `json:"invitedBy,omitempty"` // Provides information about who sent the invitation that created this permission, if that information is available. Read-only.
+ SignInRequired bool `json:"signInRequired,omitempty"` // If true the recipient of the invitation needs to sign in in order to access the shared item. Read-only.
+}
+
+// SharingLinkType groups link-related data items into a single structure.
+// If a Permission resource has a non-null sharingLink facet, the permission represents a sharing link (as opposed to permissions granted to a person or group).
+type SharingLinkType struct {
+ Application *Identity `json:"application,omitempty"` // The app the link is associated with.
+ Type LinkType `json:"type,omitempty"` // The type of the link created.
+ Scope LinkScope `json:"scope,omitempty"` // The scope of the link represented by this permission. Value anonymous indicates the link is usable by anyone, organization indicates the link is only usable for users signed into the same tenant.
+ WebHTML string `json:"webHtml,omitempty"` // For embed links, this property contains the HTML code for an