mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
docs: fix markdownlint issue md040/fenced-code-language
This commit is contained in:
@@ -32,7 +32,7 @@ Then [install Git](https://git-scm.com/downloads) and set your public contributi
|
|||||||
|
|
||||||
Next open your terminal, change directory to your preferred folder and initialise your local rclone project:
|
Next open your terminal, change directory to your preferred folder and initialise your local rclone project:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git clone https://github.com/rclone/rclone.git
|
git clone https://github.com/rclone/rclone.git
|
||||||
cd rclone
|
cd rclone
|
||||||
git remote rename origin upstream
|
git remote rename origin upstream
|
||||||
@@ -46,13 +46,13 @@ Note that most of the terminal commands in the rest of this guide must be execut
|
|||||||
|
|
||||||
Now [install Go](https://golang.org/doc/install) and verify your installation:
|
Now [install Go](https://golang.org/doc/install) and verify your installation:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go version
|
go version
|
||||||
```
|
```
|
||||||
|
|
||||||
Great, you can now compile and execute your own version of rclone:
|
Great, you can now compile and execute your own version of rclone:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go build
|
go build
|
||||||
./rclone version
|
./rclone version
|
||||||
```
|
```
|
||||||
@@ -61,7 +61,7 @@ go build
|
|||||||
more accurate version number in the executable as well as enable you to specify
|
more accurate version number in the executable as well as enable you to specify
|
||||||
more build options.) Finally make a branch to add your new feature
|
more build options.) Finally make a branch to add your new feature
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git checkout -b my-new-feature
|
git checkout -b my-new-feature
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ You may like one of the [popular editors/IDE's for Go](https://github.com/golang
|
|||||||
|
|
||||||
When ready - test the affected functionality and run the unit tests for the code you changed
|
When ready - test the affected functionality and run the unit tests for the code you changed
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd folder/with/changed/files
|
cd folder/with/changed/files
|
||||||
go test -v
|
go test -v
|
||||||
```
|
```
|
||||||
@@ -89,7 +89,7 @@ Make sure you
|
|||||||
|
|
||||||
When you are done with that push your changes to GitHub:
|
When you are done with that push your changes to GitHub:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git push -u origin my-new-feature
|
git push -u origin my-new-feature
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ You may sometimes be asked to [base your changes on the latest master](#basing-y
|
|||||||
|
|
||||||
Follow the guideline for [commit messages](#commit-messages) and then:
|
Follow the guideline for [commit messages](#commit-messages) and then:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git checkout my-new-feature # To switch to your branch
|
git checkout my-new-feature # To switch to your branch
|
||||||
git status # To see the new and changed files
|
git status # To see the new and changed files
|
||||||
git add FILENAME # To select FILENAME for the commit
|
git add FILENAME # To select FILENAME for the commit
|
||||||
@@ -117,7 +117,7 @@ git log # To verify the commit. Use q to quit the log
|
|||||||
|
|
||||||
You can modify the message or changes in the latest commit using:
|
You can modify the message or changes in the latest commit using:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git commit --amend
|
git commit --amend
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ Note that you are about to rewrite the GitHub history of your branch. It is good
|
|||||||
|
|
||||||
Your previously pushed commits are replaced by:
|
Your previously pushed commits are replaced by:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git push --force origin my-new-feature
|
git push --force origin my-new-feature
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ git push --force origin my-new-feature
|
|||||||
|
|
||||||
To base your changes on the latest version of the [rclone master](https://github.com/rclone/rclone/tree/master) (upstream):
|
To base your changes on the latest version of the [rclone master](https://github.com/rclone/rclone/tree/master) (upstream):
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git checkout master
|
git checkout master
|
||||||
git fetch upstream
|
git fetch upstream
|
||||||
git merge --ff-only
|
git merge --ff-only
|
||||||
@@ -152,7 +152,7 @@ If you rebase commits that have been pushed to GitHub, then you will have to [re
|
|||||||
|
|
||||||
To combine your commits into one commit:
|
To combine your commits into one commit:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git log # To count the commits to squash, e.g. the last 2
|
git log # To count the commits to squash, e.g. the last 2
|
||||||
git reset --soft HEAD~2 # To undo the 2 latest commits
|
git reset --soft HEAD~2 # To undo the 2 latest commits
|
||||||
git status # To check everything is as expected
|
git status # To check everything is as expected
|
||||||
@@ -160,13 +160,13 @@ git status # To check everything is as expected
|
|||||||
|
|
||||||
If everything is fine, then make the new combined commit:
|
If everything is fine, then make the new combined commit:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git commit # To commit the undone commits as one
|
git commit # To commit the undone commits as one
|
||||||
```
|
```
|
||||||
|
|
||||||
otherwise, you may roll back using:
|
otherwise, you may roll back using:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git reflog # To check that HEAD{1} is your previous state
|
git reflog # To check that HEAD{1} is your previous state
|
||||||
git reset --soft 'HEAD@{1}' # To roll back to your previous state
|
git reset --soft 'HEAD@{1}' # To roll back to your previous state
|
||||||
```
|
```
|
||||||
@@ -194,13 +194,13 @@ Using these tests ensures that the rclone codebase all uses the same coding stan
|
|||||||
rclone's tests are run from the go testing framework, so at the top
|
rclone's tests are run from the go testing framework, so at the top
|
||||||
level you can run this to run all the tests.
|
level you can run this to run all the tests.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go test -v ./...
|
go test -v ./...
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use `make`, if supported by your platform
|
You can also use `make`, if supported by your platform
|
||||||
|
|
||||||
```
|
```sh
|
||||||
make quicktest
|
make quicktest
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ need to make a remote called `TestDrive`.
|
|||||||
You can then run the unit tests in the drive directory. These tests
|
You can then run the unit tests in the drive directory. These tests
|
||||||
are skipped if `TestDrive:` isn't defined.
|
are skipped if `TestDrive:` isn't defined.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd backend/drive
|
cd backend/drive
|
||||||
go test -v
|
go test -v
|
||||||
```
|
```
|
||||||
@@ -229,7 +229,7 @@ You can then run the integration tests which test all of rclone's
|
|||||||
operations. Normally these get run against the local file system,
|
operations. Normally these get run against the local file system,
|
||||||
but they can be run against any of the remotes.
|
but they can be run against any of the remotes.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd fs/sync
|
cd fs/sync
|
||||||
go test -v -remote TestDrive:
|
go test -v -remote TestDrive:
|
||||||
go test -v -remote TestDrive: -fast-list
|
go test -v -remote TestDrive: -fast-list
|
||||||
@@ -242,7 +242,7 @@ If you want to use the integration test framework to run these tests
|
|||||||
altogether with an HTML report and test retries then from the
|
altogether with an HTML report and test retries then from the
|
||||||
project root:
|
project root:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go install github.com/rclone/rclone/fstest/test_all
|
go install github.com/rclone/rclone/fstest/test_all
|
||||||
test_all -backends drive
|
test_all -backends drive
|
||||||
```
|
```
|
||||||
@@ -252,14 +252,14 @@ test_all -backends drive
|
|||||||
If you want to run all the integration tests against all the remotes,
|
If you want to run all the integration tests against all the remotes,
|
||||||
then change into the project root and run
|
then change into the project root and run
|
||||||
|
|
||||||
```
|
```sh
|
||||||
make check
|
make check
|
||||||
make test
|
make test
|
||||||
```
|
```
|
||||||
|
|
||||||
The commands may require some extra go packages which you can install with
|
The commands may require some extra go packages which you can install with
|
||||||
|
|
||||||
```
|
```sh
|
||||||
make build_dep
|
make build_dep
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -390,13 +390,13 @@ change will get linked into the issue.
|
|||||||
|
|
||||||
Here is an example of a short commit message:
|
Here is an example of a short commit message:
|
||||||
|
|
||||||
```
|
```text
|
||||||
drive: add team drive support - fixes #885
|
drive: add team drive support - fixes #885
|
||||||
```
|
```
|
||||||
|
|
||||||
And here is an example of a longer one:
|
And here is an example of a longer one:
|
||||||
|
|
||||||
```
|
```text
|
||||||
mount: fix hang on errored upload
|
mount: fix hang on errored upload
|
||||||
|
|
||||||
In certain circumstances, if an upload failed then the mount could hang
|
In certain circumstances, if an upload failed then the mount could hang
|
||||||
@@ -419,7 +419,7 @@ To add a dependency `github.com/ncw/new_dependency` see the
|
|||||||
instructions below. These will fetch the dependency and add it to
|
instructions below. These will fetch the dependency and add it to
|
||||||
`go.mod` and `go.sum`.
|
`go.mod` and `go.sum`.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go get github.com/ncw/new_dependency
|
go get github.com/ncw/new_dependency
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -433,7 +433,7 @@ and `go.sum` in the same commit as your other changes.
|
|||||||
|
|
||||||
If you need to update a dependency then run
|
If you need to update a dependency then run
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go get golang.org/x/crypto
|
go get golang.org/x/crypto
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
24
RELEASE.md
24
RELEASE.md
@@ -48,7 +48,7 @@ Early in the next release cycle update the dependencies.
|
|||||||
|
|
||||||
If the `make updatedirect` upgrades the version of go in the `go.mod`
|
If the `make updatedirect` upgrades the version of go in the `go.mod`
|
||||||
|
|
||||||
```
|
```text
|
||||||
go 1.22.0
|
go 1.22.0
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ If `make updatedirect` added a `toolchain` directive then remove it.
|
|||||||
We don't want to force a toolchain on our users. Linux packagers are
|
We don't want to force a toolchain on our users. Linux packagers are
|
||||||
often using a version of Go that is a few versions out of date.
|
often using a version of Go that is a few versions out of date.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go list -m -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' all > /tmp/potential-upgrades
|
go list -m -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' all > /tmp/potential-upgrades
|
||||||
go get -d $(cat /tmp/potential-upgrades)
|
go get -d $(cat /tmp/potential-upgrades)
|
||||||
go mod tidy -go=1.22 -compat=1.22
|
go mod tidy -go=1.22 -compat=1.22
|
||||||
@@ -69,7 +69,7 @@ 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
|
package which can't be upgraded from `/tmp/potential-upgrades` when
|
||||||
done
|
done
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git co go.mod go.sum
|
git co go.mod go.sum
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ The above procedure will not upgrade major versions, so v2 to v3.
|
|||||||
However this tool can show which major versions might need to be
|
However this tool can show which major versions might need to be
|
||||||
upgraded:
|
upgraded:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go run github.com/icholy/gomajor@latest list -major
|
go run github.com/icholy/gomajor@latest list -major
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ Expect API breakage when updating major versions.
|
|||||||
|
|
||||||
At some point after the release run
|
At some point after the release run
|
||||||
|
|
||||||
```
|
```sh
|
||||||
bin/tidy-beta v1.55
|
bin/tidy-beta v1.55
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ which is a private repo containing artwork from sponsors.
|
|||||||
|
|
||||||
Create an update website branch based off the last release
|
Create an update website branch based off the last release
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git co -b update-website
|
git co -b update-website
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -164,19 +164,19 @@ If the branch already exists, double check there are no commits that need saving
|
|||||||
|
|
||||||
Now reset the branch to the last release
|
Now reset the branch to the last release
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git reset --hard v1.64.0
|
git reset --hard v1.64.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Create the changes, check them in, test with `make serve` then
|
Create the changes, check them in, test with `make serve` then
|
||||||
|
|
||||||
```
|
```sh
|
||||||
make upload_test_website
|
make upload_test_website
|
||||||
```
|
```
|
||||||
|
|
||||||
Check out https://test.rclone.org and when happy
|
Check out https://test.rclone.org and when happy
|
||||||
|
|
||||||
```
|
```sh
|
||||||
make upload_website
|
make upload_website
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -186,14 +186,14 @@ Cherry pick any changes back to master and the stable branch if it is active.
|
|||||||
|
|
||||||
To do a basic build of rclone's docker image to debug builds locally:
|
To do a basic build of rclone's docker image to debug builds locally:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
docker buildx build --load -t rclone/rclone:testing --progress=plain .
|
docker buildx build --load -t rclone/rclone:testing --progress=plain .
|
||||||
docker run --rm rclone/rclone:testing version
|
docker run --rm rclone/rclone:testing version
|
||||||
```
|
```
|
||||||
|
|
||||||
To test the multipatform build
|
To test the multipatform build
|
||||||
|
|
||||||
```
|
```sh
|
||||||
docker buildx build -t rclone/rclone:testing --progress=plain --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6 .
|
docker buildx build -t rclone/rclone:testing --progress=plain --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6 .
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -201,6 +201,6 @@ To make a full build then set the tags correctly and add `--push`
|
|||||||
|
|
||||||
Note that you can't only build one architecture - you need to build them all.
|
Note that you can't only build one architecture - you need to build them all.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
docker buildx build --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6 -t rclone/rclone:1.54.1 -t rclone/rclone:1.54 -t rclone/rclone:1 -t rclone/rclone:latest --push .
|
docker buildx build --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6 -t rclone/rclone:1.54.1 -t rclone/rclone:1.54 -t rclone/rclone:1 -t rclone/rclone:latest --push .
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ file and choose its location.)
|
|||||||
The easiest way to make the config is to run rclone with the config
|
The easiest way to make the config is to run rclone with the config
|
||||||
option:
|
option:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone config
|
rclone config
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ Rclone syncs a directory tree from one storage system to another.
|
|||||||
|
|
||||||
Its syntax is like this
|
Its syntax is like this
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone subcommand [options] <parameters> <parameters...>
|
rclone subcommand [options] <parameters> <parameters...>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ used before the `subcommand`. Anything after a `--` option will not be
|
|||||||
interpreted as an option so if you need to add a parameter which
|
interpreted as an option so if you need to add a parameter which
|
||||||
starts with a `-` then put a `--` on its own first, eg
|
starts with a `-` then put a `--` on its own first, eg
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsf -- -directory-starting-with-dash
|
rclone lsf -- -directory-starting-with-dash
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ learning rclone to avoid accidental data loss.
|
|||||||
|
|
||||||
rclone uses a system of subcommands. For example
|
rclone uses a system of subcommands. For example
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone ls remote:path # lists a remote
|
rclone ls remote:path # lists a remote
|
||||||
rclone copy /local/path remote:path # copies /local/path to the remote
|
rclone copy /local/path remote:path # copies /local/path to the remote
|
||||||
rclone sync --interactive /local/path remote:path # syncs /local/path to the remote
|
rclone sync --interactive /local/path remote:path # syncs /local/path to the remote
|
||||||
@@ -188,7 +188,7 @@ directory` if it isn't.
|
|||||||
For example, suppose you have a remote with a file in called
|
For example, suppose you have a remote with a file in called
|
||||||
`test.jpg`, then you could copy just that file like this
|
`test.jpg`, then you could copy just that file like this
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy remote:test.jpg /tmp/download
|
rclone copy remote:test.jpg /tmp/download
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -196,13 +196,13 @@ The file `test.jpg` will be placed inside `/tmp/download`.
|
|||||||
|
|
||||||
This is equivalent to specifying
|
This is equivalent to specifying
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy --files-from /tmp/files remote: /tmp/download
|
rclone copy --files-from /tmp/files remote: /tmp/download
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `/tmp/files` contains the single line
|
Where `/tmp/files` contains the single line
|
||||||
|
|
||||||
```
|
```sh
|
||||||
test.jpg
|
test.jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -248,25 +248,25 @@ the command line (or in environment variables).
|
|||||||
|
|
||||||
Here are some examples:
|
Here are some examples:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsd --http-url https://pub.rclone.org :http:
|
rclone lsd --http-url https://pub.rclone.org :http:
|
||||||
```
|
```
|
||||||
|
|
||||||
To list all the directories in the root of `https://pub.rclone.org/`.
|
To list all the directories in the root of `https://pub.rclone.org/`.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsf --http-url https://example.com :http:path/to/dir
|
rclone lsf --http-url https://example.com :http:path/to/dir
|
||||||
```
|
```
|
||||||
|
|
||||||
To list files and directories in `https://example.com/path/to/dir/`
|
To list files and directories in `https://example.com/path/to/dir/`
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy --http-url https://example.com :http:path/to/dir /tmp/dir
|
rclone copy --http-url https://example.com :http:path/to/dir /tmp/dir
|
||||||
```
|
```
|
||||||
|
|
||||||
To copy files and directories in `https://example.com/path/to/dir` to `/tmp/dir`.
|
To copy files and directories in `https://example.com/path/to/dir` to `/tmp/dir`.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy --sftp-host example.com :sftp:path/to/dir /tmp/dir
|
rclone copy --sftp-host example.com :sftp:path/to/dir /tmp/dir
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ syntax, so instead of providing the arguments as command line
|
|||||||
parameters `--http-url https://pub.rclone.org` they are provided as
|
parameters `--http-url https://pub.rclone.org` they are provided as
|
||||||
part of the remote specification as a kind of connection string.
|
part of the remote specification as a kind of connection string.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsd ":http,url='https://pub.rclone.org':"
|
rclone lsd ":http,url='https://pub.rclone.org':"
|
||||||
rclone lsf ":http,url='https://example.com':path/to/dir"
|
rclone lsf ":http,url='https://example.com':path/to/dir"
|
||||||
rclone copy ":http,url='https://example.com':path/to/dir" /tmp/dir
|
rclone copy ":http,url='https://example.com':path/to/dir" /tmp/dir
|
||||||
@@ -291,7 +291,7 @@ These can apply to modify existing remotes as well as create new
|
|||||||
remotes with the on the fly syntax. This example is equivalent to
|
remotes with the on the fly syntax. This example is equivalent to
|
||||||
adding the `--drive-shared-with-me` parameter to the remote `gdrive:`.
|
adding the `--drive-shared-with-me` parameter to the remote `gdrive:`.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsf "gdrive,shared_with_me:path/to/dir"
|
rclone lsf "gdrive,shared_with_me:path/to/dir"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -302,13 +302,13 @@ file shared on google drive to the normal drive which **does not
|
|||||||
work** because the `--drive-shared-with-me` flag applies to both the
|
work** because the `--drive-shared-with-me` flag applies to both the
|
||||||
source and the destination.
|
source and the destination.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy --drive-shared-with-me gdrive:shared-file.txt gdrive:
|
rclone copy --drive-shared-with-me gdrive:shared-file.txt gdrive:
|
||||||
```
|
```
|
||||||
|
|
||||||
However using the connection string syntax, this does work.
|
However using the connection string syntax, this does work.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy "gdrive,shared_with_me:shared-file.txt" gdrive:
|
rclone copy "gdrive,shared_with_me:shared-file.txt" gdrive:
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -317,13 +317,13 @@ backend. If for example gdriveCrypt is a crypt based on gdrive, then the
|
|||||||
following command **will not work** as intended, because
|
following command **will not work** as intended, because
|
||||||
`shared_with_me` is ignored by the crypt backend:
|
`shared_with_me` is ignored by the crypt backend:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy "gdriveCrypt,shared_with_me:shared-file.txt" gdriveCrypt:
|
rclone copy "gdriveCrypt,shared_with_me:shared-file.txt" gdriveCrypt:
|
||||||
```
|
```
|
||||||
|
|
||||||
The connection strings have the following syntax
|
The connection strings have the following syntax
|
||||||
|
|
||||||
```
|
```sh
|
||||||
remote,parameter=value,parameter2=value2:path/to/dir
|
remote,parameter=value,parameter2=value2:path/to/dir
|
||||||
:backend,parameter=value,parameter2=value2:path/to/dir
|
:backend,parameter=value,parameter2=value2:path/to/dir
|
||||||
```
|
```
|
||||||
@@ -331,7 +331,7 @@ remote,parameter=value,parameter2=value2:path/to/dir
|
|||||||
If the `parameter` has a `:` or `,` then it must be placed in quotes `"` or
|
If the `parameter` has a `:` or `,` then it must be placed in quotes `"` or
|
||||||
`'`, so
|
`'`, so
|
||||||
|
|
||||||
```
|
```sh
|
||||||
remote,parameter="colon:value",parameter2="comma,value":path/to/dir
|
remote,parameter="colon:value",parameter2="comma,value":path/to/dir
|
||||||
:backend,parameter='colon:value',parameter2='comma,value':path/to/dir
|
:backend,parameter='colon:value',parameter2='comma,value':path/to/dir
|
||||||
```
|
```
|
||||||
@@ -339,7 +339,7 @@ remote,parameter="colon:value",parameter2="comma,value":path/to/dir
|
|||||||
If a quoted value needs to include that quote, then it should be
|
If a quoted value needs to include that quote, then it should be
|
||||||
doubled, so
|
doubled, so
|
||||||
|
|
||||||
```
|
```sh
|
||||||
remote,parameter="with""quote",parameter2='with''quote':path/to/dir
|
remote,parameter="with""quote",parameter2='with''quote':path/to/dir
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -350,13 +350,13 @@ If you leave off the `=parameter` then rclone will substitute `=true`
|
|||||||
which works very well with flags. For example, to use s3 configured in
|
which works very well with flags. For example, to use s3 configured in
|
||||||
the environment you could use:
|
the environment you could use:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsd :s3,env_auth:
|
rclone lsd :s3,env_auth:
|
||||||
```
|
```
|
||||||
|
|
||||||
Which is equivalent to
|
Which is equivalent to
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsd :s3,env_auth=true:
|
rclone lsd :s3,env_auth=true:
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ If you are a shell master then you'll know which strings are OK and
|
|||||||
which aren't, but if you aren't sure then enclose them in `"` and use
|
which aren't, but if you aren't sure then enclose them in `"` and use
|
||||||
`'` as the inside quote. This syntax works on all OSes.
|
`'` as the inside quote. This syntax works on all OSes.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy ":http,url='https://example.com':path/to/dir" /tmp/dir
|
rclone copy ":http,url='https://example.com':path/to/dir" /tmp/dir
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -377,7 +377,7 @@ strings in the shell (notably `\` and `$` and `"`) so if your strings
|
|||||||
contain those you can swap the roles of `"` and `'` thus. (This syntax
|
contain those you can swap the roles of `"` and `'` thus. (This syntax
|
||||||
does not work on Windows.)
|
does not work on Windows.)
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy ':http,url="https://example.com":path/to/dir' /tmp/dir
|
rclone copy ':http,url="https://example.com":path/to/dir' /tmp/dir
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -387,13 +387,13 @@ If you supply extra configuration to a backend by command line flag,
|
|||||||
environment variable or connection string then rclone will add a
|
environment variable or connection string then rclone will add a
|
||||||
suffix based on the hash of the config to the name of the remote, eg
|
suffix based on the hash of the config to the name of the remote, eg
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone -vv lsf --s3-chunk-size 20M s3:
|
rclone -vv lsf --s3-chunk-size 20M s3:
|
||||||
```
|
```
|
||||||
|
|
||||||
Has the log message
|
Has the log message
|
||||||
|
|
||||||
```
|
```sh
|
||||||
DEBUG : s3: detected overridden config - adding "{Srj1p}" suffix to name
|
DEBUG : s3: detected overridden config - adding "{Srj1p}" suffix to name
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -404,13 +404,13 @@ This should only be noticeable in the logs.
|
|||||||
|
|
||||||
This means that on the fly backends such as
|
This means that on the fly backends such as
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone -vv lsf :s3,env_auth:
|
rclone -vv lsf :s3,env_auth:
|
||||||
```
|
```
|
||||||
|
|
||||||
Will get their own names
|
Will get their own names
|
||||||
|
|
||||||
```
|
```sh
|
||||||
DEBUG : :s3: detected overridden config - adding "{YTu53}" suffix to name
|
DEBUG : :s3: detected overridden config - adding "{YTu53}" suffix to name
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -447,13 +447,13 @@ Here are some gotchas which may help users unfamiliar with the shell rules
|
|||||||
If your names have spaces or shell metacharacters (e.g. `*`, `?`, `$`,
|
If your names have spaces or shell metacharacters (e.g. `*`, `?`, `$`,
|
||||||
`'`, `"`, etc.) then you must quote them. Use single quotes `'` by default.
|
`'`, `"`, etc.) then you must quote them. Use single quotes `'` by default.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy 'Important files?' remote:backup
|
rclone copy 'Important files?' remote:backup
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to send a `'` you will need to use `"`, e.g.
|
If you want to send a `'` you will need to use `"`, e.g.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy "O'Reilly Reviews" remote:backup
|
rclone copy "O'Reilly Reviews" remote:backup
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -465,14 +465,14 @@ shell.
|
|||||||
|
|
||||||
If your names have spaces in you need to put them in `"`, e.g.
|
If your names have spaces in you need to put them in `"`, e.g.
|
||||||
|
|
||||||
```
|
```bat
|
||||||
rclone copy "E:\folder name\folder name\folder name" remote:backup
|
rclone copy "E:\folder name\folder name\folder name" remote:backup
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are using the root directory on its own then don't quote it
|
If you are using the root directory on its own then don't quote it
|
||||||
(see [#464](https://github.com/rclone/rclone/issues/464) for why), e.g.
|
(see [#464](https://github.com/rclone/rclone/issues/464) for why), e.g.
|
||||||
|
|
||||||
```
|
```bat
|
||||||
rclone copy E:\ remote:backup
|
rclone copy E:\ remote:backup
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -486,13 +486,13 @@ file or directory like this then use the full path starting with a
|
|||||||
|
|
||||||
So to sync a directory called `sync:me` to a remote called `remote:` use
|
So to sync a directory called `sync:me` to a remote called `remote:` use
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone sync --interactive ./sync:me remote:path
|
rclone sync --interactive ./sync:me remote:path
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone sync --interactive /full/path/to/sync:me remote:path
|
rclone sync --interactive /full/path/to/sync:me remote:path
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -507,7 +507,7 @@ to copy them in place.
|
|||||||
|
|
||||||
Eg
|
Eg
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy s3:oldbucket s3:newbucket
|
rclone copy s3:oldbucket s3:newbucket
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -528,7 +528,7 @@ same.
|
|||||||
|
|
||||||
This can be used when scripting to make aged backups efficiently, e.g.
|
This can be used when scripting to make aged backups efficiently, e.g.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone sync --interactive remote:current-backup remote:previous-backup
|
rclone sync --interactive remote:current-backup remote:previous-backup
|
||||||
rclone sync --interactive /path/to/files remote:current-backup
|
rclone sync --interactive /path/to/files remote:current-backup
|
||||||
```
|
```
|
||||||
@@ -768,7 +768,7 @@ excluded by a filter rule.
|
|||||||
|
|
||||||
For example
|
For example
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone sync --interactive /path/to/local remote:current --backup-dir remote:old
|
rclone sync --interactive /path/to/local remote:current --backup-dir remote:old
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -796,7 +796,7 @@ You can use `--bind 0.0.0.0` to force rclone to use IPv4 addresses and
|
|||||||
|
|
||||||
This option controls the bandwidth limit. For example
|
This option controls the bandwidth limit. For example
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--bwlimit 10M
|
--bwlimit 10M
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -808,7 +808,7 @@ suffix B|K|M|G|T|P. The default is `0` which means to not limit bandwidth.
|
|||||||
The upload and download bandwidth can be specified separately, as
|
The upload and download bandwidth can be specified separately, as
|
||||||
`--bwlimit UP:DOWN`, so
|
`--bwlimit UP:DOWN`, so
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--bwlimit 10M:100k
|
--bwlimit 10M:100k
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -816,7 +816,7 @@ would mean limit the upload bandwidth to 10 MiB/s and the download
|
|||||||
bandwidth to 100 KiB/s. Either limit can be "off" meaning no limit, so
|
bandwidth to 100 KiB/s. Either limit can be "off" meaning no limit, so
|
||||||
to just limit the upload bandwidth you would use
|
to just limit the upload bandwidth you would use
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--bwlimit 10M:off
|
--bwlimit 10M:off
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -872,11 +872,15 @@ be unlimited.
|
|||||||
Timeslots without `WEEKDAY` are extended to the whole week. So this
|
Timeslots without `WEEKDAY` are extended to the whole week. So this
|
||||||
example:
|
example:
|
||||||
|
|
||||||
`--bwlimit "Mon-00:00,512 12:00,1M Sun-20:00,off"`
|
```sh
|
||||||
|
--bwlimit "Mon-00:00,512 12:00,1M Sun-20:00,off"
|
||||||
|
```
|
||||||
|
|
||||||
Is equivalent to this:
|
Is equivalent to this:
|
||||||
|
|
||||||
`--bwlimit "Mon-00:00,512Mon-12:00,1M Tue-12:00,1M Wed-12:00,1M Thu-12:00,1M Fri-12:00,1M Sat-12:00,1M Sun-12:00,1M Sun-20:00,off"`
|
```sh
|
||||||
|
--bwlimit "Mon-00:00,512Mon-12:00,1M Tue-12:00,1M Wed-12:00,1M Thu-12:00,1M Fri-12:00,1M Sat-12:00,1M Sun-12:00,1M Sun-20:00,off"
|
||||||
|
```
|
||||||
|
|
||||||
Bandwidth limit apply to the data transfer for all backends. For most
|
Bandwidth limit apply to the data transfer for all backends. For most
|
||||||
backends the directory listing bandwidth is also included (exceptions
|
backends the directory listing bandwidth is also included (exceptions
|
||||||
@@ -894,14 +898,14 @@ of a long running rclone transfer and to restore it back to the value specified
|
|||||||
with `--bwlimit` quickly when needed. Assuming there is only one rclone instance
|
with `--bwlimit` quickly when needed. Assuming there is only one rclone instance
|
||||||
running, you can toggle the limiter like this:
|
running, you can toggle the limiter like this:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
kill -SIGUSR2 $(pidof rclone)
|
kill -SIGUSR2 $(pidof rclone)
|
||||||
```
|
```
|
||||||
|
|
||||||
If you configure rclone with a [remote control](/rc) then you can use
|
If you configure rclone with a [remote control](/rc) then you can use
|
||||||
change the bwlimit dynamically:
|
change the bwlimit dynamically:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc core/bwlimit rate=1M
|
rclone rc core/bwlimit rate=1M
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -912,7 +916,7 @@ This option controls per file bandwidth limit. For the options see the
|
|||||||
|
|
||||||
For example use this to allow no transfers to be faster than 1 MiB/s
|
For example use this to allow no transfers to be faster than 1 MiB/s
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--bwlimit-file 1M
|
--bwlimit-file 1M
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1114,7 +1118,7 @@ beginning of a line.
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```
|
```ini
|
||||||
[megaremote]
|
[megaremote]
|
||||||
type = mega
|
type = mega
|
||||||
user = you@example.com
|
user = you@example.com
|
||||||
@@ -1199,7 +1203,7 @@ time rclone started up.
|
|||||||
This disables a comma separated list of optional features. For example
|
This disables a comma separated list of optional features. For example
|
||||||
to disable server-side move and server-side copy use:
|
to disable server-side move and server-side copy use:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--disable move,copy
|
--disable move,copy
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1207,13 +1211,13 @@ The features can be put in any case.
|
|||||||
|
|
||||||
To see a list of which features can be disabled use:
|
To see a list of which features can be disabled use:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--disable help
|
--disable help
|
||||||
```
|
```
|
||||||
|
|
||||||
The features a remote has can be seen in JSON format with:
|
The features a remote has can be seen in JSON format with:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone backend features remote:
|
rclone backend features remote:
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1252,7 +1256,7 @@ can avoid occupying too much bandwidth in a network with DiffServ support ([RFC
|
|||||||
|
|
||||||
For example, if you configured QoS on router to handle LE properly. Running:
|
For example, if you configured QoS on router to handle LE properly. Running:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy --dscp LE from:/from to:/to
|
rclone copy --dscp LE from:/from to:/to
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1344,7 +1348,7 @@ This flag is supported for all HTTP based backends even those not
|
|||||||
supported by `--header-upload` and `--header-download` so may be used
|
supported by `--header-upload` and `--header-download` so may be used
|
||||||
as a workaround for those with care.
|
as a workaround for those with care.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone ls remote:test --header "X-Rclone: Foo" --header "X-LetMeIn: Yes"
|
rclone ls remote:test --header "X-Rclone: Foo" --header "X-LetMeIn: Yes"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1353,7 +1357,7 @@ rclone ls remote:test --header "X-Rclone: Foo" --header "X-LetMeIn: Yes"
|
|||||||
Add an HTTP header for all download transactions. The flag can be repeated to
|
Add an HTTP header for all download transactions. The flag can be repeated to
|
||||||
add multiple headers.
|
add multiple headers.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone sync --interactive s3:test/src ~/dst --header-download "X-Amz-Meta-Test: Foo" --header-download "X-Amz-Meta-Test2: Bar"
|
rclone sync --interactive s3:test/src ~/dst --header-download "X-Amz-Meta-Test: Foo" --header-download "X-Amz-Meta-Test2: Bar"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1365,7 +1369,7 @@ currently supported backends.
|
|||||||
Add an HTTP header for all upload transactions. The flag can be repeated to add
|
Add an HTTP header for all upload transactions. The flag can be repeated to add
|
||||||
multiple headers.
|
multiple headers.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone sync --interactive ~/src s3:test/dst --header-upload "Content-Disposition: attachment; filename='cool.html'" --header-upload "X-Amz-Meta-Test: FooBar"
|
rclone sync --interactive ~/src s3:test/dst --header-upload "Content-Disposition: attachment; filename='cool.html'" --header-upload "X-Amz-Meta-Test: FooBar"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1493,7 +1497,7 @@ temporary file with an extension like this, where `XXXXXX` represents a
|
|||||||
hash of the source file's fingerprint and `.partial` is
|
hash of the source file's fingerprint and `.partial` is
|
||||||
[--partial-suffix](#partial-suffix) value (`.partial` by default).
|
[--partial-suffix](#partial-suffix) value (`.partial` by default).
|
||||||
|
|
||||||
```
|
```text
|
||||||
original-file-name.XXXXXX.partial
|
original-file-name.XXXXXX.partial
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1534,7 +1538,7 @@ especially with `rclone sync`.
|
|||||||
|
|
||||||
For example
|
For example
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ rclone delete --interactive /tmp/dir
|
$ rclone delete --interactive /tmp/dir
|
||||||
rclone: delete "important-file.txt"?
|
rclone: delete "important-file.txt"?
|
||||||
y) Yes, this is OK (default)
|
y) Yes, this is OK (default)
|
||||||
@@ -1667,7 +1671,7 @@ once as administrator to create the registry key in advance.
|
|||||||
severe) than or equal to the `--log-level`. For example to log DEBUG
|
severe) than or equal to the `--log-level`. For example to log DEBUG
|
||||||
to a log file but ERRORs to the event log you would use
|
to a log file but ERRORs to the event log you would use
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--log-file rclone.log --log-level DEBUG --windows-event-log ERROR
|
--log-file rclone.log --log-level DEBUG --windows-event-log ERROR
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1898,7 +1902,7 @@ it in `"`, if you want a literal `"` in an argument then enclose the
|
|||||||
argument in `"` and double the `"`. See [CSV encoding](https://godoc.org/encoding/csv)
|
argument in `"` and double the `"`. See [CSV encoding](https://godoc.org/encoding/csv)
|
||||||
for more info.
|
for more info.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--metadata-mapper "python bin/test_metadata_mapper.py"
|
--metadata-mapper "python bin/test_metadata_mapper.py"
|
||||||
--metadata-mapper 'python bin/test_metadata_mapper.py "argument with a space"'
|
--metadata-mapper 'python bin/test_metadata_mapper.py "argument with a space"'
|
||||||
--metadata-mapper 'python bin/test_metadata_mapper.py "argument with ""two"" quotes"'
|
--metadata-mapper 'python bin/test_metadata_mapper.py "argument with ""two"" quotes"'
|
||||||
@@ -2268,7 +2272,7 @@ for more info.
|
|||||||
|
|
||||||
Eg
|
Eg
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--password-command "echo hello"
|
--password-command "echo hello"
|
||||||
--password-command 'echo "hello with space"'
|
--password-command 'echo "hello with space"'
|
||||||
--password-command 'echo "hello with ""quotes"" and space"'
|
--password-command 'echo "hello with ""quotes"" and space"'
|
||||||
@@ -2472,7 +2476,7 @@ or with `--backup-dir`. See `--backup-dir` for more info.
|
|||||||
|
|
||||||
For example
|
For example
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy --interactive /path/to/local/file remote:current --suffix .bak
|
rclone copy --interactive /path/to/local/file remote:current --suffix .bak
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2483,7 +2487,7 @@ If using `rclone sync` with `--suffix` and without `--backup-dir` then
|
|||||||
it is recommended to put a filter rule in excluding the suffix
|
it is recommended to put a filter rule in excluding the suffix
|
||||||
otherwise the `sync` will delete the backup files.
|
otherwise the `sync` will delete the backup files.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone sync --interactive /path/to/local/file remote:current --suffix .bak --exclude "*.bak"
|
rclone sync --interactive /path/to/local/file remote:current --suffix .bak --exclude "*.bak"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2851,8 +2855,8 @@ have to supply the password every time you start rclone.
|
|||||||
|
|
||||||
To add a password to your rclone configuration, execute `rclone config`.
|
To add a password to your rclone configuration, execute `rclone config`.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
>rclone config
|
$ rclone config
|
||||||
Current remotes:
|
Current remotes:
|
||||||
|
|
||||||
e) Edit existing remote
|
e) Edit existing remote
|
||||||
@@ -2865,7 +2869,7 @@ e/n/d/s/q>
|
|||||||
|
|
||||||
Go into `s`, Set configuration password:
|
Go into `s`, Set configuration password:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
e/n/d/s/q> s
|
e/n/d/s/q> s
|
||||||
Your configuration is not encrypted.
|
Your configuration is not encrypted.
|
||||||
If you add a password, you will protect your login information to cloud services.
|
If you add a password, you will protect your login information to cloud services.
|
||||||
@@ -3263,7 +3267,7 @@ so it can only contain letters, digits, or the `_` (underscore) character.
|
|||||||
For example, to configure an S3 remote named `mys3:` without a config
|
For example, to configure an S3 remote named `mys3:` without a config
|
||||||
file (using unix ways of setting environment variables):
|
file (using unix ways of setting environment variables):
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ export RCLONE_CONFIG_MYS3_TYPE=s3
|
$ export RCLONE_CONFIG_MYS3_TYPE=s3
|
||||||
$ export RCLONE_CONFIG_MYS3_ACCESS_KEY_ID=XXX
|
$ export RCLONE_CONFIG_MYS3_ACCESS_KEY_ID=XXX
|
||||||
$ export RCLONE_CONFIG_MYS3_SECRET_ACCESS_KEY=XXX
|
$ export RCLONE_CONFIG_MYS3_SECRET_ACCESS_KEY=XXX
|
||||||
@@ -3283,7 +3287,7 @@ You must write the name in uppercase in the environment variable, but
|
|||||||
as seen from example above it will be listed and can be accessed in
|
as seen from example above it will be listed and can be accessed in
|
||||||
lowercase, while you can also refer to the same remote in uppercase:
|
lowercase, while you can also refer to the same remote in uppercase:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ rclone lsd mys3:
|
$ rclone lsd mys3:
|
||||||
-1 2016-09-21 12:54:21 -1 my-bucket
|
-1 2016-09-21 12:54:21 -1 my-bucket
|
||||||
$ rclone lsd MYS3:
|
$ rclone lsd MYS3:
|
||||||
@@ -3298,7 +3302,7 @@ set the access key of all remotes using S3, including myS3Crypt.
|
|||||||
Note also that now rclone has [connection strings](#connection-strings),
|
Note also that now rclone has [connection strings](#connection-strings),
|
||||||
it is probably easier to use those instead which makes the above example
|
it is probably easier to use those instead which makes the above example
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsd :s3,access_key_id=XXX,secret_access_key=XXX:
|
rclone lsd :s3,access_key_id=XXX,secret_access_key=XXX:
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -51,13 +51,13 @@ signatures on the release.
|
|||||||
|
|
||||||
To install rclone on Linux/macOS/BSD systems, run:
|
To install rclone on Linux/macOS/BSD systems, run:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo -v ; curl https://rclone.org/install.sh | sudo bash
|
sudo -v ; curl https://rclone.org/install.sh | sudo bash
|
||||||
```
|
```
|
||||||
|
|
||||||
For beta installation, run:
|
For beta installation, run:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo -v ; curl https://rclone.org/install.sh | sudo bash -s beta
|
sudo -v ; curl https://rclone.org/install.sh | sudo bash -s beta
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -69,13 +69,13 @@ won't re-download if not needed.
|
|||||||
[Beta releases](https://beta.rclone.org) are generated from each commit
|
[Beta releases](https://beta.rclone.org) are generated from each commit
|
||||||
to master. Note these are named like
|
to master. Note these are named like
|
||||||
|
|
||||||
```
|
```text
|
||||||
{Version Tag}.beta.{Commit Number}.{Git Commit Hash}
|
{Version Tag}.beta.{Commit Number}.{Git Commit Hash}
|
||||||
```
|
```
|
||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
```
|
```text
|
||||||
v1.53.0-beta.4677.b657a2204
|
v1.53.0-beta.4677.b657a2204
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -87,13 +87,13 @@ and will normally be at the end of the list.
|
|||||||
|
|
||||||
Some beta releases may have a branch name also:
|
Some beta releases may have a branch name also:
|
||||||
|
|
||||||
```
|
```text
|
||||||
{Version Tag}-beta.{Commit Number}.{Git Commit Hash}.{Branch Name}
|
{Version Tag}-beta.{Commit Number}.{Git Commit Hash}.{Branch Name}
|
||||||
```
|
```
|
||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
```
|
```text
|
||||||
v1.53.0-beta.4677.b657a2204.semver
|
v1.53.0-beta.4677.b657a2204.semver
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ If you need to configure a remote, see the [config help docs](/docs/#configure).
|
|||||||
If you are using rclone entirely with [on the fly remotes](/docs/#backend-path-to-dir),
|
If you are using rclone entirely with [on the fly remotes](/docs/#backend-path-to-dir),
|
||||||
you can create an empty config file to get rid of this notice, for example:
|
you can create an empty config file to get rid of this notice, for example:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone config touch
|
rclone config touch
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ The syncs would be incremental (on a file by file basis).
|
|||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone sync --interactive drive:Folder s3:bucket
|
rclone sync --interactive drive:Folder s3:bucket
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ rclone sync --interactive drive:Folder s3:bucket
|
|||||||
You can use rclone from multiple places at the same time if you choose
|
You can use rclone from multiple places at the same time if you choose
|
||||||
different subdirectory for the output, e.g.
|
different subdirectory for the output, e.g.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
Server A> rclone sync --interactive /tmp/whatever remote:ServerA
|
Server A> rclone sync --interactive /tmp/whatever remote:ServerA
|
||||||
Server B> rclone sync --interactive /tmp/whatever remote:ServerB
|
Server B> rclone sync --interactive /tmp/whatever remote:ServerB
|
||||||
```
|
```
|
||||||
@@ -64,7 +64,7 @@ Server B> rclone sync --interactive /tmp/whatever remote:ServerB
|
|||||||
If you sync to the same directory then you should use rclone copy
|
If you sync to the same directory then you should use rclone copy
|
||||||
otherwise the two instances of rclone may delete each other's files, e.g.
|
otherwise the two instances of rclone may delete each other's files, e.g.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
Server A> rclone copy /tmp/whatever remote:Backup
|
Server A> rclone copy /tmp/whatever remote:Backup
|
||||||
Server B> rclone copy /tmp/whatever remote:Backup
|
Server B> rclone copy /tmp/whatever remote:Backup
|
||||||
```
|
```
|
||||||
@@ -118,7 +118,7 @@ may use `http_proxy` but another one `HTTP_PROXY`. The `Go` libraries
|
|||||||
used by `rclone` will try both variations, but you may wish to set all
|
used by `rclone` will try both variations, but you may wish to set all
|
||||||
possibilities. So, on Linux, you may end up with code similar to
|
possibilities. So, on Linux, you may end up with code similar to
|
||||||
|
|
||||||
```
|
```sh
|
||||||
export http_proxy=http://proxyserver:12345
|
export http_proxy=http://proxyserver:12345
|
||||||
export https_proxy=$http_proxy
|
export https_proxy=$http_proxy
|
||||||
export HTTP_PROXY=$http_proxy
|
export HTTP_PROXY=$http_proxy
|
||||||
@@ -127,7 +127,7 @@ export HTTPS_PROXY=$http_proxy
|
|||||||
|
|
||||||
Note: If the proxy server requires a username and password, then use
|
Note: If the proxy server requires a username and password, then use
|
||||||
|
|
||||||
```
|
```sh
|
||||||
export http_proxy=http://username:password@proxyserver:12345
|
export http_proxy=http://username:password@proxyserver:12345
|
||||||
export https_proxy=$http_proxy
|
export https_proxy=$http_proxy
|
||||||
export HTTP_PROXY=$http_proxy
|
export HTTP_PROXY=$http_proxy
|
||||||
@@ -140,7 +140,7 @@ For instance "foo.com" also matches "bar.foo.com".
|
|||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
export no_proxy=localhost,127.0.0.0/8,my.host.name
|
export no_proxy=localhost,127.0.0.0/8,my.host.name
|
||||||
export NO_PROXY=$no_proxy
|
export NO_PROXY=$no_proxy
|
||||||
```
|
```
|
||||||
@@ -156,7 +156,7 @@ possibly on Solaris.
|
|||||||
Rclone (via the Go runtime) tries to load the root certificates from
|
Rclone (via the Go runtime) tries to load the root certificates from
|
||||||
these places on Linux.
|
these places on Linux.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
"/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc.
|
"/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc.
|
||||||
"/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL
|
"/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL
|
||||||
"/etc/ssl/ca-bundle.pem", // OpenSUSE
|
"/etc/ssl/ca-bundle.pem", // OpenSUSE
|
||||||
@@ -166,7 +166,7 @@ these places on Linux.
|
|||||||
So doing something like this should fix the problem. It also sets the
|
So doing something like this should fix the problem. It also sets the
|
||||||
time which is important for SSL to work properly.
|
time which is important for SSL to work properly.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
mkdir -p /etc/ssl/certs/
|
mkdir -p /etc/ssl/certs/
|
||||||
curl -o /etc/ssl/certs/ca-certificates.crt https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt
|
curl -o /etc/ssl/certs/ca-certificates.crt https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt
|
||||||
ntpclient -s -h pool.ntp.org
|
ntpclient -s -h pool.ntp.org
|
||||||
@@ -177,7 +177,7 @@ provide an additional way to provide the SSL root certificates.
|
|||||||
|
|
||||||
Note that you may need to add the `--insecure` option to the `curl` command line if it doesn't work without.
|
Note that you may need to add the `--insecure` option to the `curl` command line if it doesn't work without.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
curl --insecure -o /etc/ssl/certs/ca-certificates.crt https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt
|
curl --insecure -o /etc/ssl/certs/ca-certificates.crt https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ versions' file formats
|
|||||||
This happens when rclone cannot resolve a domain. Please check that
|
This happens when rclone cannot resolve a domain. Please check that
|
||||||
your DNS setup is generally working, e.g.
|
your DNS setup is generally working, e.g.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# both should print a long list of possible IP addresses
|
# both should print a long list of possible IP addresses
|
||||||
dig www.googleapis.com # resolve using your default DNS
|
dig www.googleapis.com # resolve using your default DNS
|
||||||
dig www.googleapis.com @8.8.8.8 # resolve with Google's DNS server
|
dig www.googleapis.com @8.8.8.8 # resolve with Google's DNS server
|
||||||
@@ -223,7 +223,7 @@ from source with CGO enabled if necessary). See the
|
|||||||
|
|
||||||
### Failed to start auth webserver on Windows ###
|
### Failed to start auth webserver on Windows ###
|
||||||
|
|
||||||
```
|
```text
|
||||||
Error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
|
Error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
|
||||||
...
|
...
|
||||||
yyyy/mm/dd hh:mm:ss Fatal error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
|
yyyy/mm/dd hh:mm:ss Fatal error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
|
||||||
@@ -233,7 +233,7 @@ This is sometimes caused by the Host Network Service causing issues with opening
|
|||||||
|
|
||||||
A simple solution may be restarting the Host Network Service with eg. Powershell
|
A simple solution may be restarting the Host Network Service with eg. Powershell
|
||||||
|
|
||||||
```
|
```pwsh
|
||||||
Restart-Service hns
|
Restart-Service hns
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ Here is a formal definition of the pattern syntax,
|
|||||||
|
|
||||||
Rclone matching rules follow a glob style:
|
Rclone matching rules follow a glob style:
|
||||||
|
|
||||||
```
|
```text
|
||||||
* matches any sequence of non-separator (/) characters
|
* matches any sequence of non-separator (/) characters
|
||||||
** matches any sequence of characters including / separators
|
** matches any sequence of characters including / separators
|
||||||
? matches any single non-separator (/) character
|
? matches any single non-separator (/) character
|
||||||
@@ -55,8 +55,7 @@ c matches character c (c != *, **, ?, \, [, {, })
|
|||||||
|
|
||||||
character-range:
|
character-range:
|
||||||
|
|
||||||
```
|
```text
|
||||||
|
|
||||||
c matches character c (c != \, -, ])
|
c matches character c (c != \, -, ])
|
||||||
\c matches reserved character c (c = \, -, ])
|
\c matches reserved character c (c = \, -, ])
|
||||||
lo - hi matches character c for lo <= c <= hi
|
lo - hi matches character c for lo <= c <= hi
|
||||||
@@ -64,14 +63,14 @@ lo - hi matches character c for lo <= c <= hi
|
|||||||
|
|
||||||
pattern-list:
|
pattern-list:
|
||||||
|
|
||||||
```
|
```text
|
||||||
pattern { , pattern }
|
pattern { , pattern }
|
||||||
comma-separated (without spaces) patterns
|
comma-separated (without spaces) patterns
|
||||||
```
|
```
|
||||||
|
|
||||||
character classes (see [Go regular expression reference](https://golang.org/pkg/regexp/syntax/)) include:
|
character classes (see [Go regular expression reference](https://golang.org/pkg/regexp/syntax/)) include:
|
||||||
|
|
||||||
```
|
```text
|
||||||
Named character classes (e.g. [\d], [^\d], [\D], [^\D])
|
Named character classes (e.g. [\d], [^\d], [\D], [^\D])
|
||||||
Perl character classes (e.g. \s, \S, \w, \W)
|
Perl character classes (e.g. \s, \S, \w, \W)
|
||||||
ASCII character classes (e.g. [[:alnum:]], [[:alpha:]], [[:punct:]], [[:xdigit:]])
|
ASCII character classes (e.g. [[:alnum:]], [[:alpha:]], [[:punct:]], [[:xdigit:]])
|
||||||
@@ -79,7 +78,7 @@ ASCII character classes (e.g. [[:alnum:]], [[:alpha:]], [[:punct:]], [[:xdigit:]
|
|||||||
|
|
||||||
regexp for advanced users to insert a regular expression - see [below](#regexp) for more info:
|
regexp for advanced users to insert a regular expression - see [below](#regexp) for more info:
|
||||||
|
|
||||||
```
|
```text
|
||||||
Any re2 regular expression not containing `}}`
|
Any re2 regular expression not containing `}}`
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -91,7 +90,7 @@ starting at the **end of the path/file name** but it only matches
|
|||||||
a complete path element - it must match from a `/`
|
a complete path element - it must match from a `/`
|
||||||
separator or the beginning of the path/file.
|
separator or the beginning of the path/file.
|
||||||
|
|
||||||
```
|
```text
|
||||||
file.jpg - matches "file.jpg"
|
file.jpg - matches "file.jpg"
|
||||||
- matches "directory/file.jpg"
|
- matches "directory/file.jpg"
|
||||||
- doesn't match "afile.jpg"
|
- doesn't match "afile.jpg"
|
||||||
@@ -105,7 +104,7 @@ The top level of the remote might not be the top level of the drive.
|
|||||||
|
|
||||||
E.g. for a Microsoft Windows local directory structure
|
E.g. for a Microsoft Windows local directory structure
|
||||||
|
|
||||||
```
|
```text
|
||||||
F:
|
F:
|
||||||
├── bkp
|
├── bkp
|
||||||
├── data
|
├── data
|
||||||
@@ -128,14 +127,14 @@ Simple patterns are case sensitive unless the `--ignore-case` flag is used.
|
|||||||
|
|
||||||
Without `--ignore-case` (default)
|
Without `--ignore-case` (default)
|
||||||
|
|
||||||
```
|
```text
|
||||||
potato - matches "potato"
|
potato - matches "potato"
|
||||||
- doesn't match "POTATO"
|
- doesn't match "POTATO"
|
||||||
```
|
```
|
||||||
|
|
||||||
With `--ignore-case`
|
With `--ignore-case`
|
||||||
|
|
||||||
```
|
```text
|
||||||
potato - matches "potato"
|
potato - matches "potato"
|
||||||
- matches "POTATO"
|
- matches "POTATO"
|
||||||
```
|
```
|
||||||
@@ -160,20 +159,20 @@ the supplied regular expression(s).
|
|||||||
Here is how the `{{regexp}}` is transformed into an full regular
|
Here is how the `{{regexp}}` is transformed into an full regular
|
||||||
expression to match the entire path:
|
expression to match the entire path:
|
||||||
|
|
||||||
```
|
```text
|
||||||
{{regexp}} becomes (^|/)(regexp)$
|
{{regexp}} becomes (^|/)(regexp)$
|
||||||
/{{regexp}} becomes ^(regexp)$
|
/{{regexp}} becomes ^(regexp)$
|
||||||
```
|
```
|
||||||
|
|
||||||
Regexp syntax can be mixed with glob syntax, for example
|
Regexp syntax can be mixed with glob syntax, for example
|
||||||
|
|
||||||
```
|
```text
|
||||||
*.{{jpe?g}} to match file.jpg, file.jpeg but not file.png
|
*.{{jpe?g}} to match file.jpg, file.jpeg but not file.png
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use regexp flags - to set case insensitive, for example
|
You can also use regexp flags - to set case insensitive, for example
|
||||||
|
|
||||||
```
|
```text
|
||||||
*.{{(?i)jpg}} to match file.jpg, file.JPG but not file.png
|
*.{{(?i)jpg}} to match file.jpg, file.JPG but not file.png
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -181,13 +180,13 @@ Be careful with wildcards in regular expressions - you don't want them
|
|||||||
to match path separators normally. To match any file name starting
|
to match path separators normally. To match any file name starting
|
||||||
with `start` and ending with `end` write
|
with `start` and ending with `end` write
|
||||||
|
|
||||||
```
|
```text
|
||||||
{{start[^/]*end\.jpg}}
|
{{start[^/]*end\.jpg}}
|
||||||
```
|
```
|
||||||
|
|
||||||
Not
|
Not
|
||||||
|
|
||||||
```
|
```text
|
||||||
{{start.*end\.jpg}}
|
{{start.*end\.jpg}}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -319,13 +318,13 @@ command specify the `--dump filters` flag.
|
|||||||
|
|
||||||
E.g. for an include rule
|
E.g. for an include rule
|
||||||
|
|
||||||
```
|
```text
|
||||||
/a/*.jpg
|
/a/*.jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
Rclone implies the directory include rule
|
Rclone implies the directory include rule
|
||||||
|
|
||||||
```
|
```text
|
||||||
/a/
|
/a/
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -341,7 +340,7 @@ access to the remote by ignoring everything outside of that directory.
|
|||||||
E.g. `rclone ls remote: --filter-from filter-list.txt` with a file
|
E.g. `rclone ls remote: --filter-from filter-list.txt` with a file
|
||||||
`filter-list.txt`:
|
`filter-list.txt`:
|
||||||
|
|
||||||
```
|
```text
|
||||||
- /dir1/
|
- /dir1/
|
||||||
- /dir2/
|
- /dir2/
|
||||||
+ *.pdf
|
+ *.pdf
|
||||||
@@ -364,7 +363,7 @@ from this pattern list.
|
|||||||
|
|
||||||
E.g. for an include rule
|
E.g. for an include rule
|
||||||
|
|
||||||
```
|
```text
|
||||||
{dir1/**,dir2/**}
|
{dir1/**,dir2/**}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -418,7 +417,7 @@ named file. The file contains a list of remarks and pattern rules.
|
|||||||
|
|
||||||
For an example `exclude-file.txt`:
|
For an example `exclude-file.txt`:
|
||||||
|
|
||||||
```
|
```text
|
||||||
# a sample exclude rule file
|
# a sample exclude rule file
|
||||||
*.bak
|
*.bak
|
||||||
file2.jpg
|
file2.jpg
|
||||||
@@ -465,14 +464,14 @@ E.g. `rclone ls remote: --include "*.{png,jpg}"` lists the files on
|
|||||||
E.g. multiple rclone copy commands can be combined with `--include` and a
|
E.g. multiple rclone copy commands can be combined with `--include` and a
|
||||||
pattern-list.
|
pattern-list.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy /vol1/A remote:A
|
rclone copy /vol1/A remote:A
|
||||||
rclone copy /vol1/B remote:B
|
rclone copy /vol1/B remote:B
|
||||||
```
|
```
|
||||||
|
|
||||||
is equivalent to:
|
is equivalent to:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy /vol1 remote: --include "{A,B}/**"
|
rclone copy /vol1 remote: --include "{A,B}/**"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -488,7 +487,7 @@ named file. The file contains a list of remarks and pattern rules.
|
|||||||
|
|
||||||
For an example `include-file.txt`:
|
For an example `include-file.txt`:
|
||||||
|
|
||||||
```
|
```text
|
||||||
# a sample include rule file
|
# a sample include rule file
|
||||||
*.jpg
|
*.jpg
|
||||||
file2.avi
|
file2.avi
|
||||||
@@ -554,7 +553,7 @@ Lines starting with # or ; are ignored, and can be used to write comments. Inlin
|
|||||||
|
|
||||||
E.g. for `filter-file.txt`:
|
E.g. for `filter-file.txt`:
|
||||||
|
|
||||||
```
|
```text
|
||||||
# a sample filter rule file
|
# a sample filter rule file
|
||||||
- secret*.jpg
|
- secret*.jpg
|
||||||
+ *.jpg
|
+ *.jpg
|
||||||
@@ -575,7 +574,7 @@ everything in the directory `dir` at the root of `remote`, except
|
|||||||
|
|
||||||
E.g. for an alternative `filter-file.txt`:
|
E.g. for an alternative `filter-file.txt`:
|
||||||
|
|
||||||
```
|
```text
|
||||||
- secret*.jpg
|
- secret*.jpg
|
||||||
+ *.jpg
|
+ *.jpg
|
||||||
+ *.png
|
+ *.png
|
||||||
@@ -588,7 +587,7 @@ Files `file1.jpg`, `file3.png` and `file2.avi` are listed whilst
|
|||||||
|
|
||||||
E.g. for an alternative `filter-file.txt`:
|
E.g. for an alternative `filter-file.txt`:
|
||||||
|
|
||||||
```
|
```text
|
||||||
+ *.jpg
|
+ *.jpg
|
||||||
+ *.gif
|
+ *.gif
|
||||||
!
|
!
|
||||||
@@ -637,7 +636,7 @@ you need the input to be processed in a raw manner.
|
|||||||
|
|
||||||
E.g. for a file `files-from.txt`:
|
E.g. for a file `files-from.txt`:
|
||||||
|
|
||||||
```
|
```text
|
||||||
# comment
|
# comment
|
||||||
file1.jpg
|
file1.jpg
|
||||||
subdir/file2.jpg
|
subdir/file2.jpg
|
||||||
@@ -646,14 +645,14 @@ subdir/file2.jpg
|
|||||||
`rclone copy --files-from files-from.txt /home/me/pics remote:pics`
|
`rclone copy --files-from files-from.txt /home/me/pics remote:pics`
|
||||||
copies the following, if they exist, and only those files.
|
copies the following, if they exist, and only those files.
|
||||||
|
|
||||||
```
|
```text
|
||||||
/home/me/pics/file1.jpg → remote:pics/file1.jpg
|
/home/me/pics/file1.jpg → remote:pics/file1.jpg
|
||||||
/home/me/pics/subdir/file2.jpg → remote:pics/subdir/file2.jpg
|
/home/me/pics/subdir/file2.jpg → remote:pics/subdir/file2.jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
E.g. to copy the following files referenced by their absolute paths:
|
E.g. to copy the following files referenced by their absolute paths:
|
||||||
|
|
||||||
```
|
```text
|
||||||
/home/user1/42
|
/home/user1/42
|
||||||
/home/user1/dir/ford
|
/home/user1/dir/ford
|
||||||
/home/user2/prefect
|
/home/user2/prefect
|
||||||
@@ -663,7 +662,7 @@ First find a common subdirectory - in this case `/home`
|
|||||||
and put the remaining files in `files-from.txt` with or without
|
and put the remaining files in `files-from.txt` with or without
|
||||||
leading `/`, e.g.
|
leading `/`, e.g.
|
||||||
|
|
||||||
```
|
```text
|
||||||
user1/42
|
user1/42
|
||||||
user1/dir/ford
|
user1/dir/ford
|
||||||
user2/prefect
|
user2/prefect
|
||||||
@@ -671,13 +670,13 @@ user2/prefect
|
|||||||
|
|
||||||
Then copy these to a remote:
|
Then copy these to a remote:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy --files-from files-from.txt /home remote:backup
|
rclone copy --files-from files-from.txt /home remote:backup
|
||||||
```
|
```
|
||||||
|
|
||||||
The three files are transferred as follows:
|
The three files are transferred as follows:
|
||||||
|
|
||||||
```
|
```text
|
||||||
/home/user1/42 → remote:backup/user1/important
|
/home/user1/42 → remote:backup/user1/important
|
||||||
/home/user1/dir/ford → remote:backup/user1/dir/file
|
/home/user1/dir/ford → remote:backup/user1/dir/file
|
||||||
/home/user2/prefect → remote:backup/user2/stuff
|
/home/user2/prefect → remote:backup/user2/stuff
|
||||||
@@ -685,7 +684,7 @@ The three files are transferred as follows:
|
|||||||
|
|
||||||
Alternatively if `/` is chosen as root `files-from.txt` will be:
|
Alternatively if `/` is chosen as root `files-from.txt` will be:
|
||||||
|
|
||||||
```
|
```text
|
||||||
/home/user1/42
|
/home/user1/42
|
||||||
/home/user1/dir/ford
|
/home/user1/dir/ford
|
||||||
/home/user2/prefect
|
/home/user2/prefect
|
||||||
@@ -693,13 +692,13 @@ Alternatively if `/` is chosen as root `files-from.txt` will be:
|
|||||||
|
|
||||||
The copy command will be:
|
The copy command will be:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone copy --files-from files-from.txt / remote:backup
|
rclone copy --files-from files-from.txt / remote:backup
|
||||||
```
|
```
|
||||||
|
|
||||||
Then there will be an extra `home` directory on the remote:
|
Then there will be an extra `home` directory on the remote:
|
||||||
|
|
||||||
```
|
```text
|
||||||
/home/user1/42 → remote:backup/home/user1/42
|
/home/user1/42 → remote:backup/home/user1/42
|
||||||
/home/user1/dir/ford → remote:backup/home/user1/dir/ford
|
/home/user1/dir/ford → remote:backup/home/user1/dir/ford
|
||||||
/home/user2/prefect → remote:backup/home/user2/prefect
|
/home/user2/prefect → remote:backup/home/user2/prefect
|
||||||
@@ -798,7 +797,7 @@ The `--hash-filter` flag enables selecting a deterministic subset of files, usef
|
|||||||
|
|
||||||
The flag takes two parameters expressed as a fraction:
|
The flag takes two parameters expressed as a fraction:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--hash-filter K/N
|
--hash-filter K/N
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -816,7 +815,7 @@ Each partition is non-overlapping, ensuring all files are covered without duplic
|
|||||||
|
|
||||||
Use `@` as `K` to randomly select a partition:
|
Use `@` as `K` to randomly select a partition:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--hash-filter @/M
|
--hash-filter @/M
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -844,7 +843,7 @@ For example, `--hash-filter @/3` will randomly select a number between 0 and 2.
|
|||||||
|
|
||||||
Assuming the current directory contains `file1.jpg` through `file9.jpg`:
|
Assuming the current directory contains `file1.jpg` through `file9.jpg`:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ rclone lsf --hash-filter 0/4 .
|
$ rclone lsf --hash-filter 0/4 .
|
||||||
file1.jpg
|
file1.jpg
|
||||||
file5.jpg
|
file5.jpg
|
||||||
@@ -869,13 +868,13 @@ file5.jpg
|
|||||||
|
|
||||||
##### Syncing the first quarter of files
|
##### Syncing the first quarter of files
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone sync --hash-filter 1/4 source:path destination:path
|
rclone sync --hash-filter 1/4 source:path destination:path
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Checking a random 1% of files for integrity
|
##### Checking a random 1% of files for integrity
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone check --download --hash-filter @/100 source:path destination:path
|
rclone check --download --hash-filter @/100 source:path destination:path
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -891,7 +890,7 @@ on the destination which are excluded from the command.
|
|||||||
|
|
||||||
E.g. the scope of `rclone sync --interactive A: B:` can be restricted:
|
E.g. the scope of `rclone sync --interactive A: B:` can be restricted:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone --min-size 50k --delete-excluded sync A: B:
|
rclone --min-size 50k --delete-excluded sync A: B:
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -917,7 +916,7 @@ This flag has a priority over other filter flags.
|
|||||||
|
|
||||||
E.g. for the following directory structure:
|
E.g. for the following directory structure:
|
||||||
|
|
||||||
```
|
```text
|
||||||
dir1/file1
|
dir1/file1
|
||||||
dir1/dir2/file2
|
dir1/dir2/file2
|
||||||
dir1/dir2/dir3/file3
|
dir1/dir2/dir3/file3
|
||||||
@@ -940,13 +939,13 @@ expressions](#regexp).
|
|||||||
For example if you wished to list only local files with a mode of
|
For example if you wished to list only local files with a mode of
|
||||||
`100664` you could do that with:
|
`100664` you could do that with:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsf -M --files-only --metadata-include "mode=100664" .
|
rclone lsf -M --files-only --metadata-include "mode=100664" .
|
||||||
```
|
```
|
||||||
|
|
||||||
Or if you wished to show files with an `atime`, `mtime` or `btime` at a given date:
|
Or if you wished to show files with an `atime`, `mtime` or `btime` at a given date:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone lsf -M --files-only --metadata-include "[abm]time=2022-12-16*" .
|
rclone lsf -M --files-only --metadata-include "[abm]time=2022-12-16*" .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -13,13 +13,13 @@ change.
|
|||||||
Run this command in a terminal and rclone will download and then
|
Run this command in a terminal and rclone will download and then
|
||||||
display the GUI in a web browser.
|
display the GUI in a web browser.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rcd --rc-web-gui
|
rclone rcd --rc-web-gui
|
||||||
```
|
```
|
||||||
|
|
||||||
This will produce logs like this and rclone needs to continue to run to serve the GUI:
|
This will produce logs like this and rclone needs to continue to run to serve the GUI:
|
||||||
|
|
||||||
```
|
```text
|
||||||
2019/08/25 11:40:14 NOTICE: A new release for gui is present at https://github.com/rclone/rclone-webui-react/releases/download/v0.0.6/currentbuild.zip
|
2019/08/25 11:40:14 NOTICE: A new release for gui is present at https://github.com/rclone/rclone-webui-react/releases/download/v0.0.6/currentbuild.zip
|
||||||
2019/08/25 11:40:14 NOTICE: Downloading webgui binary. Please wait. [Size: 3813937, Path : /home/USER/.cache/rclone/webgui/v0.0.6.zip]
|
2019/08/25 11:40:14 NOTICE: Downloading webgui binary. Please wait. [Size: 3813937, Path : /home/USER/.cache/rclone/webgui/v0.0.6.zip]
|
||||||
2019/08/25 11:40:16 NOTICE: Unzipping
|
2019/08/25 11:40:16 NOTICE: Unzipping
|
||||||
|
|||||||
@@ -29,13 +29,13 @@ signatures on the release.
|
|||||||
|
|
||||||
To install rclone on Linux/macOS/BSD systems, run:
|
To install rclone on Linux/macOS/BSD systems, run:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo -v ; curl https://rclone.org/install.sh | sudo bash
|
sudo -v ; curl https://rclone.org/install.sh | sudo bash
|
||||||
```
|
```
|
||||||
|
|
||||||
For beta installation, run:
|
For beta installation, run:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo -v ; curl https://rclone.org/install.sh | sudo bash -s beta
|
sudo -v ; curl https://rclone.org/install.sh | sudo bash -s beta
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ won't re-download if not needed.
|
|||||||
|
|
||||||
Fetch and unpack
|
Fetch and unpack
|
||||||
|
|
||||||
```
|
```sh
|
||||||
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
|
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
|
||||||
unzip rclone-current-linux-amd64.zip
|
unzip rclone-current-linux-amd64.zip
|
||||||
cd rclone-*-linux-amd64
|
cd rclone-*-linux-amd64
|
||||||
@@ -56,7 +56,7 @@ cd rclone-*-linux-amd64
|
|||||||
|
|
||||||
Copy binary file
|
Copy binary file
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo cp rclone /usr/bin/
|
sudo cp rclone /usr/bin/
|
||||||
sudo chown root:root /usr/bin/rclone
|
sudo chown root:root /usr/bin/rclone
|
||||||
sudo chmod 755 /usr/bin/rclone
|
sudo chmod 755 /usr/bin/rclone
|
||||||
@@ -64,7 +64,7 @@ sudo chmod 755 /usr/bin/rclone
|
|||||||
|
|
||||||
Install manpage
|
Install manpage
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo mkdir -p /usr/local/share/man/man1
|
sudo mkdir -p /usr/local/share/man/man1
|
||||||
sudo cp rclone.1 /usr/local/share/man/man1/
|
sudo cp rclone.1 /usr/local/share/man/man1/
|
||||||
sudo mandb
|
sudo mandb
|
||||||
@@ -72,7 +72,7 @@ sudo mandb
|
|||||||
|
|
||||||
Run `rclone config` to setup. See [rclone config docs](/docs/) for more details.
|
Run `rclone config` to setup. See [rclone config docs](/docs/) for more details.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone config
|
rclone config
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ rclone config
|
|||||||
|
|
||||||
### Installation with brew {#macos-brew}
|
### Installation with brew {#macos-brew}
|
||||||
|
|
||||||
```
|
```sh
|
||||||
brew install rclone
|
brew install rclone
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ developers so it may be out of date. Its current version is as below.
|
|||||||
|
|
||||||
On macOS, rclone can also be installed via [MacPorts](https://www.macports.org):
|
On macOS, rclone can also be installed via [MacPorts](https://www.macports.org):
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo port install rclone
|
sudo port install rclone
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -116,19 +116,19 @@ notarized it is enough to download with `curl`.
|
|||||||
|
|
||||||
Download the latest version of rclone.
|
Download the latest version of rclone.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd && curl -O https://downloads.rclone.org/rclone-current-osx-amd64.zip
|
cd && curl -O https://downloads.rclone.org/rclone-current-osx-amd64.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
Unzip the download and cd to the extracted folder.
|
Unzip the download and cd to the extracted folder.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
unzip -a rclone-current-osx-amd64.zip && cd rclone-*-osx-amd64
|
unzip -a rclone-current-osx-amd64.zip && cd rclone-*-osx-amd64
|
||||||
```
|
```
|
||||||
|
|
||||||
Move rclone to your $PATH. You will be prompted for your password.
|
Move rclone to your $PATH. You will be prompted for your password.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo mkdir -p /usr/local/bin
|
sudo mkdir -p /usr/local/bin
|
||||||
sudo mv rclone /usr/local/bin/
|
sudo mv rclone /usr/local/bin/
|
||||||
```
|
```
|
||||||
@@ -137,13 +137,13 @@ sudo mv rclone /usr/local/bin/
|
|||||||
|
|
||||||
Remove the leftover files.
|
Remove the leftover files.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd .. && rm -rf rclone-*-osx-amd64 rclone-current-osx-amd64.zip
|
cd .. && rm -rf rclone-*-osx-amd64 rclone-current-osx-amd64.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
Run `rclone config` to setup. See [rclone config docs](/docs/) for more details.
|
Run `rclone config` to setup. See [rclone config docs](/docs/) for more details.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone config
|
rclone config
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -153,14 +153,14 @@ When downloading a binary with a web browser, the browser will set the macOS
|
|||||||
gatekeeper quarantine attribute. Starting from Catalina, when attempting to run
|
gatekeeper quarantine attribute. Starting from Catalina, when attempting to run
|
||||||
`rclone`, a pop-up will appear saying:
|
`rclone`, a pop-up will appear saying:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
"rclone" cannot be opened because the developer cannot be verified.
|
"rclone" cannot be opened because the developer cannot be verified.
|
||||||
macOS cannot verify that this app is free from malware.
|
macOS cannot verify that this app is free from malware.
|
||||||
```
|
```
|
||||||
|
|
||||||
The simplest fix is to run
|
The simplest fix is to run
|
||||||
|
|
||||||
```
|
```sh
|
||||||
xattr -d com.apple.quarantine rclone
|
xattr -d com.apple.quarantine rclone
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -194,13 +194,13 @@ feature then you will need to install the third party utility
|
|||||||
|
|
||||||
To install rclone
|
To install rclone
|
||||||
|
|
||||||
```
|
```bat
|
||||||
winget install Rclone.Rclone
|
winget install Rclone.Rclone
|
||||||
```
|
```
|
||||||
|
|
||||||
To uninstall rclone
|
To uninstall rclone
|
||||||
|
|
||||||
```
|
```bat
|
||||||
winget uninstall Rclone.Rclone --force
|
winget uninstall Rclone.Rclone --force
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ winget uninstall Rclone.Rclone --force
|
|||||||
|
|
||||||
Make sure you have [Choco](https://chocolatey.org/) installed
|
Make sure you have [Choco](https://chocolatey.org/) installed
|
||||||
|
|
||||||
```
|
```bat
|
||||||
choco search rclone
|
choco search rclone
|
||||||
choco install rclone
|
choco install rclone
|
||||||
```
|
```
|
||||||
@@ -216,7 +216,7 @@ choco install rclone
|
|||||||
This will install rclone on your Windows machine. If you are planning
|
This will install rclone on your Windows machine. If you are planning
|
||||||
to use [rclone mount](/commands/rclone_mount/) then
|
to use [rclone mount](/commands/rclone_mount/) then
|
||||||
|
|
||||||
```
|
```bat
|
||||||
choco install winfsp
|
choco install winfsp
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ developers so it may be out of date. Its current version is as below.
|
|||||||
|
|
||||||
Make sure you have [Scoop](https://scoop.sh/) installed
|
Make sure you have [Scoop](https://scoop.sh/) installed
|
||||||
|
|
||||||
```
|
```bat
|
||||||
scoop install rclone
|
scoop install rclone
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ The `:latest` tag will always point to the latest stable release. You
|
|||||||
can use the `:beta` tag to get the latest build from master. You can
|
can use the `:beta` tag to get the latest build from master. You can
|
||||||
also use version tags, e.g. `:1.49.1`, `:1.49` or `:1`.
|
also use version tags, e.g. `:1.49.1`, `:1.49` or `:1`.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ docker pull rclone/rclone:latest
|
$ docker pull rclone/rclone:latest
|
||||||
latest: Pulling from rclone/rclone
|
latest: Pulling from rclone/rclone
|
||||||
Digest: sha256:0e0ced72671989bb837fea8e88578b3fc48371aa45d209663683e24cfdaa0e11
|
Digest: sha256:0e0ced72671989bb837fea8e88578b3fc48371aa45d209663683e24cfdaa0e11
|
||||||
@@ -315,7 +315,7 @@ from the rclone image.
|
|||||||
|
|
||||||
Here are some commands tested on an Ubuntu 18.04.3 host:
|
Here are some commands tested on an Ubuntu 18.04.3 host:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# config on host at ~/.config/rclone/rclone.conf
|
# config on host at ~/.config/rclone/rclone.conf
|
||||||
# data on host at ~/data
|
# data on host at ~/data
|
||||||
|
|
||||||
@@ -353,7 +353,7 @@ kill %1
|
|||||||
|
|
||||||
Make sure you have [Snapd installed](https://snapcraft.io/docs/installing-snapd)
|
Make sure you have [Snapd installed](https://snapcraft.io/docs/installing-snapd)
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
sudo snap install rclone
|
sudo snap install rclone
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -377,7 +377,7 @@ Go version 1.22 or newer is required, the latest release is recommended.
|
|||||||
You can get it from your package manager, or download it from
|
You can get it from your package manager, or download it from
|
||||||
[golang.org/dl](https://golang.org/dl/). Then you can run the following:
|
[golang.org/dl](https://golang.org/dl/). Then you can run the following:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
git clone https://github.com/rclone/rclone.git
|
git clone https://github.com/rclone/rclone.git
|
||||||
cd rclone
|
cd rclone
|
||||||
go build
|
go build
|
||||||
@@ -391,7 +391,7 @@ in the same folder. As an initial check you can now run `./rclone version`
|
|||||||
Note that on macOS and Windows the [mount](https://rclone.org/commands/rclone_mount/)
|
Note that on macOS and Windows the [mount](https://rclone.org/commands/rclone_mount/)
|
||||||
command will not be available unless you specify an additional build tag `cmount`.
|
command will not be available unless you specify an additional build tag `cmount`.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go build -tags cmount
|
go build -tags cmount
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@ You may add arguments `-ldflags -s` to omit symbol table and debug information,
|
|||||||
making the executable file smaller, and `-trimpath` to remove references to
|
making the executable file smaller, and `-trimpath` to remove references to
|
||||||
local file system paths. The official rclone releases are built with both of these.
|
local file system paths. The official rclone releases are built with both of these.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go build -trimpath -ldflags -s -tags cmount
|
go build -trimpath -ldflags -s -tags cmount
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -428,7 +428,7 @@ or `fs.VersionSuffix` (to keep default number but customize the suffix).
|
|||||||
This can be done from the build command, by adding to the `-ldflags`
|
This can be done from the build command, by adding to the `-ldflags`
|
||||||
argument value as shown below.
|
argument value as shown below.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go build -trimpath -ldflags "-s -X github.com/rclone/rclone/fs.Version=v9.9.9-test" -tags cmount
|
go build -trimpath -ldflags "-s -X github.com/rclone/rclone/fs.Version=v9.9.9-test" -tags cmount
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -439,7 +439,7 @@ It generates a Windows resource system object file, with extension .syso, e.g.
|
|||||||
`resource_windows_amd64.syso`, that will be automatically picked up by
|
`resource_windows_amd64.syso`, that will be automatically picked up by
|
||||||
future build commands.
|
future build commands.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go run bin/resource_windows.go
|
go run bin/resource_windows.go
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -451,7 +451,7 @@ override this version variable in the build command as described above, you
|
|||||||
need to do that also when generating the resource file, or else it will still
|
need to do that also when generating the resource file, or else it will still
|
||||||
use the value from the source.
|
use the value from the source.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go run bin/resource_windows.go -version v9.9.9-test
|
go run bin/resource_windows.go -version v9.9.9-test
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -461,13 +461,13 @@ followed by additional commit details, embeds version information binary resourc
|
|||||||
on Windows, and copies the resulting rclone executable into your GOPATH bin folder
|
on Windows, and copies the resulting rclone executable into your GOPATH bin folder
|
||||||
(`$(go env GOPATH)/bin`, which corresponds to `~/go/bin/rclone` by default).
|
(`$(go env GOPATH)/bin`, which corresponds to `~/go/bin/rclone` by default).
|
||||||
|
|
||||||
```
|
```sh
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
To include mount command on macOS and Windows with Makefile build:
|
To include mount command on macOS and Windows with Makefile build:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
make GOTAGS=cmount
|
make GOTAGS=cmount
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ The source will be stored it in the Go module cache, and the resulting
|
|||||||
executable will be in your GOPATH bin folder (`$(go env GOPATH)/bin`,
|
executable will be in your GOPATH bin folder (`$(go env GOPATH)/bin`,
|
||||||
which corresponds to `~/go/bin/rclone` by default).
|
which corresponds to `~/go/bin/rclone` by default).
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go install github.com/rclone/rclone@latest
|
go install github.com/rclone/rclone@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -503,7 +503,7 @@ Instructions
|
|||||||
1. `git clone https://github.com/stefangweichinger/ansible-rclone.git` into your local roles-directory
|
1. `git clone https://github.com/stefangweichinger/ansible-rclone.git` into your local roles-directory
|
||||||
2. add the role to the hosts you want rclone installed to:
|
2. add the role to the hosts you want rclone installed to:
|
||||||
|
|
||||||
```
|
```yml
|
||||||
- hosts: rclone-hosts
|
- hosts: rclone-hosts
|
||||||
roles:
|
roles:
|
||||||
- rclone
|
- rclone
|
||||||
@@ -567,7 +567,7 @@ Rclone has a built-in option `--log-file` for that.
|
|||||||
|
|
||||||
Example command to run a sync in background:
|
Example command to run a sync in background:
|
||||||
|
|
||||||
```
|
```bat
|
||||||
c:\rclone\rclone.exe sync c:\files remote:/files --no-console --log-file c:\rclone\logs\sync_files.txt
|
c:\rclone\rclone.exe sync c:\files remote:/files --no-console --log-file c:\rclone\logs\sync_files.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -630,7 +630,7 @@ Example of a PowerShell command that creates a Windows service for mounting
|
|||||||
some `remote:/files` as drive letter `X:`, for *all* users (service will be running as the
|
some `remote:/files` as drive letter `X:`, for *all* users (service will be running as the
|
||||||
local system account):
|
local system account):
|
||||||
|
|
||||||
```
|
```pwsh
|
||||||
New-Service -Name Rclone -BinaryPathName 'c:\rclone\rclone.exe mount remote:/files X: --config c:\rclone\config\rclone.conf --log-file c:\rclone\logs\mount.txt'
|
New-Service -Name Rclone -BinaryPathName 'c:\rclone\rclone.exe mount remote:/files X: --config c:\rclone\config\rclone.conf --log-file c:\rclone\logs\mount.txt'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ description: "Rclone Licence"
|
|||||||
This is free software under the terms of the MIT license (check the
|
This is free software under the terms of the MIT license (check the
|
||||||
COPYING file included with the source code).
|
COPYING file included with the source code).
|
||||||
|
|
||||||
```
|
```text
|
||||||
Copyright (C) 2019 by Nick Craig-Wood https://www.craig-wood.com/nick/
|
Copyright (C) 2019 by Nick Craig-Wood https://www.craig-wood.com/nick/
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ and to maintain backward compatibility, its behavior has not been changed.
|
|||||||
|
|
||||||
To take a specific example, the FTP backend's default encoding is
|
To take a specific example, the FTP backend's default encoding is
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--ftp-encoding "Slash,Del,Ctl,RightSpace,Dot"
|
--ftp-encoding "Slash,Del,Ctl,RightSpace,Dot"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -411,13 +411,13 @@ any of the invalid Windows characters in file names. You are backing
|
|||||||
up Linux servers to this FTP server which do have those characters in
|
up Linux servers to this FTP server which do have those characters in
|
||||||
file names. So you would add the Windows set which are
|
file names. So you would add the Windows set which are
|
||||||
|
|
||||||
```
|
```text
|
||||||
Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot
|
Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot
|
||||||
```
|
```
|
||||||
|
|
||||||
to the existing ones, giving:
|
to the existing ones, giving:
|
||||||
|
|
||||||
```
|
```text
|
||||||
Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot,Del,RightSpace
|
Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot,Del,RightSpace
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ To avoid this you can change the set of characters rclone should convert
|
|||||||
for the local filesystem, using command-line argument `--local-encoding`.
|
for the local filesystem, using command-line argument `--local-encoding`.
|
||||||
Rclone's default behavior on Windows corresponds to
|
Rclone's default behavior on Windows corresponds to
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--local-encoding "Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"
|
--local-encoding "Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -443,7 +443,7 @@ If you want to use fullwidth characters `:`, `*` and `?` in your filenames
|
|||||||
without rclone changing them when uploading to a remote, then set the same as
|
without rclone changing them when uploading to a remote, then set the same as
|
||||||
the default value but without `Colon,Question,Asterisk`:
|
the default value but without `Colon,Question,Asterisk`:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--local-encoding "Slash,LtGt,DoubleQuote,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"
|
--local-encoding "Slash,LtGt,DoubleQuote,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ rc` command.
|
|||||||
|
|
||||||
You can use it like this:
|
You can use it like this:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ rclone rc rc/noop param1=one param2=two
|
$ rclone rc rc/noop param1=one param2=two
|
||||||
{
|
{
|
||||||
"param1": "one",
|
"param1": "one",
|
||||||
@@ -193,14 +193,14 @@ $ rclone rc rc/noop param1=one param2=two
|
|||||||
If the remote is running on a different URL than the default
|
If the remote is running on a different URL than the default
|
||||||
`http://localhost:5572/`, use the `--url` option to specify it:
|
`http://localhost:5572/`, use the `--url` option to specify it:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc --url http://some.remote:1234/ rc/noop
|
rclone rc --url http://some.remote:1234/ rc/noop
|
||||||
```
|
```
|
||||||
|
|
||||||
Or, if the remote is listening on a Unix socket, use the `--unix-socket` option
|
Or, if the remote is listening on a Unix socket, use the `--unix-socket` option
|
||||||
instead:
|
instead:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc --unix-socket /tmp/rclone.sock rc/noop
|
rclone rc --unix-socket /tmp/rclone.sock rc/noop
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ remote server.
|
|||||||
`rclone rc` also supports a `--json` flag which can be used to send
|
`rclone rc` also supports a `--json` flag which can be used to send
|
||||||
more complicated input parameters.
|
more complicated input parameters.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ rclone rc --json '{ "p1": [1,"2",null,4], "p2": { "a":1, "b":2 } }' rc/noop
|
$ rclone rc --json '{ "p1": [1,"2",null,4], "p2": { "a":1, "b":2 } }' rc/noop
|
||||||
{
|
{
|
||||||
"p1": [
|
"p1": [
|
||||||
@@ -233,13 +233,13 @@ If the parameter being passed is an object then it can be passed as a
|
|||||||
JSON string rather than using the `--json` flag which simplifies the
|
JSON string rather than using the `--json` flag which simplifies the
|
||||||
command line.
|
command line.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc operations/list fs=/tmp remote=test opt='{"showHash": true}'
|
rclone rc operations/list fs=/tmp remote=test opt='{"showHash": true}'
|
||||||
```
|
```
|
||||||
|
|
||||||
Rather than
|
Rather than
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc operations/list --json '{"fs": "/tmp", "remote": "test", "opt": {"showHash": true}}'
|
rclone rc operations/list --json '{"fs": "/tmp", "remote": "test", "opt": {"showHash": true}}'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ response timing out.
|
|||||||
|
|
||||||
Starting a job with the `_async` flag:
|
Starting a job with the `_async` flag:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ rclone rc --json '{ "p1": [1,"2",null,4], "p2": { "a":1, "b":2 }, "_async": true }' rc/noop
|
$ rclone rc --json '{ "p1": [1,"2",null,4], "p2": { "a":1, "b":2 }, "_async": true }' rc/noop
|
||||||
{
|
{
|
||||||
"jobid": 2
|
"jobid": 2
|
||||||
@@ -276,7 +276,7 @@ $ rclone rc --json '{ "p1": [1,"2",null,4], "p2": { "a":1, "b":2 }, "_async": tr
|
|||||||
Query the status to see if the job has finished. For more information
|
Query the status to see if the job has finished. For more information
|
||||||
on the meaning of these return parameters see the `job/status` call.
|
on the meaning of these return parameters see the `job/status` call.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ rclone rc --json '{ "jobid":2 }' job/status
|
$ rclone rc --json '{ "jobid":2 }' job/status
|
||||||
{
|
{
|
||||||
"duration": 0.000124163,
|
"duration": 0.000124163,
|
||||||
@@ -304,7 +304,7 @@ $ rclone rc --json '{ "jobid":2 }' job/status
|
|||||||
|
|
||||||
`job/list` can be used to show the running or recently completed jobs
|
`job/list` can be used to show the running or recently completed jobs
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ rclone rc job/list
|
$ rclone rc job/list
|
||||||
{
|
{
|
||||||
"jobids": [
|
"jobids": [
|
||||||
@@ -321,27 +321,27 @@ duration of an rc call only then pass in the `_config` parameter.
|
|||||||
This should be in the same format as the `main` key returned by
|
This should be in the same format as the `main` key returned by
|
||||||
[options/get](#options-get).
|
[options/get](#options-get).
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc --loopback options/get blocks=main
|
rclone rc --loopback options/get blocks=main
|
||||||
```
|
```
|
||||||
|
|
||||||
You can see more help on these options with this command (see [the
|
You can see more help on these options with this command (see [the
|
||||||
options blocks section](#option-blocks) for more info).
|
options blocks section](#option-blocks) for more info).
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc --loopback options/info blocks=main
|
rclone rc --loopback options/info blocks=main
|
||||||
```
|
```
|
||||||
|
|
||||||
For example, if you wished to run a sync with the `--checksum`
|
For example, if you wished to run a sync with the `--checksum`
|
||||||
parameter, you would pass this parameter in your JSON blob.
|
parameter, you would pass this parameter in your JSON blob.
|
||||||
|
|
||||||
```
|
```json
|
||||||
"_config":{"CheckSum": true}
|
"_config":{"CheckSum": true}
|
||||||
```
|
```
|
||||||
|
|
||||||
If using `rclone rc` this could be passed as
|
If using `rclone rc` this could be passed as
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc sync/sync ... _config='{"CheckSum": true}'
|
rclone rc sync/sync ... _config='{"CheckSum": true}'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -352,7 +352,7 @@ Note that it is possible to set some values as strings or integers -
|
|||||||
see [data types](#data-types) for more info. Here is an example
|
see [data types](#data-types) for more info. Here is an example
|
||||||
setting the equivalent of `--buffer-size` in string or integer format.
|
setting the equivalent of `--buffer-size` in string or integer format.
|
||||||
|
|
||||||
```
|
```json
|
||||||
"_config":{"BufferSize": "42M"}
|
"_config":{"BufferSize": "42M"}
|
||||||
"_config":{"BufferSize": 44040192}
|
"_config":{"BufferSize": 44040192}
|
||||||
```
|
```
|
||||||
@@ -368,32 +368,32 @@ pass in the `_filter` parameter.
|
|||||||
This should be in the same format as the `filter` key returned by
|
This should be in the same format as the `filter` key returned by
|
||||||
[options/get](#options-get).
|
[options/get](#options-get).
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc --loopback options/get blocks=filter
|
rclone rc --loopback options/get blocks=filter
|
||||||
```
|
```
|
||||||
|
|
||||||
You can see more help on these options with this command (see [the
|
You can see more help on these options with this command (see [the
|
||||||
options blocks section](#option-blocks) for more info).
|
options blocks section](#option-blocks) for more info).
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc --loopback options/info blocks=filter
|
rclone rc --loopback options/info blocks=filter
|
||||||
```
|
```
|
||||||
|
|
||||||
For example, if you wished to run a sync with these flags
|
For example, if you wished to run a sync with these flags
|
||||||
|
|
||||||
```
|
```sh
|
||||||
--max-size 1M --max-age 42s --include "a" --include "b"
|
--max-size 1M --max-age 42s --include "a" --include "b"
|
||||||
```
|
```
|
||||||
|
|
||||||
you would pass this parameter in your JSON blob.
|
you would pass this parameter in your JSON blob.
|
||||||
|
|
||||||
```
|
```json
|
||||||
"_filter":{"MaxSize":"1M", "IncludeRule":["a","b"], "MaxAge":"42s"}
|
"_filter":{"MaxSize":"1M", "IncludeRule":["a","b"], "MaxAge":"42s"}
|
||||||
```
|
```
|
||||||
|
|
||||||
If using `rclone rc` this could be passed as
|
If using `rclone rc` this could be passed as
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rclone rc ... _filter='{"MaxSize":"1M", "IncludeRule":["a","b"], "MaxAge":"42s"}'
|
rclone rc ... _filter='{"MaxSize":"1M", "IncludeRule":["a","b"], "MaxAge":"42s"}'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ Note that it is possible to set some values as strings or integers -
|
|||||||
see [data types](#data-types) for more info. Here is an example
|
see [data types](#data-types) for more info. Here is an example
|
||||||
setting the equivalent of `--buffer-size` in string or integer format.
|
setting the equivalent of `--buffer-size` in string or integer format.
|
||||||
|
|
||||||
```
|
```json
|
||||||
"_filter":{"MinSize": "42M"}
|
"_filter":{"MinSize": "42M"}
|
||||||
"_filter":{"MinSize": 44040192}
|
"_filter":{"MinSize": 44040192}
|
||||||
```
|
```
|
||||||
@@ -423,7 +423,7 @@ value. This allows caller to group stats under their own name.
|
|||||||
|
|
||||||
Stats for specific group can be accessed by passing `group` to `core/stats`:
|
Stats for specific group can be accessed by passing `group` to `core/stats`:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ rclone rc --json '{ "group": "job/1" }' core/stats
|
$ rclone rc --json '{ "group": "job/1" }' core/stats
|
||||||
{
|
{
|
||||||
"speed": 12345
|
"speed": 12345
|
||||||
@@ -488,7 +488,7 @@ An example of this might be the `--log-level` flag. Note that the
|
|||||||
`Name` of the option becomes the command line flag with `_` replaced
|
`Name` of the option becomes the command line flag with `_` replaced
|
||||||
with `-`.
|
with `-`.
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"Advanced": false,
|
"Advanced": false,
|
||||||
"Default": 5,
|
"Default": 5,
|
||||||
@@ -547,7 +547,7 @@ isn't specified then it defaults to the root of the remote.
|
|||||||
|
|
||||||
For example this JSON is equivalent to `remote:/tmp`
|
For example this JSON is equivalent to `remote:/tmp`
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"_name": "remote",
|
"_name": "remote",
|
||||||
"_root": "/tmp"
|
"_root": "/tmp"
|
||||||
@@ -556,7 +556,7 @@ For example this JSON is equivalent to `remote:/tmp`
|
|||||||
|
|
||||||
And this is equivalent to `:sftp,host='example.com':/tmp`
|
And this is equivalent to `:sftp,host='example.com':/tmp`
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"type": "sftp",
|
"type": "sftp",
|
||||||
"host": "example.com",
|
"host": "example.com",
|
||||||
@@ -566,7 +566,7 @@ And this is equivalent to `:sftp,host='example.com':/tmp`
|
|||||||
|
|
||||||
And this is equivalent to `/tmp/dir`
|
And this is equivalent to `/tmp/dir`
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"type": "local",
|
"type": "local",
|
||||||
"_root": "/tmp/dir"
|
"_root": "/tmp/dir"
|
||||||
@@ -2374,7 +2374,7 @@ If an error occurs then there will be an HTTP error status (e.g. 500)
|
|||||||
and the body of the response will contain a JSON encoded error object,
|
and the body of the response will contain a JSON encoded error object,
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"error": "Expecting string value for key \"remote\" (was float64)",
|
"error": "Expecting string value for key \"remote\" (was float64)",
|
||||||
"input": {
|
"input": {
|
||||||
@@ -2400,13 +2400,13 @@ The response to a preflight OPTIONS request will echo the requested "Access-Cont
|
|||||||
|
|
||||||
### Using POST with URL parameters only
|
### Using POST with URL parameters only
|
||||||
|
|
||||||
```
|
```sh
|
||||||
curl -X POST 'http://localhost:5572/rc/noop?potato=1&sausage=2'
|
curl -X POST 'http://localhost:5572/rc/noop?potato=1&sausage=2'
|
||||||
```
|
```
|
||||||
|
|
||||||
Response
|
Response
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"potato": "1",
|
"potato": "1",
|
||||||
"sausage": "2"
|
"sausage": "2"
|
||||||
@@ -2415,11 +2415,11 @@ Response
|
|||||||
|
|
||||||
Here is what an error response looks like:
|
Here is what an error response looks like:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
curl -X POST 'http://localhost:5572/rc/error?potato=1&sausage=2'
|
curl -X POST 'http://localhost:5572/rc/error?potato=1&sausage=2'
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"error": "arbitrary error on input map[potato:1 sausage:2]",
|
"error": "arbitrary error on input map[potato:1 sausage:2]",
|
||||||
"input": {
|
"input": {
|
||||||
@@ -2431,7 +2431,7 @@ curl -X POST 'http://localhost:5572/rc/error?potato=1&sausage=2'
|
|||||||
|
|
||||||
Note that curl doesn't return errors to the shell unless you use the `-f` option
|
Note that curl doesn't return errors to the shell unless you use the `-f` option
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ curl -f -X POST 'http://localhost:5572/rc/error?potato=1&sausage=2'
|
$ curl -f -X POST 'http://localhost:5572/rc/error?potato=1&sausage=2'
|
||||||
curl: (22) The requested URL returned error: 400 Bad Request
|
curl: (22) The requested URL returned error: 400 Bad Request
|
||||||
$ echo $?
|
$ echo $?
|
||||||
@@ -2440,13 +2440,13 @@ $ echo $?
|
|||||||
|
|
||||||
### Using POST with a form
|
### Using POST with a form
|
||||||
|
|
||||||
```
|
```sh
|
||||||
curl --data "potato=1" --data "sausage=2" http://localhost:5572/rc/noop
|
curl --data "potato=1" --data "sausage=2" http://localhost:5572/rc/noop
|
||||||
```
|
```
|
||||||
|
|
||||||
Response
|
Response
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"potato": "1",
|
"potato": "1",
|
||||||
"sausage": "2"
|
"sausage": "2"
|
||||||
@@ -2456,13 +2456,13 @@ Response
|
|||||||
Note that you can combine these with URL parameters too with the POST
|
Note that you can combine these with URL parameters too with the POST
|
||||||
parameters taking precedence.
|
parameters taking precedence.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
curl --data "potato=1" --data "sausage=2" "http://localhost:5572/rc/noop?rutabaga=3&sausage=4"
|
curl --data "potato=1" --data "sausage=2" "http://localhost:5572/rc/noop?rutabaga=3&sausage=4"
|
||||||
```
|
```
|
||||||
|
|
||||||
Response
|
Response
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"potato": "1",
|
"potato": "1",
|
||||||
"rutabaga": "3",
|
"rutabaga": "3",
|
||||||
@@ -2473,13 +2473,13 @@ Response
|
|||||||
|
|
||||||
### Using POST with a JSON blob
|
### Using POST with a JSON blob
|
||||||
|
|
||||||
```
|
```sh
|
||||||
curl -H "Content-Type: application/json" -X POST -d '{"potato":2,"sausage":1}' http://localhost:5572/rc/noop
|
curl -H "Content-Type: application/json" -X POST -d '{"potato":2,"sausage":1}' http://localhost:5572/rc/noop
|
||||||
```
|
```
|
||||||
|
|
||||||
response
|
response
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"password": "xyz",
|
"password": "xyz",
|
||||||
"username": "xyz"
|
"username": "xyz"
|
||||||
@@ -2489,11 +2489,11 @@ response
|
|||||||
This can be combined with URL parameters too if required. The JSON
|
This can be combined with URL parameters too if required. The JSON
|
||||||
blob takes precedence.
|
blob takes precedence.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
curl -H "Content-Type: application/json" -X POST -d '{"potato":2,"sausage":1}' 'http://localhost:5572/rc/noop?rutabaga=3&potato=4'
|
curl -H "Content-Type: application/json" -X POST -d '{"potato":2,"sausage":1}' 'http://localhost:5572/rc/noop?rutabaga=3&potato=4'
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"potato": 2,
|
"potato": 2,
|
||||||
"rutabaga": "3",
|
"rutabaga": "3",
|
||||||
@@ -2512,7 +2512,7 @@ To use these, first [install go](https://golang.org/doc/install).
|
|||||||
|
|
||||||
To profile rclone's memory use you can run:
|
To profile rclone's memory use you can run:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go tool pprof -web http://localhost:5572/debug/pprof/heap
|
go tool pprof -web http://localhost:5572/debug/pprof/heap
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2521,7 +2521,7 @@ memory.
|
|||||||
|
|
||||||
You can also use the `-text` flag to produce a textual summary
|
You can also use the `-text` flag to produce a textual summary
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ go tool pprof -text http://localhost:5572/debug/pprof/heap
|
$ go tool pprof -text http://localhost:5572/debug/pprof/heap
|
||||||
Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
|
Showing nodes accounting for 1537.03kB, 100% of 1537.03kB total
|
||||||
flat flat% sum% cum cum%
|
flat flat% sum% cum cum%
|
||||||
@@ -2546,7 +2546,7 @@ alive which should have been garbage collected.
|
|||||||
|
|
||||||
See all active go routines using
|
See all active go routines using
|
||||||
|
|
||||||
```
|
```sh
|
||||||
curl http://localhost:5572/debug/pprof/goroutine?debug=1
|
curl http://localhost:5572/debug/pprof/goroutine?debug=1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user