2014-04-25 01:11:08 +08:00
|
|
|
% rclone(1) User Manual
|
|
|
|
% Nick Craig-Wood
|
2014-07-04 04:56:54 +08:00
|
|
|
% Jul 7, 2014
|
2014-04-25 01:11:08 +08:00
|
|
|
|
2013-06-28 03:00:01 +08:00
|
|
|
Rclone
|
|
|
|
======
|
2012-11-19 01:32:31 +08:00
|
|
|
|
2014-04-18 05:39:07 +08:00
|
|
|
[![Logo](http://rclone.org/img/rclone-120x120.png)](http://rclone.org/)
|
2014-03-16 22:01:17 +08:00
|
|
|
|
2014-04-27 00:43:41 +08:00
|
|
|
Rclone is a command line program to sync files and directories to and from
|
2013-06-28 03:00:01 +08:00
|
|
|
|
|
|
|
* Google Drive
|
2014-03-16 22:01:17 +08:00
|
|
|
* Amazon S3
|
|
|
|
* Openstack Swift / Rackspace cloud files / Memset Memstore
|
2014-07-18 03:03:11 +08:00
|
|
|
* Dropbox
|
|
|
|
* Google Cloud Storage
|
2013-06-28 03:00:01 +08:00
|
|
|
* The local filesystem
|
2012-11-19 01:32:31 +08:00
|
|
|
|
2014-03-16 01:39:56 +08:00
|
|
|
Features
|
2012-11-19 01:32:31 +08:00
|
|
|
|
2014-03-16 01:39:56 +08:00
|
|
|
* MD5SUMs checked at all times for file integrity
|
|
|
|
* Timestamps preserved on files
|
|
|
|
* Partial syncs supported on a whole file basis
|
|
|
|
* Copy mode to just copy new/changed files
|
|
|
|
* Sync mode to make a directory identical
|
|
|
|
* Check mode to check all MD5SUMs
|
2014-03-16 22:01:17 +08:00
|
|
|
* Can sync to and from network, eg two different Drive accounts
|
|
|
|
|
2014-04-18 05:39:07 +08:00
|
|
|
See the Home page for more documentation and configuration walkthroughs.
|
2014-03-16 22:01:17 +08:00
|
|
|
|
|
|
|
* http://rclone.org/
|
2012-11-19 01:32:31 +08:00
|
|
|
|
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
2013-06-28 03:00:01 +08:00
|
|
|
Rclone is a Go program and comes as a single binary file.
|
2012-11-19 01:32:31 +08:00
|
|
|
|
2014-04-25 01:11:08 +08:00
|
|
|
Download the binary for your OS from
|
2012-11-19 01:32:31 +08:00
|
|
|
|
2014-04-25 01:11:08 +08:00
|
|
|
* http://rclone.org/downloads/
|
2012-11-19 01:32:31 +08:00
|
|
|
|
|
|
|
Or alternatively if you have Go installed use
|
|
|
|
|
2014-04-25 01:11:08 +08:00
|
|
|
go install github.com/ncw/rclone
|
2012-11-19 01:32:31 +08:00
|
|
|
|
2014-03-16 22:01:17 +08:00
|
|
|
and this will build the binary in `$GOPATH/bin`.
|
|
|
|
|
2014-03-16 01:39:56 +08: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-27 00:43:41 +08:00
|
|
|
`--config` option to choose a different config file.)
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
The easiest way to make the config is to run rclone with the config
|
|
|
|
option, Eg
|
|
|
|
|
2014-03-16 08:28:32 +08:00
|
|
|
rclone config
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2012-11-19 01:32:31 +08:00
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
2014-03-16 01:39:56 +08:00
|
|
|
Rclone syncs a directory tree from local to remote.
|
|
|
|
|
2014-04-27 00:43:41 +08:00
|
|
|
Its basic syntax is
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Syntax: [options] subcommand <parameters> <parameters...>
|
|
|
|
|
2014-03-16 08:28:32 +08:00
|
|
|
See below for how to specify the source and destination paths.
|
|
|
|
|
|
|
|
Subcommands
|
|
|
|
-----------
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
rclone copy source:path dest:path
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Copy the source to the destination. Doesn't transfer
|
2015-05-10 19:17:24 +08:00
|
|
|
unchanged files, testing by size and modification time or
|
2014-03-16 01:39:56 +08:00
|
|
|
MD5SUM. Doesn't delete files from the destination.
|
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
rclone sync source:path dest:path
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2015-05-10 19:17:24 +08: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
|
|
|
|
source, including deleting files if necessary. Since this can
|
|
|
|
cause data loss, test first with the `--dry-run` flag.
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
rclone ls [remote:path]
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2015-02-28 21:08:18 +08:00
|
|
|
List all the objects in the the path with size and path.
|
|
|
|
|
|
|
|
rclone lsd [remote:path]
|
|
|
|
|
|
|
|
List all directories/containers/buckets in the the path.
|
2014-07-18 03:03:11 +08:00
|
|
|
|
|
|
|
rclone lsl [remote:path]
|
|
|
|
|
2015-05-10 19:17:24 +08:00
|
|
|
List all the objects in the the path with modification time,
|
|
|
|
size and path.
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2015-02-28 21:08:18 +08:00
|
|
|
rclone md5sum [remote:path]
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2015-02-28 21:08:18 +08: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-16 01:39:56 +08:00
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
rclone mkdir remote:path
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Make the path if it doesn't already exist
|
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
rclone rmdir remote:path
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Remove the path. Note that you can't remove a path with
|
|
|
|
objects in it, use purge for that.
|
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
rclone purge remote:path
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Remove the path and all of its contents.
|
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
rclone check source:path dest:path
|
2014-03-16 01:39:56 +08: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.
|
|
|
|
|
2015-06-03 22:08:27 +08:00
|
|
|
rclone config
|
2015-02-28 21:08:18 +08:00
|
|
|
|
|
|
|
Enter an interactive configuration session.
|
|
|
|
|
2015-06-03 22:08:27 +08:00
|
|
|
rclone help
|
2014-07-18 03:03:11 +08:00
|
|
|
|
2015-02-28 21:08:18 +08:00
|
|
|
This help.
|
2014-07-18 03:03:11 +08:00
|
|
|
|
2014-03-16 01:39:56 +08:00
|
|
|
General options:
|
2014-04-27 00:43:41 +08:00
|
|
|
|
|
|
|
```
|
2015-05-10 18:25:54 +08:00
|
|
|
--bwlimit=0: Bandwidth limit in kBytes/s, or use suffix k|M|G
|
2014-04-27 00:43:41 +08:00
|
|
|
--checkers=8: Number of checkers to run in parallel.
|
2015-06-06 15:38:45 +08:00
|
|
|
-c, --checksum=false: Skip based on checksum & size, not mod-time & size
|
2014-04-27 00:43:41 +08:00
|
|
|
--config="~/.rclone.conf": Config file.
|
2015-05-10 18:25:54 +08:00
|
|
|
--contimeout=1m0s: Connect timeout
|
2014-04-27 00:43:41 +08:00
|
|
|
-n, --dry-run=false: Do a trial run with no permanent changes
|
2015-02-28 00:51:17 +08:00
|
|
|
--log-file="": Log everything to this file
|
2014-04-27 00:43:41 +08:00
|
|
|
--modify-window=1ns: Max time diff to be considered the same
|
|
|
|
-q, --quiet=false: Print as little stuff as possible
|
2015-06-06 15:38:45 +08:00
|
|
|
--size-only=false: Skip based on size only, not mod-time or checksum
|
2015-02-28 00:51:17 +08:00
|
|
|
--stats=1m0s: Interval to print stats (0 to disable)
|
2015-05-10 18:25:54 +08:00
|
|
|
--timeout=5m0s: IO idle timeout
|
2014-04-27 00:43:41 +08:00
|
|
|
--transfers=4: Number of file transfers to run in parallel.
|
|
|
|
-v, --verbose=false: Print lots more stuff
|
2015-02-28 00:51:17 +08:00
|
|
|
-V, --version=false: Print the version number
|
2014-04-27 00:43:41 +08:00
|
|
|
```
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Developer options:
|
2014-04-27 00:43:41 +08:00
|
|
|
|
|
|
|
```
|
|
|
|
--cpuprofile="": Write cpu profile to file
|
|
|
|
```
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Local Filesystem
|
|
|
|
----------------
|
|
|
|
|
|
|
|
Paths are specified as normal filesystem paths, so
|
|
|
|
|
|
|
|
rclone sync /home/source /tmp/destination
|
|
|
|
|
2014-04-27 00:43:41 +08:00
|
|
|
Will sync `/home/source` to `/tmp/destination`
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Swift / Rackspace cloudfiles / Memset Memstore
|
|
|
|
----------------------------------------------
|
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
Paths are specified as remote:container (or remote: for the `lsd`
|
2014-05-06 02:52:52 +08:00
|
|
|
command.) You may put subdirectories in too, eg
|
|
|
|
`remote:container/path/to/dir`.
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2014-03-16 08:28:32 +08:00
|
|
|
So to copy a local directory to a swift container called backup:
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
rclone sync /home/source swift:backup
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2015-05-10 19:17:24 +08:00
|
|
|
For more help see the [online docs on Openstack Swift](http://rclone.org/swift).
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Amazon S3
|
|
|
|
---------
|
|
|
|
|
2014-05-06 02:52:52 +08:00
|
|
|
Paths are specified as remote:bucket. You may put subdirectories in
|
|
|
|
too, eg `remote:bucket/path/to/dir`.
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
So to copy a local directory to a s3 container called backup
|
|
|
|
|
2014-03-28 01:31:57 +08:00
|
|
|
rclone sync /home/source s3:backup
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2015-05-10 19:17:24 +08:00
|
|
|
For more help see the [online docs on Amazon S3](http://rclone.org/s3).
|
2014-03-16 01:39:56 +08:00
|
|
|
|
|
|
|
Google drive
|
|
|
|
------------
|
|
|
|
|
2014-07-18 03:03:11 +08:00
|
|
|
Paths are specified as remote:path Drive paths may be as deep as required.
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2014-03-16 22:01:17 +08:00
|
|
|
The initial setup for drive involves getting a token from Google drive
|
2014-04-27 00:43:41 +08:00
|
|
|
which you need to do in your browser. `rclone config` walks you
|
2014-03-16 22:01:17 +08:00
|
|
|
through it.
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2014-03-16 22:01:17 +08:00
|
|
|
To copy a local directory to a drive directory called backup
|
|
|
|
|
2014-07-18 03:03:11 +08:00
|
|
|
rclone copy /home/source remote:backup
|
|
|
|
|
2015-05-10 19:17:24 +08:00
|
|
|
For more help see the [online docs on Google Drive](http://rclone.org/drive).
|
2014-07-18 03:03:11 +08:00
|
|
|
|
|
|
|
Dropbox
|
|
|
|
-------
|
|
|
|
|
|
|
|
Paths are specified as remote:path Dropbox paths may be as deep as required.
|
|
|
|
|
|
|
|
The initial setup for dropbox involves getting a token from Dropbox
|
|
|
|
which you need to do in your browser. `rclone config` walks you
|
|
|
|
through it.
|
|
|
|
|
|
|
|
To copy a local directory to a drive directory called backup
|
|
|
|
|
|
|
|
rclone copy /home/source dropbox:backup
|
|
|
|
|
2015-05-10 19:17:24 +08:00
|
|
|
For more help see the [online docs on Dropbox](http://rclone.org/dropbox).
|
2014-07-18 03:03:11 +08:00
|
|
|
|
|
|
|
Google Cloud Storage
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
Paths are specified as remote:path Google Cloud Storage paths may be
|
|
|
|
as deep as required.
|
|
|
|
|
|
|
|
The initial setup for Google Cloud Storage involves getting a token
|
|
|
|
from Google which you need to do in your browser. `rclone config`
|
|
|
|
walks you through it.
|
|
|
|
|
|
|
|
To copy a local directory to a google cloud storage directory called backup
|
|
|
|
|
|
|
|
rclone copy /home/source remote:backup
|
2014-03-16 22:01:17 +08:00
|
|
|
|
2015-05-10 19:17:24 +08:00
|
|
|
For more help see the [online docs on Google Cloud Storage](http://rclone.org/googlecloudstorage/).
|
2012-11-19 01:32:31 +08:00
|
|
|
|
2014-05-06 02:52:52 +08:00
|
|
|
Single file copies
|
|
|
|
------------------
|
|
|
|
|
|
|
|
Rclone can copy single files
|
|
|
|
|
|
|
|
rclone src:path/to/file dst:path/dir
|
|
|
|
|
|
|
|
Or
|
|
|
|
|
|
|
|
rclone src:path/to/file dst:path/to/file
|
|
|
|
|
|
|
|
Note that you can't rename the file if you are copying from one file to another.
|
|
|
|
|
2012-11-19 01:32:31 +08:00
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
|
|
|
This is free software under the terms of MIT the license (check the
|
|
|
|
COPYING file included in this package).
|
|
|
|
|
2014-03-16 01:39:56 +08:00
|
|
|
Bugs
|
|
|
|
----
|
|
|
|
|
2014-03-16 22:01:17 +08:00
|
|
|
* Empty directories left behind with Local and Drive
|
|
|
|
* eg purging a local directory with subdirectories doesn't work
|
2014-03-16 01:39:56 +08:00
|
|
|
|
2014-04-25 01:11:08 +08:00
|
|
|
Changelog
|
|
|
|
---------
|
2015-05-22 03:13:40 +08:00
|
|
|
* v1.14 - 2015-05-21
|
|
|
|
* local: fix encoding of non utf-8 file names - fixes a duplicate file problem
|
|
|
|
* drive: docs about rate limiting
|
|
|
|
* google cloud storage: Fix compile after API change in "google.golang.org/api/storage/v1"
|
2015-05-10 19:39:06 +08:00
|
|
|
* v1.13 - 2015-05-10
|
|
|
|
* Revise documentation (especially sync)
|
|
|
|
* Implement --timeout and --conntimeout
|
|
|
|
* s3: ignore etags from multipart uploads which aren't md5sums
|
2015-03-15 23:55:38 +08:00
|
|
|
* v1.12 - 2015-03-15
|
|
|
|
* drive: Use chunked upload for files above a certain size
|
|
|
|
* drive: add --drive-chunk-size and --drive-upload-cutoff parameters
|
|
|
|
* drive: switch to insert from update when a failed copy deletes the upload
|
|
|
|
* core: Log duplicate files if they are detected
|
2015-03-05 01:59:31 +08:00
|
|
|
* v1.11 - 2015-03-04
|
|
|
|
* swift: add region parameter
|
|
|
|
* drive: fix crash on failed to update remote mtime
|
|
|
|
* In remote paths, change native directory separators to /
|
|
|
|
* Add synchronization to ls/lsl/lsd output to stop corruptions
|
|
|
|
* Ensure all stats/log messages to go stderr
|
|
|
|
* Add --log-file flag to log everything (including panics) to file
|
|
|
|
* Make it possible to disable stats printing with --stats=0
|
|
|
|
* Implement --bwlimit to limit data transfer bandwidth
|
2015-02-13 02:00:20 +08:00
|
|
|
* v1.10 - 2015-02-12
|
|
|
|
* s3: list an unlimited number of items
|
|
|
|
* Fix getting stuck in the configurator
|
2015-02-08 06:44:23 +08:00
|
|
|
* v1.09 - 2015-02-07
|
|
|
|
* windows: Stop drive letters (eg C:) getting mixed up with remotes (eg drive:)
|
|
|
|
* local: Fix directory separators on Windows
|
|
|
|
* drive: fix rate limit exceeded errors
|
2015-02-05 06:31:56 +08:00
|
|
|
* v1.08 - 2015-02-04
|
|
|
|
* drive: fix subdirectory listing to not list entire drive
|
|
|
|
* drive: Fix SetModTime
|
|
|
|
* dropbox: adapt code to recent library changes
|
2014-12-23 19:26:32 +08:00
|
|
|
* v1.07 - 2014-12-23
|
|
|
|
* google cloud storage: fix memory leak
|
2014-12-13 04:13:03 +08:00
|
|
|
* v1.06 - 2014-12-12
|
|
|
|
* Fix "Couldn't find home directory" on OSX
|
2014-12-23 19:26:32 +08:00
|
|
|
* swift: Add tenant parameter
|
2014-12-13 04:13:03 +08:00
|
|
|
* Use new location of Google API packages
|
2014-08-10 00:22:17 +08:00
|
|
|
* v1.05 - 2014-08-09
|
|
|
|
* Improved tests and consequently lots of minor fixes
|
|
|
|
* core: Fix race detected by go race detector
|
|
|
|
* core: Fixes after running errcheck
|
|
|
|
* drive: reset root directory on Rmdir and Purge
|
|
|
|
* fs: Document that Purger returns error on empty directory, test and fix
|
|
|
|
* google cloud storage: fix ListDir on subdirectory
|
|
|
|
* google cloud storage: re-read metadata in SetModTime
|
|
|
|
* s3: make reading metadata more reliable to work around eventual consistency problems
|
|
|
|
* s3: strip trailing / from ListDir()
|
|
|
|
* swift: return directories without / in ListDir
|
2014-07-22 04:32:37 +08:00
|
|
|
* v1.04 - 2014-07-21
|
|
|
|
* google cloud storage: Fix crash on Update
|
2014-07-20 18:28:50 +08:00
|
|
|
* v1.03 - 2014-07-20
|
2014-07-22 04:32:37 +08:00
|
|
|
* swift, s3, dropbox: fix updated files being marked as corrupted
|
|
|
|
* Make compile with go 1.1 again
|
2014-07-19 20:12:20 +08:00
|
|
|
* v1.02 - 2014-07-19
|
|
|
|
* Implement Dropbox remote
|
|
|
|
* Implement Google Cloud Storage remote
|
|
|
|
* Verify Md5sums and Sizes after copies
|
|
|
|
* Remove times from "ls" command - lists sizes only
|
|
|
|
* Add add "lsl" - lists times and sizes
|
|
|
|
* Add "md5sum" command
|
2014-07-05 04:15:27 +08:00
|
|
|
* v1.01 - 2014-07-04
|
|
|
|
* drive: fix transfer of big files using up lots of memory
|
2014-07-04 04:56:54 +08:00
|
|
|
* v1.00 - 2014-07-03
|
2014-07-05 04:15:27 +08:00
|
|
|
* drive: fix whole second dates
|
2014-06-27 00:49:26 +08:00
|
|
|
* v0.99 - 2014-06-26
|
|
|
|
* Fix --dry-run not working
|
|
|
|
* Make compatible with go 1.1
|
2014-05-31 00:29:20 +08:00
|
|
|
* v0.98 - 2014-05-30
|
|
|
|
* s3: Treat missing Content-Length as 0 for some ceph installations
|
|
|
|
* rclonetest: add file with a space in
|
2014-05-06 05:25:29 +08:00
|
|
|
* v0.97 - 2014-05-05
|
|
|
|
* Implement copying of single files
|
|
|
|
* s3 & swift: support paths inside containers/buckets
|
2014-04-25 01:11:08 +08:00
|
|
|
* v0.96 - 2014-04-24
|
|
|
|
* drive: Fix multiple files of same name being created
|
|
|
|
* drive: Use o.Update and fs.Put to optimise transfers
|
|
|
|
* Add version number, -V and --version
|
|
|
|
* v0.95 - 2014-03-28
|
|
|
|
* rclone.org: website, docs and graphics
|
|
|
|
* drive: fix path parsing
|
|
|
|
* v0.94 - 2014-03-27
|
|
|
|
* Change remote format one last time
|
|
|
|
* GNU style flags
|
|
|
|
* v0.93 - 2014-03-16
|
|
|
|
* drive: store token in config file
|
|
|
|
* cross compile other versions
|
|
|
|
* set strict permissions on config file
|
|
|
|
* v0.92 - 2014-03-15
|
|
|
|
* Config fixes and --config option
|
|
|
|
* v0.91 - 2014-03-15
|
|
|
|
* Make config file
|
|
|
|
* v0.90 - 2013-06-27
|
|
|
|
* Project named rclone
|
|
|
|
* v0.00 - 2012-11-18
|
|
|
|
* Project started
|
|
|
|
|
|
|
|
|
2012-11-19 01:32:31 +08:00
|
|
|
Contact and support
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
The project website is at:
|
|
|
|
|
2014-03-16 22:01:17 +08:00
|
|
|
* https://github.com/ncw/rclone
|
2012-11-19 01:32:31 +08:00
|
|
|
|
2014-04-27 00:43:41 +08:00
|
|
|
There you can file bug reports, ask for help or send pull requests.
|
2012-11-19 01:32:31 +08:00
|
|
|
|
|
|
|
Authors
|
|
|
|
-------
|
|
|
|
|
2014-03-16 22:01:17 +08:00
|
|
|
* Nick Craig-Wood <nick@craig-wood.com>
|
2012-11-19 01:32:31 +08:00
|
|
|
|
|
|
|
Contributors
|
|
|
|
------------
|
|
|
|
|
2015-06-06 03:12:56 +08:00
|
|
|
* Alex Couper <amcouper@gmail.com>
|