forked from TrueCloudLab/rclone
Revise documentation (especially sync) - fixes #39
This commit is contained in:
parent
1d254a3674
commit
981104519e
4 changed files with 46 additions and 40 deletions
36
README.md
36
README.md
|
@ -75,16 +75,16 @@ Subcommands
|
||||||
rclone copy source:path dest:path
|
rclone copy source:path dest:path
|
||||||
|
|
||||||
Copy the source to the destination. Doesn't transfer
|
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.
|
MD5SUM. Doesn't delete files from the destination.
|
||||||
|
|
||||||
rclone sync source:path dest:path
|
rclone sync source:path dest:path
|
||||||
|
|
||||||
Sync the source to the destination. Doesn't transfer
|
Sync the source to the destination, changing the destination
|
||||||
unchanged files, testing first by modification time then by
|
only. Doesn't transfer unchanged files, testing by size and
|
||||||
size. Deletes any files that exist in source that don't
|
modification time or MD5SUM. Destination is updated to match
|
||||||
exist in destination. Since this can cause data loss, test
|
source, including deleting files if necessary. Since this can
|
||||||
first with the `--dry-run` flag.
|
cause data loss, test first with the `--dry-run` flag.
|
||||||
|
|
||||||
rclone ls [remote:path]
|
rclone ls [remote:path]
|
||||||
|
|
||||||
|
@ -96,7 +96,8 @@ List all directories/containers/buckets in the the path.
|
||||||
|
|
||||||
rclone lsl [remote: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]
|
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
|
rclone sync /home/source swift:backup
|
||||||
|
|
||||||
The modified time is stored as metadata on the object as
|
For more help see the [online docs on Openstack Swift](http://rclone.org/swift).
|
||||||
`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
|
Amazon S3
|
||||||
---------
|
---------
|
||||||
|
@ -191,8 +187,7 @@ So to copy a local directory to a s3 container called backup
|
||||||
|
|
||||||
rclone sync /home/source s3:backup
|
rclone sync /home/source s3:backup
|
||||||
|
|
||||||
The modified time is stored as metadata on the object as
|
For more help see the [online docs on Amazon S3](http://rclone.org/s3).
|
||||||
`X-Amz-Meta-Mtime` as floating point since the epoch.
|
|
||||||
|
|
||||||
Google drive
|
Google drive
|
||||||
------------
|
------------
|
||||||
|
@ -207,7 +202,7 @@ To copy a local directory to a drive directory called backup
|
||||||
|
|
||||||
rclone copy /home/source remote: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
|
Dropbox
|
||||||
-------
|
-------
|
||||||
|
@ -222,10 +217,7 @@ To copy a local directory to a drive directory called backup
|
||||||
|
|
||||||
rclone copy /home/source dropbox:backup
|
rclone copy /home/source dropbox:backup
|
||||||
|
|
||||||
Md5sums and timestamps in RFC3339 format accurate to 1ns are stored in
|
For more help see the [online docs on Dropbox](http://rclone.org/dropbox).
|
||||||
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.
|
|
||||||
|
|
||||||
Google Cloud Storage
|
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
|
rclone copy /home/source remote:backup
|
||||||
|
|
||||||
Google google cloud storage stores md5sums natively and rclone stores
|
For more help see the [online docs on Google Cloud Storage](http://rclone.org/googlecloudstorage/).
|
||||||
modification times as metadata on the object, under the "mtime" key in
|
|
||||||
RFC3339 format accurate to 1ns.
|
|
||||||
|
|
||||||
Single file copies
|
Single file copies
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -58,16 +58,16 @@ Subcommands
|
||||||
rclone copy source:path dest:path
|
rclone copy source:path dest:path
|
||||||
|
|
||||||
Copy the source to the destination. Doesn't transfer
|
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.
|
MD5SUM. Doesn't delete files from the destination.
|
||||||
|
|
||||||
rclone sync source:path dest:path
|
rclone sync source:path dest:path
|
||||||
|
|
||||||
Sync the source to the destination. Doesn't transfer
|
Sync the source to the destination, changing the destination
|
||||||
unchanged files, testing first by modification time then by
|
only. Doesn't transfer unchanged files, testing by size and
|
||||||
size. Deletes any files that exist in source that don't
|
modification time or MD5SUM. Destination is updated to match
|
||||||
exist in destination. Since this can cause data loss, test
|
source, including deleting files if necessary. Since this can
|
||||||
first with the `--dry-run` flag.
|
cause data loss, test first with the `--dry-run` flag.
|
||||||
|
|
||||||
rclone ls [remote:path]
|
rclone ls [remote:path]
|
||||||
|
|
||||||
|
@ -79,7 +79,8 @@ List all directories/containers/buckets in the the path.
|
||||||
|
|
||||||
rclone lsl [remote: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]
|
rclone md5sum [remote:path]
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
title: "Google drive"
|
title: "Google drive"
|
||||||
description: "Rclone docs for Google drive"
|
description: "Rclone docs for Google drive"
|
||||||
date: "2014-04-26"
|
date: "2015-05-10"
|
||||||
---
|
---
|
||||||
|
|
||||||
<i class="fa fa-google"></i> Google Drive
|
<i class="fa fa-google"></i> Google Drive
|
||||||
|
@ -73,3 +73,16 @@ Modified time
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Google drive stores modification times accurate to 1 ms.
|
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.
|
||||||
|
|
20
rclone.go
20
rclone.go
|
@ -62,8 +62,8 @@ var Commands = []Command{
|
||||||
ArgsHelp: "source:path dest:path",
|
ArgsHelp: "source:path dest:path",
|
||||||
Help: `
|
Help: `
|
||||||
Copy the source to the destination. Doesn't transfer
|
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
|
||||||
size. Doesn't delete files from the destination.`,
|
MD5SUM. Doesn't delete files from the destination.`,
|
||||||
Run: func(fdst, fsrc fs.Fs) {
|
Run: func(fdst, fsrc fs.Fs) {
|
||||||
err := fs.Sync(fdst, fsrc, false)
|
err := fs.Sync(fdst, fsrc, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -77,11 +77,11 @@ var Commands = []Command{
|
||||||
Name: "sync",
|
Name: "sync",
|
||||||
ArgsHelp: "source:path dest:path",
|
ArgsHelp: "source:path dest:path",
|
||||||
Help: `
|
Help: `
|
||||||
Sync the source to the destination. Doesn't transfer
|
Sync the source to the destination, changing the destination
|
||||||
unchanged files, testing first by modification time then by
|
only. Doesn't transfer unchanged files, testing by size and
|
||||||
size. Deletes any files that exist in source that don't
|
modification time or MD5SUM. Destination is updated to match
|
||||||
exist in destination. Since this can cause data loss, test
|
source, including deleting files if necessary. Since this can
|
||||||
first with the --dry-run flag.`,
|
cause data loss, test first with the --dry-run flag.`,
|
||||||
Run: func(fdst, fsrc fs.Fs) {
|
Run: func(fdst, fsrc fs.Fs) {
|
||||||
err := fs.Sync(fdst, fsrc, true)
|
err := fs.Sync(fdst, fsrc, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -123,7 +123,8 @@ var Commands = []Command{
|
||||||
Name: "lsl",
|
Name: "lsl",
|
||||||
ArgsHelp: "[remote:path]",
|
ArgsHelp: "[remote:path]",
|
||||||
Help: `
|
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) {
|
Run: func(fdst, fsrc fs.Fs) {
|
||||||
err := fs.ListLong(fdst, os.Stdout)
|
err := fs.ListLong(fdst, os.Stdout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -242,7 +243,8 @@ Subcommands:
|
||||||
fmt.Fprintf(os.Stderr, "Options:\n")
|
fmt.Fprintf(os.Stderr, "Options:\n")
|
||||||
pflag.PrintDefaults()
|
pflag.PrintDefaults()
|
||||||
fmt.Fprintf(os.Stderr, `
|
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'.
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue