Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Revise documentation (especially sync) - fixes #39

Nick Craig-Wood981104519ef3
diff --git a/README.md b/README.md
index d46293f9a..f19675702 100644
--- a/README.md
+++ b/README.md
@@ -75,16 +75,16 @@ 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
+unchanged files, testing by size and modification time or
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
-size. 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.
+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.
rclone ls [remote:path]
@@ -96,7 +96,8 @@ List all directories/containers/buckets in the the path.
rclone lsl [remote:path]
-List all the objects in the the path with modification time, size and path.
+List all the objects in the the path with modification time,
+size and path.
rclone md5sum [remote:path]
@@ -174,12 +175,7 @@ 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.
+For more help see the [online docs on Openstack Swift](http://rclone.org/swift).
Amazon S3
---------
@@ -191,8 +187,7 @@ 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.
+For more help see the [online docs on Amazon S3](http://rclone.org/s3).
Google drive
------------
@@ -207,7 +202,7 @@ To copy a local directory to a drive directory called backup
rclone copy /home/source remote:backup
-Google drive stores modification times accurate to 1 ms natively.
+For more help see the [online docs on Google Drive](http://rclone.org/drive).
Dropbox
-------
@@ -222,10 +217,7 @@ To copy a local directory to a drive directory called backup
rclone copy /home/source dropbox:backup
-Md5sums and timestamps in RFC3339 format accurate to 1ns are stored in
-a Dropbox datastore called "rclone". Dropbox datastores are limited
-to 100,000 rows so this is the maximum number of files rclone can
-manage on Dropbox.
+For more help see the [online docs on Dropbox](http://rclone.org/dropbox).
Google Cloud Storage
--------------------
@@ -241,9 +233,7 @@ To copy a local directory to a google cloud storage directory called backup
rclone copy /home/source remote:backup
-Google google cloud storage stores md5sums natively and rclone stores
-modification times as metadata on the object, under the "mtime" key in
-RFC3339 format accurate to 1ns.
+For more help see the [online docs on Google Cloud Storage](http://rclone.org/googlecloudstorage/).
Single file copies
------------------
diff --git a/docs/content/docs.md b/docs/content/docs.md
index 054d7ac4a..8d2cca5f4 100644
--- a/docs/content/docs.md
+++ b/docs/content/docs.md
@@ -58,16 +58,16 @@ 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
+unchanged files, testing by size and modification time or
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
-size. 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.
+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.
rclone ls [remote:path]
@@ -79,7 +79,8 @@ List all directories/containers/buckets in the the path.
rclone lsl [remote:path]
-List all the objects in the the path with modification time, size and path.
+List all the objects in the the path with modification time,
+size and path.
rclone md5sum [remote:path]
diff --git a/docs/content/drive.md b/docs/content/drive.md
index e11d0c80a..a7a0ce67c 100644
--- a/docs/content/drive.md
+++ b/docs/content/drive.md
@@ -1,7 +1,7 @@
---
title: "Google drive"
description: "Rclone docs for Google drive"
-date: "2014-04-26"
+date: "2015-05-10"
---
<i class="fa fa-google"></i> Google Drive
@@ -73,3 +73,16 @@ Modified time
-------------
Google drive stores modification times accurate to 1 ms.
+
+Revisions
+---------
+
+Google drive stores revisions of files. When you upload a change to
+an existing file to google drive using rclone it will create a new
+revision of that file.
+
+Revisions follow the standard google policy which at time of writing
+was
+
+ * They are deleted after 30 days or 100 revisions (whatever comes first).
+ * They do not count towards a user storage quota.
diff --git a/rclone.go b/rclone.go
index 77c66b213..2822bcb02 100644
--- a/rclone.go
+++ b/rclone.go
@@ -62,8 +62,8 @@ var Commands = []Command{
ArgsHelp: "source:path dest:path",
Help: `
Copy the source to the destination. Doesn't transfer
- unchanged files, testing first by modification time then by
- size. Doesn't delete files from the destination.`,
+ unchanged files, testing by size and modification time or
+ MD5SUM. Doesn't delete files from the destination.`,
Run: func(fdst, fsrc fs.Fs) {
err := fs.Sync(fdst, fsrc, false)
if err != nil {
@@ -77,11 +77,11 @@ var Commands = []Command{
Name: "sync",
ArgsHelp: "source:path dest:path",
Help: `
- Sync the source to the destination. Doesn't transfer
- unchanged files, testing first by modification time then by
- size. 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.`,
+ 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.`,
Run: func(fdst, fsrc fs.Fs) {
err := fs.Sync(fdst, fsrc, true)
if err != nil {
@@ -123,7 +123,8 @@ var Commands = []Command{
Name: "lsl",
ArgsHelp: "[remote:path]",
Help: `
- List all the objects in the the path with modification time, size and path.`,
+ List all the objects in the the path with modification time,
+ size and path.`,
Run: func(fdst, fsrc fs.Fs) {
err := fs.ListLong(fdst, os.Stdout)
if err != nil {
@@ -242,7 +243,8 @@ Subcommands:
fmt.Fprintf(os.Stderr, "Options:\n")
pflag.PrintDefaults()
fmt.Fprintf(os.Stderr, `
-It is only necessary to use a unique prefix of the subcommand, eg 'up' for 'upload'.
+It is only necessary to use a unique prefix of the subcommand, eg 'up'
+for 'upload'.
`)
}