2014-03-28 22:34:13 +00:00
---
title: "Documentation"
2015-06-06 09:05:21 +00:00
description: "Rclone Usage"
date: "2015-06-06"
2014-03-28 22:34:13 +00:00
---
Configure
---------
First you'll need to configure rclone. As the object storage systems
have quite complicated authentication these are kept in a config file
`.rclone.conf` in your home directory by default. (You can use the
2014-04-26 16:43:41 +00:00
`--config` option to choose a different config file.)
2014-03-28 22:34:13 +00:00
The easiest way to make the config is to run rclone with the config
option:
rclone config
2015-06-06 09:05:21 +00:00
See the following for detailed instructions for
2014-03-28 22:34:13 +00:00
* [Google drive ](/drive/ )
* [Amazon S3 ](/s3/ )
* [Swift / Rackspace Cloudfiles / Memset Memstore ](/swift/ )
2015-06-06 09:05:21 +00:00
* [Dropbox ](/dropbox/ )
2015-09-04 10:06:25 +00:00
* [Google Cloud Storage ](/googlecloudstorage/ )
2014-03-28 22:34:13 +00:00
* [Local filesystem ](/local/ )
2016-07-11 11:42:44 +00:00
* [Amazon Drive ](/amazonclouddrive/ )
2016-01-07 15:20:32 +00:00
* [Backblaze B2 ](/b2/ )
* [Hubic ](/hubic/ )
* [Microsoft One Drive ](/onedrive/ )
* [Yandex Disk ](/yandex/ )
2014-03-28 22:34:13 +00:00
Usage
-----
Rclone syncs a directory tree from one storage system to another.
Its syntax is like this
Syntax: [options] subcommand < parameters > < parameters... >
Source and destination paths are specified by the name you gave the
storage system in the config file then the sub path, eg
"drive:myfolder" to look at "myfolder" in Google drive.
You can define as many storage paths as you like in the config file.
Subcommands
-----------
2015-06-06 09:05:21 +00:00
### rclone copy source:path dest:path ###
2014-03-28 22:34:13 +00:00
Copy the source to the destination. Doesn't transfer
2015-05-10 11:17:24 +00:00
unchanged files, testing by size and modification time or
2014-03-28 22:34:13 +00:00
MD5SUM. Doesn't delete files from the destination.
2016-01-31 16:27:19 +00:00
Note that it is always the contents of the directory that is synced,
not the directory so when source:path is a directory, it's the
contents of source:path that are copied, not the directory name and
contents.
If dest:path doesn't exist, it is created and the source:path contents
go there.
For example
rclone copy source:sourcepath dest:destpath
Let's say there are two files in sourcepath
sourcepath/one.txt
sourcepath/two.txt
This copies them to
destpath/one.txt
destpath/two.txt
Not to
destpath/sourcepath/one.txt
destpath/sourcepath/two.txt
If you are familiar with `rsync` , rclone always works as if you had
written a trailing / - meaning "copy the contents of this directory".
This applies to all commands and whether you are talking about the
source or destination.
2016-06-25 13:28:26 +00:00
See the `--no-traverse` option for controlling whether rclone lists
the destination directory or not.
2015-06-06 09:05:21 +00:00
### rclone sync source:path dest:path ###
2014-03-28 22:34:13 +00:00
2015-05-10 11:17:24 +00:00
Sync the source to the destination, changing the destination
only. Doesn't transfer unchanged files, testing by size and
modification time or MD5SUM. Destination is updated to match
2016-01-29 07:59:33 +00:00
source, including deleting files if necessary.
**Important**: Since this can cause data loss, test first with the
2016-01-31 15:53:09 +00:00
`--dry-run` flag to see exactly what would be copied and deleted.
2014-03-28 22:34:13 +00:00
2016-01-10 10:43:59 +00:00
Note that files in the destination won't be deleted if there were any
errors at any point.
2016-01-31 16:27:19 +00:00
It is always the contents of the directory that is synced, not the
directory so when source:path is a directory, it's the contents of
source:path that are copied, not the directory name and contents. See
extended explanation in the `copy` command above if unsure.
If dest:path doesn't exist, it is created and the source:path contents
go there.
2016-02-25 20:05:34 +00:00
### move source:path dest:path ###
2016-07-11 10:36:46 +00:00
Moves the contents of the source directory to the destination
directory. Rclone will error if the source and destination overlap.
If no filters are in use and if possible this will server side move
`source:path` into `dest:path` . After this `source:path` will no
longer longer exist.
Otherwise for each file in `source:path` selected by the filters (if
any) this will move it into `dest:path` . If possible a server side
move will be used, otherwise it will copy it (server side if possible)
into `dest:path` then delete the original (if no errors on copy) in
`source:path` .
2016-02-25 20:05:34 +00:00
**Important**: Since this can cause data loss, test first with the
--dry-run flag.
2015-10-02 18:48:48 +00:00
### rclone ls remote:path ###
2014-03-28 22:34:13 +00:00
2016-04-20 02:50:28 +00:00
List all the objects in the path with size and path.
2015-02-28 13:08:18 +00:00
2015-10-02 18:48:48 +00:00
### rclone lsd remote:path ###
2015-02-28 13:08:18 +00:00
List all directories/containers/buckets in the the path.
2014-07-17 19:03:11 +00:00
2015-10-02 18:48:48 +00:00
### rclone lsl remote:path ###
2014-07-17 19:03:11 +00:00
2015-05-10 11:17:24 +00:00
List all the objects in the the path with modification time,
size and path.
2014-03-28 22:34:13 +00:00
2015-10-02 18:48:48 +00:00
### rclone md5sum remote:path ###
2014-03-28 22:34:13 +00:00
2015-02-28 13:08:18 +00:00
Produces an md5sum file for all the objects in the path. This
is in the same format as the standard md5sum tool produces.
2014-03-28 22:34:13 +00:00
2016-01-11 12:39:33 +00:00
### rclone sha1sum remote:path ###
Produces an sha1sum file for all the objects in the path. This
is in the same format as the standard sha1sum tool produces.
2015-10-02 18:48:48 +00:00
### rclone size remote:path ###
Prints the total size of objects in remote:path and the number of
objects.
2015-06-06 09:05:21 +00:00
### rclone mkdir remote:path ###
2014-03-28 22:34:13 +00:00
Make the path if it doesn't already exist
2015-06-06 09:05:21 +00:00
### rclone rmdir remote:path ###
2014-03-28 22:34:13 +00:00
Remove the path. Note that you can't remove a path with
objects in it, use purge for that.
2015-06-06 09:05:21 +00:00
### rclone purge remote:path ###
2014-03-28 22:34:13 +00:00
2015-12-02 22:25:32 +00:00
Remove the path and all of its contents. Note that this does not obey
include/exclude filters - everything will be removed. Use `delete` if
you want to selectively delete files.
### rclone delete remote:path ###
Remove the contents of path. Unlike `purge` it obeys include/exclude
filters so can be used to selectively delete files.
Eg delete all files bigger than 100MBytes
Check what would be deleted first (use either)
rclone --min-size 100M lsl remote:path
rclone --dry-run --min-size 100M delete remote:path
Then delete
rclone --min-size 100M delete remote:path
That reads "delete everything with a minimum size of 100 MB", hence
delete all files bigger than 100MBytes.
2014-03-28 22:34:13 +00:00
2015-06-06 09:05:21 +00:00
### rclone check source:path dest:path ###
2014-03-28 22:34:13 +00:00
Checks the files in the source and destination match. It
compares sizes and MD5SUMs and prints a report of files which
don't match. It doesn't alter the source or destination.
2016-04-07 13:56:27 +00:00
`--size-only` may be used to only compare the sizes, not the MD5SUMs.
2016-07-01 15:35:36 +00:00
### rclone cleanup remote:path ###
Clean up the remote if possible. Empty the trash or delete old file
versions. Not supported by all remotes.
2016-01-31 12:58:41 +00:00
### rclone dedupe remote:path ###
2016-03-05 16:10:51 +00:00
By default `dedup` interactively finds duplicate files and offers to
delete all but one or rename them to be different. Only useful with
Google Drive which can have duplicate file names.
The `dedupe` command will delete all but one of any identical (same
md5sum) files it finds without confirmation. This means that for most
duplicated files the `dedupe` command will not be interactive. You
can use `--dry-run` to see what would happen without doing anything.
Here is an example run.
Before - with duplicates
```
$ rclone lsl drive:dupes
6048320 2016-03-05 16:23:16.798000000 one.txt
6048320 2016-03-05 16:23:11.775000000 one.txt
564374 2016-03-05 16:23:06.731000000 one.txt
6048320 2016-03-05 16:18:26.092000000 one.txt
6048320 2016-03-05 16:22:46.185000000 two.txt
1744073 2016-03-05 16:22:38.104000000 two.txt
564374 2016-03-05 16:22:52.118000000 two.txt
```
Now the `dedupe` session
2016-01-31 12:58:41 +00:00
```
$ rclone dedupe drive:dupes
2016-03-05 16:10:51 +00:00
2016/03/05 16:24:37 Google drive root 'dupes': Looking for duplicates using interactive mode.
one.txt: Found 4 duplicates - deleting identical copies
one.txt: Deleting 2/3 identical duplicates (md5sum "1eedaa9fe86fd4b8632e2ac549403b36")
one.txt: 2 duplicates remain
1: 6048320 bytes, 2016-03-05 16:23:16.798000000, md5sum 1eedaa9fe86fd4b8632e2ac549403b36
2: 564374 bytes, 2016-03-05 16:23:06.731000000, md5sum 7594e7dc9fc28f727c42ee3e0749de81
s) Skip and do nothing
k) Keep just one (choose which in next step)
r) Rename all to be different (by changing file.jpg to file-1.jpg)
s/k/r> k
Enter the number of the file to keep> 1
one.txt: Deleted 1 extra copies
two.txt: Found 3 duplicates - deleting identical copies
two.txt: 3 duplicates remain
1: 564374 bytes, 2016-03-05 16:22:52.118000000, md5sum 7594e7dc9fc28f727c42ee3e0749de81
2: 6048320 bytes, 2016-03-05 16:22:46.185000000, md5sum 1eedaa9fe86fd4b8632e2ac549403b36
3: 1744073 bytes, 2016-03-05 16:22:38.104000000, md5sum 851957f7fb6f0bc4ce76be966d336802
2016-01-31 12:58:41 +00:00
s) Skip and do nothing
k) Keep just one (choose which in next step)
r) Rename all to be different (by changing file.jpg to file-1.jpg)
s/k/r> r
two-1.txt: renamed from: two.txt
two-2.txt: renamed from: two.txt
two-3.txt: renamed from: two.txt
```
The result being
```
$ rclone lsl drive:dupes
2016-03-05 16:10:51 +00:00
6048320 2016-03-05 16:23:16.798000000 one.txt
564374 2016-03-05 16:22:52.118000000 two-1.txt
6048320 2016-03-05 16:22:46.185000000 two-2.txt
1744073 2016-03-05 16:22:38.104000000 two-3.txt
2016-01-31 12:58:41 +00:00
```
2016-03-05 16:10:51 +00:00
Dedupe can be run non interactively using the `--dedupe-mode` flag.
* `--dedupe-mode interactive` - interactive as above.
* `--dedupe-mode skip` - removes identical files then skips anything left.
* `--dedupe-mode first` - removes identical files then keeps the first one.
* `--dedupe-mode newest` - removes identical files then keeps the newest one.
* `--dedupe-mode oldest` - removes identical files then keeps the oldest one.
* `--dedupe-mode rename` - removes identical files then renames the rest to be different.
For example to rename all the identically named photos in your Google Photos directory, do
rclone dedupe --dedupe-mode rename "drive:Google Photos"
2016-08-03 17:00:25 +00:00
The modes can also be passed as an extra parameter, eg
rclone dedupe rename "drive:Google Photos"
2015-06-06 09:05:21 +00:00
### rclone config ###
2015-02-28 13:08:18 +00:00
Enter an interactive configuration session.
2015-06-06 09:05:21 +00:00
### rclone help ###
Prints help on rclone commands and options.
2016-06-26 20:10:20 +00:00
Copying single files
--------------------
rclone normally syncs or copies directories. However if the source
remote points to a file, rclone will just copy that file. The
destination remote must point to a directory - rclone will give the
error `Failed to create file system for "remote:file": is a file not a
directory` if it isn't.
For example, suppose you have a remote with a file in called
`test.jpg` , then you could copy just that file like this
rclone copy remote:test.jpg /tmp/download
The file `test.jpg` will be placed inside `/tmp/download` .
This is equivalent to specifying
rclone copy --no-traverse --files-from /tmp/files remote: /tmp/download
Where `/tmp/files` contains the single line
test.jpg
It is recommended to use `copy` when copying single files not `sync` .
They have pretty much the same effect but `copy` will use a lot less
memory.
2016-06-17 15:28:50 +00:00
Quoting and the shell
---------------------
When you are typing commands to your computer you are using something
called the command line shell. This interprets various characters in
an OS specific way.
Here are some gotchas which may help users unfamiliar with the shell rules
### Linux / OSX ###
If your names have spaces or shell metacharacters (eg `*` , `?` , `$` ,
`'` , `"` etc) then you must quote them. Use single quotes `'` by default.
rclone copy 'Important files?' remote:backup
If you want to send a `'` you will need to use `"` , eg
rclone copy "O'Reilly Reviews" remote:backup
The rules for quoting metacharacters are complicated and if you want
the full details you'll have to consult the manual page for your
shell.
### Windows ###
If your names have spaces in you need to put them in `"` , eg
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
(see [#464 ](https://github.com/ncw/rclone/issues/464 ) for why), eg
rclone copy E:\ remote:backup
2015-02-14 18:48:08 +00:00
Server Side Copy
----------------
Drive, S3, Dropbox, Swift and Google Cloud Storage support server side
copy.
This means if you want to copy one folder to another then rclone won't
download all the files and re-upload them; it will instruct the server
to copy them in place.
Eg
rclone copy s3:oldbucket s3:newbucket
Will copy the contents of `oldbucket` to `newbucket` without
downloading and re-uploading.
Remotes which don't support server side copy (eg local) **will**
download and re-upload in this case.
Server side copies are used with `sync` and `copy` and will be
identified in the log when using the `-v` flag.
Server side copies will only be attempted if the remote names are the
same.
This can be used when scripting to make aged backups efficiently, eg
rclone sync remote:current-backup remote:previous-backup
rclone sync /path/to/files remote:current-backup
2015-06-06 09:05:21 +00:00
Options
2014-03-28 22:34:13 +00:00
-------
2015-06-06 09:05:21 +00:00
Rclone has a number of options to control its behaviour.
2014-03-28 22:34:13 +00:00
2015-06-06 09:05:21 +00:00
Options which use TIME use the go time parser. A duration string is a
possibly signed sequence of decimal numbers, each with optional
fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid
time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
2014-03-28 22:34:13 +00:00
2016-06-03 20:16:48 +00:00
Options which use SIZE use kByte by default. However a suffix of `b`
for bytes, `k` for kBytes, `M` for MBytes and `G` for GBytes may be
used. These are the binary units, eg 1, 2\*\*10, 2\*\*20, 2\*\*30
respectively.
2014-03-28 22:34:13 +00:00
2015-06-06 09:05:21 +00:00
### --bwlimit=SIZE ###
2014-03-28 22:34:13 +00:00
2016-06-03 20:16:48 +00:00
Bandwidth limit in kBytes/s, or use suffix b|k|M|G. The default is `0`
2015-06-06 09:05:21 +00:00
which means to not limit bandwidth.
2014-03-28 22:34:13 +00:00
2015-06-06 09:05:21 +00:00
For example to limit bandwidth usage to 10 MBytes/s use `--bwlimit 10M`
2014-03-28 22:34:13 +00:00
2015-06-06 09:05:21 +00:00
This only limits the bandwidth of the data transfer, it doesn't limit
the bandwith of the directory listings etc.
2014-03-28 22:34:13 +00:00
2015-06-06 09:05:21 +00:00
### --checkers=N ###
The number of checkers to run in parallel. Checkers do the equality
checking of files during a sync. For some storage systems (eg s3,
swift, dropbox) this can take a significant amount of time so they are
run in parallel.
The default is to run 8 checkers in parallel.
### -c, --checksum ###
Normally rclone will look at modification time and size of files to
see if they are equal. If you set this flag then rclone will check
2016-01-13 10:29:43 +00:00
the file hash and size to determine if files are equal.
This is useful when the remote doesn't support setting modified time
and a more accurate sync is desired than just checking the file size.
2015-06-06 09:05:21 +00:00
This is very useful when transferring between remotes which store the
2016-01-13 10:29:43 +00:00
same hash type on the object, eg Drive and Swift. For details of which
remotes support which hash type see the table in the [overview
section](/overview/).
2015-06-06 09:05:21 +00:00
Eg `rclone --checksum sync s3:/bucket swift:/bucket` would run much
quicker than without the `--checksum` flag.
When using this flag, rclone won't update mtimes of remote files if
they are incorrect as it would normally.
### --config=CONFIG_FILE ###
Specify the location of the rclone config file. Normally this is in
your home directory as a file called `.rclone.conf` . If you run
`rclone -h` and look at the help for the `--config` option you will
see where the default location is for you. Use this flag to override
the config location, eg `rclone --config=".myconfig" .config` .
### --contimeout=TIME ###
Set the connection timeout. This should be in go time format which
looks like `5s` for 5 seconds, `10m` for 10 minutes, or `3h30m` .
The connection timeout is the amount of time rclone will wait for a
connection to go through to a remote object storage system. It is
`1m` by default.
2016-03-05 16:10:51 +00:00
### --dedupe-mode MODE ###
Mode to run dedupe command in. One of `interactive` , `skip` , `first` , `newest` , `oldest` , `rename` . The default is `interactive` . See the dedupe command for more information as to what these options mean.
2015-06-06 09:05:21 +00:00
### -n, --dry-run ###
2016-01-31 15:53:09 +00:00
Do a trial run with no permanent changes. Use this to see what rclone
would do without actually doing it. Useful when setting up the `sync`
command which deletes files in the destination.
2015-06-06 09:05:21 +00:00
2016-01-10 12:04:20 +00:00
### --ignore-existing ###
Using this option will make rclone unconditionally skip all files
that exist on the destination, no matter the content of these files.
While this isn't a generally recommended option, it can be useful
in cases where your files change due to encryption. However, it cannot
correct partial transfers in case a transfer was interrupted.
2016-06-17 16:20:08 +00:00
### --ignore-size ###
Normally rclone will look at modification time and size of files to
see if they are equal. If you set this flag then rclone will check
only the modification time. If `--checksum` is set then it only
checks the checksum.
It will also cause rclone to skip verifying the sizes are the same
after transfer.
This can be useful for transferring files to and from onedrive which
occasionally misreports the size of image files (see
[#399 ](https://github.com/ncw/rclone/issues/399 ) for more info).
2016-03-22 17:02:27 +00:00
### -I, --ignore-times ###
Using this option will cause rclone to unconditionally upload all
files regardless of the state of files on the destination.
Normally rclone would skip any files that have the same
modification time and are the same size (or have the same checksum if
using `--checksum` ).
2015-06-06 09:05:21 +00:00
### --log-file=FILE ###
Log all of rclone's output to FILE. This is not active by default.
This can be useful for tracking down problems with syncs in
2016-06-04 17:49:27 +00:00
combination with the `-v` flag. See the Logging section for more
info.
2015-06-06 09:05:21 +00:00
2016-01-12 17:38:28 +00:00
### --low-level-retries NUMBER ###
This controls the number of low level retries rclone does.
A low level retry is used to retry a failing operation - typically one
HTTP request. This might be uploading a chunk of a big file for
example. You will see low level retries in the log with the `-v`
flag.
This shouldn't need to be changed from the default in normal
operations, however if you get a lot of low level retries you may wish
to reduce the value so rclone moves on to a high level retry (see the
`--retries` flag) quicker.
Disable low level retries with `--low-level-retries 1` .
2016-06-02 20:02:44 +00:00
### --max-depth=N ###
This modifies the recursion depth for all the commands except purge.
So if you do `rclone --max-depth 1 ls remote:path` you will see only
the files in the top level directory. Using `--max-depth 2` means you
will see all the files in first two directory levels and so on.
For historical reasons the `lsd` command defaults to using a
`--max-depth` of 1 - you can override this with the command line flag.
You can use this command to disable recursion (with `--max-depth 1` ).
Note that if you use this with `sync` and `--delete-excluded` the
files not recursed through are considered excluded and will be deleted
on the destination. Test first with `--dry-run` if you are not sure
what will happen.
2015-06-06 09:05:21 +00:00
### --modify-window=TIME ###
When checking whether a file has been modified, this is the maximum
allowed time difference that a file can have and still be considered
equivalent.
The default is `1ns` unless this is overridden by a remote. For
example OS X only stores modification times to the nearest second so
if you are reading and writing to an OS X filing system this will be
`1s` by default.
This command line flag allows you to override that computed default.
2016-02-14 18:14:41 +00:00
### --no-gzip-encoding ###
Don't set `Accept-Encoding: gzip` . This means that rclone won't ask
the server for compressed files automatically. Useful if you've set
the server to return files with `Content-Encoding: gzip` but you
uploaded compressed files.
There is no need to set this in normal operation, and doing so will
decrease the network transfer efficiency of rclone.
2016-07-12 09:46:45 +00:00
### --no-update-modtime ###
When using this flag, rclone won't update modification times of remote
files if they are incorrect as it would normally.
This can be used if the remote is being synced with another tool also
(eg the Google Drive client).
2015-06-06 09:05:21 +00:00
### -q, --quiet ###
Normally rclone outputs stats and a completion message. If you set
this flag it will make as little output as possible.
2016-01-10 12:04:20 +00:00
### --retries int ###
Retry the entire sync if it fails this many times it fails (default 3).
Some remotes can be unreliable and a few retries helps pick up the
files which didn't get transferred because of errors.
Disable retries with `--retries 1` .
2015-06-06 09:05:21 +00:00
### --size-only ###
Normally rclone will look at modification time and size of files to
see if they are equal. If you set this flag then rclone will check
only the size.
This can be useful transferring files from dropbox which have been
modified by the desktop sync client which doesn't set checksums of
modification times in the same way as rclone.
### --stats=TIME ###
Rclone will print stats at regular intervals to show its progress.
This sets the interval.
The default is `1m` . Use 0 to disable.
2016-01-12 13:33:03 +00:00
### --delete-(before,during,after) ###
This option allows you to specify when files on your destination are
deleted when you sync folders.
2016-06-25 13:28:26 +00:00
Specifying the value `--delete-before` will delete all files present
on the destination, but not on the source *before* starting the
transfer of any new or updated files. This uses extra memory as it
has to store the source listing before proceeding.
2016-01-12 13:33:03 +00:00
2016-06-25 13:28:26 +00:00
Specifying `--delete-during` (default value) will delete files while
checking and uploading files. This is usually the fastest option.
Currently this works the same as `--delete-after` but it may change in
the future.
2016-01-12 13:33:03 +00:00
Specifying `--delete-after` will delay deletion of files until all new/updated
files have been successfully transfered.
2015-06-06 09:05:21 +00:00
### --timeout=TIME ###
This sets the IO idle timeout. If a transfer has started but then
becomes idle for this long it is considered broken and disconnected.
The default is `5m` . Set to 0 to disable.
### --transfers=N ###
The number of file transfers to run in parallel. It can sometimes be
useful to set this to a smaller number if the remote is giving a lot
of timeouts or bigger if you have lots of bandwidth and a fast remote.
The default is to run 4 file transfers in parallel.
2016-02-29 17:46:40 +00:00
### -u, --update ###
This forces rclone to skip any files which exist on the destination
and have a modified time that is newer than the source file.
If an existing destination file has a modification time equal (within
the computed modify window precision) to the source file's, it will be
updated if the sizes are different.
On remotes which don't support mod time directly the time checked will
be the uploaded time. This means that if uploading to one of these
remoes, rclone will skip any files which exist on the destination and
have an uploaded time that is newer than the modification time of the
source file.
This can be useful when transferring to a remote which doesn't support
mod times directly as it is more accurate than a `--size-only` check
and faster than using `--checksum` .
2015-06-06 09:05:21 +00:00
### -v, --verbose ###
If you set this flag, rclone will become very verbose telling you
about every file it considers and transfers.
Very useful for debugging.
### -V, --version ###
Prints the version number
2016-02-16 15:25:27 +00:00
Configuration Encryption
------------------------
Your configuration file contains information for logging in to
your cloud services. This means that you should keep your
`.rclone.conf` file in a secure location.
If you are in an environment where that isn't possible, you can
add a password to your configuration. This means that you will
have to enter the password every time you start rclone.
To add a password to your rclone configuration, execute `rclone config` .
```
>rclone config
Current remotes:
e) Edit existing remote
n) New remote
d) Delete remote
s) Set configuration password
q) Quit config
e/n/d/s/q>
```
Go into `s` , Set configuration password:
```
e/n/d/s/q> s
Your configuration is not encrypted.
If you add a password, you will protect your login information to cloud services.
a) Add Password
q) Quit to main menu
a/q> a
Enter NEW configuration password:
2016-03-29 20:10:35 +00:00
password:
2016-02-16 15:25:27 +00:00
Confirm NEW password:
2016-03-29 20:10:35 +00:00
password:
2016-02-16 15:25:27 +00:00
Password set
Your configuration is encrypted.
c) Change Password
u) Unencrypt configuration
q) Quit to main menu
c/u/q>
```
Your configuration is now encrypted, and every time you start rclone
you will now be asked for the password. In the same menu you can
change the password or completely remove encryption from your
configuration.
There is no way to recover the configuration if you lose your password.
rclone uses [nacl secretbox ](https://godoc.org/golang.org/x/crypto/nacl/secretbox )
2016-04-20 02:50:28 +00:00
which in turn uses XSalsa20 and Poly1305 to encrypt and authenticate
2016-02-16 15:25:27 +00:00
your configuration with secret-key cryptography.
The password is SHA-256 hashed, which produces the key for secretbox.
The hashed password is not stored.
While this provides very good security, we do not recommend storing
2016-04-20 02:50:28 +00:00
your encrypted rclone configuration in public if it contains sensitive
2016-02-16 15:25:27 +00:00
information, maybe except if you use a very strong password.
If it is safe in your environment, you can set the `RCLONE_CONFIG_PASS`
environment variable to contain your password, in which case it will be
used for decrypting the configuration.
2016-02-17 10:45:05 +00:00
If you are running rclone inside a script, you might want to disable
password prompts. To do that, pass the parameter
`--ask-password=false` to rclone. This will make rclone fail instead
2016-04-20 02:50:28 +00:00
of asking for a password if `RCLONE_CONFIG_PASS` doesn't contain
2016-02-17 10:45:05 +00:00
a valid password.
2016-02-16 15:25:27 +00:00
2015-06-06 09:05:21 +00:00
Developer options
-----------------
2014-03-28 22:34:13 +00:00
2015-06-06 09:05:21 +00:00
These options are useful when developing or debugging rclone. There
are also some more remote specific options which aren't documented
here which are used for testing. These start with remote name eg
2016-01-10 12:04:20 +00:00
`--drive-test-option` - see the docs for the remote in question.
2014-03-28 22:34:13 +00:00
2015-06-06 09:05:21 +00:00
### --cpuprofile=FILE ###
2014-03-28 22:34:13 +00:00
2016-01-10 12:04:20 +00:00
Write CPU profile to file. This can be analysed with `go tool pprof` .
### --dump-bodies ###
Dump HTTP headers and bodies - may contain sensitive info. Can be
very verbose. Useful for debugging only.
### --dump-filters ###
Dump the filters to the output. Useful to see exactly what include
and exclude options are filtering on.
### --dump-headers ###
Dump HTTP headers - may contain sensitive info. Can be very verbose.
Useful for debugging only.
### --memprofile=FILE ###
Write memory profile to file. This can be analysed with `go tool pprof` .
2015-09-27 15:13:20 +00:00
2015-10-29 15:42:25 +00:00
### --no-check-certificate=true/false ###
`--no-check-certificate` controls whether a client verifies the
server's certificate chain and host name.
If `--no-check-certificate` is true, TLS accepts any certificate
presented by the server and any host name in that certificate.
In this mode, TLS is susceptible to man-in-the-middle attacks.
This option defaults to `false` .
**This should be used only for testing.**
2016-06-25 13:28:26 +00:00
### --no-traverse ###
The `--no-traverse` flag controls whether the destination file system
is traversed when using the `copy` or `move` commands.
If you are only copying a small number of files and/or have a large
number of files on the destination then `--no-traverse` will stop
rclone listing the destination and save time.
However if you are copying a large number of files, escpecially if you
are doing a copy where lots of the files haven't changed and won't
need copying then you shouldn't use `--no-traverse` .
It can also be used to reduce the memory usage of rclone when copying
- `rclone --no-traverse copy src dst` won't load either the source or
destination listings into memory so will use the minimum amount of
memory.
2015-09-27 15:13:20 +00:00
Filtering
---------
For the filtering options
* `--delete-excluded`
* `--filter`
* `--filter-from`
* `--exclude`
* `--exclude-from`
* `--include`
* `--include-from`
* `--files-from`
* `--min-size`
* `--max-size`
2015-12-29 19:34:10 +00:00
* `--min-age`
* `--max-age`
2015-09-27 15:13:20 +00:00
* `--dump-filters`
See the [filtering section ](/filtering/ ).
2016-01-31 16:15:25 +00:00
2016-06-04 17:49:27 +00:00
Logging
-------
rclone has 3 levels of logging, `Error` , `Info` and `Debug` .
By default rclone logs `Error` and `Info` to standard error and `Debug`
to standard output. This means you can redirect standard output and
standard error to different places.
By default rclone will produce `Error` and `Info` level messages.
If you use the `-q` flag, rclone will only produce `Error` messages.
If you use the `-v` flag, rclone will produce `Error` , `Info` and
`Debug` messages.
If you use the `--log-file=FILE` option, rclone will redirect `Error` ,
`Info` and `Debug` messages along with standard error to FILE.
2016-01-31 16:15:25 +00:00
Exit Code
---------
If any errors occurred during the command, rclone will set a non zero
exit code. This allows scripts to detect when rclone operations have
failed.