"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go to file
2014-04-25 18:18:58 +01:00
docs Version v0.96 - automate the release process 2014-04-25 18:18:58 +01:00
drive drive: Use o.Update and fs.Put to optimise transfers 2014-04-18 17:49:01 +01:00
fs drive: Use o.Update and fs.Put to optimise transfers 2014-04-18 17:49:01 +01:00
graphics rclone.org: website, docs and graphics 2014-03-28 22:34:13 +00:00
local Factor Fs.Put into Object.Update and call Update rather than Put if possible 2014-04-18 17:49:01 +01:00
rclonetest Version v0.96 - automate the release process 2014-04-25 18:18:58 +01:00
s3 Factor Fs.Put into Object.Update and call Update rather than Put if possible 2014-04-18 17:49:01 +01:00
swift Factor Fs.Put into Object.Update and call Update rather than Put if possible 2014-04-18 17:49:01 +01:00
.gitignore Version v0.96 - automate the release process 2014-04-25 18:18:58 +01:00
COPYING Initial commit - some small parts working 2012-11-18 17:32:31 +00:00
cross-compile Version v0.96 - automate the release process 2014-04-25 18:18:58 +01:00
Makefile Version v0.96 - automate the release process 2014-04-25 18:18:58 +01:00
notes.txt Version v0.96 - automate the release process 2014-04-25 18:18:58 +01:00
rclone_test.go Rename to rclone 2013-06-27 20:09:40 +01:00
rclone.go Add version number, -V and --version 2014-04-24 17:59:05 +01:00
README.md Version v0.96 - automate the release process 2014-04-25 18:18:58 +01:00
version.go Version v0.96 - automate the release process 2014-04-25 18:18:58 +01:00

% rclone(1) User Manual
% Nick Craig-Wood
% Apr 24, 2014

Rclone

Logo

Sync files and directories to and from

  • Google Drive
  • Amazon S3
  • Openstack Swift / Rackspace cloud files / Memset Memstore
  • The local filesystem

Features

  • 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
  • Can sync to and from network, eg two different Drive accounts

See the Home page for more documentation and configuration walkthroughs.

Install

Rclone is a Go program and comes as a single binary file.

Download the binary for your OS from

Or alternatively if you have Go installed use

go install github.com/ncw/rclone

and this will build the binary in $GOPATH/bin.

You can then modify the source and submit patches.

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
-config option to choose a different config file.)

The easiest way to make the config is to run rclone with the config
option, Eg

rclone config

Usage

Rclone syncs a directory tree from local to remote.

Its basic syntax is like this

Syntax: [options] subcommand <parameters> <parameters...>

See below for how to specify the source and destination paths.

Subcommands

rclone copy source:path dest:path

Copy the source to the destination. Doesn't transfer
unchanged files, testing first by modification time then by
MD5SUM. Doesn't delete files from the destination.

rclone sync source:path dest:path

Sync the source to the destination. Doesn't transfer
unchanged files, testing first by modification time then by
MD5SUM. Deletes any files that exist in source that don't
exist in destination. Since this can cause data loss, test
first with the -dry-run flag.

rclone ls [remote:path]

List all the objects in the the path.

rclone lsd [remote:path]

List all directoryes/objects/buckets in the the path.

rclone mkdir remote:path

Make the path if it doesn't already exist

rclone rmdir remote:path

Remove the path. Note that you can't remove a path with
objects in it, use purge for that.

rclone purge remote:path

Remove the path and all of its contents.

rclone check source:path dest:path

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.

General options:

  • -config Location of the config file
  • -transfers=4: Number of file transfers to run in parallel.
  • -checkers=8: Number of MD5SUM checkers to run in parallel.
  • -dry-run=false: Do a trial run with no permanent changes
  • -modify-window=1ns: Max time difference to be considered the same - this is automatically set usually
  • -quiet=false: Print as little stuff as possible
  • -stats=1m0s: Interval to print stats
  • -verbose=false: Print lots more stuff

Developer options:

  • -cpuprofile="": Write cpu profile to file

Local Filesystem

Paths are specified as normal filesystem paths, so

rclone sync /home/source /tmp/destination

Will sync source to destination

Swift / Rackspace cloudfiles / Memset Memstore

Paths are specified as remote:container (or remote: for the lsd
command.)

So to copy a local directory to a swift container called backup:

rclone sync /home/source swift:backup

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

This is a defacto standard (used in the official python-swiftclient
amongst others) for storing the modification time (as read using
os.Stat) for an object.

Amazon S3

Paths are specified as remote:bucket

So to copy a local directory to a s3 container called backup

rclone sync /home/source s3:backup

The modified time is stored as metadata on the object as
X-Amz-Meta-Mtime as floating point since the epoch.

Google drive

Paths are specified as drive:path Drive paths may be as deep as required.

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

To copy a local directory to a drive directory called backup

rclone copy /home/source drv:backup

Google drive stores modification times accurate to 1 ms.

License

This is free software under the terms of MIT the license (check the
COPYING file included in this package).

Bugs

  • Doesn't sync individual files yet, only directories.
  • Drive: Sometimes get: Failed to copy: Upload failed: googleapi: Error 403: Rate Limit Exceeded
    • quota is 100.0 requests/second/user
  • Empty directories left behind with Local and Drive
    • eg purging a local directory with subdirectories doesn't work

Changelog

  • 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

Contact and support

The project website is at:

There you can file bug reports, ask for help or contribute patches.

Authors

Contributors

  • Your name goes here!