Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b8b379feb | ||
|
|
f538fd8eb4 | ||
|
|
4dd5428b13 | ||
|
|
64ec220d5d | ||
|
|
cbfec0d281 | ||
|
|
80c044f2d3 | ||
|
|
1b2dda8c4c | ||
|
|
473bdad00b | ||
|
|
4482e75f38 | ||
|
|
43c530922a | ||
|
|
dd60f088ed | ||
|
|
0117aeafbf | ||
|
|
442861581a | ||
|
|
4e809c951d | ||
|
|
215fd2a11d | ||
|
|
13b705e227 | ||
|
|
8083804575 | ||
|
|
ec0916c59d | ||
|
|
7392cd1a1a | ||
|
|
2656a0e070 | ||
|
|
5b5df9ae8e | ||
|
|
fafbcc8e2f | ||
|
|
c55402caa2 | ||
|
|
d132dc7640 | ||
|
|
48a2e3844d | ||
|
|
d911bf3889 | ||
|
|
dcf53a1d12 | ||
|
|
3bdfa284a9 | ||
|
|
cb9f1eefd2 | ||
|
|
dd99a4b3dc | ||
|
|
e79a5de7df | ||
|
|
c24da0b886 | ||
|
|
be4fd51289 | ||
|
|
2cbdb95ce5 | ||
|
|
716ce49ce9 | ||
|
|
34b9ac8a5d | ||
|
|
c265f451f2 | ||
|
|
2058652fa4 | ||
|
|
50b3cfccb1 | ||
|
|
5e35aeca9e | ||
|
|
05798672c8 | ||
|
|
7929b6e756 | ||
|
|
2756900749 | ||
|
|
539853df36 | ||
|
|
651db36674 | ||
|
|
f9df545e3c | ||
|
|
5e62ede8d0 | ||
|
|
7f41c9a015 | ||
|
|
ac7727861e | ||
|
|
943a0938e7 | ||
|
|
6580d9478e | ||
|
|
36d411c25d | ||
|
|
8aae166a5b | ||
|
|
aaad0354e6 | ||
|
|
f3365dd251 | ||
|
|
aaa1370a36 | ||
|
|
c41b67ea08 | ||
|
|
0b562bcabc | ||
|
|
1e41a015b5 | ||
|
|
8b82cc7073 | ||
|
|
e19b30bd26 | ||
|
|
09897c8d0d | ||
|
|
d4ddbcea96 | ||
|
|
00af021abb | ||
|
|
8118623680 | ||
|
|
2c594dd996 | ||
|
|
d8b7156b5c | ||
|
|
d4a609c6cd | ||
|
|
bf243f30d3 | ||
|
|
3ce82facac | ||
|
|
fb1458815a | ||
|
|
2243b065e8 | ||
|
|
718694d5ee | ||
|
|
77f38cb6f1 | ||
|
|
ca017980a3 | ||
|
|
4105da206a | ||
|
|
34e7ca90fc | ||
|
|
687abe7803 | ||
|
|
9b1820a7ad |
No files matched your search
+3
-3
@@ -6,8 +6,8 @@ os:
|
||||
- osx
|
||||
go:
|
||||
- 1.5.4
|
||||
- 1.6.3
|
||||
- 1.7.3
|
||||
- 1.6.4
|
||||
- 1.7.4
|
||||
install:
|
||||
- git fetch --unshallow --tags
|
||||
- make vars
|
||||
@@ -23,5 +23,5 @@ deploy:
|
||||
script: make travis_beta
|
||||
on:
|
||||
branch: master
|
||||
go: 1.7.3
|
||||
go: 1.7.4
|
||||
condition: "`uname` == 'Linux'"
|
||||
+13
-1
@@ -52,7 +52,10 @@ Note the top level Makefile targets
|
||||
* make test
|
||||
|
||||
Both of these will be run by Travis when you make a pull request but
|
||||
you can do this yourself locally too.
|
||||
you can do this yourself locally too. These require some extra go
|
||||
packages which you can install with
|
||||
|
||||
* make build_dep
|
||||
|
||||
Make sure you
|
||||
|
||||
@@ -119,6 +122,15 @@ contribution.
|
||||
* make test
|
||||
* make tag
|
||||
|
||||
## Updating the vendor dirctory ##
|
||||
|
||||
Do these commands to update the entire build directory to the latest
|
||||
version of all the dependencies. This should be done early in the
|
||||
release cycle. Individual dependencies can be added with `godep get`.
|
||||
|
||||
* make build_dep
|
||||
* make update
|
||||
|
||||
## Writing a new backend ##
|
||||
|
||||
Choose a name. The docs here will use `remote` as an example.
|
||||
|
||||
Generated
+186
-88
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ImportPath": "github.com/ncw/rclone",
|
||||
"GoVersion": "go1.7",
|
||||
"GodepVersion": "v74",
|
||||
"GoVersion": "devel-41908a5",
|
||||
"GodepVersion": "v75",
|
||||
"Packages": [
|
||||
"./..."
|
||||
],
|
||||
@@ -20,17 +20,17 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "cloud.google.com/go/compute/metadata",
|
||||
"Comment": "v0.3.0-49-gbd8a5e8",
|
||||
"Rev": "bd8a5e8b5d233a78bb4ef057f38eae438f8b6f55"
|
||||
"Comment": "v0.5.0-11-gbfdc39b",
|
||||
"Rev": "bfdc39bde7a3c8dd361ea7fcdb69e7a41a475bb9"
|
||||
},
|
||||
{
|
||||
"ImportPath": "cloud.google.com/go/internal",
|
||||
"Comment": "v0.3.0-49-gbd8a5e8",
|
||||
"Rev": "bd8a5e8b5d233a78bb4ef057f38eae438f8b6f55"
|
||||
"Comment": "v0.5.0-11-gbfdc39b",
|
||||
"Rev": "bfdc39bde7a3c8dd361ea7fcdb69e7a41a475bb9"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/Unknwon/goconfig",
|
||||
"Rev": "5aa4f8cd5a472c2411c778b4680f59f2223f1966"
|
||||
"Rev": "87a46d97951ee1ea20ed3b24c25646a79e87ba5d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/VividCortex/ewma",
|
||||
@@ -39,123 +39,138 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/awserr",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/awsutil",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/client",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/client/metadata",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/corehandlers",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/credentials",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds",
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/stscreds",
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/defaults",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/ec2metadata",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/request",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/session",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/aws/signer/v4",
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restxml",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/service/s3",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/service/s3/s3iface",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/service/s3/s3manager",
|
||||
"Comment": "v1.1.7",
|
||||
"Rev": "13a12060f716145019378a10e2806c174356b857"
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/aws/aws-sdk-go/service/sts",
|
||||
"Comment": "v1.5.13-3-gc50c370",
|
||||
"Rev": "c50c37095f7ff735e74842842f9ec157c6300273"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/cpuguy83/go-md2man/md2man",
|
||||
@@ -173,12 +188,16 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/golang/protobuf/proto",
|
||||
"Rev": "552c7b9542c194800fd493123b3798ef0a832032"
|
||||
"Rev": "8ee79997227bf9b34611aee7946ae64735e6fd93"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/google/go-querystring/query",
|
||||
"Rev": "9235644dd9e52eeae6fa48efd539fdc351a0af53"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/googleapis/gax-go",
|
||||
"Rev": "da06d194a00e19ce00d9011a13931c3f6f6887c7"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/inconshreveable/mousetrap",
|
||||
"Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
|
||||
@@ -190,11 +209,11 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/ncw/go-acd",
|
||||
"Rev": "5622f9ac57985c9fd6e1ad419983c20043e007ce"
|
||||
"Rev": "7954f1fad2bda6a7836999003e4481d6e32edc1e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/ncw/swift",
|
||||
"Rev": "b964f2ca856aac39885e258ad25aec08d5f64ee6"
|
||||
"Rev": "cefd25ce9a2fdb37e4deecc743a2c58cafecdf3f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/pkg/errors",
|
||||
@@ -225,11 +244,11 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/cobra",
|
||||
"Rev": "6e91dded25d73176bf7f60b40dd7aa1f0bf9be8d"
|
||||
"Rev": "9495bc009a56819bdb0ddbc1a373e29c140bc674"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/cobra/doc",
|
||||
"Rev": "6e91dded25d73176bf7f60b40dd7aa1f0bf9be8d"
|
||||
"Rev": "9495bc009a56819bdb0ddbc1a373e29c140bc674"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/pflag",
|
||||
@@ -241,13 +260,13 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/stretchr/testify/assert",
|
||||
"Comment": "v1.1.3-4-g1f4a164",
|
||||
"Rev": "1f4a1643a57e798696635ea4c126e9127adb7d3c"
|
||||
"Comment": "v1.1.4-6-g18a02ba",
|
||||
"Rev": "18a02ba4a312f95da08ff4cfc0055750ce50ae9e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/stretchr/testify/require",
|
||||
"Comment": "v1.1.3-4-g1f4a164",
|
||||
"Rev": "1f4a1643a57e798696635ea4c126e9127adb7d3c"
|
||||
"Comment": "v1.1.4-6-g18a02ba",
|
||||
"Rev": "18a02ba4a312f95da08ff4cfc0055750ce50ae9e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/tsenart/tb",
|
||||
@@ -255,87 +274,111 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/nacl/secretbox",
|
||||
"Rev": "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"
|
||||
"Rev": "8a549a1948fc5271eb24f36dcb0d3b47dec75a16"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/pbkdf2",
|
||||
"Rev": "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"
|
||||
"Rev": "8a549a1948fc5271eb24f36dcb0d3b47dec75a16"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/poly1305",
|
||||
"Rev": "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"
|
||||
"Rev": "8a549a1948fc5271eb24f36dcb0d3b47dec75a16"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/salsa20/salsa",
|
||||
"Rev": "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"
|
||||
"Rev": "8a549a1948fc5271eb24f36dcb0d3b47dec75a16"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/scrypt",
|
||||
"Rev": "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"
|
||||
"Rev": "8a549a1948fc5271eb24f36dcb0d3b47dec75a16"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/ssh/terminal",
|
||||
"Rev": "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"
|
||||
"Rev": "8a549a1948fc5271eb24f36dcb0d3b47dec75a16"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/context",
|
||||
"Rev": "6acef71eb69611914f7a30939ea9f6e194c78172"
|
||||
"Rev": "6cdc0daab091c43fc46193327e0047b4f883c613"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/context/ctxhttp",
|
||||
"Rev": "6acef71eb69611914f7a30939ea9f6e194c78172"
|
||||
"Rev": "6cdc0daab091c43fc46193327e0047b4f883c613"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/http2",
|
||||
"Rev": "6cdc0daab091c43fc46193327e0047b4f883c613"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/http2/hpack",
|
||||
"Rev": "6cdc0daab091c43fc46193327e0047b4f883c613"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/idna",
|
||||
"Rev": "6cdc0daab091c43fc46193327e0047b4f883c613"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/internal/timeseries",
|
||||
"Rev": "6cdc0daab091c43fc46193327e0047b4f883c613"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/lex/httplex",
|
||||
"Rev": "6cdc0daab091c43fc46193327e0047b4f883c613"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/trace",
|
||||
"Rev": "6cdc0daab091c43fc46193327e0047b4f883c613"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/oauth2",
|
||||
"Rev": "25b4fb1468cb89700c7c060cb99f30581a61f5e3"
|
||||
"Rev": "f6093e37b6cb4092101a298aba5d794eb570757f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/oauth2/google",
|
||||
"Rev": "25b4fb1468cb89700c7c060cb99f30581a61f5e3"
|
||||
"Rev": "f6093e37b6cb4092101a298aba5d794eb570757f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/oauth2/internal",
|
||||
"Rev": "25b4fb1468cb89700c7c060cb99f30581a61f5e3"
|
||||
"Rev": "f6093e37b6cb4092101a298aba5d794eb570757f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/oauth2/jws",
|
||||
"Rev": "25b4fb1468cb89700c7c060cb99f30581a61f5e3"
|
||||
"Rev": "f6093e37b6cb4092101a298aba5d794eb570757f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/oauth2/jwt",
|
||||
"Rev": "25b4fb1468cb89700c7c060cb99f30581a61f5e3"
|
||||
"Rev": "f6093e37b6cb4092101a298aba5d794eb570757f"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/sys/unix",
|
||||
"Rev": "c200b10b5d5e122be351b67af224adc6128af5bf"
|
||||
"Rev": "478fcf54317e52ab69f40bb4c7a1520288d7f7ea"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/transform",
|
||||
"Rev": "a71fd10341b064c10f4a81ceac72bcf70f26ea34"
|
||||
"Rev": "5c6cf4f9a2357d38515014cea8c488ed22bdab90"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/text/unicode/norm",
|
||||
"Rev": "a71fd10341b064c10f4a81ceac72bcf70f26ea34"
|
||||
"Rev": "5c6cf4f9a2357d38515014cea8c488ed22bdab90"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/api/drive/v2",
|
||||
"Rev": "037d03010933c9fa8e57559c1b7faeec971688d1"
|
||||
"Rev": "eeba0f9a5982027f920574de995cd46f96058368"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/api/gensupport",
|
||||
"Rev": "037d03010933c9fa8e57559c1b7faeec971688d1"
|
||||
"Rev": "eeba0f9a5982027f920574de995cd46f96058368"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/api/googleapi",
|
||||
"Rev": "037d03010933c9fa8e57559c1b7faeec971688d1"
|
||||
"Rev": "eeba0f9a5982027f920574de995cd46f96058368"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/api/googleapi/internal/uritemplates",
|
||||
"Rev": "037d03010933c9fa8e57559c1b7faeec971688d1"
|
||||
"Rev": "eeba0f9a5982027f920574de995cd46f96058368"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/api/storage/v1",
|
||||
"Rev": "037d03010933c9fa8e57559c1b7faeec971688d1"
|
||||
"Rev": "eeba0f9a5982027f920574de995cd46f96058368"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/appengine",
|
||||
@@ -368,6 +411,61 @@
|
||||
{
|
||||
"ImportPath": "google.golang.org/appengine/internal/remote_api",
|
||||
"Rev": "c98f627282072b1230c8795abe98e2914c8a1de9"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/codes",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/credentials",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/grpclog",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/internal",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/metadata",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/naming",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/peer",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/stats",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/tap",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/transport",
|
||||
"Comment": "v1.0.4-78-g708a7f9",
|
||||
"Rev": "708a7f9f3283aa2d4f6132d287d78683babe55c8"
|
||||
}
|
||||
]
|
||||
}
|
||||
+167
-19
@@ -12,7 +12,7 @@
|
||||
<div id="header">
|
||||
<h1 class="title">rclone(1) User Manual</h1>
|
||||
<h2 class="author">Nick Craig-Wood</h2>
|
||||
<h3 class="date">Nov 06, 2016</h3>
|
||||
<h3 class="date">Jan 02, 2017</h3>
|
||||
</div>
|
||||
<h1 id="rclone">Rclone</h1>
|
||||
<p><a href="http://rclone.org/"><img src="http://rclone.org/img/rclone-120x120.png" alt="Logo" /></a></p>
|
||||
@@ -46,8 +46,8 @@
|
||||
<ul>
|
||||
<li><a href="http://rclone.org/">Home page</a></li>
|
||||
<li><a href="http://github.com/ncw/rclone">Github project page for source and bug tracker</a></li>
|
||||
<li><a href="https://google.com/+RcloneOrg" rel="publisher">Google+ page</a>
|
||||
</li></li>
|
||||
<li><a href="https://forum.rclone.org">Rclone Forum</a></li>
|
||||
<li><a href="https://google.com/+RcloneOrg" rel="publisher">Google+ page</a></li>
|
||||
<li><a href="http://rclone.org/downloads/">Downloads</a></li>
|
||||
</ul>
|
||||
<h1 id="install">Install</h1>
|
||||
@@ -168,7 +168,7 @@ destpath/sourcepath/two.txt</code></pre>
|
||||
<h2 id="rclone-move">rclone move</h2>
|
||||
<p>Move files from source to dest.</p>
|
||||
<h3 id="synopsis-3">Synopsis</h3>
|
||||
<p>Moves the contents of the source directory to the destination directory. Rclone will error if the source and destination overlap.</p>
|
||||
<p>Moves the contents of the source directory to the destination directory. Rclone will error if the source and destination overlap and the remote does not support a server side directory move operation.</p>
|
||||
<p>If no filters are in use and if possible this will server side move <code>source:path</code> into <code>dest:path</code>. After this <code>source:path</code> will no longer longer exist.</p>
|
||||
<p>Otherwise for each file in <code>source:path</code> selected by the filters (if any) this will move it into <code>dest:path</code>. If possible a server side move will be used, otherwise it will copy it (server side if possible) into <code>dest:path</code> then delete the original (if no errors on copy) in <code>source:path</code>.</p>
|
||||
<p><strong>Important</strong>: Since this can cause data loss, test first with the --dry-run flag.</p>
|
||||
@@ -325,9 +325,25 @@ two-3.txt: renamed from: two.txt</code></pre>
|
||||
<p>Or like this to output any .txt files in dir or subdirectories.</p>
|
||||
<pre><code>rclone --include "*.txt" cat remote:path/to/dir</code></pre>
|
||||
<pre><code>rclone cat remote:path</code></pre>
|
||||
<h2 id="rclone-copyto">rclone copyto</h2>
|
||||
<p>Copy files from source to dest, skipping already copied</p>
|
||||
<h3 id="synopsis-20">Synopsis</h3>
|
||||
<p>If source:path is a file or directory then it copies it to a file or directory named dest:path.</p>
|
||||
<p>This can be used to upload single files to other than their current name. If the source is a directory then it acts exactly like the copy command.</p>
|
||||
<p>So</p>
|
||||
<pre><code>rclone copyto src dst</code></pre>
|
||||
<p>where src and dst are rclone paths, either remote:path or /path/to/local or C:.</p>
|
||||
<p>This will:</p>
|
||||
<pre><code>if src is file
|
||||
copy it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
copy it to dst, overwriting existing files if they exist
|
||||
see copy command for full details</code></pre>
|
||||
<p>This doesn't transfer unchanged files, testing by size and modification time or MD5SUM. It doesn't delete files from the destination.</p>
|
||||
<pre><code>rclone copyto source:path dest:path</code></pre>
|
||||
<h2 id="rclone-genautocomplete">rclone genautocomplete</h2>
|
||||
<p>Output bash completion script for rclone.</p>
|
||||
<h3 id="synopsis-20">Synopsis</h3>
|
||||
<h3 id="synopsis-21">Synopsis</h3>
|
||||
<p>Generates a bash shell autocompletion script for rclone.</p>
|
||||
<p>This writes to /etc/bash_completion.d/rclone by default so will probably need to be run with sudo or as root, eg</p>
|
||||
<pre><code>sudo rclone genautocomplete</code></pre>
|
||||
@@ -337,12 +353,12 @@ two-3.txt: renamed from: two.txt</code></pre>
|
||||
<pre><code>rclone genautocomplete [output_file]</code></pre>
|
||||
<h2 id="rclone-gendocs">rclone gendocs</h2>
|
||||
<p>Output markdown docs for rclone to the directory supplied.</p>
|
||||
<h3 id="synopsis-21">Synopsis</h3>
|
||||
<h3 id="synopsis-22">Synopsis</h3>
|
||||
<p>This produces markdown docs for the rclone commands to the directory supplied. These are in a format suitable for hugo to render into the rclone.org website.</p>
|
||||
<pre><code>rclone gendocs output_directory</code></pre>
|
||||
<h2 id="rclone-listremotes">rclone listremotes</h2>
|
||||
<p>List all the remotes in the config file.</p>
|
||||
<h3 id="synopsis-22">Synopsis</h3>
|
||||
<h3 id="synopsis-23">Synopsis</h3>
|
||||
<p>rclone listremotes lists all the available remotes from the config file.</p>
|
||||
<p>When uses with the -l flag it lists the types too.</p>
|
||||
<pre><code>rclone listremotes</code></pre>
|
||||
@@ -350,7 +366,7 @@ two-3.txt: renamed from: two.txt</code></pre>
|
||||
<pre><code> -l, --long Show the type as well as names.</code></pre>
|
||||
<h2 id="rclone-mount">rclone mount</h2>
|
||||
<p>Mount the remote as a mountpoint. <strong>EXPERIMENTAL</strong></p>
|
||||
<h3 id="synopsis-23">Synopsis</h3>
|
||||
<h3 id="synopsis-24">Synopsis</h3>
|
||||
<p>rclone mount allows Linux, FreeBSD and macOS to mount any of Rclone's cloud storage systems as a file system with FUSE.</p>
|
||||
<p>This is <strong>EXPERIMENTAL</strong> - use with care.</p>
|
||||
<p>First set up your remote using <code>rclone config</code>. Check it works with <code>rclone ls</code> etc.</p>
|
||||
@@ -371,7 +387,7 @@ two-3.txt: renamed from: two.txt</code></pre>
|
||||
<ul>
|
||||
<li>All the remotes should work for read, but some may not for write
|
||||
<ul>
|
||||
<li>those which need to know the size in advance won't - eg B2, Amazon Drive</li>
|
||||
<li>those which need to know the size in advance won't - eg B2</li>
|
||||
<li>maybe should pass in size as -1 to mean work it out</li>
|
||||
<li>Or put in an an upload cache to cache the files on disk first</li>
|
||||
</ul></li>
|
||||
@@ -398,6 +414,29 @@ two-3.txt: renamed from: two.txt</code></pre>
|
||||
--uid uint32 Override the uid field set by the filesystem. (default 502)
|
||||
--umask int Override the permission bits set by the filesystem. (default 2)
|
||||
--write-back-cache Makes kernel buffer writes before sending them to rclone. Without this, writethrough caching is used.</code></pre>
|
||||
<h2 id="rclone-moveto">rclone moveto</h2>
|
||||
<p>Move file or directory from source to dest.</p>
|
||||
<h3 id="synopsis-25">Synopsis</h3>
|
||||
<p>If source:path is a file or directory then it moves it to a file or directory named dest:path.</p>
|
||||
<p>This can be used to rename files or upload single files to other than their existing name. If the source is a directory then it acts exacty like the move command.</p>
|
||||
<p>So</p>
|
||||
<pre><code>rclone moveto src dst</code></pre>
|
||||
<p>where src and dst are rclone paths, either remote:path or /path/to/local or C:.</p>
|
||||
<p>This will:</p>
|
||||
<pre><code>if src is file
|
||||
move it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
move it to dst, overwriting existing files if they exist
|
||||
see move command for full details</code></pre>
|
||||
<p>This doesn't transfer unchanged files, testing by size and modification time or MD5SUM. src will be deleted on successful transfer.</p>
|
||||
<p><strong>Important</strong>: Since this can cause data loss, test first with the --dry-run flag.</p>
|
||||
<pre><code>rclone moveto source:path dest:path</code></pre>
|
||||
<h2 id="rclone-rmdirs">rclone rmdirs</h2>
|
||||
<p>Remove any empty directoryies under the path.</p>
|
||||
<h3 id="synopsis-26">Synopsis</h3>
|
||||
<p>This removes any empty directories (or directories that only contain empty directories) under the path that it finds, including the path if it has nothing in.</p>
|
||||
<p>This is useful for tidying up remotes that rclone has left a lot of empty directories in.</p>
|
||||
<pre><code>rclone rmdirs remote:path</code></pre>
|
||||
<h2 id="copying-single-files">Copying single files</h2>
|
||||
<p>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 <code>Failed to create file system for "remote:file": is a file not a directory</code> if it isn't.</p>
|
||||
<p>For example, suppose you have a remote with a file in called <code>test.jpg</code>, then you could copy just that file like this</p>
|
||||
@@ -504,9 +543,16 @@ rclone sync /path/to/files remote:current-backup</code></pre>
|
||||
<p>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.</p>
|
||||
<p>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.</p>
|
||||
<h3 id="statstime">--stats=TIME</h3>
|
||||
<p>Rclone will print stats at regular intervals to show its progress.</p>
|
||||
<p>Commands which transfer data (<code>sync</code>, <code>copy</code>, <code>copyto</code>, <code>move</code>, <code>moveto</code>) will print data transfer stats at regular intervals to show their progress.</p>
|
||||
<p>This sets the interval.</p>
|
||||
<p>The default is <code>1m</code>. Use 0 to disable.</p>
|
||||
<p>If you set the stats interval then all command can show stats. This can be useful when running other commands, <code>check</code> or <code>mount</code> for example.</p>
|
||||
<h3 id="stats-unitbitsbytes">--stats-unit=bits|bytes</h3>
|
||||
<p>By default data transfer rates will be printed in bytes/second.</p>
|
||||
<p>This option allows the data rate to be printed in bits/second.</p>
|
||||
<p>Data transfer volume will still be reported in bytes.</p>
|
||||
<p>The rate is reported as a binary unit, not SI unit. So 1 Mbit/s equals 1,048,576 bits/s and not 1,000,000 bits/s.</p>
|
||||
<p>The default is <code>bytes</code>.</p>
|
||||
<h3 id="delete-beforeduringafter">--delete-(before,during,after)</h3>
|
||||
<p>This option allows you to specify when files on your destination are deleted when you sync folders.</p>
|
||||
<p>Specifying the value <code>--delete-before</code> will delete all files present on the destination, but not on the source <em>before</em> starting the transfer of any new or updated files. This uses extra memory as it has to store the source listing before proceeding.</p>
|
||||
@@ -563,6 +609,12 @@ c/u/q></code></pre>
|
||||
<p>rclone uses <a href="https://godoc.org/golang.org/x/crypto/nacl/secretbox">nacl secretbox</a> which in turn uses XSalsa20 and Poly1305 to encrypt and authenticate your configuration with secret-key cryptography. The password is SHA-256 hashed, which produces the key for secretbox. The hashed password is not stored.</p>
|
||||
<p>While this provides very good security, we do not recommend storing your encrypted rclone configuration in public if it contains sensitive information, maybe except if you use a very strong password.</p>
|
||||
<p>If it is safe in your environment, you can set the <code>RCLONE_CONFIG_PASS</code> environment variable to contain your password, in which case it will be used for decrypting the configuration.</p>
|
||||
<p>You can set this for a session from a script. For unix like systems save this to a file called <code>set-rclone-password</code>:</p>
|
||||
<pre><code>#!/bin/echo Source this file don't run it
|
||||
|
||||
read -s RCLONE_CONFIG_PASS
|
||||
export RCLONE_CONFIG_PASS</code></pre>
|
||||
<p>Then source the file when you want to use it. From the shell you would do <code>source set-rclone-password</code>. It will then ask you for the password and set it in the envonment variable.</p>
|
||||
<p>If you are running rclone inside a script, you might want to disable password prompts. To do that, pass the parameter <code>--ask-password=false</code> to rclone. This will make rclone fail instead of asking for a password if <code>RCLONE_CONFIG_PASS</code> doesn't contain a valid password.</p>
|
||||
<h2 id="developer-options">Developer options</h2>
|
||||
<p>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 <code>--drive-test-option</code> - see the docs for the remote in question.</p>
|
||||
@@ -671,10 +723,9 @@ y/e/d></code></pre>
|
||||
<p>Rclone has a sophisticated set of include and exclude rules. Some of these are based on patterns and some on other things like file size.</p>
|
||||
<p>The filters are applied for the <code>copy</code>, <code>sync</code>, <code>move</code>, <code>ls</code>, <code>lsl</code>, <code>md5sum</code>, <code>sha1sum</code>, <code>size</code>, <code>delete</code> and <code>check</code> operations. Note that <code>purge</code> does not obey the filters.</p>
|
||||
<p>Each path as it passes through rclone is matched against the include and exclude rules like <code>--include</code>, <code>--exclude</code>, <code>--include-from</code>, <code>--exclude-from</code>, <code>--filter</code>, or <code>--filter-from</code>. The simplest way to try them out is using the <code>ls</code> command, or <code>--dry-run</code> together with <code>-v</code>.</p>
|
||||
<p><strong>Important</strong> Due to limitations of the command line parser you can only use any of these options once - if you duplicate them then rclone will use the last one only.</p>
|
||||
<h2 id="patterns">Patterns</h2>
|
||||
<p>The patterns used to match files for inclusion or exclusion are based on "file globs" as used by the unix shell.</p>
|
||||
<p>If the pattern starts with a <code>/</code> then it only matches at the top level of the directory tree, relative to the root of the remote. If it doesn't start with <code>/</code> then it is matched starting at the <strong>end of the path</strong>, but it will only match a complete path element:</p>
|
||||
<p>If the pattern starts with a <code>/</code> then it only matches at the top level of the directory tree, <strong>relative to the root of the remote</strong> (not necessarily the root of the local drive). If it doesn't start with <code>/</code> then it is matched starting at the <strong>end of the path</strong>, but it will only match a complete path element:</p>
|
||||
<pre><code>file.jpg - matches "file.jpg"
|
||||
- matches "directory/file.jpg"
|
||||
- doesn't match "afile.jpg"
|
||||
@@ -722,9 +773,9 @@ y/e/d></code></pre>
|
||||
<p>Rclone implements bash style <code>{a,b,c}</code> glob matching which rsync doesn't.</p>
|
||||
<p>Rclone always does a wildcard match so <code>\</code> must always escape a <code>\</code>.</p>
|
||||
<h2 id="how-the-rules-are-used">How the rules are used</h2>
|
||||
<p>Rclone maintains a list of include rules and exclude rules.</p>
|
||||
<p>Each file is matched in order against the list until it finds a match. The file is then included or excluded according to the rule type.</p>
|
||||
<p>If the matcher falls off the bottom of the list then the path is included.</p>
|
||||
<p>Rclone maintains a combined list of include rules and exclude rules.</p>
|
||||
<p>Each file is matched in order, starting from the top, against the rule in the list until it finds a match. The file is then included or excluded according to the rule type.</p>
|
||||
<p>If the matcher fails to find a match after testing against all the entries in the list then the path is included.</p>
|
||||
<p>For example given the following rules, <code>+</code> being include, <code>-</code> being exclude,</p>
|
||||
<pre><code>- secret*.jpg
|
||||
+ *.jpg
|
||||
@@ -745,11 +796,26 @@ y/e/d></code></pre>
|
||||
<p>A similar process is done on directory entries before recursing into them. This only works on remotes which have a concept of directory (Eg local, google drive, onedrive, amazon drive) and not on bucket based remotes (eg s3, swift, google compute storage, b2).</p>
|
||||
<h2 id="adding-filtering-rules">Adding filtering rules</h2>
|
||||
<p>Filtering rules are added with the following command line flags.</p>
|
||||
<h3 id="repeating-options">Repeating options</h3>
|
||||
<p>You can repeat the following options to add more than one rule of that type.</p>
|
||||
<ul>
|
||||
<li><code>--include</code></li>
|
||||
<li><code>--include-from</code></li>
|
||||
<li><code>--exclude</code></li>
|
||||
<li><code>--exclude-from</code></li>
|
||||
<li><code>--filter</code></li>
|
||||
<li><code>--filter-from</code></li>
|
||||
</ul>
|
||||
<p>Note that all the options of the same type are processed together in the order above, regardless of what order they were placed on the command line.</p>
|
||||
<p>So all <code>--include</code> options are processed first in the order they appeared on the command line, then all <code>--include-from</code> options etc.</p>
|
||||
<p>To mix up the order includes and excludes, the <code>--filter</code> flag can be used.</p>
|
||||
<h3 id="exclude---exclude-files-matching-pattern"><code>--exclude</code> - Exclude files matching pattern</h3>
|
||||
<p>Add a single exclude rule with <code>--exclude</code>.</p>
|
||||
<p>This flag can be repeated. See above for the order the flags are processed in.</p>
|
||||
<p>Eg <code>--exclude *.bak</code> to exclude all bak files from the sync.</p>
|
||||
<h3 id="exclude-from---read-exclude-patterns-from-file"><code>--exclude-from</code> - Read exclude patterns from file</h3>
|
||||
<p>Add exclude rules from a file.</p>
|
||||
<p>This flag can be repeated. See above for the order the flags are processed in.</p>
|
||||
<p>Prepare a file like this <code>exclude-file.txt</code></p>
|
||||
<pre><code># a sample exclude rule file
|
||||
*.bak
|
||||
@@ -758,10 +824,12 @@ file2.jpg</code></pre>
|
||||
<p>This is useful if you have a lot of rules.</p>
|
||||
<h3 id="include---include-files-matching-pattern"><code>--include</code> - Include files matching pattern</h3>
|
||||
<p>Add a single include rule with <code>--include</code>.</p>
|
||||
<p>This flag can be repeated. See above for the order the flags are processed in.</p>
|
||||
<p>Eg <code>--include *.{png,jpg}</code> to include all <code>png</code> and <code>jpg</code> files in the backup and no others.</p>
|
||||
<p>This adds an implicit <code>--exclude *</code> at the very end of the filter list. This means you can mix <code>--include</code> and <code>--include-from</code> with the other filters (eg <code>--exclude</code>) but you must include all the files you want in the include statement. If this doesn't provide enough flexibility then you must use <code>--filter-from</code>.</p>
|
||||
<h3 id="include-from---read-include-patterns-from-file"><code>--include-from</code> - Read include patterns from file</h3>
|
||||
<p>Add include rules from a file.</p>
|
||||
<p>This flag can be repeated. See above for the order the flags are processed in.</p>
|
||||
<p>Prepare a file like this <code>include-file.txt</code></p>
|
||||
<pre><code># a sample include rule file
|
||||
*.jpg
|
||||
@@ -772,9 +840,11 @@ file2.avi</code></pre>
|
||||
<p>This adds an implicit <code>--exclude *</code> at the very end of the filter list. This means you can mix <code>--include</code> and <code>--include-from</code> with the other filters (eg <code>--exclude</code>) but you must include all the files you want in the include statement. If this doesn't provide enough flexibility then you must use <code>--filter-from</code>.</p>
|
||||
<h3 id="filter---add-a-file-filtering-rule"><code>--filter</code> - Add a file-filtering rule</h3>
|
||||
<p>This can be used to add a single include or exclude rule. Include rules start with <code>+</code> and exclude rules start with <code>-</code>. A special rule called <code>!</code> can be used to clear the existing rules.</p>
|
||||
<p>This flag can be repeated. See above for the order the flags are processed in.</p>
|
||||
<p>Eg <code>--filter "- *.bak"</code> to exclude all bak files from the sync.</p>
|
||||
<h3 id="filter-from---read-filtering-patterns-from-a-file"><code>--filter-from</code> - Read filtering patterns from a file</h3>
|
||||
<p>Add include/exclude rules from a file.</p>
|
||||
<p>This flag can be repeated. See above for the order the flags are processed in.</p>
|
||||
<p>Prepare a file like this <code>filter-file.txt</code></p>
|
||||
<pre><code># a sample exclude rule file
|
||||
- secret*.jpg
|
||||
@@ -787,6 +857,7 @@ file2.avi</code></pre>
|
||||
<p>This example will include all <code>jpg</code> and <code>png</code> files, exclude any files matching <code>secret*.jpg</code> and include <code>file2.avi</code>. Everything else will be excluded from the sync.</p>
|
||||
<h3 id="files-from---read-list-of-source-file-names"><code>--files-from</code> - Read list of source-file names</h3>
|
||||
<p>This reads a list of file names from the file passed in and <strong>only</strong> these files are transferred. The filtering rules are ignored completely if you use this option.</p>
|
||||
<p>This option can be repeated to read from more than one file. These are read in the order that they are placed on the command line.</p>
|
||||
<p>Prepare a file like this <code>files-from.txt</code></p>
|
||||
<pre><code># comment
|
||||
file1.jpg
|
||||
@@ -1045,8 +1116,8 @@ The hashes are used when transferring data as an integrity check and can be spec
|
||||
<td align="left">Amazon Drive</td>
|
||||
<td align="center">Yes</td>
|
||||
<td align="center">No</td>
|
||||
<td align="center">No <a href="https://github.com/ncw/rclone/issues/721">#721</a></td>
|
||||
<td align="center">No <a href="https://github.com/ncw/rclone/issues/721">#721</a></td>
|
||||
<td align="center">Yes</td>
|
||||
<td align="center">Yes</td>
|
||||
<td align="center">No <a href="https://github.com/ncw/rclone/issues/575">#575</a></td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
@@ -1204,7 +1275,7 @@ y/e/d> y</code></pre>
|
||||
<p>Google documents can only be exported from Google drive. When rclone downloads a Google doc it chooses a format to download depending upon this setting.</p>
|
||||
<p>By default the formats are <code>docx,xlsx,pptx,svg</code> which are a sensible default for an editable document.</p>
|
||||
<p>When choosing a format, rclone runs down the list provided in order and chooses the first file format the doc can be exported as from the list. If the file can't be exported to a format on the formats list, then rclone will choose a format from the default list.</p>
|
||||
<p>If you prefer an archive copy then you might use <code>--drive-formats pdf</code>, or if you prefer openoffice/libreoffice formats you might use <code>--drive-formats ods,odt</code>.</p>
|
||||
<p>If you prefer an archive copy then you might use <code>--drive-formats pdf</code>, or if you prefer openoffice/libreoffice formats you might use <code>--drive-formats ods,odt,odp</code>.</p>
|
||||
<p>Note that rclone adds the extension to the google doc, so if it is calles <code>My Spreadsheet</code> on google docs, it will be exported as <code>My Spreadsheet.xlsx</code> or <code>My Spreadsheet.pdf</code> etc.</p>
|
||||
<p>Here are the possible extensions with their corresponding mime types.</p>
|
||||
<table style="width:49%;">
|
||||
@@ -2042,7 +2113,7 @@ y/e/d> y</code></pre>
|
||||
<p>Amazon Drive has rate limiting so you may notice errors in the sync (429 errors). rclone will automatically retry the sync up to 3 times by default (see <code>--retries</code> flag) which should hopefully work around this problem.</p>
|
||||
<p>Amazon Drive has an internal limit of file sizes that can be uploaded to the service. This limit is not officially published, but all files larger than this will fail.</p>
|
||||
<p>At the time of writing (Jan 2016) is in the area of 50GB per file. This means that larger files are likely to fail.</p>
|
||||
<p>Unfortunatly there is no way for rclone to see that this failure is because of file size, so it will retry the operation, as any other failure. To avoid this problem, use <code>--max-size 50G</code> option to limit the maximum size of uploaded files.</p>
|
||||
<p>Unfortunatly there is no way for rclone to see that this failure is because of file size, so it will retry the operation, as any other failure. To avoid this problem, use <code>--max-size 50000M</code> option to limit the maximum size of uploaded files. Note that <code>--max-size</code> does not split files into segments, it only ignores files over this size.</p>
|
||||
<h2 id="microsoft-one-drive">Microsoft One Drive</h2>
|
||||
<p>Paths are specified as <code>remote:path</code></p>
|
||||
<p>Paths may be as deep as required, eg <code>remote:directory/subdirectory</code>.</p>
|
||||
@@ -2129,6 +2200,7 @@ y/e/d> y</code></pre>
|
||||
<p>Note that One Drive is case insensitive so you can't have a file called "Hello.doc" and one called "hello.doc".</p>
|
||||
<p>Rclone only supports your default One Drive, and doesn't work with One Drive for business. Both these issues may be fixed at some point depending on user demand!</p>
|
||||
<p>There are quite a few characters that can't be in One Drive file names. These can't occur on Windows platforms, but on non-Windows platforms they are common. Rclone will map these names to and from an identical looking unicode equivalent. For example if a file has a <code>?</code> in it will be mapped to <code>?</code> instead.</p>
|
||||
<p>The largest allowed file size is 10GiB (10,737,418,240 bytes).</p>
|
||||
<h2 id="hubic">Hubic</h2>
|
||||
<p>Paths are specified as <code>remote:path</code></p>
|
||||
<p>Paths are specified as <code>remote:container</code> (or <code>remote:</code> for the <code>lsd</code> command.) You may put subdirectories in too, eg <code>remote:container/path/to/dir</code>.</p>
|
||||
@@ -2670,6 +2742,52 @@ nounc = true</code></pre>
|
||||
<p><strong>NB</strong> This flag is only available on Unix based systems. On systems where it isn't supported (eg Windows) it will not appear as an valid flag.</p>
|
||||
<h2 id="changelog">Changelog</h2>
|
||||
<ul>
|
||||
<li>v1.35 - 2017-01-02
|
||||
<ul>
|
||||
<li>New Features</li>
|
||||
<li>moveto and copyto commands for choosing a destination name on copy/move</li>
|
||||
<li>rmdirs command to recursively delete empty directories</li>
|
||||
<li>Allow repeated --include/--exclude/--filter options</li>
|
||||
<li>Only show transfer stats on commands which transfer stuff
|
||||
<ul>
|
||||
<li>show stats on any command using the <code>--stats</code> flag</li>
|
||||
</ul></li>
|
||||
<li>Allow overlapping directories in move when server side dir move is supported</li>
|
||||
<li>Add --stats-unit option - thanks Scott McGillivray</li>
|
||||
<li>Bug Fixes</li>
|
||||
<li>Fix the config file being overwritten when two rclones are running</li>
|
||||
<li>Make rclone lsd obey the filters properly</li>
|
||||
<li>Fix compilation on mips</li>
|
||||
<li>Fix not transferring files that don't differ in size</li>
|
||||
<li>Fix panic on nil retry/fatal error</li>
|
||||
<li>Mount</li>
|
||||
<li>Retry reads on error - should help with reliability a lot</li>
|
||||
<li>Report the modification times for directories from the remote</li>
|
||||
<li>Add bandwidth accounting and limiting (fixes --bwlimit)</li>
|
||||
<li>If --stats provided will show stats and which files are transferring</li>
|
||||
<li>Support R/W files if truncate is set.</li>
|
||||
<li>Implement statfs interface so df works</li>
|
||||
<li>Note that write is now supported on Amazon Drive</li>
|
||||
<li>Report number of blocks in a file - thanks Stefan Breunig</li>
|
||||
<li>Crypt</li>
|
||||
<li>Prevent the user pointing crypt at itself</li>
|
||||
<li>Fix failed to authenticate decrypted block errors
|
||||
<ul>
|
||||
<li>these will now return the underlying unexpected EOF instead</li>
|
||||
</ul></li>
|
||||
<li>Amazon Drive</li>
|
||||
<li>Add support for server side move and directory move - thanks Stefan Breunig</li>
|
||||
<li>Fix nil pointer deref on size attribute</li>
|
||||
<li>B2</li>
|
||||
<li>Use new prefix and delimiter parameters in directory listings
|
||||
<ul>
|
||||
<li>This makes --max-depth 1 dir listings as used in mount much faster</li>
|
||||
</ul></li>
|
||||
<li>Reauth the account while doing uploads too - should help with token expiry</li>
|
||||
<li>Drive</li>
|
||||
<li>Make DirMove more efficient and complain about moving the root</li>
|
||||
<li>Create destination directory on Move()</li>
|
||||
</ul></li>
|
||||
<li>v1.34 - 2016-11-06
|
||||
<ul>
|
||||
<li>New Features</li>
|
||||
@@ -3567,6 +3685,36 @@ h='hotmail.com';a='@';
|
||||
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>');
|
||||
// -->
|
||||
</script><noscript>maxd13_luiz_carlos at hotmail dot com</noscript></li>
|
||||
<li>Stefan Breunig <script type="text/javascript">
|
||||
<!--
|
||||
h='yrden.de';a='@';n='stefan-github';e=n+a+h;
|
||||
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>');
|
||||
// -->
|
||||
</script><noscript>stefan-github at yrden dot de</noscript></li>
|
||||
<li>Alishan Ladhani <script type="text/javascript">
|
||||
<!--
|
||||
h='users.noreply.github.com';a='@';n='ali-l';e=n+a+h;
|
||||
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>');
|
||||
// -->
|
||||
</script><noscript>ali-l at users dot noreply dot github dot com</noscript></li>
|
||||
<li>0xJAKE <script type="text/javascript">
|
||||
<!--
|
||||
h='users.noreply.github.com';a='@';n='0xJAKE';e=n+a+h;
|
||||
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>');
|
||||
// -->
|
||||
</script><noscript>0xJAKE at users dot noreply dot github dot com</noscript></li>
|
||||
<li>Thibault Molleman <script type="text/javascript">
|
||||
<!--
|
||||
h='users.noreply.github.com';a='@';n='thibaultmol';e=n+a+h;
|
||||
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>');
|
||||
// -->
|
||||
</script><noscript>thibaultmol at users dot noreply dot github dot com</noscript></li>
|
||||
<li>Scott McGillivray <script type="text/javascript">
|
||||
<!--
|
||||
h='gmail.com';a='@';n='scott.mcgillivray';e=n+a+h;
|
||||
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>');
|
||||
// -->
|
||||
</script><noscript>scott.mcgillivray at gmail dot com</noscript></li>
|
||||
</ul>
|
||||
<h1 id="contact-the-rclone-project">Contact the rclone project</h1>
|
||||
<h2 id="forum">Forum</h2>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
% rclone(1) User Manual
|
||||
% Nick Craig-Wood
|
||||
% Nov 06, 2016
|
||||
% Jan 02, 2017
|
||||
|
||||
Rclone
|
||||
======
|
||||
@@ -37,7 +37,8 @@ Links
|
||||
|
||||
* [Home page](http://rclone.org/)
|
||||
* [Github project page for source and bug tracker](http://github.com/ncw/rclone)
|
||||
* <a href="https://google.com/+RcloneOrg" rel="publisher">Google+ page</a></li>
|
||||
* [Rclone Forum](https://forum.rclone.org)
|
||||
* <a href="https://google.com/+RcloneOrg" rel="publisher">Google+ page</a>
|
||||
* [Downloads](http://rclone.org/downloads/)
|
||||
|
||||
# Install #
|
||||
@@ -288,7 +289,8 @@ Move files from source to dest.
|
||||
|
||||
|
||||
Moves the contents of the source directory to the destination
|
||||
directory. Rclone will error if the source and destination overlap.
|
||||
directory. Rclone will error if the source and destination overlap and
|
||||
the remote does not support a server side directory move operation.
|
||||
|
||||
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
|
||||
@@ -652,6 +654,45 @@ Or like this to output any .txt files in dir or subdirectories.
|
||||
rclone cat remote:path
|
||||
```
|
||||
|
||||
## rclone copyto
|
||||
|
||||
Copy files from source to dest, skipping already copied
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
|
||||
If source:path is a file or directory then it copies it to a file or
|
||||
directory named dest:path.
|
||||
|
||||
This can be used to upload single files to other than their current
|
||||
name. If the source is a directory then it acts exactly like the copy
|
||||
command.
|
||||
|
||||
So
|
||||
|
||||
rclone copyto src dst
|
||||
|
||||
where src and dst are rclone paths, either remote:path or
|
||||
/path/to/local or C:\windows\path\if\on\windows.
|
||||
|
||||
This will:
|
||||
|
||||
if src is file
|
||||
copy it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
copy it to dst, overwriting existing files if they exist
|
||||
see copy command for full details
|
||||
|
||||
This doesn't transfer unchanged files, testing by size and
|
||||
modification time or MD5SUM. It doesn't delete files from the
|
||||
destination.
|
||||
|
||||
|
||||
```
|
||||
rclone copyto source:path dest:path
|
||||
```
|
||||
|
||||
## rclone genautocomplete
|
||||
|
||||
Output bash completion script for rclone.
|
||||
@@ -774,7 +815,7 @@ mount won't do that, so will be less reliable than the rclone command.
|
||||
### Bugs ###
|
||||
|
||||
* All the remotes should work for read, but some may not for write
|
||||
* those which need to know the size in advance won't - eg B2, Amazon Drive
|
||||
* those which need to know the size in advance won't - eg B2
|
||||
* maybe should pass in size as -1 to mean work it out
|
||||
* Or put in an an upload cache to cache the files on disk first
|
||||
|
||||
@@ -808,6 +849,68 @@ rclone mount remote:path /path/to/mountpoint
|
||||
--write-back-cache Makes kernel buffer writes before sending them to rclone. Without this, writethrough caching is used.
|
||||
```
|
||||
|
||||
## rclone moveto
|
||||
|
||||
Move file or directory from source to dest.
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
|
||||
If source:path is a file or directory then it moves it to a file or
|
||||
directory named dest:path.
|
||||
|
||||
This can be used to rename files or upload single files to other than
|
||||
their existing name. If the source is a directory then it acts exacty
|
||||
like the move command.
|
||||
|
||||
So
|
||||
|
||||
rclone moveto src dst
|
||||
|
||||
where src and dst are rclone paths, either remote:path or
|
||||
/path/to/local or C:\windows\path\if\on\windows.
|
||||
|
||||
This will:
|
||||
|
||||
if src is file
|
||||
move it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
move it to dst, overwriting existing files if they exist
|
||||
see move command for full details
|
||||
|
||||
This doesn't transfer unchanged files, testing by size and
|
||||
modification time or MD5SUM. src will be deleted on successful
|
||||
transfer.
|
||||
|
||||
**Important**: Since this can cause data loss, test first with the
|
||||
--dry-run flag.
|
||||
|
||||
|
||||
```
|
||||
rclone moveto source:path dest:path
|
||||
```
|
||||
|
||||
## rclone rmdirs
|
||||
|
||||
Remove any empty directoryies under the path.
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
This removes any empty directories (or directories that only contain
|
||||
empty directories) under the path that it finds, including the path if
|
||||
it has nothing in.
|
||||
|
||||
This is useful for tidying up remotes that rclone has left a lot of
|
||||
empty directories in.
|
||||
|
||||
|
||||
|
||||
```
|
||||
rclone rmdirs remote:path
|
||||
```
|
||||
|
||||
|
||||
Copying single files
|
||||
--------------------
|
||||
@@ -1120,12 +1223,31 @@ modification times in the same way as rclone.
|
||||
|
||||
### --stats=TIME ###
|
||||
|
||||
Rclone will print stats at regular intervals to show its progress.
|
||||
Commands which transfer data (`sync`, `copy`, `copyto`, `move`,
|
||||
`moveto`) will print data transfer stats at regular intervals to show
|
||||
their progress.
|
||||
|
||||
This sets the interval.
|
||||
|
||||
The default is `1m`. Use 0 to disable.
|
||||
|
||||
If you set the stats interval then all command can show stats. This
|
||||
can be useful when running other commands, `check` or `mount` for
|
||||
example.
|
||||
|
||||
### --stats-unit=bits|bytes ###
|
||||
|
||||
By default data transfer rates will be printed in bytes/second.
|
||||
|
||||
This option allows the data rate to be printed in bits/second.
|
||||
|
||||
Data transfer volume will still be reported in bytes.
|
||||
|
||||
The rate is reported as a binary unit, not SI unit. So 1 Mbit/s
|
||||
equals 1,048,576 bits/s and not 1,000,000 bits/s.
|
||||
|
||||
The default is `bytes`.
|
||||
|
||||
### --delete-(before,during,after) ###
|
||||
|
||||
This option allows you to specify when files on your destination are
|
||||
@@ -1254,6 +1376,20 @@ 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.
|
||||
|
||||
You can set this for a session from a script. For unix like systems
|
||||
save this to a file called `set-rclone-password`:
|
||||
|
||||
```
|
||||
#!/bin/echo Source this file don't run it
|
||||
|
||||
read -s RCLONE_CONFIG_PASS
|
||||
export RCLONE_CONFIG_PASS
|
||||
```
|
||||
|
||||
Then source the file when you want to use it. From the shell you
|
||||
would do `source set-rclone-password`. It will then ask you for the
|
||||
password and set it in the envonment variable.
|
||||
|
||||
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
|
||||
@@ -1489,19 +1625,16 @@ and exclude rules like `--include`, `--exclude`, `--include-from`,
|
||||
try them out is using the `ls` command, or `--dry-run` together with
|
||||
`-v`.
|
||||
|
||||
**Important** Due to limitations of the command line parser you can
|
||||
only use any of these options once - if you duplicate them then rclone
|
||||
will use the last one only.
|
||||
|
||||
## Patterns ##
|
||||
|
||||
The patterns used to match files for inclusion or exclusion are based
|
||||
on "file globs" as used by the unix shell.
|
||||
|
||||
If the pattern starts with a `/` then it only matches at the top level
|
||||
of the directory tree, relative to the root of the remote.
|
||||
If it doesn't start with `/` then it is matched starting at the
|
||||
**end of the path**, but it will only match a complete path element:
|
||||
of the directory tree, **relative to the root of the remote** (not
|
||||
necessarily the root of the local drive). If it doesn't start with `/`
|
||||
then it is matched starting at the **end of the path**, but it will
|
||||
only match a complete path element:
|
||||
|
||||
file.jpg - matches "file.jpg"
|
||||
- matches "directory/file.jpg"
|
||||
@@ -1590,13 +1723,14 @@ Rclone always does a wildcard match so `\` must always escape a `\`.
|
||||
|
||||
## How the rules are used ##
|
||||
|
||||
Rclone maintains a list of include rules and exclude rules.
|
||||
Rclone maintains a combined list of include rules and exclude rules.
|
||||
|
||||
Each file is matched in order against the list until it finds a match.
|
||||
The file is then included or excluded according to the rule type.
|
||||
Each file is matched in order, starting from the top, against the rule
|
||||
in the list until it finds a match. The file is then included or
|
||||
excluded according to the rule type.
|
||||
|
||||
If the matcher falls off the bottom of the list then the path is
|
||||
included.
|
||||
If the matcher fails to find a match after testing against all the
|
||||
entries in the list then the path is included.
|
||||
|
||||
For example given the following rules, `+` being include, `-` being
|
||||
exclude,
|
||||
@@ -1627,16 +1761,44 @@ based remotes (eg s3, swift, google compute storage, b2).
|
||||
|
||||
Filtering rules are added with the following command line flags.
|
||||
|
||||
### Repeating options ##
|
||||
|
||||
You can repeat the following options to add more than one rule of that
|
||||
type.
|
||||
|
||||
* `--include`
|
||||
* `--include-from`
|
||||
* `--exclude`
|
||||
* `--exclude-from`
|
||||
* `--filter`
|
||||
* `--filter-from`
|
||||
|
||||
Note that all the options of the same type are processed together in
|
||||
the order above, regardless of what order they were placed on the
|
||||
command line.
|
||||
|
||||
So all `--include` options are processed first in the order they
|
||||
appeared on the command line, then all `--include-from` options etc.
|
||||
|
||||
To mix up the order includes and excludes, the `--filter` flag can be
|
||||
used.
|
||||
|
||||
### `--exclude` - Exclude files matching pattern ###
|
||||
|
||||
Add a single exclude rule with `--exclude`.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Eg `--exclude *.bak` to exclude all bak files from the sync.
|
||||
|
||||
### `--exclude-from` - Read exclude patterns from file ###
|
||||
|
||||
Add exclude rules from a file.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Prepare a file like this `exclude-file.txt`
|
||||
|
||||
# a sample exclude rule file
|
||||
@@ -1652,6 +1814,9 @@ This is useful if you have a lot of rules.
|
||||
|
||||
Add a single include rule with `--include`.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Eg `--include *.{png,jpg}` to include all `png` and `jpg` files in the
|
||||
backup and no others.
|
||||
|
||||
@@ -1665,6 +1830,9 @@ flexibility then you must use `--filter-from`.
|
||||
|
||||
Add include rules from a file.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Prepare a file like this `include-file.txt`
|
||||
|
||||
# a sample include rule file
|
||||
@@ -1689,12 +1857,18 @@ This can be used to add a single include or exclude rule. Include
|
||||
rules start with `+ ` and exclude rules start with `- `. A special
|
||||
rule called `!` can be used to clear the existing rules.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Eg `--filter "- *.bak"` to exclude all bak files from the sync.
|
||||
|
||||
### `--filter-from` - Read filtering patterns from a file ###
|
||||
|
||||
Add include/exclude rules from a file.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Prepare a file like this `filter-file.txt`
|
||||
|
||||
# a sample exclude rule file
|
||||
@@ -1718,6 +1892,9 @@ This reads a list of file names from the file passed in and **only**
|
||||
these files are transferred. The filtering rules are ignored
|
||||
completely if you use this option.
|
||||
|
||||
This option can be repeated to read from more than one file. These
|
||||
are read in the order that they are placed on the command line.
|
||||
|
||||
Prepare a file like this `files-from.txt`
|
||||
|
||||
# comment
|
||||
@@ -1950,7 +2127,7 @@ operations more efficient.
|
||||
| Openstack Swift | Yes † | Yes | No | No | No |
|
||||
| Dropbox | Yes | Yes | Yes | Yes | No [#575](https://github.com/ncw/rclone/issues/575) |
|
||||
| Google Cloud Storage | Yes | Yes | No | No | No |
|
||||
| Amazon Drive | Yes | No | No [#721](https://github.com/ncw/rclone/issues/721) | No [#721](https://github.com/ncw/rclone/issues/721) | No [#575](https://github.com/ncw/rclone/issues/575) |
|
||||
| Amazon Drive | Yes | No | Yes | Yes | No [#575](https://github.com/ncw/rclone/issues/575) |
|
||||
| Microsoft One Drive | Yes | Yes | No [#197](https://github.com/ncw/rclone/issues/197) | No [#197](https://github.com/ncw/rclone/issues/197) | No [#575](https://github.com/ncw/rclone/issues/575) |
|
||||
| Hubic | Yes † | Yes | No | No | No |
|
||||
| Backblaze B2 | No | No | No | No | Yes |
|
||||
@@ -2166,7 +2343,7 @@ then rclone will choose a format from the default list.
|
||||
|
||||
If you prefer an archive copy then you might use `--drive-formats
|
||||
pdf`, or if you prefer openoffice/libreoffice formats you might use
|
||||
`--drive-formats ods,odt`.
|
||||
`--drive-formats ods,odt,odp`.
|
||||
|
||||
Note that rclone adds the extension to the google doc, so if it is
|
||||
calles `My Spreadsheet` on google docs, it will be exported as `My
|
||||
@@ -3280,8 +3457,9 @@ This means that larger files are likely to fail.
|
||||
|
||||
Unfortunatly there is no way for rclone to see that this failure is
|
||||
because of file size, so it will retry the operation, as any other
|
||||
failure. To avoid this problem, use `--max-size 50G` option to limit
|
||||
the maximum size of uploaded files.
|
||||
failure. To avoid this problem, use `--max-size 50000M` option to limit
|
||||
the maximum size of uploaded files. Note that `--max-size` does not split
|
||||
files into segments, it only ignores files over this size.
|
||||
|
||||
Microsoft One Drive
|
||||
-----------------------------------------
|
||||
@@ -3427,6 +3605,8 @@ platforms they are common. Rclone will map these names to and from an
|
||||
identical looking unicode equivalent. For example if a file has a `?`
|
||||
in it will be mapped to `?` instead.
|
||||
|
||||
The largest allowed file size is 10GiB (10,737,418,240 bytes).
|
||||
|
||||
Hubic
|
||||
-----------------------------------------
|
||||
|
||||
@@ -4400,6 +4580,44 @@ flag.
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* v1.35 - 2017-01-02
|
||||
* New Features
|
||||
* moveto and copyto commands for choosing a destination name on copy/move
|
||||
* rmdirs command to recursively delete empty directories
|
||||
* Allow repeated --include/--exclude/--filter options
|
||||
* Only show transfer stats on commands which transfer stuff
|
||||
* show stats on any command using the `--stats` flag
|
||||
* Allow overlapping directories in move when server side dir move is supported
|
||||
* Add --stats-unit option - thanks Scott McGillivray
|
||||
* Bug Fixes
|
||||
* Fix the config file being overwritten when two rclones are running
|
||||
* Make rclone lsd obey the filters properly
|
||||
* Fix compilation on mips
|
||||
* Fix not transferring files that don't differ in size
|
||||
* Fix panic on nil retry/fatal error
|
||||
* Mount
|
||||
* Retry reads on error - should help with reliability a lot
|
||||
* Report the modification times for directories from the remote
|
||||
* Add bandwidth accounting and limiting (fixes --bwlimit)
|
||||
* If --stats provided will show stats and which files are transferring
|
||||
* Support R/W files if truncate is set.
|
||||
* Implement statfs interface so df works
|
||||
* Note that write is now supported on Amazon Drive
|
||||
* Report number of blocks in a file - thanks Stefan Breunig
|
||||
* Crypt
|
||||
* Prevent the user pointing crypt at itself
|
||||
* Fix failed to authenticate decrypted block errors
|
||||
* these will now return the underlying unexpected EOF instead
|
||||
* Amazon Drive
|
||||
* Add support for server side move and directory move - thanks Stefan Breunig
|
||||
* Fix nil pointer deref on size attribute
|
||||
* B2
|
||||
* Use new prefix and delimiter parameters in directory listings
|
||||
* This makes --max-depth 1 dir listings as used in mount much faster
|
||||
* Reauth the account while doing uploads too - should help with token expiry
|
||||
* Drive
|
||||
* Make DirMove more efficient and complain about moving the root
|
||||
* Create destination directory on Move()
|
||||
* v1.34 - 2016-11-06
|
||||
* New Features
|
||||
* Stop single file and `--files-from` operations iterating through the source bucket.
|
||||
@@ -5118,6 +5336,11 @@ Contributors
|
||||
* Felix Bünemann <buenemann@louis.info>
|
||||
* Durval Menezes <jmrclone@durval.com>
|
||||
* Luiz Carlos Rumbelsperger Viana <maxd13_luiz_carlos@hotmail.com>
|
||||
* Stefan Breunig <stefan-github@yrden.de>
|
||||
* Alishan Ladhani <ali-l@users.noreply.github.com>
|
||||
* 0xJAKE <0xJAKE@users.noreply.github.com>
|
||||
* Thibault Molleman <thibaultmol@users.noreply.github.com>
|
||||
* Scott McGillivray <scott.mcgillivray@gmail.com>
|
||||
|
||||
# Contact the rclone project #
|
||||
|
||||
|
||||
+232
-21
@@ -1,6 +1,6 @@
|
||||
rclone(1) User Manual
|
||||
Nick Craig-Wood
|
||||
Nov 06, 2016
|
||||
Jan 02, 2017
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ Links
|
||||
|
||||
- Home page
|
||||
- Github project page for source and bug tracker
|
||||
- Rclone Forum
|
||||
- Google+ page
|
||||
- Downloads
|
||||
|
||||
@@ -284,7 +285,8 @@ Move files from source to dest.
|
||||
Synopsis
|
||||
|
||||
Moves the contents of the source directory to the destination directory.
|
||||
Rclone will error if the source and destination overlap.
|
||||
Rclone will error if the source and destination overlap and the remote
|
||||
does not support a server side directory move operation.
|
||||
|
||||
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
|
||||
@@ -599,6 +601,40 @@ Or like this to output any .txt files in dir or subdirectories.
|
||||
rclone cat remote:path
|
||||
|
||||
|
||||
rclone copyto
|
||||
|
||||
Copy files from source to dest, skipping already copied
|
||||
|
||||
Synopsis
|
||||
|
||||
If source:path is a file or directory then it copies it to a file or
|
||||
directory named dest:path.
|
||||
|
||||
This can be used to upload single files to other than their current
|
||||
name. If the source is a directory then it acts exactly like the copy
|
||||
command.
|
||||
|
||||
So
|
||||
|
||||
rclone copyto src dst
|
||||
|
||||
where src and dst are rclone paths, either remote:path or /path/to/local
|
||||
or C:.
|
||||
|
||||
This will:
|
||||
|
||||
if src is file
|
||||
copy it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
copy it to dst, overwriting existing files if they exist
|
||||
see copy command for full details
|
||||
|
||||
This doesn't transfer unchanged files, testing by size and modification
|
||||
time or MD5SUM. It doesn't delete files from the destination.
|
||||
|
||||
rclone copyto source:path dest:path
|
||||
|
||||
|
||||
rclone genautocomplete
|
||||
|
||||
Output bash completion script for rclone.
|
||||
@@ -705,8 +741,7 @@ that, so will be less reliable than the rclone command.
|
||||
Bugs
|
||||
|
||||
- All the remotes should work for read, but some may not for write
|
||||
- those which need to know the size in advance won't - eg B2,
|
||||
Amazon Drive
|
||||
- those which need to know the size in advance won't - eg B2
|
||||
- maybe should pass in size as -1 to mean work it out
|
||||
- Or put in an an upload cache to cache the files on disk first
|
||||
|
||||
@@ -736,6 +771,59 @@ Options
|
||||
--write-back-cache Makes kernel buffer writes before sending them to rclone. Without this, writethrough caching is used.
|
||||
|
||||
|
||||
rclone moveto
|
||||
|
||||
Move file or directory from source to dest.
|
||||
|
||||
Synopsis
|
||||
|
||||
If source:path is a file or directory then it moves it to a file or
|
||||
directory named dest:path.
|
||||
|
||||
This can be used to rename files or upload single files to other than
|
||||
their existing name. If the source is a directory then it acts exacty
|
||||
like the move command.
|
||||
|
||||
So
|
||||
|
||||
rclone moveto src dst
|
||||
|
||||
where src and dst are rclone paths, either remote:path or /path/to/local
|
||||
or C:.
|
||||
|
||||
This will:
|
||||
|
||||
if src is file
|
||||
move it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
move it to dst, overwriting existing files if they exist
|
||||
see move command for full details
|
||||
|
||||
This doesn't transfer unchanged files, testing by size and modification
|
||||
time or MD5SUM. src will be deleted on successful transfer.
|
||||
|
||||
IMPORTANT: Since this can cause data loss, test first with the --dry-run
|
||||
flag.
|
||||
|
||||
rclone moveto source:path dest:path
|
||||
|
||||
|
||||
rclone rmdirs
|
||||
|
||||
Remove any empty directoryies under the path.
|
||||
|
||||
Synopsis
|
||||
|
||||
This removes any empty directories (or directories that only contain
|
||||
empty directories) under the path that it finds, including the path if
|
||||
it has nothing in.
|
||||
|
||||
This is useful for tidying up remotes that rclone has left a lot of
|
||||
empty directories in.
|
||||
|
||||
rclone rmdirs remote:path
|
||||
|
||||
|
||||
Copying single files
|
||||
|
||||
rclone normally syncs or copies directories. However if the source
|
||||
@@ -1043,12 +1131,29 @@ modification times in the same way as rclone.
|
||||
|
||||
--stats=TIME
|
||||
|
||||
Rclone will print stats at regular intervals to show its progress.
|
||||
Commands which transfer data (sync, copy, copyto, move, moveto) will
|
||||
print data transfer stats at regular intervals to show their progress.
|
||||
|
||||
This sets the interval.
|
||||
|
||||
The default is 1m. Use 0 to disable.
|
||||
|
||||
If you set the stats interval then all command can show stats. This can
|
||||
be useful when running other commands, check or mount for example.
|
||||
|
||||
--stats-unit=bits|bytes
|
||||
|
||||
By default data transfer rates will be printed in bytes/second.
|
||||
|
||||
This option allows the data rate to be printed in bits/second.
|
||||
|
||||
Data transfer volume will still be reported in bytes.
|
||||
|
||||
The rate is reported as a binary unit, not SI unit. So 1 Mbit/s equals
|
||||
1,048,576 bits/s and not 1,000,000 bits/s.
|
||||
|
||||
The default is bytes.
|
||||
|
||||
--delete-(before,during,after)
|
||||
|
||||
This option allows you to specify when files on your destination are
|
||||
@@ -1173,6 +1278,18 @@ 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.
|
||||
|
||||
You can set this for a session from a script. For unix like systems save
|
||||
this to a file called set-rclone-password:
|
||||
|
||||
#!/bin/echo Source this file don't run it
|
||||
|
||||
read -s RCLONE_CONFIG_PASS
|
||||
export RCLONE_CONFIG_PASS
|
||||
|
||||
Then source the file when you want to use it. From the shell you would
|
||||
do source set-rclone-password. It will then ask you for the password and
|
||||
set it in the envonment variable.
|
||||
|
||||
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 of asking for a password if
|
||||
@@ -1404,10 +1521,6 @@ exclude rules like --include, --exclude, --include-from, --exclude-from,
|
||||
--filter, or --filter-from. The simplest way to try them out is using
|
||||
the ls command, or --dry-run together with -v.
|
||||
|
||||
IMPORTANT Due to limitations of the command line parser you can only use
|
||||
any of these options once - if you duplicate them then rclone will use
|
||||
the last one only.
|
||||
|
||||
|
||||
Patterns
|
||||
|
||||
@@ -1415,9 +1528,10 @@ The patterns used to match files for inclusion or exclusion are based on
|
||||
"file globs" as used by the unix shell.
|
||||
|
||||
If the pattern starts with a / then it only matches at the top level of
|
||||
the directory tree, relative to the root of the remote. If it doesn't
|
||||
start with / then it is matched starting at the END OF THE PATH, but it
|
||||
will only match a complete path element:
|
||||
the directory tree, RELATIVE TO THE ROOT OF THE REMOTE (not necessarily
|
||||
the root of the local drive). If it doesn't start with / then it is
|
||||
matched starting at the END OF THE PATH, but it will only match a
|
||||
complete path element:
|
||||
|
||||
file.jpg - matches "file.jpg"
|
||||
- matches "directory/file.jpg"
|
||||
@@ -1504,13 +1618,14 @@ Rclone always does a wildcard match so \ must always escape a \.
|
||||
|
||||
How the rules are used
|
||||
|
||||
Rclone maintains a list of include rules and exclude rules.
|
||||
Rclone maintains a combined list of include rules and exclude rules.
|
||||
|
||||
Each file is matched in order against the list until it finds a match.
|
||||
The file is then included or excluded according to the rule type.
|
||||
Each file is matched in order, starting from the top, against the rule
|
||||
in the list until it finds a match. The file is then included or
|
||||
excluded according to the rule type.
|
||||
|
||||
If the matcher falls off the bottom of the list then the path is
|
||||
included.
|
||||
If the matcher fails to find a match after testing against all the
|
||||
entries in the list then the path is included.
|
||||
|
||||
For example given the following rules, + being include, - being exclude,
|
||||
|
||||
@@ -1541,16 +1656,44 @@ Adding filtering rules
|
||||
|
||||
Filtering rules are added with the following command line flags.
|
||||
|
||||
Repeating options
|
||||
|
||||
You can repeat the following options to add more than one rule of that
|
||||
type.
|
||||
|
||||
- --include
|
||||
- --include-from
|
||||
- --exclude
|
||||
- --exclude-from
|
||||
- --filter
|
||||
- --filter-from
|
||||
|
||||
Note that all the options of the same type are processed together in the
|
||||
order above, regardless of what order they were placed on the command
|
||||
line.
|
||||
|
||||
So all --include options are processed first in the order they appeared
|
||||
on the command line, then all --include-from options etc.
|
||||
|
||||
To mix up the order includes and excludes, the --filter flag can be
|
||||
used.
|
||||
|
||||
--exclude - Exclude files matching pattern
|
||||
|
||||
Add a single exclude rule with --exclude.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Eg --exclude *.bak to exclude all bak files from the sync.
|
||||
|
||||
--exclude-from - Read exclude patterns from file
|
||||
|
||||
Add exclude rules from a file.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Prepare a file like this exclude-file.txt
|
||||
|
||||
# a sample exclude rule file
|
||||
@@ -1566,6 +1709,9 @@ This is useful if you have a lot of rules.
|
||||
|
||||
Add a single include rule with --include.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Eg --include *.{png,jpg} to include all png and jpg files in the backup
|
||||
and no others.
|
||||
|
||||
@@ -1579,6 +1725,9 @@ you must use --filter-from.
|
||||
|
||||
Add include rules from a file.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Prepare a file like this include-file.txt
|
||||
|
||||
# a sample include rule file
|
||||
@@ -1603,12 +1752,18 @@ This can be used to add a single include or exclude rule. Include rules
|
||||
start with + and exclude rules start with -. A special rule called ! can
|
||||
be used to clear the existing rules.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Eg --filter "- *.bak" to exclude all bak files from the sync.
|
||||
|
||||
--filter-from - Read filtering patterns from a file
|
||||
|
||||
Add include/exclude rules from a file.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Prepare a file like this filter-file.txt
|
||||
|
||||
# a sample exclude rule file
|
||||
@@ -1632,6 +1787,9 @@ This reads a list of file names from the file passed in and ONLY these
|
||||
files are transferred. The filtering rules are ignored completely if you
|
||||
use this option.
|
||||
|
||||
This option can be repeated to read from more than one file. These are
|
||||
read in the order that they are placed on the command line.
|
||||
|
||||
Prepare a file like this files-from.txt
|
||||
|
||||
# comment
|
||||
@@ -1867,7 +2025,7 @@ more efficient.
|
||||
Openstack Swift Yes † Yes No No No
|
||||
Dropbox Yes Yes Yes Yes No #575
|
||||
Google Cloud Storage Yes Yes No No No
|
||||
Amazon Drive Yes No No #721 No #721 No #575
|
||||
Amazon Drive Yes No Yes Yes No #575
|
||||
Microsoft One Drive Yes Yes No #197 No #197 No #575
|
||||
Hubic Yes † Yes No No No
|
||||
Backblaze B2 No No No No Yes
|
||||
@@ -2078,7 +2236,7 @@ rclone will choose a format from the default list.
|
||||
|
||||
If you prefer an archive copy then you might use --drive-formats pdf, or
|
||||
if you prefer openoffice/libreoffice formats you might use
|
||||
--drive-formats ods,odt.
|
||||
--drive-formats ods,odt,odp.
|
||||
|
||||
Note that rclone adds the extension to the google doc, so if it is
|
||||
calles My Spreadsheet on google docs, it will be exported as
|
||||
@@ -3229,8 +3387,9 @@ means that larger files are likely to fail.
|
||||
|
||||
Unfortunatly there is no way for rclone to see that this failure is
|
||||
because of file size, so it will retry the operation, as any other
|
||||
failure. To avoid this problem, use --max-size 50G option to limit the
|
||||
maximum size of uploaded files.
|
||||
failure. To avoid this problem, use --max-size 50000M option to limit
|
||||
the maximum size of uploaded files. Note that --max-size does not split
|
||||
files into segments, it only ignores files over this size.
|
||||
|
||||
|
||||
Microsoft One Drive
|
||||
@@ -3372,6 +3531,8 @@ they are common. Rclone will map these names to and from an identical
|
||||
looking unicode equivalent. For example if a file has a ? in it will be
|
||||
mapped to ? instead.
|
||||
|
||||
The largest allowed file size is 10GiB (10,737,418,240 bytes).
|
||||
|
||||
|
||||
Hubic
|
||||
|
||||
@@ -4292,6 +4453,51 @@ it isn't supported (eg Windows) it will not appear as an valid flag.
|
||||
|
||||
Changelog
|
||||
|
||||
- v1.35 - 2017-01-02
|
||||
- New Features
|
||||
- moveto and copyto commands for choosing a destination name on
|
||||
copy/move
|
||||
- rmdirs command to recursively delete empty directories
|
||||
- Allow repeated --include/--exclude/--filter options
|
||||
- Only show transfer stats on commands which transfer stuff
|
||||
- show stats on any command using the --stats flag
|
||||
- Allow overlapping directories in move when server side dir move
|
||||
is supported
|
||||
- Add --stats-unit option - thanks Scott McGillivray
|
||||
- Bug Fixes
|
||||
- Fix the config file being overwritten when two rclones are
|
||||
running
|
||||
- Make rclone lsd obey the filters properly
|
||||
- Fix compilation on mips
|
||||
- Fix not transferring files that don't differ in size
|
||||
- Fix panic on nil retry/fatal error
|
||||
- Mount
|
||||
- Retry reads on error - should help with reliability a lot
|
||||
- Report the modification times for directories from the remote
|
||||
- Add bandwidth accounting and limiting (fixes --bwlimit)
|
||||
- If --stats provided will show stats and which files are
|
||||
transferring
|
||||
- Support R/W files if truncate is set.
|
||||
- Implement statfs interface so df works
|
||||
- Note that write is now supported on Amazon Drive
|
||||
- Report number of blocks in a file - thanks Stefan Breunig
|
||||
- Crypt
|
||||
- Prevent the user pointing crypt at itself
|
||||
- Fix failed to authenticate decrypted block errors
|
||||
- these will now return the underlying unexpected EOF instead
|
||||
- Amazon Drive
|
||||
- Add support for server side move and directory move - thanks
|
||||
Stefan Breunig
|
||||
- Fix nil pointer deref on size attribute
|
||||
- B2
|
||||
- Use new prefix and delimiter parameters in directory listings
|
||||
- This makes --max-depth 1 dir listings as used in mount much
|
||||
faster
|
||||
- Reauth the account while doing uploads too - should help with
|
||||
token expiry
|
||||
- Drive
|
||||
- Make DirMove more efficient and complain about moving the root
|
||||
- Create destination directory on Move()
|
||||
- v1.34 - 2016-11-06
|
||||
- New Features
|
||||
- Stop single file and --files-from operations iterating through
|
||||
@@ -5070,6 +5276,11 @@ Contributors
|
||||
- Felix Bünemann buenemann@louis.info
|
||||
- Durval Menezes jmrclone@durval.com
|
||||
- Luiz Carlos Rumbelsperger Viana maxd13_luiz_carlos@hotmail.com
|
||||
- Stefan Breunig stefan-github@yrden.de
|
||||
- Alishan Ladhani ali-l@users.noreply.github.com
|
||||
- 0xJAKE 0xJAKE@users.noreply.github.com
|
||||
- Thibault Molleman thibaultmol@users.noreply.github.com
|
||||
- Scott McGillivray scott.mcgillivray@gmail.com
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -50,10 +50,12 @@ ifdef GO_LATEST
|
||||
go get -u github.com/golang/lint/golint
|
||||
go get -u github.com/mitchellh/gox
|
||||
go get -u github.com/inconshreveable/mousetrap
|
||||
go get -u github.com/tools/godep
|
||||
endif
|
||||
|
||||
# Update dependencies
|
||||
update:
|
||||
rm -rf Godeps vendor
|
||||
go get -t -u -f -v ./...
|
||||
godep save ./...
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
[Contributing](CONTRIBUTING.md) |
|
||||
[Changelog](http://rclone.org/changelog/) |
|
||||
[Installation](http://rclone.org/install/) |
|
||||
[Forum](https://forum.rclone.org/)
|
||||
[G+](https://google.com/+RcloneOrg)
|
||||
|
||||
|
||||
|
||||
+12
-3
@@ -8,17 +8,26 @@ Required software for making a release
|
||||
* golint - go get github.com/golang/lint
|
||||
|
||||
Making a release
|
||||
* make update
|
||||
* git status - make sure everything is checked in
|
||||
* Check travis & appveyor builds are green
|
||||
* make check
|
||||
* make test
|
||||
* make tag
|
||||
* edit docs/content/changelog.md
|
||||
* make doc
|
||||
* git commit -a -v
|
||||
* git status - to check for new man pages - git add them
|
||||
* git commit -a -v -m "Version v1.XX"
|
||||
* make retag
|
||||
* # Set the GOPATH for a gox enabled compiler - . ~/bin/go-cross - not required for go >= 1.5
|
||||
* # Set the GOPATH for a current stable go compiler
|
||||
* make cross
|
||||
* make upload
|
||||
* make upload_website
|
||||
* git push --tags origin master
|
||||
* make upload_github
|
||||
|
||||
Early in the next release cycle update the vendored dependencies
|
||||
* make update
|
||||
* git status
|
||||
* git add new files
|
||||
* carry forward any patches to vendor stuff
|
||||
* git commit -a -v
|
||||
@@ -13,10 +13,12 @@ we ignore assets completely!
|
||||
*/
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"path"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
@@ -96,6 +98,7 @@ type Fs struct {
|
||||
pacer *pacer.Pacer // pacer for API calls
|
||||
ts *oauthutil.TokenSource // token source for oauth
|
||||
uploads int32 // number of uploads in progress - atomic access required
|
||||
trueRootID string // ID of true root directory
|
||||
}
|
||||
|
||||
// Object describes a acd object
|
||||
@@ -198,11 +201,12 @@ func NewFs(name, root string) (fs.Fs, error) {
|
||||
if err != nil || rootInfo.Id == nil {
|
||||
return nil, errors.Wrap(err, "failed to get root")
|
||||
}
|
||||
f.trueRootID = *rootInfo.Id
|
||||
|
||||
// Renew the token in the background
|
||||
go f.renewToken()
|
||||
|
||||
f.dirCache = dircache.New(root, *rootInfo.Id, f)
|
||||
f.dirCache = dircache.New(root, f.trueRootID, f)
|
||||
|
||||
// Find the current root
|
||||
err = f.dirCache.FindRoot(false)
|
||||
@@ -210,7 +214,7 @@ func NewFs(name, root string) (fs.Fs, error) {
|
||||
// Assume it is a file
|
||||
newRoot, remote := dircache.SplitPath(root)
|
||||
newF := *f
|
||||
newF.dirCache = dircache.New(newRoot, *rootInfo.Id, &newF)
|
||||
newF.dirCache = dircache.New(newRoot, f.trueRootID, &newF)
|
||||
newF.root = newRoot
|
||||
// Make new Fs which is the parent
|
||||
err = newF.dirCache.FindRoot(false)
|
||||
@@ -392,6 +396,17 @@ func (f *Fs) listAll(dirID string, title string, directoriesOnly bool, filesOnly
|
||||
if *node.Status != statusAvailable {
|
||||
continue
|
||||
}
|
||||
// Ignore bogus nodes Amazon Drive sometimes reports
|
||||
hasValidParent := false
|
||||
for _, parent := range node.Parents {
|
||||
if parent == dirID {
|
||||
hasValidParent = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !hasValidParent {
|
||||
continue
|
||||
}
|
||||
// Store the nodes up in case we have to retry the listing
|
||||
out = append(out, node)
|
||||
}
|
||||
@@ -578,11 +593,7 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo) (fs.Object, error) {
|
||||
err = f.pacer.CallNoRetry(func() (bool, error) {
|
||||
start := time.Now()
|
||||
f.startUpload()
|
||||
if src.Size() != 0 {
|
||||
info, resp, err = folder.Put(in, leaf)
|
||||
} else {
|
||||
info, resp, err = folder.PutSized(in, size, leaf)
|
||||
}
|
||||
info, resp, err = folder.Put(in, leaf)
|
||||
f.stopUpload()
|
||||
var ok bool
|
||||
ok, info, err = f.checkUpload(resp, in, src, info, err, time.Since(start))
|
||||
@@ -599,22 +610,147 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo) (fs.Object, error) {
|
||||
}
|
||||
|
||||
// Mkdir creates the container if it doesn't exist
|
||||
func (f *Fs) Mkdir() error {
|
||||
return f.dirCache.FindRoot(true)
|
||||
func (f *Fs) Mkdir(dir string) error {
|
||||
err := f.dirCache.FindRoot(true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if dir != "" {
|
||||
_, err = f.dirCache.FindDir(dir, true)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// Move src to this remote using server side move operations.
|
||||
//
|
||||
// This is stored with the remote path given
|
||||
//
|
||||
// It returns the destination Object and a possible error
|
||||
//
|
||||
// Will only be called if src.Fs().Name() == f.Name()
|
||||
//
|
||||
// If it isn't possible then return fs.ErrorCantMove
|
||||
func (f *Fs) Move(src fs.Object, remote string) (fs.Object, error) {
|
||||
// go test -v -run '^Test(Setup|Init|FsMkdir|FsPutFile1|FsPutFile2|FsUpdateFile1|FsMove)$'
|
||||
srcObj, ok := src.(*Object)
|
||||
if !ok {
|
||||
fs.Debug(src, "Can't move - not same remote type")
|
||||
return nil, fs.ErrorCantMove
|
||||
}
|
||||
|
||||
// create the destination directory if necessary
|
||||
err := f.dirCache.FindRoot(true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
srcLeaf, srcDirectoryID, err := srcObj.fs.dirCache.FindPath(srcObj.remote, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dstLeaf, dstDirectoryID, err := f.dirCache.FindPath(remote, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dstInfo, err := f.moveNode(srcObj.remote, dstLeaf, dstDirectoryID, srcObj.info, srcLeaf, srcDirectoryID, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dstObj := &Object{
|
||||
fs: f,
|
||||
remote: remote,
|
||||
info: dstInfo,
|
||||
}
|
||||
return dstObj, nil
|
||||
}
|
||||
|
||||
// DirCacheFlush resets the directory cache - used in testing as an
|
||||
// optional interface
|
||||
func (f *Fs) DirCacheFlush() {
|
||||
f.dirCache.ResetRoot()
|
||||
}
|
||||
|
||||
// DirMove moves src directory to this remote using server side move
|
||||
// operations.
|
||||
//
|
||||
// Will only be called if src.Fs().Name() == f.Name()
|
||||
//
|
||||
// If it isn't possible then return fs.ErrorCantDirMove
|
||||
//
|
||||
// If destination exists then return fs.ErrorDirExists
|
||||
func (f *Fs) DirMove(src fs.Fs) (err error) {
|
||||
// go test -v -run '^Test(Setup|Init|FsMkdir|FsPutFile1|FsPutFile2|FsUpdateFile1|FsDirMove)$
|
||||
srcFs, ok := src.(*Fs)
|
||||
if !ok {
|
||||
fs.Debug(src, "DirMove error: not same remote type")
|
||||
return fs.ErrorCantDirMove
|
||||
}
|
||||
|
||||
// Check if destination exists
|
||||
if f.dirCache.FoundRoot() {
|
||||
fs.Debug(src, "DirMove error: destination exists")
|
||||
return fs.ErrorDirExists
|
||||
}
|
||||
|
||||
// Refuse to move to or from the root
|
||||
if f.root == "" || srcFs.root == "" {
|
||||
fs.Debug(src, "DirMove error: Can't move root")
|
||||
return errors.New("can't move root directory")
|
||||
}
|
||||
|
||||
// Find ID of parent
|
||||
dstLeaf, dstDirectoryID, err := f.dirCache.FindPath(f.root, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Find the ID of the source and make a node from it
|
||||
err = srcFs.dirCache.FindRoot(false)
|
||||
if err != nil {
|
||||
fs.Debug(src, "DirMove error: error finding src root: %v", err)
|
||||
return err
|
||||
}
|
||||
srcDirectoryID, err := srcFs.dirCache.RootParentID()
|
||||
if err != nil {
|
||||
fs.Debug(src, "DirMove error: error finding src RootParentID: %v", err)
|
||||
return err
|
||||
}
|
||||
srcLeaf, _ := dircache.SplitPath(srcFs.root)
|
||||
|
||||
// FIXME make a proper node.UpdateMetadata command
|
||||
srcInfo := acd.NodeFromId(srcFs.dirCache.RootID(), f.c.Nodes)
|
||||
var jsonStr string
|
||||
err = srcFs.pacer.Call(func() (bool, error) {
|
||||
jsonStr, err = srcInfo.GetMetadata()
|
||||
return srcFs.shouldRetry(nil, err)
|
||||
})
|
||||
if err != nil {
|
||||
fs.Debug(src, "DirMove error: error reading src metadata: %v", err)
|
||||
return err
|
||||
}
|
||||
err = json.Unmarshal([]byte(jsonStr), &srcInfo)
|
||||
if err != nil {
|
||||
fs.Debug(src, "DirMove error: error reading unpacking src metadata: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = f.moveNode(srcFs.root, dstLeaf, dstDirectoryID, srcInfo, srcLeaf, srcDirectoryID, true)
|
||||
|
||||
srcFs.dirCache.ResetRoot()
|
||||
return err
|
||||
}
|
||||
|
||||
// purgeCheck remotes the root directory, if check is set then it
|
||||
// refuses to do so if it has anything in
|
||||
func (f *Fs) purgeCheck(check bool) error {
|
||||
if f.root == "" {
|
||||
func (f *Fs) purgeCheck(dir string, check bool) error {
|
||||
root := path.Join(f.root, dir)
|
||||
if root == "" {
|
||||
return errors.New("can't purge root directory")
|
||||
}
|
||||
dc := f.dirCache
|
||||
err := dc.FindRoot(false)
|
||||
rootID, err := dc.FindDir(dir, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rootID := dc.RootID()
|
||||
|
||||
if check {
|
||||
// check directory is empty
|
||||
@@ -650,7 +786,7 @@ func (f *Fs) purgeCheck(check bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
f.dirCache.ResetRoot()
|
||||
f.dirCache.FlushDir(dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -660,8 +796,8 @@ func (f *Fs) purgeCheck(check bool) error {
|
||||
// Rmdir deletes the root folder
|
||||
//
|
||||
// Returns an error if it isn't empty
|
||||
func (f *Fs) Rmdir() error {
|
||||
return f.purgeCheck(true)
|
||||
func (f *Fs) Rmdir(dir string) error {
|
||||
return f.purgeCheck(dir, true)
|
||||
}
|
||||
|
||||
// Precision return the precision of this Fs
|
||||
@@ -703,7 +839,7 @@ func (f *Fs) Hashes() fs.HashSet {
|
||||
// deleting all the files quicker than just running Remove() on the
|
||||
// result of List()
|
||||
func (f *Fs) Purge() error {
|
||||
return f.purgeCheck(false)
|
||||
return f.purgeCheck("", false)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
@@ -731,7 +867,7 @@ func (o *Object) Hash(t fs.HashType) (string, error) {
|
||||
if t != fs.HashMD5 {
|
||||
return "", fs.ErrHashUnsupported
|
||||
}
|
||||
if o.info.ContentProperties.Md5 != nil {
|
||||
if o.info.ContentProperties != nil && o.info.ContentProperties.Md5 != nil {
|
||||
return *o.info.ContentProperties.Md5, nil
|
||||
}
|
||||
return "", nil
|
||||
@@ -739,7 +875,10 @@ func (o *Object) Hash(t fs.HashType) (string, error) {
|
||||
|
||||
// Size returns the size of an object in bytes
|
||||
func (o *Object) Size() int64 {
|
||||
return int64(*o.info.ContentProperties.Size)
|
||||
if o.info.ContentProperties != nil && o.info.ContentProperties.Size != nil {
|
||||
return int64(*o.info.ContentProperties.Size)
|
||||
}
|
||||
return 0 // Object is likely PENDING
|
||||
}
|
||||
|
||||
// readMetaData gets the metadata if it hasn't already been fetched
|
||||
@@ -829,7 +968,6 @@ func (o *Object) Open(options ...fs.OpenOption) (in io.ReadCloser, err error) {
|
||||
//
|
||||
// The new object may have been created if an error is returned
|
||||
func (o *Object) Update(in io.Reader, src fs.ObjectInfo) error {
|
||||
size := src.Size()
|
||||
file := acd.File{Node: o.info}
|
||||
var info *acd.File
|
||||
var resp *http.Response
|
||||
@@ -837,11 +975,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo) error {
|
||||
err = o.fs.pacer.CallNoRetry(func() (bool, error) {
|
||||
start := time.Now()
|
||||
o.fs.startUpload()
|
||||
if size != 0 {
|
||||
info, resp, err = file.Overwrite(in)
|
||||
} else {
|
||||
info, resp, err = file.OverwriteSized(in, size)
|
||||
}
|
||||
info, resp, err = file.Overwrite(in)
|
||||
o.fs.stopUpload()
|
||||
var ok bool
|
||||
ok, info, err = o.fs.checkUpload(resp, in, src, info, err, time.Since(start))
|
||||
@@ -857,20 +991,144 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Remove an object
|
||||
func (o *Object) Remove() error {
|
||||
// Remove a node
|
||||
func (f *Fs) removeNode(info *acd.Node) error {
|
||||
var resp *http.Response
|
||||
var err error
|
||||
err = o.fs.pacer.Call(func() (bool, error) {
|
||||
resp, err = o.info.Trash()
|
||||
return o.fs.shouldRetry(resp, err)
|
||||
err = f.pacer.Call(func() (bool, error) {
|
||||
resp, err = info.Trash()
|
||||
return f.shouldRetry(resp, err)
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
// Remove an object
|
||||
func (o *Object) Remove() error {
|
||||
return o.fs.removeNode(o.info)
|
||||
}
|
||||
|
||||
// Restore a node
|
||||
func (f *Fs) restoreNode(info *acd.Node) (*acd.Node, error) {
|
||||
var resp *http.Response
|
||||
var err error
|
||||
err = f.pacer.Call(func() (bool, error) {
|
||||
info, resp, err = info.Restore()
|
||||
return f.shouldRetry(resp, err)
|
||||
})
|
||||
return info, err
|
||||
}
|
||||
|
||||
// Changes name of given node
|
||||
func (f *Fs) renameNode(info *acd.Node, newName string) (*acd.Node, error) {
|
||||
var resp *http.Response
|
||||
var err error
|
||||
err = f.pacer.Call(func() (bool, error) {
|
||||
info, resp, err = info.Rename(newName)
|
||||
return f.shouldRetry(resp, err)
|
||||
})
|
||||
return info, err
|
||||
}
|
||||
|
||||
// Replaces one parent with another, effectively moving the file. Leaves other
|
||||
// parents untouched. ReplaceParent cannot be used when the file is trashed.
|
||||
func (f *Fs) replaceParent(info *acd.Node, oldParentID string, newParentID string) error {
|
||||
return f.pacer.Call(func() (bool, error) {
|
||||
resp, err := info.ReplaceParent(oldParentID, newParentID)
|
||||
return f.shouldRetry(resp, err)
|
||||
})
|
||||
}
|
||||
|
||||
// Adds one additional parent to object.
|
||||
func (f *Fs) addParent(info *acd.Node, newParentID string) error {
|
||||
return f.pacer.Call(func() (bool, error) {
|
||||
resp, err := info.AddParent(newParentID)
|
||||
return f.shouldRetry(resp, err)
|
||||
})
|
||||
}
|
||||
|
||||
// Remove given parent from object, leaving the other possible
|
||||
// parents untouched. Object can end up having no parents.
|
||||
func (f *Fs) removeParent(info *acd.Node, parentID string) error {
|
||||
return f.pacer.Call(func() (bool, error) {
|
||||
resp, err := info.RemoveParent(parentID)
|
||||
return f.shouldRetry(resp, err)
|
||||
})
|
||||
}
|
||||
|
||||
// moveNode moves the node given from the srcLeaf,srcDirectoryID to
|
||||
// the dstLeaf,dstDirectoryID
|
||||
func (f *Fs) moveNode(name, dstLeaf, dstDirectoryID string, srcInfo *acd.Node, srcLeaf, srcDirectoryID string, useDirErrorMsgs bool) (dstInfo *acd.Node, err error) {
|
||||
// fs.Debug(name, "moveNode dst(%q,%s) <- src(%q,%s)", dstLeaf, dstDirectoryID, srcLeaf, srcDirectoryID)
|
||||
cantMove := fs.ErrorCantMove
|
||||
if useDirErrorMsgs {
|
||||
cantMove = fs.ErrorCantDirMove
|
||||
}
|
||||
|
||||
if len(srcInfo.Parents) > 1 && srcLeaf != dstLeaf {
|
||||
fs.Debug(name, "Move error: object is attached to multiple parents and should be renamed. This would change the name of the node in all parents.")
|
||||
return nil, cantMove
|
||||
}
|
||||
|
||||
if srcLeaf != dstLeaf {
|
||||
// fs.Debug(name, "renaming")
|
||||
dstInfo, err = f.renameNode(srcInfo, dstLeaf)
|
||||
if err != nil {
|
||||
fs.Debug(name, "Move: quick path rename failed: %v", err)
|
||||
goto OnConflict
|
||||
}
|
||||
}
|
||||
if srcDirectoryID != dstDirectoryID {
|
||||
// fs.Debug(name, "trying parent replace: %s -> %s", oldParentID, newParentID)
|
||||
err = f.replaceParent(srcInfo, srcDirectoryID, dstDirectoryID)
|
||||
if err != nil {
|
||||
fs.Debug(name, "Move: quick path parent replace failed: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return dstInfo, nil
|
||||
|
||||
OnConflict:
|
||||
fs.Debug(name, "Could not directly rename file, presumably because there was a file with the same name already. Instead, the file will now be trashed where such operations do not cause errors. It will be restored to the correct parent after. If any of the subsequent calls fails, the rename/move will be in an invalid state.")
|
||||
|
||||
// fs.Debug(name, "Trashing file")
|
||||
err = f.removeNode(srcInfo)
|
||||
if err != nil {
|
||||
fs.Debug(name, "Move: remove node failed: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
// fs.Debug(name, "Renaming file")
|
||||
_, err = f.renameNode(srcInfo, dstLeaf)
|
||||
if err != nil {
|
||||
fs.Debug(name, "Move: rename node failed: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
// note: replacing parent is forbidden by API, modifying them individually is
|
||||
// okay though
|
||||
// fs.Debug(name, "Adding target parent")
|
||||
err = f.addParent(srcInfo, dstDirectoryID)
|
||||
if err != nil {
|
||||
fs.Debug(name, "Move: addParent failed: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
// fs.Debug(name, "removing original parent")
|
||||
err = f.removeParent(srcInfo, srcDirectoryID)
|
||||
if err != nil {
|
||||
fs.Debug(name, "Move: removeParent failed: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
// fs.Debug(name, "Restoring")
|
||||
dstInfo, err = f.restoreNode(srcInfo)
|
||||
if err != nil {
|
||||
fs.Debug(name, "Move: restoreNode node failed: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
return dstInfo, nil
|
||||
}
|
||||
|
||||
// MimeType of an Object if known, "" otherwise
|
||||
func (o *Object) MimeType() string {
|
||||
if o.info.ContentProperties.ContentType != nil {
|
||||
if o.info.ContentProperties != nil && o.info.ContentProperties.ContentType != nil {
|
||||
return *o.info.ContentProperties.ContentType
|
||||
}
|
||||
return ""
|
||||
@@ -881,8 +1139,9 @@ var (
|
||||
_ fs.Fs = (*Fs)(nil)
|
||||
_ fs.Purger = (*Fs)(nil)
|
||||
// _ fs.Copier = (*Fs)(nil)
|
||||
// _ fs.Mover = (*Fs)(nil)
|
||||
// _ fs.DirMover = (*Fs)(nil)
|
||||
_ fs.Object = (*Object)(nil)
|
||||
_ fs.MimeTyper = &Object{}
|
||||
_ fs.Mover = (*Fs)(nil)
|
||||
_ fs.DirMover = (*Fs)(nil)
|
||||
_ fs.DirCacheFlusher = (*Fs)(nil)
|
||||
_ fs.Object = (*Object)(nil)
|
||||
_ fs.MimeTyper = &Object{}
|
||||
)
|
||||
@@ -23,6 +23,7 @@ func TestFsString(t *testing.T) { fstests.TestFsString(t) }
|
||||
func TestFsRmdirEmpty(t *testing.T) { fstests.TestFsRmdirEmpty(t) }
|
||||
func TestFsRmdirNotFound(t *testing.T) { fstests.TestFsRmdirNotFound(t) }
|
||||
func TestFsMkdir(t *testing.T) { fstests.TestFsMkdir(t) }
|
||||
func TestFsMkdirRmdirSubdir(t *testing.T) { fstests.TestFsMkdirRmdirSubdir(t) }
|
||||
func TestFsListEmpty(t *testing.T) { fstests.TestFsListEmpty(t) }
|
||||
func TestFsListDirEmpty(t *testing.T) { fstests.TestFsListDirEmpty(t) }
|
||||
func TestFsNewObjectNotFound(t *testing.T) { fstests.TestFsNewObjectNotFound(t) }
|
||||
|
||||
@@ -154,6 +154,8 @@ type ListFileNamesRequest struct {
|
||||
StartFileName string `json:"startFileName,omitempty"` // optional - The first file name to return. If there is a file with this name, it will be returned in the list. If not, the first file name after this the first one after this name.
|
||||
MaxFileCount int `json:"maxFileCount,omitempty"` // optional - The maximum number of files to return from this call. The default value is 100, and the maximum allowed is 1000.
|
||||
StartFileID string `json:"startFileId,omitempty"` // optional - What to pass in to startFileId for the next search to continue where this one left off.
|
||||
Prefix string `json:"prefix,omitempty"` // optional - Files returned will be limited to those with the given prefix. Defaults to the empty string, which matches all files.
|
||||
Delimiter string `json:"delimiter,omitempty"` // Files returned will be limited to those within the top folder, or any one subfolder. Defaults to NULL. Folder names will also be returned. The delimiter character will be used to "break" file names into folders.
|
||||
}
|
||||
|
||||
// ListFileNamesResponse is as received from b2_list_file_names or b2_list_file_versions
|
||||
|
||||
@@ -465,34 +465,6 @@ func (f *Fs) NewObject(remote string) (fs.Object, error) {
|
||||
return f.newObjectWithInfo(remote, nil)
|
||||
}
|
||||
|
||||
// sendDir works out given a lastDir and a remote which directories should be sent
|
||||
func sendDir(lastDir string, remote string, level int) (dirNames []string, newLastDir string) {
|
||||
dir := path.Dir(remote)
|
||||
if dir == "." {
|
||||
// No slashes - nothing to do!
|
||||
return nil, lastDir
|
||||
}
|
||||
if dir == lastDir {
|
||||
// Still in same directory
|
||||
return nil, lastDir
|
||||
}
|
||||
newLastDir = lastDir
|
||||
for {
|
||||
slashes := strings.Count(dir, "/")
|
||||
if !strings.HasPrefix(lastDir, dir) && slashes < level {
|
||||
dirNames = append([]string{dir}, dirNames...)
|
||||
}
|
||||
if newLastDir == lastDir {
|
||||
newLastDir = dir
|
||||
}
|
||||
dir = path.Dir(dir)
|
||||
if dir == "." {
|
||||
break
|
||||
}
|
||||
}
|
||||
return dirNames, newLastDir
|
||||
}
|
||||
|
||||
// listFn is called from list to handle an object
|
||||
type listFn func(remote string, object *api.File, isDirectory bool) error
|
||||
|
||||
@@ -503,6 +475,8 @@ var errEndList = errors.New("end list")
|
||||
// list lists the objects into the function supplied from
|
||||
// the bucket and root supplied
|
||||
//
|
||||
// dir is the starting directory, "" for root
|
||||
//
|
||||
// level is the depth to search to
|
||||
//
|
||||
// If prefix is set then startFileName is used as a prefix which all
|
||||
@@ -517,6 +491,14 @@ func (f *Fs) list(dir string, level int, prefix string, limit int, hidden bool,
|
||||
if dir != "" {
|
||||
root += dir + "/"
|
||||
}
|
||||
delimiter := ""
|
||||
switch level {
|
||||
case 1:
|
||||
delimiter = "/"
|
||||
case fs.MaxLevel:
|
||||
default:
|
||||
return fs.ErrorLevelNotSupported
|
||||
}
|
||||
bucketID, err := f.getBucketID()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -528,6 +510,8 @@ func (f *Fs) list(dir string, level int, prefix string, limit int, hidden bool,
|
||||
var request = api.ListFileNamesRequest{
|
||||
BucketID: bucketID,
|
||||
MaxFileCount: chunkSize,
|
||||
Prefix: root,
|
||||
Delimiter: delimiter,
|
||||
}
|
||||
prefix = root + prefix
|
||||
if prefix != "" {
|
||||
@@ -541,7 +525,6 @@ func (f *Fs) list(dir string, level int, prefix string, limit int, hidden bool,
|
||||
if hidden {
|
||||
opts.Path = "/b2_list_file_versions"
|
||||
}
|
||||
lastDir := dir
|
||||
for {
|
||||
err := f.pacer.Call(func() (bool, error) {
|
||||
resp, err := f.srv.CallJSON(&opts, &request, &response)
|
||||
@@ -553,34 +536,26 @@ func (f *Fs) list(dir string, level int, prefix string, limit int, hidden bool,
|
||||
for i := range response.Files {
|
||||
file := &response.Files[i]
|
||||
// Finish if file name no longer has prefix
|
||||
if !strings.HasPrefix(file.Name, prefix) {
|
||||
if prefix != "" && !strings.HasPrefix(file.Name, prefix) {
|
||||
return nil
|
||||
}
|
||||
remote := file.Name[len(f.root):]
|
||||
slashes := strings.Count(remote, "/")
|
||||
|
||||
// Check if this file makes a new directories
|
||||
var dirNames []string
|
||||
dirNames, lastDir = sendDir(lastDir, remote, level)
|
||||
for _, dirName := range dirNames {
|
||||
err = fn(dirName, nil, true)
|
||||
if err != nil {
|
||||
if err == errEndList {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
if !strings.HasPrefix(file.Name, f.root) {
|
||||
fs.Log(f, "Odd name received %q", file.Name)
|
||||
continue
|
||||
}
|
||||
|
||||
// Send the file
|
||||
if slashes < level {
|
||||
err = fn(remote, file, false)
|
||||
if err != nil {
|
||||
if err == errEndList {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
remote := file.Name[len(f.root):]
|
||||
// Check for directory
|
||||
isDirectory := level != 0 && strings.HasSuffix(remote, "/")
|
||||
if isDirectory {
|
||||
remote = remote[:len(remote)-1]
|
||||
}
|
||||
// Send object
|
||||
err = fn(remote, file, isDirectory)
|
||||
if err != nil {
|
||||
if err == errEndList {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
// end if no NextFileName
|
||||
@@ -745,7 +720,11 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo) (fs.Object, error) {
|
||||
}
|
||||
|
||||
// Mkdir creates the bucket if it doesn't exist
|
||||
func (f *Fs) Mkdir() error {
|
||||
func (f *Fs) Mkdir(dir string) error {
|
||||
// Can't create subdirs
|
||||
if dir != "" {
|
||||
return nil
|
||||
}
|
||||
opts := rest.Opts{
|
||||
Method: "POST",
|
||||
Path: "/b2_create_bucket",
|
||||
@@ -784,8 +763,8 @@ func (f *Fs) Mkdir() error {
|
||||
// Rmdir deletes the bucket if the fs is at the root
|
||||
//
|
||||
// Returns an error if it isn't empty
|
||||
func (f *Fs) Rmdir() error {
|
||||
if f.root != "" {
|
||||
func (f *Fs) Rmdir(dir string) error {
|
||||
if f.root != "" || dir != "" {
|
||||
return nil
|
||||
}
|
||||
opts := rest.Opts{
|
||||
@@ -896,7 +875,7 @@ func (f *Fs) purge(oldOnly bool) error {
|
||||
wg.Wait()
|
||||
|
||||
if !oldOnly {
|
||||
checkErr(f.Rmdir())
|
||||
checkErr(f.Rmdir(""))
|
||||
}
|
||||
return errReturn
|
||||
}
|
||||
@@ -1368,7 +1347,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo) (err error) {
|
||||
// Don't retry, return a retry error instead
|
||||
err = o.fs.pacer.CallNoRetry(func() (bool, error) {
|
||||
resp, err := o.fs.srv.CallJSON(&opts, nil, &response)
|
||||
retry, err := o.fs.shouldRetryNoReauth(resp, err)
|
||||
retry, err := o.fs.shouldRetry(resp, err)
|
||||
// On retryable error clear UploadURL
|
||||
if retry {
|
||||
fs.Debug(o, "Clearing upload URL because of error: %v", err)
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/ncw/rclone/fstest"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
// Test b2 string encoding
|
||||
@@ -169,116 +168,3 @@ func TestParseTimeString(t *testing.T) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestSendDir(t *testing.T) {
|
||||
for _, test := range []struct {
|
||||
lastDir string
|
||||
remote string
|
||||
level int
|
||||
dirNames []string
|
||||
newLastDir string
|
||||
}{
|
||||
{
|
||||
lastDir: "",
|
||||
remote: "test.txt",
|
||||
level: 100,
|
||||
dirNames: nil,
|
||||
newLastDir: "",
|
||||
},
|
||||
{
|
||||
lastDir: "",
|
||||
remote: "potato/test.txt",
|
||||
level: 100,
|
||||
dirNames: []string{"potato"},
|
||||
newLastDir: "potato",
|
||||
},
|
||||
{
|
||||
lastDir: "potato",
|
||||
remote: "potato/test.txt",
|
||||
level: 100,
|
||||
dirNames: nil,
|
||||
newLastDir: "potato",
|
||||
},
|
||||
{
|
||||
lastDir: "",
|
||||
remote: "potato/sausage/test.txt",
|
||||
level: 100,
|
||||
dirNames: []string{"potato", "potato/sausage"},
|
||||
newLastDir: "potato/sausage",
|
||||
},
|
||||
{
|
||||
lastDir: "potato",
|
||||
remote: "potato/sausage/test.txt",
|
||||
level: 100,
|
||||
dirNames: []string{"potato/sausage"},
|
||||
newLastDir: "potato/sausage",
|
||||
},
|
||||
{
|
||||
lastDir: "potato/sausage",
|
||||
remote: "potato/sausage/test.txt",
|
||||
level: 100,
|
||||
dirNames: nil,
|
||||
newLastDir: "potato/sausage",
|
||||
},
|
||||
{
|
||||
lastDir: "",
|
||||
remote: "a/b/c/d/e/f.txt",
|
||||
level: 100,
|
||||
dirNames: []string{"a", "a/b", "a/b/c", "a/b/c/d", "a/b/c/d/e"},
|
||||
newLastDir: "a/b/c/d/e",
|
||||
},
|
||||
{
|
||||
lastDir: "a/b/c/d/e",
|
||||
remote: "a/b/c/d/E/f.txt",
|
||||
level: 100,
|
||||
dirNames: []string{"a/b/c/d/E"},
|
||||
newLastDir: "a/b/c/d/E",
|
||||
},
|
||||
{
|
||||
lastDir: "a/b/c/d/e",
|
||||
remote: "a/b/C/D/E/f.txt",
|
||||
level: 100,
|
||||
dirNames: []string{"a/b/C", "a/b/C/D", "a/b/C/D/E"},
|
||||
newLastDir: "a/b/C/D/E",
|
||||
},
|
||||
{
|
||||
lastDir: "a/b/c",
|
||||
remote: "a/b/c/d/e/f.txt",
|
||||
level: 100,
|
||||
dirNames: []string{"a/b/c/d", "a/b/c/d/e"},
|
||||
newLastDir: "a/b/c/d/e",
|
||||
},
|
||||
{
|
||||
lastDir: "",
|
||||
remote: "a/b/c/d/e/f.txt",
|
||||
level: 1,
|
||||
dirNames: []string{"a"},
|
||||
newLastDir: "a/b/c/d/e",
|
||||
},
|
||||
{
|
||||
lastDir: "a/b/c",
|
||||
remote: "a/b/c/d/e/f.txt",
|
||||
level: 1,
|
||||
dirNames: nil,
|
||||
newLastDir: "a/b/c/d/e",
|
||||
},
|
||||
{
|
||||
lastDir: "",
|
||||
remote: "a/b/c/d/e/f.txt",
|
||||
level: 3,
|
||||
dirNames: []string{"a", "a/b", "a/b/c"},
|
||||
newLastDir: "a/b/c/d/e",
|
||||
},
|
||||
{
|
||||
lastDir: "a/b/C/D/E",
|
||||
remote: "a/b/c/d/e/f.txt",
|
||||
level: 3,
|
||||
dirNames: []string{"a/b/c"},
|
||||
newLastDir: "a/b/c/d/e",
|
||||
},
|
||||
} {
|
||||
dirNames, newLastDir := sendDir(test.lastDir, test.remote, test.level)
|
||||
assert.Equal(t, test.dirNames, dirNames, "dirNames fail for sendDir(%q,%q,%v)", test.lastDir, test.remote, test.level)
|
||||
assert.Equal(t, test.newLastDir, newLastDir, "newLastDir fail for sendDir(%q,%q,%v)", test.lastDir, test.remote, test.level)
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ func TestFsString(t *testing.T) { fstests.TestFsString(t) }
|
||||
func TestFsRmdirEmpty(t *testing.T) { fstests.TestFsRmdirEmpty(t) }
|
||||
func TestFsRmdirNotFound(t *testing.T) { fstests.TestFsRmdirNotFound(t) }
|
||||
func TestFsMkdir(t *testing.T) { fstests.TestFsMkdir(t) }
|
||||
func TestFsMkdirRmdirSubdir(t *testing.T) { fstests.TestFsMkdirRmdirSubdir(t) }
|
||||
func TestFsListEmpty(t *testing.T) { fstests.TestFsListEmpty(t) }
|
||||
func TestFsListDirEmpty(t *testing.T) { fstests.TestFsListDirEmpty(t) }
|
||||
func TestFsNewObjectNotFound(t *testing.T) { fstests.TestFsNewObjectNotFound(t) }
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ func (up *largeUpload) transferChunk(part int64, body []byte) error {
|
||||
var response api.UploadPartResponse
|
||||
|
||||
resp, err := up.f.srv.CallJSON(&opts, nil, &response)
|
||||
retry, err := up.f.shouldRetryNoReauth(resp, err)
|
||||
retry, err := up.f.shouldRetry(resp, err)
|
||||
// On retryable error clear PartUploadURL
|
||||
if retry {
|
||||
fs.Debug(up.o, "Clearing part upload URL because of error: %v", err)
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
_ "github.com/ncw/rclone/cmd/cleanup"
|
||||
_ "github.com/ncw/rclone/cmd/config"
|
||||
_ "github.com/ncw/rclone/cmd/copy"
|
||||
_ "github.com/ncw/rclone/cmd/copyto"
|
||||
_ "github.com/ncw/rclone/cmd/dedupe"
|
||||
_ "github.com/ncw/rclone/cmd/delete"
|
||||
_ "github.com/ncw/rclone/cmd/genautocomplete"
|
||||
@@ -23,8 +24,10 @@ import (
|
||||
_ "github.com/ncw/rclone/cmd/mkdir"
|
||||
_ "github.com/ncw/rclone/cmd/mount"
|
||||
_ "github.com/ncw/rclone/cmd/move"
|
||||
_ "github.com/ncw/rclone/cmd/moveto"
|
||||
_ "github.com/ncw/rclone/cmd/purge"
|
||||
_ "github.com/ncw/rclone/cmd/rmdir"
|
||||
_ "github.com/ncw/rclone/cmd/rmdirs"
|
||||
_ "github.com/ncw/rclone/cmd/sha1sum"
|
||||
_ "github.com/ncw/rclone/cmd/size"
|
||||
_ "github.com/ncw/rclone/cmd/sync"
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(authorizeCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var authorizeCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "authorize",
|
||||
Short: `Remote authorization.`,
|
||||
Long: `
|
||||
|
||||
+3
-3
@@ -9,10 +9,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(catCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var catCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "cat remote:path",
|
||||
Short: `Concatenates any files and sends them to stdout.`,
|
||||
Long: `
|
||||
@@ -33,7 +33,7 @@ Or like this to output any .txt files in dir or subdirectories.
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
return fs.Cat(fsrc, os.Stdout)
|
||||
})
|
||||
},
|
||||
|
||||
+3
-3
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(checkCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var checkCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "check source:path dest:path",
|
||||
Short: `Checks the files in the source and destination match.`,
|
||||
Long: `
|
||||
@@ -23,7 +23,7 @@ don't match. It doesn't alter the source or destination.
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(2, 2, command, args)
|
||||
fsrc, fdst := cmd.NewFsSrcDst(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
return fs.Check(fdst, fsrc)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(cleanupCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var cleanupCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "cleanup remote:path",
|
||||
Short: `Clean up the remote if possible`,
|
||||
Long: `
|
||||
@@ -20,7 +20,7 @@ versions. Not supported by all remotes.
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(true, command, func() error {
|
||||
cmd.Run(true, false, command, func() error {
|
||||
return fs.CleanUp(fsrc)
|
||||
})
|
||||
},
|
||||
|
||||
+113
-19
@@ -11,8 +11,10 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"runtime/pprof"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
@@ -26,7 +28,8 @@ var (
|
||||
// Flags
|
||||
cpuProfile = pflag.StringP("cpuprofile", "", "", "Write cpu profile to file")
|
||||
memProfile = pflag.String("memprofile", "", "Write memory profile to file")
|
||||
statsInterval = pflag.DurationP("stats", "", time.Minute*1, "Interval to print stats (0 to disable)")
|
||||
statsInterval = pflag.DurationP("stats", "", time.Minute*1, "Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable)")
|
||||
dataRateUnit = pflag.StringP("stats-unit", "", "bytes", "Show data rate in stats as either 'bits' or 'bytes'/s")
|
||||
version bool
|
||||
logFile = pflag.StringP("log-file", "", "", "Log everything to this file")
|
||||
retries = pflag.IntP("retries", "", 3, "Retry operations this many times if they fail")
|
||||
@@ -92,31 +95,50 @@ func ShowVersion() {
|
||||
fmt.Printf("rclone %s\n", fs.Version)
|
||||
}
|
||||
|
||||
// newFsSrc creates a src Fs from a name
|
||||
// newFsFile creates a dst Fs from a name but may point to a file.
|
||||
//
|
||||
// This can point to a file
|
||||
func newFsSrc(remote string) fs.Fs {
|
||||
// It returns a string with the file name if points to a file
|
||||
func newFsFile(remote string) (fs.Fs, string) {
|
||||
fsInfo, configName, fsPath, err := fs.ParseRemote(remote)
|
||||
if err != nil {
|
||||
fs.Stats.Error()
|
||||
log.Fatalf("Failed to create file system for %q: %v", remote, err)
|
||||
}
|
||||
f, err := fsInfo.NewFs(configName, fsPath)
|
||||
if err == fs.ErrorIsFile {
|
||||
switch err {
|
||||
case fs.ErrorIsFile:
|
||||
return f, path.Base(fsPath)
|
||||
case nil:
|
||||
return f, ""
|
||||
default:
|
||||
fs.Stats.Error()
|
||||
log.Fatalf("Failed to create file system for %q: %v", remote, err)
|
||||
}
|
||||
return nil, ""
|
||||
}
|
||||
|
||||
// newFsSrc creates a src Fs from a name
|
||||
//
|
||||
// It returns a string with the file name if limiting to one file
|
||||
//
|
||||
// This can point to a file
|
||||
func newFsSrc(remote string) (fs.Fs, string) {
|
||||
f, fileName := newFsFile(remote)
|
||||
if fileName != "" {
|
||||
if !fs.Config.Filter.InActive() {
|
||||
fs.Stats.Error()
|
||||
log.Fatalf("Can't limit to single files when using filters: %v", remote)
|
||||
}
|
||||
// Limit transfers to this file
|
||||
err = fs.Config.Filter.AddFile(path.Base(fsPath))
|
||||
err := fs.Config.Filter.AddFile(fileName)
|
||||
if err != nil {
|
||||
fs.Stats.Error()
|
||||
log.Fatalf("Failed to limit to single file %q: %v", remote, err)
|
||||
}
|
||||
// Set --no-traverse as only one file
|
||||
fs.Config.NoTraverse = true
|
||||
}
|
||||
if err != nil {
|
||||
fs.Stats.Error()
|
||||
log.Fatalf("Failed to create file system for %q: %v", remote, err)
|
||||
}
|
||||
return f
|
||||
return f, fileName
|
||||
}
|
||||
|
||||
// newFsDst creates a dst Fs from a name
|
||||
@@ -133,14 +155,62 @@ func newFsDst(remote string) fs.Fs {
|
||||
|
||||
// NewFsSrcDst creates a new src and dst fs from the arguments
|
||||
func NewFsSrcDst(args []string) (fs.Fs, fs.Fs) {
|
||||
fsrc, fdst := newFsSrc(args[0]), newFsDst(args[1])
|
||||
fsrc, _ := newFsSrc(args[0])
|
||||
fdst := newFsDst(args[1])
|
||||
fs.CalculateModifyWindow(fdst, fsrc)
|
||||
return fsrc, fdst
|
||||
}
|
||||
|
||||
// RemoteSplit splits a remote into a parent and a leaf
|
||||
//
|
||||
// if it returns parent as an empty string then it wasn't possible
|
||||
func RemoteSplit(remote string) (parent string, leaf string) {
|
||||
// Split remote on :
|
||||
i := strings.Index(remote, ":")
|
||||
remoteName := ""
|
||||
remotePath := remote
|
||||
if i >= 0 {
|
||||
remoteName = remote[:i+1]
|
||||
remotePath = remote[i+1:]
|
||||
}
|
||||
if remotePath == "" {
|
||||
return "", ""
|
||||
}
|
||||
// Construct new remote name without last segment
|
||||
parent, leaf = path.Split(remotePath)
|
||||
if leaf == "" {
|
||||
return "", ""
|
||||
}
|
||||
if parent != "/" {
|
||||
parent = strings.TrimSuffix(parent, "/")
|
||||
}
|
||||
parent = remoteName + parent
|
||||
if parent == "" {
|
||||
parent = "."
|
||||
}
|
||||
return parent, leaf
|
||||
}
|
||||
|
||||
// NewFsSrcDstFiles creates a new src and dst fs from the arguments
|
||||
// If src is a file then srcFileName and dstFileName will be non-empty
|
||||
func NewFsSrcDstFiles(args []string) (fsrc fs.Fs, srcFileName string, fdst fs.Fs, dstFileName string) {
|
||||
fsrc, srcFileName = newFsSrc(args[0])
|
||||
// If copying a file...
|
||||
dstRemote := args[1]
|
||||
if srcFileName != "" {
|
||||
dstRemote, dstFileName = RemoteSplit(dstRemote)
|
||||
if dstRemote == "" {
|
||||
log.Fatalf("Can't find parent directory for %q", args[1])
|
||||
}
|
||||
}
|
||||
fdst = newFsDst(dstRemote)
|
||||
fs.CalculateModifyWindow(fdst, fsrc)
|
||||
return
|
||||
}
|
||||
|
||||
// NewFsSrc creates a new src fs from the arguments
|
||||
func NewFsSrc(args []string) fs.Fs {
|
||||
fsrc := newFsSrc(args[0])
|
||||
fsrc, _ := newFsSrc(args[0])
|
||||
fs.CalculateModifyWindow(fsrc)
|
||||
return fsrc
|
||||
}
|
||||
@@ -154,10 +224,25 @@ func NewFsDst(args []string) fs.Fs {
|
||||
return fdst
|
||||
}
|
||||
|
||||
// ShowStats returns true if the user added a `--stats` flag to the command line.
|
||||
//
|
||||
// This is called by Run to override the default value of the
|
||||
// showStats passed in.
|
||||
func ShowStats() bool {
|
||||
statsIntervalFlag := pflag.Lookup("stats")
|
||||
return statsIntervalFlag != nil && statsIntervalFlag.Changed
|
||||
}
|
||||
|
||||
// Run the function with stats and retries if required
|
||||
func Run(Retry bool, cmd *cobra.Command, f func() error) {
|
||||
func Run(Retry bool, showStats bool, cmd *cobra.Command, f func() error) {
|
||||
var err error
|
||||
stopStats := startStats()
|
||||
var stopStats chan struct{}
|
||||
if !showStats && ShowStats() {
|
||||
showStats = true
|
||||
}
|
||||
if showStats {
|
||||
stopStats = StartStats()
|
||||
}
|
||||
for try := 1; try <= *retries; try++ {
|
||||
err = f()
|
||||
if !Retry || (err == nil && !fs.Stats.Errored()) {
|
||||
@@ -183,11 +268,13 @@ func Run(Retry bool, cmd *cobra.Command, f func() error) {
|
||||
fs.Stats.ResetErrors()
|
||||
}
|
||||
}
|
||||
close(stopStats)
|
||||
if showStats {
|
||||
close(stopStats)
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to %s: %v", cmd.Name(), err)
|
||||
}
|
||||
if !fs.Config.Quiet || fs.Stats.Errored() || *statsInterval > 0 {
|
||||
if showStats && (!fs.Config.Quiet || fs.Stats.Errored() || *statsInterval > 0) {
|
||||
fs.Log(nil, "%s", fs.Stats)
|
||||
}
|
||||
if fs.Config.Verbose {
|
||||
@@ -211,10 +298,10 @@ func CheckArgs(MinArgs, MaxArgs int, cmd *cobra.Command, args []string) {
|
||||
}
|
||||
}
|
||||
|
||||
// startStats prints the stats every statsInterval
|
||||
// StartStats prints the stats every statsInterval
|
||||
//
|
||||
// It returns a channel which should be closed to stop the stats.
|
||||
func startStats() chan struct{} {
|
||||
func StartStats() chan struct{} {
|
||||
stopStats := make(chan struct{})
|
||||
if *statsInterval > 0 {
|
||||
go func() {
|
||||
@@ -293,4 +380,11 @@ func initConfig() {
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
if m, _ := regexp.MatchString("^(bits|bytes)$", *dataRateUnit); m == false {
|
||||
fs.ErrorLog(nil, "Invalid unit passed to --stats-unit. Defaulting to bytes.")
|
||||
fs.Config.DataRateUnit = "bytes"
|
||||
} else {
|
||||
fs.Config.DataRateUnit = *dataRateUnit
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestRemoteSplit(t *testing.T) {
|
||||
|
||||
for _, test := range []struct {
|
||||
remote, wantParent, wantLeaf string
|
||||
}{
|
||||
{"", "", ""},
|
||||
{"remote:", "", ""},
|
||||
{"remote:potato", "remote:", "potato"},
|
||||
{"remote:potato/sausage", "remote:potato", "sausage"},
|
||||
{"/", "", ""},
|
||||
{"/root", "/", "root"},
|
||||
{"/a/b", "/a", "b"},
|
||||
{"root", ".", "root"},
|
||||
{"a/b", "a", "b"},
|
||||
} {
|
||||
gotParent, gotLeaf := RemoteSplit(test.remote)
|
||||
assert.Equal(t, test.wantParent, gotParent, test.remote)
|
||||
assert.Equal(t, test.wantLeaf, gotLeaf, test.remote)
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(configCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var configCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "config",
|
||||
Short: `Enter an interactive configuration session.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
|
||||
+5
-5
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(copyCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var copyCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "copy source:path dest:path",
|
||||
Short: `Copy files from source to dest, skipping already copied`,
|
||||
Long: `
|
||||
@@ -45,18 +45,18 @@ Not to
|
||||
destpath/sourcepath/one.txt
|
||||
destpath/sourcepath/two.txt
|
||||
|
||||
If you are familiar with ` + "`" + `rsync` + "`" + `, rclone always works as if you had
|
||||
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.
|
||||
|
||||
See the ` + "`" + `--no-traverse` + "`" + ` option for controlling whether rclone lists
|
||||
See the ` + "`--no-traverse`" + ` option for controlling whether rclone lists
|
||||
the destination directory or not.
|
||||
`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(2, 2, command, args)
|
||||
fsrc, fdst := cmd.NewFsSrcDst(args)
|
||||
cmd.Run(true, command, func() error {
|
||||
cmd.Run(true, true, command, func() error {
|
||||
return fs.CopyDir(fdst, fsrc)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package copyto
|
||||
|
||||
import (
|
||||
"github.com/ncw/rclone/cmd"
|
||||
"github.com/ncw/rclone/fs"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "copyto source:path dest:path",
|
||||
Short: `Copy files from source to dest, skipping already copied`,
|
||||
Long: `
|
||||
If source:path is a file or directory then it copies it to a file or
|
||||
directory named dest:path.
|
||||
|
||||
This can be used to upload single files to other than their current
|
||||
name. If the source is a directory then it acts exactly like the copy
|
||||
command.
|
||||
|
||||
So
|
||||
|
||||
rclone copyto src dst
|
||||
|
||||
where src and dst are rclone paths, either remote:path or
|
||||
/path/to/local or C:\windows\path\if\on\windows.
|
||||
|
||||
This will:
|
||||
|
||||
if src is file
|
||||
copy it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
copy it to dst, overwriting existing files if they exist
|
||||
see copy command for full details
|
||||
|
||||
This doesn't transfer unchanged files, testing by size and
|
||||
modification time or MD5SUM. It doesn't delete files from the
|
||||
destination.
|
||||
`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(2, 2, command, args)
|
||||
fsrc, srcFileName, fdst, dstFileName := cmd.NewFsSrcDstFiles(args)
|
||||
cmd.Run(true, true, command, func() error {
|
||||
if srcFileName == "" {
|
||||
return fs.CopyDir(fdst, fsrc)
|
||||
}
|
||||
return fs.CopyFile(fdst, fsrc, dstFileName, srcFileName)
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -13,11 +13,11 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(dedupeCmd)
|
||||
dedupeCmd.Flags().VarP(&dedupeMode, "dedupe-mode", "", "Dedupe mode interactive|skip|first|newest|oldest|rename.")
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
commandDefintion.Flags().VarP(&dedupeMode, "dedupe-mode", "", "Dedupe mode interactive|skip|first|newest|oldest|rename.")
|
||||
}
|
||||
|
||||
var dedupeCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "dedupe [mode] remote:path",
|
||||
Short: `Interactively find duplicate files delete/rename them.`,
|
||||
Long: `
|
||||
@@ -106,7 +106,7 @@ Or
|
||||
args = args[1:]
|
||||
}
|
||||
fdst := cmd.NewFsSrc(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
return fs.Deduplicate(fdst, dedupeMode)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(deleteCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var deleteCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "delete remote:path",
|
||||
Short: `Remove the contents of path.`,
|
||||
Long: `
|
||||
@@ -34,7 +34,7 @@ delete all files bigger than 100MBytes.
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(true, command, func() error {
|
||||
cmd.Run(true, false, command, func() error {
|
||||
return fs.Delete(fsrc)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(genautocompleteCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var genautocompleteCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "genautocomplete [output_file]",
|
||||
Short: `Output bash completion script for rclone.`,
|
||||
Long: `
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(gendocsCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
const gendocFrontmatterTemplate = `---
|
||||
@@ -25,7 +25,7 @@ url: %s
|
||||
---
|
||||
`
|
||||
|
||||
var gendocsCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "gendocs output_directory",
|
||||
Short: `Output markdown docs for rclone to the directory supplied.`,
|
||||
Long: `
|
||||
|
||||
@@ -15,11 +15,11 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(listremotesCmd)
|
||||
listremotesCmd.Flags().BoolVarP(&listLong, "long", "l", listLong, "Show the type as well as names.")
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
commandDefintion.Flags().BoolVarP(&listLong, "long", "l", listLong, "Show the type as well as names.")
|
||||
}
|
||||
|
||||
var listremotesCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "listremotes",
|
||||
Short: `List all the remotes in the config file.`,
|
||||
Long: `
|
||||
|
||||
+3
-3
@@ -9,16 +9,16 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(lsCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var lsCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "ls remote:path",
|
||||
Short: `List all the objects in the the path with size and path.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
return fs.List(fsrc, os.Stdout)
|
||||
})
|
||||
},
|
||||
|
||||
+3
-3
@@ -9,16 +9,16 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(lsdCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var lsdCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "lsd remote:path",
|
||||
Short: `List all directories/containers/buckets in the the path.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
return fs.ListDir(fsrc, os.Stdout)
|
||||
})
|
||||
},
|
||||
|
||||
+3
-3
@@ -9,16 +9,16 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(lslCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var lslCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "lsl remote:path",
|
||||
Short: `List all the objects path with modification time, size and path.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
return fs.ListLong(fsrc, os.Stdout)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(md5sumCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var md5sumCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "md5sum remote:path",
|
||||
Short: `Produces an md5sum file for all the objects in the path.`,
|
||||
Long: `
|
||||
@@ -22,7 +22,7 @@ is in the same format as the standard md5sum tool produces.
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
return fs.Md5sum(fsrc, os.Stdout)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -10,17 +10,17 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(memtestCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var memtestCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "memtest remote:path",
|
||||
Short: `Load all the objects at remote:path and report memory stats.`,
|
||||
Hidden: true,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
objects, _, err := fs.Count(fsrc)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
+4
-4
@@ -7,17 +7,17 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(mkdirCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var mkdirCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "mkdir remote:path",
|
||||
Short: `Make the path if it doesn't already exist.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fdst := cmd.NewFsDst(args)
|
||||
cmd.Run(true, command, func() error {
|
||||
return fs.Mkdir(fdst)
|
||||
cmd.Run(true, false, command, func() error {
|
||||
return fs.Mkdir(fdst, "")
|
||||
})
|
||||
},
|
||||
}
|
||||
+16
-10
@@ -27,17 +27,19 @@ type DirEntry struct {
|
||||
|
||||
// Dir represents a directory entry
|
||||
type Dir struct {
|
||||
f fs.Fs
|
||||
path string
|
||||
mu sync.RWMutex // protects the following
|
||||
read time.Time // time directory entry last read
|
||||
items map[string]*DirEntry
|
||||
f fs.Fs
|
||||
path string
|
||||
modTime time.Time
|
||||
mu sync.RWMutex // protects the following
|
||||
read time.Time // time directory entry last read
|
||||
items map[string]*DirEntry
|
||||
}
|
||||
|
||||
func newDir(f fs.Fs, path string) *Dir {
|
||||
func newDir(f fs.Fs, fsDir *fs.Dir) *Dir {
|
||||
return &Dir{
|
||||
f: f,
|
||||
path: path,
|
||||
f: f,
|
||||
path: fsDir.Name,
|
||||
modTime: fsDir.When,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +156,10 @@ func (d *Dir) Attr(ctx context.Context, a *fuse.Attr) error {
|
||||
a.Gid = gid
|
||||
a.Uid = uid
|
||||
a.Mode = os.ModeDir | dirPerms
|
||||
a.Atime = d.modTime
|
||||
a.Mtime = d.modTime
|
||||
a.Ctime = d.modTime
|
||||
a.Crtime = d.modTime
|
||||
// FIXME include Valid so get some caching? Also mtime
|
||||
return nil
|
||||
}
|
||||
@@ -172,7 +178,7 @@ func (d *Dir) lookupNode(leaf string) (item *DirEntry, err error) {
|
||||
case fs.Object:
|
||||
node, err = newFile(d, x), nil
|
||||
case *fs.Dir:
|
||||
node, err = newDir(d.f, x.Remote()), nil
|
||||
node, err = newDir(d.f, x), nil
|
||||
default:
|
||||
err = errors.Errorf("unknown type %T", item)
|
||||
}
|
||||
@@ -275,7 +281,7 @@ func (d *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fusefs.Node, e
|
||||
Name: path,
|
||||
When: time.Now(),
|
||||
}
|
||||
dir := newDir(d.f, path)
|
||||
dir := newDir(d.f, fsDir)
|
||||
d.addObject(fsDir, dir)
|
||||
fs.Debug(path, "Dir.Mkdir OK")
|
||||
return dir, nil
|
||||
|
||||
+2
-1
@@ -62,6 +62,7 @@ func (f *File) Attr(ctx context.Context, a *fuse.Attr) error {
|
||||
a.Crtime = modTime
|
||||
}
|
||||
}
|
||||
a.Blocks = (a.Size + 511) / 512
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -118,7 +119,7 @@ func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenR
|
||||
resp.Flags |= fuse.OpenNonSeekable
|
||||
}
|
||||
return newReadFileHandle(o)
|
||||
case req.Flags.IsWriteOnly():
|
||||
case req.Flags.IsWriteOnly() || (req.Flags.IsReadWrite() && (req.Flags&fuse.OpenTruncate) != 0):
|
||||
resp.Flags |= fuse.OpenNonSeekable
|
||||
src := newCreateInfo(f.d.f, o.Remote())
|
||||
fh, err := newWriteFileHandle(f.d, f, src)
|
||||
|
||||
+27
-1
@@ -5,9 +5,12 @@
|
||||
package mount
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"bazil.org/fuse"
|
||||
fusefs "bazil.org/fuse/fs"
|
||||
"github.com/ncw/rclone/fs"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
// FS represents the top level filing system
|
||||
@@ -21,7 +24,11 @@ var _ fusefs.FS = (*FS)(nil)
|
||||
// Root returns the root node
|
||||
func (f *FS) Root() (fusefs.Node, error) {
|
||||
fs.Debug(f.f, "Root()")
|
||||
return newDir(f.f, ""), nil
|
||||
fsDir := &fs.Dir{
|
||||
Name: "",
|
||||
When: time.Now(),
|
||||
}
|
||||
return newDir(f.f, fsDir), nil
|
||||
}
|
||||
|
||||
// mountOptions configures the options from the command line flags
|
||||
@@ -97,3 +104,22 @@ func mount(f fs.Fs, mountpoint string) (<-chan error, error) {
|
||||
|
||||
return errChan, nil
|
||||
}
|
||||
|
||||
// Check interface satsified
|
||||
var _ fusefs.FSStatfser = (*FS)(nil)
|
||||
|
||||
// Statfs is called to obtain file system metadata.
|
||||
// It should write that data to resp.
|
||||
func (f *FS) Statfs(ctx context.Context, req *fuse.StatfsRequest, resp *fuse.StatfsResponse) error {
|
||||
const blockSize = 4096
|
||||
const fsBlocks = (1 << 50) / blockSize
|
||||
resp.Blocks = fsBlocks // Total data blocks in file system.
|
||||
resp.Bfree = fsBlocks // Free blocks in file system.
|
||||
resp.Bavail = fsBlocks // Free blocks in file system if you're not root.
|
||||
resp.Files = 1E9 // Total files in file system.
|
||||
resp.Ffree = 1E9 // Free files in file system.
|
||||
resp.Bsize = blockSize // Block size
|
||||
resp.Namelen = 255 // Maximum file name length?
|
||||
resp.Frsize = blockSize // Fragment size, smallest addressable data size in the file system.
|
||||
return nil
|
||||
}
|
||||
@@ -82,7 +82,7 @@ func newRun() *Run {
|
||||
log.Fatalf("Failed to open remote %q: %v", *RemoteName, err)
|
||||
}
|
||||
|
||||
err = r.fremote.Mkdir()
|
||||
err = r.fremote.Mkdir("")
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to open mkdir %q: %v", *RemoteName, err)
|
||||
}
|
||||
|
||||
+24
-18
@@ -43,26 +43,26 @@ var (
|
||||
func init() {
|
||||
umask = unix.Umask(0) // read the umask
|
||||
unix.Umask(umask) // set it back to what it was
|
||||
cmd.Root.AddCommand(mountCmd)
|
||||
mountCmd.Flags().BoolVarP(&noModTime, "no-modtime", "", noModTime, "Don't read the modification time (can speed things up).")
|
||||
mountCmd.Flags().BoolVarP(&debugFUSE, "debug-fuse", "", debugFUSE, "Debug the FUSE internals - needs -v.")
|
||||
mountCmd.Flags().BoolVarP(&noSeek, "no-seek", "", noSeek, "Don't allow seeking in files.")
|
||||
mountCmd.Flags().DurationVarP(&dirCacheTime, "dir-cache-time", "", dirCacheTime, "Time to cache directory entries for.")
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
commandDefintion.Flags().BoolVarP(&noModTime, "no-modtime", "", noModTime, "Don't read the modification time (can speed things up).")
|
||||
commandDefintion.Flags().BoolVarP(&debugFUSE, "debug-fuse", "", debugFUSE, "Debug the FUSE internals - needs -v.")
|
||||
commandDefintion.Flags().BoolVarP(&noSeek, "no-seek", "", noSeek, "Don't allow seeking in files.")
|
||||
commandDefintion.Flags().DurationVarP(&dirCacheTime, "dir-cache-time", "", dirCacheTime, "Time to cache directory entries for.")
|
||||
// mount options
|
||||
mountCmd.Flags().BoolVarP(&readOnly, "read-only", "", readOnly, "Mount read-only.")
|
||||
mountCmd.Flags().BoolVarP(&allowNonEmpty, "allow-non-empty", "", allowNonEmpty, "Allow mounting over a non-empty directory.")
|
||||
mountCmd.Flags().BoolVarP(&allowRoot, "allow-root", "", allowRoot, "Allow access to root user.")
|
||||
mountCmd.Flags().BoolVarP(&allowOther, "allow-other", "", allowOther, "Allow access to other users.")
|
||||
mountCmd.Flags().BoolVarP(&defaultPermissions, "default-permissions", "", defaultPermissions, "Makes kernel enforce access control based on the file mode.")
|
||||
mountCmd.Flags().BoolVarP(&writebackCache, "write-back-cache", "", writebackCache, "Makes kernel buffer writes before sending them to rclone. Without this, writethrough caching is used.")
|
||||
mountCmd.Flags().VarP(&maxReadAhead, "max-read-ahead", "", "The number of bytes that can be prefetched for sequential reads.")
|
||||
mountCmd.Flags().IntVarP(&umask, "umask", "", umask, "Override the permission bits set by the filesystem.")
|
||||
mountCmd.Flags().Uint32VarP(&uid, "uid", "", uid, "Override the uid field set by the filesystem.")
|
||||
mountCmd.Flags().Uint32VarP(&gid, "gid", "", gid, "Override the gid field set by the filesystem.")
|
||||
//mountCmd.Flags().BoolVarP(&foreground, "foreground", "", foreground, "Do not detach.")
|
||||
commandDefintion.Flags().BoolVarP(&readOnly, "read-only", "", readOnly, "Mount read-only.")
|
||||
commandDefintion.Flags().BoolVarP(&allowNonEmpty, "allow-non-empty", "", allowNonEmpty, "Allow mounting over a non-empty directory.")
|
||||
commandDefintion.Flags().BoolVarP(&allowRoot, "allow-root", "", allowRoot, "Allow access to root user.")
|
||||
commandDefintion.Flags().BoolVarP(&allowOther, "allow-other", "", allowOther, "Allow access to other users.")
|
||||
commandDefintion.Flags().BoolVarP(&defaultPermissions, "default-permissions", "", defaultPermissions, "Makes kernel enforce access control based on the file mode.")
|
||||
commandDefintion.Flags().BoolVarP(&writebackCache, "write-back-cache", "", writebackCache, "Makes kernel buffer writes before sending them to rclone. Without this, writethrough caching is used.")
|
||||
commandDefintion.Flags().VarP(&maxReadAhead, "max-read-ahead", "", "The number of bytes that can be prefetched for sequential reads.")
|
||||
commandDefintion.Flags().IntVarP(&umask, "umask", "", umask, "Override the permission bits set by the filesystem.")
|
||||
commandDefintion.Flags().Uint32VarP(&uid, "uid", "", uid, "Override the uid field set by the filesystem.")
|
||||
commandDefintion.Flags().Uint32VarP(&gid, "gid", "", gid, "Override the gid field set by the filesystem.")
|
||||
//commandDefintion.Flags().BoolVarP(&foreground, "foreground", "", foreground, "Do not detach.")
|
||||
}
|
||||
|
||||
var mountCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "mount remote:path /path/to/mountpoint",
|
||||
Short: `Mount the remote as a mountpoint. **EXPERIMENTAL**`,
|
||||
Long: `
|
||||
@@ -113,7 +113,7 @@ mount won't do that, so will be less reliable than the rclone command.
|
||||
### Bugs ###
|
||||
|
||||
* All the remotes should work for read, but some may not for write
|
||||
* those which need to know the size in advance won't - eg B2, Amazon Drive
|
||||
* those which need to know the size in advance won't - eg B2
|
||||
* maybe should pass in size as -1 to mean work it out
|
||||
* Or put in an an upload cache to cache the files on disk first
|
||||
|
||||
@@ -147,6 +147,12 @@ func Mount(f fs.Fs, mountpoint string) error {
|
||||
dirPerms = 0777 &^ os.FileMode(umask)
|
||||
filePerms = 0666 &^ os.FileMode(umask)
|
||||
|
||||
// Show stats if the user has specifically requested them
|
||||
if cmd.ShowStats() {
|
||||
stopStats := cmd.StartStats()
|
||||
defer close(stopStats)
|
||||
}
|
||||
|
||||
// Mount it
|
||||
errChan, err := mount(f, mountpoint)
|
||||
if err != nil {
|
||||
|
||||
+58
-35
@@ -16,10 +16,11 @@ import (
|
||||
type ReadFileHandle struct {
|
||||
mu sync.Mutex
|
||||
closed bool // set if handle has been closed
|
||||
r io.ReadCloser
|
||||
r *fs.Account
|
||||
o fs.Object
|
||||
readCalled bool // set if read has been called
|
||||
offset int64
|
||||
retries int // number of times we have retried
|
||||
}
|
||||
|
||||
func newReadFileHandle(o fs.Object) (*ReadFileHandle, error) {
|
||||
@@ -27,10 +28,12 @@ func newReadFileHandle(o fs.Object) (*ReadFileHandle, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ReadFileHandle{
|
||||
r: r,
|
||||
fh := &ReadFileHandle{
|
||||
o: o,
|
||||
}, nil
|
||||
r: fs.NewAccount(r, o), // account the transfer
|
||||
}
|
||||
fs.Stats.Transferring(fh.o.Remote())
|
||||
return fh, nil
|
||||
}
|
||||
|
||||
// Check interface satisfied
|
||||
@@ -44,7 +47,8 @@ var _ fusefs.HandleReader = (*ReadFileHandle)(nil)
|
||||
// Must be called with fh.mu held
|
||||
func (fh *ReadFileHandle) seek(offset int64) error {
|
||||
// Can we seek it directly?
|
||||
if do, ok := fh.r.(io.Seeker); ok {
|
||||
oldReader := fh.r.GetReader()
|
||||
if do, ok := oldReader.(io.Seeker); ok {
|
||||
fs.Debug(fh.o, "ReadFileHandle.seek from %d to %d (io.Seeker)", fh.offset, offset)
|
||||
_, err := do.Seek(offset, 0)
|
||||
if err != nil {
|
||||
@@ -59,11 +63,12 @@ func (fh *ReadFileHandle) seek(offset int64) error {
|
||||
fs.Debug(fh.o, "ReadFileHandle.Read seek failed: %v", err)
|
||||
return err
|
||||
}
|
||||
err = fh.r.Close()
|
||||
err = oldReader.Close()
|
||||
if err != nil {
|
||||
fs.Debug(fh.o, "ReadFileHandle.Read seek close old failed: %v", err)
|
||||
}
|
||||
fh.r = r
|
||||
// fh.r = fs.NewAccount(r, fh.o) // account the transfer
|
||||
fh.r.UpdateReader(r)
|
||||
}
|
||||
fh.offset = offset
|
||||
return nil
|
||||
@@ -78,39 +83,56 @@ func (fh *ReadFileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp
|
||||
fs.ErrorLog(fh.o, "ReadFileHandle.Read error: %v", errClosedFileHandle)
|
||||
return errClosedFileHandle
|
||||
}
|
||||
if req.Offset != fh.offset {
|
||||
// Are we attempting to seek beyond the end of the
|
||||
// file - if so just return EOF leaving the underlying
|
||||
// file in an unchanged state.
|
||||
if req.Offset >= fh.o.Size() {
|
||||
fs.Debug(fh.o, "ReadFileHandle.Read attempt to read beyond end of file: %d > %d", req.Offset, fh.o.Size())
|
||||
resp.Data = nil
|
||||
return nil
|
||||
doSeek := req.Offset != fh.offset
|
||||
var err error
|
||||
var n int
|
||||
var newOffset int64
|
||||
buf := make([]byte, req.Size)
|
||||
for {
|
||||
if doSeek {
|
||||
// Are we attempting to seek beyond the end of the
|
||||
// file - if so just return EOF leaving the underlying
|
||||
// file in an unchanged state.
|
||||
if req.Offset >= fh.o.Size() {
|
||||
fs.Debug(fh.o, "ReadFileHandle.Read attempt to read beyond end of file: %d > %d", req.Offset, fh.o.Size())
|
||||
resp.Data = nil
|
||||
return nil
|
||||
}
|
||||
err := fh.seek(req.Offset)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
err := fh.seek(req.Offset)
|
||||
if err != nil {
|
||||
if req.Size > 0 {
|
||||
fh.readCalled = true
|
||||
}
|
||||
// One exception to the above is if we fail to fully populate a
|
||||
// page cache page; a read into page cache is always page aligned.
|
||||
// Make sure we never serve a partial read, to avoid that.
|
||||
n, err = io.ReadFull(fh.r, buf)
|
||||
newOffset = fh.offset + int64(n)
|
||||
// if err == nil && rand.Intn(10) == 0 {
|
||||
// err = errors.New("random error")
|
||||
// }
|
||||
if err == nil {
|
||||
break
|
||||
} else if (err == io.ErrUnexpectedEOF || err == io.EOF) && newOffset == fh.o.Size() {
|
||||
// Read to end of file
|
||||
break
|
||||
}
|
||||
if fh.retries >= fs.Config.LowLevelRetries {
|
||||
fs.ErrorLog(fh.o, "ReadFileHandle.Read error: %v", err)
|
||||
return err
|
||||
}
|
||||
fh.retries++
|
||||
fs.ErrorLog(fh.o, "ReadFileHandle.Read error: low level retry %d/%d: %v", fh.retries, fs.Config.LowLevelRetries, err)
|
||||
doSeek = true
|
||||
}
|
||||
if req.Size > 0 {
|
||||
fh.readCalled = true
|
||||
}
|
||||
// One exception to the above is if we fail to fully populate a
|
||||
// page cache page; a read into page cache is always page aligned.
|
||||
// Make sure we never serve a partial read, to avoid that.
|
||||
buf := make([]byte, req.Size)
|
||||
n, err := io.ReadFull(fh.r, buf)
|
||||
if err == io.ErrUnexpectedEOF || err == io.EOF {
|
||||
err = nil
|
||||
}
|
||||
fh.retries = 0 // reset retries
|
||||
resp.Data = buf[:n]
|
||||
fh.offset += int64(n)
|
||||
if err != nil {
|
||||
fs.ErrorLog(fh.o, "ReadFileHandle.Read error: %v", err)
|
||||
} else {
|
||||
fs.Debug(fh.o, "ReadFileHandle.Read OK")
|
||||
}
|
||||
return err
|
||||
fh.offset = newOffset
|
||||
fs.Debug(fh.o, "ReadFileHandle.Read OK")
|
||||
return nil
|
||||
}
|
||||
|
||||
// close the file handle returning errClosedFileHandle if it has been
|
||||
@@ -122,6 +144,7 @@ func (fh *ReadFileHandle) close() error {
|
||||
return errClosedFileHandle
|
||||
}
|
||||
fh.closed = true
|
||||
fs.Stats.DoneTransferring(fh.o.Remote(), true)
|
||||
return fh.r.Close()
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -38,12 +38,14 @@ func newWriteFileHandle(d *Dir, f *File, src fs.ObjectInfo) (*WriteFileHandle, e
|
||||
file: f,
|
||||
}
|
||||
fh.pipeReader, fh.pipeWriter = io.Pipe()
|
||||
r := fs.NewAccountSizeName(fh.pipeReader, 0, src.Remote()) // account the transfer
|
||||
go func() {
|
||||
o, err := d.f.Put(fh.pipeReader, src)
|
||||
o, err := d.f.Put(r, src)
|
||||
fh.o = o
|
||||
fh.result <- err
|
||||
}()
|
||||
fh.file.addWriters(1)
|
||||
fs.Stats.Transferring(fh.remote)
|
||||
return fh, nil
|
||||
}
|
||||
|
||||
@@ -81,6 +83,7 @@ func (fh *WriteFileHandle) close() error {
|
||||
return errClosedFileHandle
|
||||
}
|
||||
fh.closed = true
|
||||
fs.Stats.DoneTransferring(fh.remote, true)
|
||||
fh.file.addWriters(-1)
|
||||
writeCloseErr := fh.pipeWriter.Close()
|
||||
err := <-fh.result
|
||||
|
||||
+10
-9
@@ -7,25 +7,26 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(moveCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var moveCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "move source:path dest:path",
|
||||
Short: `Move files from source to dest.`,
|
||||
Long: `
|
||||
Moves the contents of the source directory to the destination
|
||||
directory. Rclone will error if the source and destination overlap.
|
||||
directory. Rclone will error if the source and destination overlap and
|
||||
the remote does not support a server side directory move operation.
|
||||
|
||||
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
|
||||
` + "`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
|
||||
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` + "`" + `.
|
||||
into ` + "`dest:path`" + ` then delete the original (if no errors on copy) in
|
||||
` + "`source:path`" + `.
|
||||
|
||||
**Important**: Since this can cause data loss, test first with the
|
||||
--dry-run flag.
|
||||
@@ -33,7 +34,7 @@ into ` + "`" + `dest:path` + "`" + ` then delete the original (if no errors on c
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(2, 2, command, args)
|
||||
fsrc, fdst := cmd.NewFsSrcDst(args)
|
||||
cmd.Run(true, command, func() error {
|
||||
cmd.Run(true, true, command, func() error {
|
||||
return fs.MoveDir(fdst, fsrc)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package moveto
|
||||
|
||||
import (
|
||||
"github.com/ncw/rclone/cmd"
|
||||
"github.com/ncw/rclone/fs"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "moveto source:path dest:path",
|
||||
Short: `Move file or directory from source to dest.`,
|
||||
Long: `
|
||||
If source:path is a file or directory then it moves it to a file or
|
||||
directory named dest:path.
|
||||
|
||||
This can be used to rename files or upload single files to other than
|
||||
their existing name. If the source is a directory then it acts exacty
|
||||
like the move command.
|
||||
|
||||
So
|
||||
|
||||
rclone moveto src dst
|
||||
|
||||
where src and dst are rclone paths, either remote:path or
|
||||
/path/to/local or C:\windows\path\if\on\windows.
|
||||
|
||||
This will:
|
||||
|
||||
if src is file
|
||||
move it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
move it to dst, overwriting existing files if they exist
|
||||
see move command for full details
|
||||
|
||||
This doesn't transfer unchanged files, testing by size and
|
||||
modification time or MD5SUM. src will be deleted on successful
|
||||
transfer.
|
||||
|
||||
**Important**: Since this can cause data loss, test first with the
|
||||
--dry-run flag.
|
||||
`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(2, 2, command, args)
|
||||
fsrc, srcFileName, fdst, dstFileName := cmd.NewFsSrcDstFiles(args)
|
||||
|
||||
cmd.Run(true, true, command, func() error {
|
||||
if srcFileName == "" {
|
||||
return fs.MoveDir(fdst, fsrc)
|
||||
}
|
||||
return fs.MoveFile(fdst, fsrc, dstFileName, srcFileName)
|
||||
})
|
||||
},
|
||||
}
|
||||
+3
-3
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(purgeCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var purgeCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "purge remote:path",
|
||||
Short: `Remove the path and all of its contents.`,
|
||||
Long: `
|
||||
@@ -21,7 +21,7 @@ you want to selectively delete files.
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fdst := cmd.NewFsDst(args)
|
||||
cmd.Run(true, command, func() error {
|
||||
cmd.Run(true, false, command, func() error {
|
||||
return fs.Purge(fdst)
|
||||
})
|
||||
},
|
||||
|
||||
+4
-4
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(rmdirCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var rmdirCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "rmdir remote:path",
|
||||
Short: `Remove the path if empty.`,
|
||||
Long: `
|
||||
@@ -19,8 +19,8 @@ objects in it, use purge for that.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fdst := cmd.NewFsDst(args)
|
||||
cmd.Run(true, command, func() error {
|
||||
return fs.Rmdir(fdst)
|
||||
cmd.Run(true, false, command, func() error {
|
||||
return fs.Rmdir(fdst, "")
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package rmdir
|
||||
|
||||
import (
|
||||
"github.com/ncw/rclone/cmd"
|
||||
"github.com/ncw/rclone/fs"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(rmdirsCmd)
|
||||
}
|
||||
|
||||
var rmdirsCmd = &cobra.Command{
|
||||
Use: "rmdirs remote:path",
|
||||
Short: `Remove any empty directoryies under the path.`,
|
||||
Long: `This removes any empty directories (or directories that only contain
|
||||
empty directories) under the path that it finds, including the path if
|
||||
it has nothing in.
|
||||
|
||||
This is useful for tidying up remotes that rclone has left a lot of
|
||||
empty directories in.
|
||||
|
||||
`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fdst := cmd.NewFsDst(args)
|
||||
cmd.Run(true, false, command, func() error {
|
||||
return fs.Rmdirs(fdst)
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(sha1sumCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var sha1sumCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "sha1sum remote:path",
|
||||
Short: `Produces an sha1sum file for all the objects in the path.`,
|
||||
Long: `
|
||||
@@ -22,7 +22,7 @@ is in the same format as the standard sha1sum tool produces.
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
return fs.Sha1sum(fsrc, os.Stdout)
|
||||
})
|
||||
},
|
||||
|
||||
+3
-3
@@ -9,16 +9,16 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(sizeCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var sizeCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "size remote:path",
|
||||
Short: `Prints the total size and number of objects in remote:path.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(1, 1, command, args)
|
||||
fsrc := cmd.NewFsSrc(args)
|
||||
cmd.Run(false, command, func() error {
|
||||
cmd.Run(false, false, command, func() error {
|
||||
objects, size, err := fs.Count(fsrc)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
+3
-3
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(syncCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var syncCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "sync source:path dest:path",
|
||||
Short: `Make source and dest identical, modifying destination only.`,
|
||||
Long: `
|
||||
@@ -36,7 +36,7 @@ go there.
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(2, 2, command, args)
|
||||
fsrc, fdst := cmd.NewFsSrcDst(args)
|
||||
cmd.Run(true, command, func() error {
|
||||
cmd.Run(true, true, command, func() error {
|
||||
return fs.Sync(fdst, fsrc)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(versionCmd)
|
||||
cmd.Root.AddCommand(commandDefintion)
|
||||
}
|
||||
|
||||
var versionCmd = &cobra.Command{
|
||||
var commandDefintion = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: `Show the version number.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
|
||||
@@ -579,6 +579,11 @@ func (fh *decrypter) fillBuffer() (err error) {
|
||||
block := fh.buf
|
||||
_, ok := secretbox.Open(block[:0], readBuf[:n], fh.nonce.pointer(), &fh.c.dataKey)
|
||||
if !ok {
|
||||
// if block wouldn't decode and got unexpected EOF
|
||||
// then return that as it is probably a better error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ErrorEncryptedBadBlock
|
||||
}
|
||||
fh.bufIndex = 0
|
||||
|
||||
+28
-6
@@ -917,14 +917,36 @@ func TestDecrypterRead(t *testing.T) {
|
||||
c, err := newCipher(NameEncryptionStandard, "", "")
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Test truncating the header
|
||||
for i := 1; i < blockHeaderSize; i++ {
|
||||
cd := newCloseDetector(bytes.NewBuffer(file1[:len(file1)-i]))
|
||||
// Test truncating the file at each possible point
|
||||
for i := 0; i < len(file16)-1; i++ {
|
||||
what := fmt.Sprintf("truncating to %d/%d", i, len(file16))
|
||||
cd := newCloseDetector(bytes.NewBuffer(file16[:i]))
|
||||
fh, err := c.newDecrypter(cd)
|
||||
assert.NoError(t, err)
|
||||
if i < fileHeaderSize {
|
||||
assert.EqualError(t, err, ErrorEncryptedFileTooShort.Error(), what)
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
assert.NoError(t, err, what)
|
||||
continue
|
||||
}
|
||||
_, err = ioutil.ReadAll(fh)
|
||||
assert.Error(t, err, ErrorEncryptedFileBadHeader.Error())
|
||||
assert.Equal(t, 0, cd.closed)
|
||||
var expectedErr error
|
||||
switch {
|
||||
case i == fileHeaderSize:
|
||||
// This would normally produce an error *except* on the first block
|
||||
expectedErr = nil
|
||||
case i <= fileHeaderSize+blockHeaderSize:
|
||||
expectedErr = ErrorEncryptedFileBadHeader
|
||||
default:
|
||||
expectedErr = io.ErrUnexpectedEOF
|
||||
}
|
||||
if expectedErr != nil {
|
||||
assert.EqualError(t, err, expectedErr.Error(), what)
|
||||
} else {
|
||||
assert.NoError(t, err, what)
|
||||
}
|
||||
assert.Equal(t, 0, cd.closed, what)
|
||||
}
|
||||
|
||||
// Test producing an error on the file on Read the underlying file
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"path"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/ncw/rclone/fs"
|
||||
@@ -71,6 +72,9 @@ func NewFs(name, rpath string) (fs.Fs, error) {
|
||||
return nil, errors.Wrap(err, "failed to make cipher")
|
||||
}
|
||||
remote := fs.ConfigFile.MustValue(name, "remote")
|
||||
if strings.HasPrefix(remote, name+":") {
|
||||
return nil, errors.New("can't point crypt remote at itself - check the value of the remote setting")
|
||||
}
|
||||
// Look for a file first
|
||||
remotePath := path.Join(remote, cipher.EncryptFileName(rpath))
|
||||
wrappedFs, err := fs.NewFs(remotePath)
|
||||
@@ -152,6 +156,20 @@ func (f *Fs) Hashes() fs.HashSet {
|
||||
return fs.HashSet(fs.HashNone)
|
||||
}
|
||||
|
||||
// Mkdir makes the directory (container, bucket)
|
||||
//
|
||||
// Shouldn't return an error if it already exists
|
||||
func (f *Fs) Mkdir(dir string) error {
|
||||
return f.Fs.Mkdir(f.cipher.EncryptDirName(dir))
|
||||
}
|
||||
|
||||
// Rmdir removes the directory (container, bucket) if empty
|
||||
//
|
||||
// Return an error if it doesn't exist or isn't empty
|
||||
func (f *Fs) Rmdir(dir string) error {
|
||||
return f.Fs.Rmdir(f.cipher.EncryptDirName(dir))
|
||||
}
|
||||
|
||||
// Purge all files in the root and the root directory
|
||||
//
|
||||
// Implement this if you have a way of deleting all the files
|
||||
|
||||
@@ -24,6 +24,7 @@ func TestFsString2(t *testing.T) { fstests.TestFsString(t) }
|
||||
func TestFsRmdirEmpty2(t *testing.T) { fstests.TestFsRmdirEmpty(t) }
|
||||
func TestFsRmdirNotFound2(t *testing.T) { fstests.TestFsRmdirNotFound(t) }
|
||||
func TestFsMkdir2(t *testing.T) { fstests.TestFsMkdir(t) }
|
||||
func TestFsMkdirRmdirSubdir2(t *testing.T) { fstests.TestFsMkdirRmdirSubdir(t) }
|
||||
func TestFsListEmpty2(t *testing.T) { fstests.TestFsListEmpty(t) }
|
||||
func TestFsListDirEmpty2(t *testing.T) { fstests.TestFsListDirEmpty(t) }
|
||||
func TestFsNewObjectNotFound2(t *testing.T) { fstests.TestFsNewObjectNotFound(t) }
|
||||
|
||||
@@ -24,6 +24,7 @@ func TestFsString(t *testing.T) { fstests.TestFsString(t) }
|
||||
func TestFsRmdirEmpty(t *testing.T) { fstests.TestFsRmdirEmpty(t) }
|
||||
func TestFsRmdirNotFound(t *testing.T) { fstests.TestFsRmdirNotFound(t) }
|
||||
func TestFsMkdir(t *testing.T) { fstests.TestFsMkdir(t) }
|
||||
func TestFsMkdirRmdirSubdir(t *testing.T) { fstests.TestFsMkdirRmdirSubdir(t) }
|
||||
func TestFsListEmpty(t *testing.T) { fstests.TestFsListEmpty(t) }
|
||||
func TestFsListDirEmpty(t *testing.T) { fstests.TestFsListDirEmpty(t) }
|
||||
func TestFsNewObjectNotFound(t *testing.T) { fstests.TestFsNewObjectNotFound(t) }
|
||||
|
||||
@@ -78,6 +78,35 @@ func (dc *DirCache) Flush() {
|
||||
dc.cacheMu.Unlock()
|
||||
}
|
||||
|
||||
// FlushDir flushes the map of all data starting with dir
|
||||
//
|
||||
// If dir is empty then this is equivalent to calling ResetRoot
|
||||
func (dc *DirCache) FlushDir(dir string) {
|
||||
if dir == "" {
|
||||
dc.ResetRoot()
|
||||
return
|
||||
}
|
||||
dc.cacheMu.Lock()
|
||||
|
||||
// Delete the root dir
|
||||
ID, ok := dc.cache[dir]
|
||||
if ok {
|
||||
delete(dc.cache, dir)
|
||||
delete(dc.invCache, ID)
|
||||
}
|
||||
|
||||
// And any sub directories
|
||||
dir += "/"
|
||||
for key, ID := range dc.cache {
|
||||
if strings.HasPrefix(key, dir) {
|
||||
delete(dc.cache, key)
|
||||
delete(dc.invCache, ID)
|
||||
}
|
||||
}
|
||||
|
||||
dc.cacheMu.Unlock()
|
||||
}
|
||||
|
||||
// SplitPath splits a path into directory, leaf
|
||||
//
|
||||
// Path shouldn't start or end with a /
|
||||
|
||||
@@ -41,5 +41,6 @@ Links
|
||||
|
||||
* <i class="fa fa-home"></i> [Home page](http://rclone.org/)
|
||||
* <i class="fa fa-github"></i> [Github project page for source and bug tracker](http://github.com/ncw/rclone)
|
||||
* <i class="fa fa-google-plus"></i> <a href="https://google.com/+RcloneOrg" rel="publisher">Google+ page</a></li>
|
||||
* <i class="fa fa-comments"></i> [Rclone Forum](https://forum.rclone.org)
|
||||
* <i class="fa fa-google-plus"></i> <a href="https://google.com/+RcloneOrg" rel="publisher">Google+ page</a>
|
||||
* <i class="fa fa-cloud-download"></i>[Downloads](/downloads/)
|
||||
@@ -174,5 +174,6 @@ This means that larger files are likely to fail.
|
||||
|
||||
Unfortunatly there is no way for rclone to see that this failure is
|
||||
because of file size, so it will retry the operation, as any other
|
||||
failure. To avoid this problem, use `--max-size 50G` option to limit
|
||||
the maximum size of uploaded files.
|
||||
failure. To avoid this problem, use `--max-size 50000M` option to limit
|
||||
the maximum size of uploaded files. Note that `--max-size` does not split
|
||||
files into segments, it only ignores files over this size.
|
||||
@@ -45,3 +45,8 @@ Contributors
|
||||
* Felix Bünemann <buenemann@louis.info>
|
||||
* Durval Menezes <jmrclone@durval.com>
|
||||
* Luiz Carlos Rumbelsperger Viana <maxd13_luiz_carlos@hotmail.com>
|
||||
* Stefan Breunig <stefan-github@yrden.de>
|
||||
* Alishan Ladhani <ali-l@users.noreply.github.com>
|
||||
* 0xJAKE <0xJAKE@users.noreply.github.com>
|
||||
* Thibault Molleman <thibaultmol@users.noreply.github.com>
|
||||
* Scott McGillivray <scott.mcgillivray@gmail.com>
|
||||
@@ -7,6 +7,44 @@ date: "2016-11-06"
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* v1.35 - 2017-01-02
|
||||
* New Features
|
||||
* moveto and copyto commands for choosing a destination name on copy/move
|
||||
* rmdirs command to recursively delete empty directories
|
||||
* Allow repeated --include/--exclude/--filter options
|
||||
* Only show transfer stats on commands which transfer stuff
|
||||
* show stats on any command using the `--stats` flag
|
||||
* Allow overlapping directories in move when server side dir move is supported
|
||||
* Add --stats-unit option - thanks Scott McGillivray
|
||||
* Bug Fixes
|
||||
* Fix the config file being overwritten when two rclones are running
|
||||
* Make rclone lsd obey the filters properly
|
||||
* Fix compilation on mips
|
||||
* Fix not transferring files that don't differ in size
|
||||
* Fix panic on nil retry/fatal error
|
||||
* Mount
|
||||
* Retry reads on error - should help with reliability a lot
|
||||
* Report the modification times for directories from the remote
|
||||
* Add bandwidth accounting and limiting (fixes --bwlimit)
|
||||
* If --stats provided will show stats and which files are transferring
|
||||
* Support R/W files if truncate is set.
|
||||
* Implement statfs interface so df works
|
||||
* Note that write is now supported on Amazon Drive
|
||||
* Report number of blocks in a file - thanks Stefan Breunig
|
||||
* Crypt
|
||||
* Prevent the user pointing crypt at itself
|
||||
* Fix failed to authenticate decrypted block errors
|
||||
* these will now return the underlying unexpected EOF instead
|
||||
* Amazon Drive
|
||||
* Add support for server side move and directory move - thanks Stefan Breunig
|
||||
* Fix nil pointer deref on size attribute
|
||||
* B2
|
||||
* Use new prefix and delimiter parameters in directory listings
|
||||
* This makes --max-depth 1 dir listings as used in mount much faster
|
||||
* Reauth the account while doing uploads too - should help with token expiry
|
||||
* Drive
|
||||
* Make DirMove more efficient and complain about moving the root
|
||||
* Create destination directory on Move()
|
||||
* v1.34 - 2016-11-06
|
||||
* New Features
|
||||
* Stop single file and `--files-from` operations iterating through the source bucket.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone"
|
||||
slug: rclone
|
||||
url: /commands/rclone/
|
||||
---
|
||||
## rclone
|
||||
|
||||
Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
### Synopsis
|
||||
|
||||
@@ -79,16 +79,16 @@ rclone
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -110,7 +110,8 @@ rclone
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -126,6 +127,7 @@ rclone
|
||||
* [rclone cleanup](/commands/rclone_cleanup/) - Clean up the remote if possible
|
||||
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
|
||||
* [rclone copy](/commands/rclone_copy/) - Copy files from source to dest, skipping already copied
|
||||
* [rclone copyto](/commands/rclone_copyto/) - Copy files from source to dest, skipping already copied
|
||||
* [rclone dedupe](/commands/rclone_dedupe/) - Interactively find duplicate files delete/rename them.
|
||||
* [rclone delete](/commands/rclone_delete/) - Remove the contents of path.
|
||||
* [rclone genautocomplete](/commands/rclone_genautocomplete/) - Output bash completion script for rclone.
|
||||
@@ -138,11 +140,13 @@ rclone
|
||||
* [rclone mkdir](/commands/rclone_mkdir/) - Make the path if it doesn't already exist.
|
||||
* [rclone mount](/commands/rclone_mount/) - Mount the remote as a mountpoint. **EXPERIMENTAL**
|
||||
* [rclone move](/commands/rclone_move/) - Move files from source to dest.
|
||||
* [rclone moveto](/commands/rclone_moveto/) - Move file or directory from source to dest.
|
||||
* [rclone purge](/commands/rclone_purge/) - Remove the path and all of its contents.
|
||||
* [rclone rmdir](/commands/rclone_rmdir/) - Remove the path if empty.
|
||||
* [rclone rmdirs](/commands/rclone_rmdirs/) - Remove any empty directoryies under the path.
|
||||
* [rclone sha1sum](/commands/rclone_sha1sum/) - Produces an sha1sum file for all the objects in the path.
|
||||
* [rclone size](/commands/rclone_size/) - Prints the total size and number of objects in remote:path.
|
||||
* [rclone sync](/commands/rclone_sync/) - Make source and dest identical, modifying destination only.
|
||||
* [rclone version](/commands/rclone_version/) - Show the version number.
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone authorize"
|
||||
slug: rclone_authorize
|
||||
url: /commands/rclone_authorize/
|
||||
@@ -52,16 +52,16 @@ rclone authorize
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -83,7 +83,8 @@ rclone authorize
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -92,6 +93,6 @@ rclone authorize
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone cat"
|
||||
slug: rclone_cat
|
||||
url: /commands/rclone_cat/
|
||||
@@ -63,16 +63,16 @@ rclone cat remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -94,7 +94,8 @@ rclone cat remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -103,6 +104,6 @@ rclone cat remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone check"
|
||||
slug: rclone_check
|
||||
url: /commands/rclone_check/
|
||||
@@ -55,16 +55,16 @@ rclone check source:path dest:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -86,7 +86,8 @@ rclone check source:path dest:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -95,6 +96,6 @@ rclone check source:path dest:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone cleanup"
|
||||
slug: rclone_cleanup
|
||||
url: /commands/rclone_cleanup/
|
||||
@@ -52,16 +52,16 @@ rclone cleanup remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -83,7 +83,8 @@ rclone cleanup remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -92,6 +93,6 @@ rclone cleanup remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone config"
|
||||
slug: rclone_config
|
||||
url: /commands/rclone_config/
|
||||
@@ -49,16 +49,16 @@ rclone config
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -80,7 +80,8 @@ rclone config
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -89,6 +90,6 @@ rclone config
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone copy"
|
||||
slug: rclone_copy
|
||||
url: /commands/rclone_copy/
|
||||
@@ -88,16 +88,16 @@ rclone copy source:path dest:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -119,7 +119,8 @@ rclone copy source:path dest:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -128,6 +129,6 @@ rclone copy source:path dest:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -0,0 +1,121 @@
|
||||
---
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone copyto"
|
||||
slug: rclone_copyto
|
||||
url: /commands/rclone_copyto/
|
||||
---
|
||||
## rclone copyto
|
||||
|
||||
Copy files from source to dest, skipping already copied
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
|
||||
If source:path is a file or directory then it copies it to a file or
|
||||
directory named dest:path.
|
||||
|
||||
This can be used to upload single files to other than their current
|
||||
name. If the source is a directory then it acts exactly like the copy
|
||||
command.
|
||||
|
||||
So
|
||||
|
||||
rclone copyto src dst
|
||||
|
||||
where src and dst are rclone paths, either remote:path or
|
||||
/path/to/local or C:\windows\path\if\on\windows.
|
||||
|
||||
This will:
|
||||
|
||||
if src is file
|
||||
copy it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
copy it to dst, overwriting existing files if they exist
|
||||
see copy command for full details
|
||||
|
||||
This doesn't transfer unchanged files, testing by size and
|
||||
modification time or MD5SUM. It doesn't delete files from the
|
||||
destination.
|
||||
|
||||
|
||||
```
|
||||
rclone copyto source:path dest:path
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--acd-templink-threshold int Files >= this size will be downloaded via their tempLink. (default 9G)
|
||||
--acd-upload-wait-per-gb duration Additional time per GB to wait after a failed complete upload to see if it appears. (default 3m0s)
|
||||
--ask-password Allow prompt for password for encrypted configuration. (default true)
|
||||
--b2-chunk-size int Upload chunk size. Must fit in memory. (default 96M)
|
||||
--b2-test-mode string A flag string for X-Bz-Test-Mode header.
|
||||
--b2-upload-cutoff int Cutoff for switching to chunked upload (default 190.735M)
|
||||
--b2-versions Include old versions in directory listings.
|
||||
--bwlimit int Bandwidth limit in kBytes/s, or use suffix b|k|M|G
|
||||
--checkers int Number of checkers to run in parallel. (default 8)
|
||||
-c, --checksum Skip based on checksum & size, not mod-time & size
|
||||
--config string Config file. (default "/home/ncw/.rclone.conf")
|
||||
--contimeout duration Connect timeout (default 1m0s)
|
||||
--cpuprofile string Write cpu profile to file
|
||||
--delete-after When synchronizing, delete files on destination after transfering
|
||||
--delete-before When synchronizing, delete files on destination before transfering
|
||||
--delete-during When synchronizing, delete files during transfer (default)
|
||||
--delete-excluded Delete files on dest excluded from sync
|
||||
--drive-auth-owner-only Only consider files owned by the authenticated user. Requires drive-full-list.
|
||||
--drive-chunk-size int Upload chunk size. Must a power of 2 >= 256k. (default 8M)
|
||||
--drive-formats string Comma separated list of preferred formats for downloading Google docs. (default "docx,xlsx,pptx,svg")
|
||||
--drive-full-list Use a full listing for directory list. More data but usually quicker. (obsolete)
|
||||
--drive-upload-cutoff int Cutoff for switching to chunked upload (default 8M)
|
||||
--drive-use-trash Send files to the trash instead of deleting permanently.
|
||||
--dropbox-chunk-size int Upload chunk size. Max 150M. (default 128M)
|
||||
-n, --dry-run Do a trial run with no permanent changes
|
||||
--dump-auth Dump HTTP headers with auth info
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
--max-depth int If set limits the recursion depth to this. (default -1)
|
||||
--max-size int Don't transfer any file larger than this in k or suffix b|k|M|G (default off)
|
||||
--memprofile string Write memory profile to file
|
||||
--min-age string Don't transfer any file younger than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
--min-size int Don't transfer any file smaller than this in k or suffix b|k|M|G (default off)
|
||||
--modify-window duration Max time diff to be considered the same (default 1ns)
|
||||
--no-check-certificate Do not verify the server SSL certificate. Insecure.
|
||||
--no-gzip-encoding Don't set Accept-Encoding: gzip.
|
||||
--no-traverse Don't traverse destination file system on copy.
|
||||
--no-update-modtime Don't update destination mod-time if files identical.
|
||||
-x, --one-file-system Don't cross filesystem boundaries.
|
||||
--onedrive-chunk-size int Above this size files will be chunked - must be multiple of 320k. (default 10M)
|
||||
--onedrive-upload-cutoff int Cutoff for switching to chunked upload - must be <= 100MB (default 10M)
|
||||
-q, --quiet Print as little stuff as possible
|
||||
--retries int Retry operations this many times if they fail (default 3)
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
-u, --update Skip files that are newer on the destination.
|
||||
-v, --verbose Print lots more stuff
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone dedupe"
|
||||
slug: rclone_dedupe
|
||||
url: /commands/rclone_dedupe/
|
||||
@@ -130,16 +130,16 @@ rclone dedupe [mode] remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -161,7 +161,8 @@ rclone dedupe [mode] remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -170,6 +171,6 @@ rclone dedupe [mode] remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone delete"
|
||||
slug: rclone_delete
|
||||
url: /commands/rclone_delete/
|
||||
@@ -66,16 +66,16 @@ rclone delete remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -97,7 +97,8 @@ rclone delete remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -106,6 +107,6 @@ rclone delete remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone genautocomplete"
|
||||
slug: rclone_genautocomplete
|
||||
url: /commands/rclone_genautocomplete/
|
||||
@@ -64,16 +64,16 @@ rclone genautocomplete [output_file]
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -95,7 +95,8 @@ rclone genautocomplete [output_file]
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -104,6 +105,6 @@ rclone genautocomplete [output_file]
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone gendocs"
|
||||
slug: rclone_gendocs
|
||||
url: /commands/rclone_gendocs/
|
||||
@@ -52,16 +52,16 @@ rclone gendocs output_directory
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -83,7 +83,8 @@ rclone gendocs output_directory
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -92,6 +93,6 @@ rclone gendocs output_directory
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone listremotes"
|
||||
slug: rclone_listremotes
|
||||
url: /commands/rclone_listremotes/
|
||||
@@ -59,16 +59,16 @@ rclone listremotes
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -90,7 +90,8 @@ rclone listremotes
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -99,6 +100,6 @@ rclone listremotes
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone ls"
|
||||
slug: rclone_ls
|
||||
url: /commands/rclone_ls/
|
||||
@@ -49,16 +49,16 @@ rclone ls remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -80,7 +80,8 @@ rclone ls remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -89,6 +90,6 @@ rclone ls remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone lsd"
|
||||
slug: rclone_lsd
|
||||
url: /commands/rclone_lsd/
|
||||
@@ -49,16 +49,16 @@ rclone lsd remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -80,7 +80,8 @@ rclone lsd remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -89,6 +90,6 @@ rclone lsd remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone lsl"
|
||||
slug: rclone_lsl
|
||||
url: /commands/rclone_lsl/
|
||||
@@ -49,16 +49,16 @@ rclone lsl remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -80,7 +80,8 @@ rclone lsl remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -89,6 +90,6 @@ rclone lsl remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone md5sum"
|
||||
slug: rclone_md5sum
|
||||
url: /commands/rclone_md5sum/
|
||||
@@ -52,16 +52,16 @@ rclone md5sum remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -83,7 +83,8 @@ rclone md5sum remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -92,6 +93,6 @@ rclone md5sum remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone mkdir"
|
||||
slug: rclone_mkdir
|
||||
url: /commands/rclone_mkdir/
|
||||
@@ -49,16 +49,16 @@ rclone mkdir remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -80,7 +80,8 @@ rclone mkdir remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -89,6 +90,6 @@ rclone mkdir remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone mount"
|
||||
slug: rclone_mount
|
||||
url: /commands/rclone_mount/
|
||||
@@ -59,7 +59,7 @@ mount won't do that, so will be less reliable than the rclone command.
|
||||
### Bugs ###
|
||||
|
||||
* All the remotes should work for read, but some may not for write
|
||||
* those which need to know the size in advance won't - eg B2, Amazon Drive
|
||||
* those which need to know the size in advance won't - eg B2
|
||||
* maybe should pass in size as -1 to mean work it out
|
||||
* Or put in an an upload cache to cache the files on disk first
|
||||
|
||||
@@ -125,16 +125,16 @@ rclone mount remote:path /path/to/mountpoint
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -156,7 +156,8 @@ rclone mount remote:path /path/to/mountpoint
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -165,6 +166,6 @@ rclone mount remote:path /path/to/mountpoint
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone move"
|
||||
slug: rclone_move
|
||||
url: /commands/rclone_move/
|
||||
@@ -13,7 +13,8 @@ Move files from source to dest.
|
||||
|
||||
|
||||
Moves the contents of the source directory to the destination
|
||||
directory. Rclone will error if the source and destination overlap.
|
||||
directory. Rclone will error if the source and destination overlap and
|
||||
the remote does not support a server side directory move operation.
|
||||
|
||||
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
|
||||
@@ -65,16 +66,16 @@ rclone move source:path dest:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -96,7 +97,8 @@ rclone move source:path dest:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -105,6 +107,6 @@ rclone move source:path dest:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -0,0 +1,124 @@
|
||||
---
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone moveto"
|
||||
slug: rclone_moveto
|
||||
url: /commands/rclone_moveto/
|
||||
---
|
||||
## rclone moveto
|
||||
|
||||
Move file or directory from source to dest.
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
|
||||
If source:path is a file or directory then it moves it to a file or
|
||||
directory named dest:path.
|
||||
|
||||
This can be used to rename files or upload single files to other than
|
||||
their existing name. If the source is a directory then it acts exacty
|
||||
like the move command.
|
||||
|
||||
So
|
||||
|
||||
rclone moveto src dst
|
||||
|
||||
where src and dst are rclone paths, either remote:path or
|
||||
/path/to/local or C:\windows\path\if\on\windows.
|
||||
|
||||
This will:
|
||||
|
||||
if src is file
|
||||
move it to dst, overwriting an existing file if it exists
|
||||
if src is directory
|
||||
move it to dst, overwriting existing files if they exist
|
||||
see move command for full details
|
||||
|
||||
This doesn't transfer unchanged files, testing by size and
|
||||
modification time or MD5SUM. src will be deleted on successful
|
||||
transfer.
|
||||
|
||||
**Important**: Since this can cause data loss, test first with the
|
||||
--dry-run flag.
|
||||
|
||||
|
||||
```
|
||||
rclone moveto source:path dest:path
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--acd-templink-threshold int Files >= this size will be downloaded via their tempLink. (default 9G)
|
||||
--acd-upload-wait-per-gb duration Additional time per GB to wait after a failed complete upload to see if it appears. (default 3m0s)
|
||||
--ask-password Allow prompt for password for encrypted configuration. (default true)
|
||||
--b2-chunk-size int Upload chunk size. Must fit in memory. (default 96M)
|
||||
--b2-test-mode string A flag string for X-Bz-Test-Mode header.
|
||||
--b2-upload-cutoff int Cutoff for switching to chunked upload (default 190.735M)
|
||||
--b2-versions Include old versions in directory listings.
|
||||
--bwlimit int Bandwidth limit in kBytes/s, or use suffix b|k|M|G
|
||||
--checkers int Number of checkers to run in parallel. (default 8)
|
||||
-c, --checksum Skip based on checksum & size, not mod-time & size
|
||||
--config string Config file. (default "/home/ncw/.rclone.conf")
|
||||
--contimeout duration Connect timeout (default 1m0s)
|
||||
--cpuprofile string Write cpu profile to file
|
||||
--delete-after When synchronizing, delete files on destination after transfering
|
||||
--delete-before When synchronizing, delete files on destination before transfering
|
||||
--delete-during When synchronizing, delete files during transfer (default)
|
||||
--delete-excluded Delete files on dest excluded from sync
|
||||
--drive-auth-owner-only Only consider files owned by the authenticated user. Requires drive-full-list.
|
||||
--drive-chunk-size int Upload chunk size. Must a power of 2 >= 256k. (default 8M)
|
||||
--drive-formats string Comma separated list of preferred formats for downloading Google docs. (default "docx,xlsx,pptx,svg")
|
||||
--drive-full-list Use a full listing for directory list. More data but usually quicker. (obsolete)
|
||||
--drive-upload-cutoff int Cutoff for switching to chunked upload (default 8M)
|
||||
--drive-use-trash Send files to the trash instead of deleting permanently.
|
||||
--dropbox-chunk-size int Upload chunk size. Max 150M. (default 128M)
|
||||
-n, --dry-run Do a trial run with no permanent changes
|
||||
--dump-auth Dump HTTP headers with auth info
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
--max-depth int If set limits the recursion depth to this. (default -1)
|
||||
--max-size int Don't transfer any file larger than this in k or suffix b|k|M|G (default off)
|
||||
--memprofile string Write memory profile to file
|
||||
--min-age string Don't transfer any file younger than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
--min-size int Don't transfer any file smaller than this in k or suffix b|k|M|G (default off)
|
||||
--modify-window duration Max time diff to be considered the same (default 1ns)
|
||||
--no-check-certificate Do not verify the server SSL certificate. Insecure.
|
||||
--no-gzip-encoding Don't set Accept-Encoding: gzip.
|
||||
--no-traverse Don't traverse destination file system on copy.
|
||||
--no-update-modtime Don't update destination mod-time if files identical.
|
||||
-x, --one-file-system Don't cross filesystem boundaries.
|
||||
--onedrive-chunk-size int Above this size files will be chunked - must be multiple of 320k. (default 10M)
|
||||
--onedrive-upload-cutoff int Cutoff for switching to chunked upload - must be <= 100MB (default 10M)
|
||||
-q, --quiet Print as little stuff as possible
|
||||
--retries int Retry operations this many times if they fail (default 3)
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
-u, --update Skip files that are newer on the destination.
|
||||
-v, --verbose Print lots more stuff
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone purge"
|
||||
slug: rclone_purge
|
||||
url: /commands/rclone_purge/
|
||||
@@ -53,16 +53,16 @@ rclone purge remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -84,7 +84,8 @@ rclone purge remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -93,6 +94,6 @@ rclone purge remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone rmdir"
|
||||
slug: rclone_rmdir
|
||||
url: /commands/rclone_rmdir/
|
||||
@@ -51,16 +51,16 @@ rclone rmdir remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -82,7 +82,8 @@ rclone rmdir remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -91,6 +92,6 @@ rclone rmdir remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -0,0 +1,102 @@
|
||||
---
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone rmdirs"
|
||||
slug: rclone_rmdirs
|
||||
url: /commands/rclone_rmdirs/
|
||||
---
|
||||
## rclone rmdirs
|
||||
|
||||
Remove any empty directoryies under the path.
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
This removes any empty directories (or directories that only contain
|
||||
empty directories) under the path that it finds, including the path if
|
||||
it has nothing in.
|
||||
|
||||
This is useful for tidying up remotes that rclone has left a lot of
|
||||
empty directories in.
|
||||
|
||||
|
||||
|
||||
```
|
||||
rclone rmdirs remote:path
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--acd-templink-threshold int Files >= this size will be downloaded via their tempLink. (default 9G)
|
||||
--acd-upload-wait-per-gb duration Additional time per GB to wait after a failed complete upload to see if it appears. (default 3m0s)
|
||||
--ask-password Allow prompt for password for encrypted configuration. (default true)
|
||||
--b2-chunk-size int Upload chunk size. Must fit in memory. (default 96M)
|
||||
--b2-test-mode string A flag string for X-Bz-Test-Mode header.
|
||||
--b2-upload-cutoff int Cutoff for switching to chunked upload (default 190.735M)
|
||||
--b2-versions Include old versions in directory listings.
|
||||
--bwlimit int Bandwidth limit in kBytes/s, or use suffix b|k|M|G
|
||||
--checkers int Number of checkers to run in parallel. (default 8)
|
||||
-c, --checksum Skip based on checksum & size, not mod-time & size
|
||||
--config string Config file. (default "/home/ncw/.rclone.conf")
|
||||
--contimeout duration Connect timeout (default 1m0s)
|
||||
--cpuprofile string Write cpu profile to file
|
||||
--delete-after When synchronizing, delete files on destination after transfering
|
||||
--delete-before When synchronizing, delete files on destination before transfering
|
||||
--delete-during When synchronizing, delete files during transfer (default)
|
||||
--delete-excluded Delete files on dest excluded from sync
|
||||
--drive-auth-owner-only Only consider files owned by the authenticated user. Requires drive-full-list.
|
||||
--drive-chunk-size int Upload chunk size. Must a power of 2 >= 256k. (default 8M)
|
||||
--drive-formats string Comma separated list of preferred formats for downloading Google docs. (default "docx,xlsx,pptx,svg")
|
||||
--drive-full-list Use a full listing for directory list. More data but usually quicker. (obsolete)
|
||||
--drive-upload-cutoff int Cutoff for switching to chunked upload (default 8M)
|
||||
--drive-use-trash Send files to the trash instead of deleting permanently.
|
||||
--dropbox-chunk-size int Upload chunk size. Max 150M. (default 128M)
|
||||
-n, --dry-run Do a trial run with no permanent changes
|
||||
--dump-auth Dump HTTP headers with auth info
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
--max-depth int If set limits the recursion depth to this. (default -1)
|
||||
--max-size int Don't transfer any file larger than this in k or suffix b|k|M|G (default off)
|
||||
--memprofile string Write memory profile to file
|
||||
--min-age string Don't transfer any file younger than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
--min-size int Don't transfer any file smaller than this in k or suffix b|k|M|G (default off)
|
||||
--modify-window duration Max time diff to be considered the same (default 1ns)
|
||||
--no-check-certificate Do not verify the server SSL certificate. Insecure.
|
||||
--no-gzip-encoding Don't set Accept-Encoding: gzip.
|
||||
--no-traverse Don't traverse destination file system on copy.
|
||||
--no-update-modtime Don't update destination mod-time if files identical.
|
||||
-x, --one-file-system Don't cross filesystem boundaries.
|
||||
--onedrive-chunk-size int Above this size files will be chunked - must be multiple of 320k. (default 10M)
|
||||
--onedrive-upload-cutoff int Cutoff for switching to chunked upload - must be <= 100MB (default 10M)
|
||||
-q, --quiet Print as little stuff as possible
|
||||
--retries int Retry operations this many times if they fail (default 3)
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
-u, --update Skip files that are newer on the destination.
|
||||
-v, --verbose Print lots more stuff
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone sha1sum"
|
||||
slug: rclone_sha1sum
|
||||
url: /commands/rclone_sha1sum/
|
||||
@@ -52,16 +52,16 @@ rclone sha1sum remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -83,7 +83,8 @@ rclone sha1sum remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -92,6 +93,6 @@ rclone sha1sum remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone size"
|
||||
slug: rclone_size
|
||||
url: /commands/rclone_size/
|
||||
@@ -49,16 +49,16 @@ rclone size remote:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -80,7 +80,8 @@ rclone size remote:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -89,6 +90,6 @@ rclone size remote:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone sync"
|
||||
slug: rclone_sync
|
||||
url: /commands/rclone_sync/
|
||||
@@ -68,16 +68,16 @@ rclone sync source:path dest:path
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -99,7 +99,8 @@ rclone sync source:path dest:path
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -108,6 +109,6 @@ rclone sync source:path dest:path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2016-11-06T10:19:14Z
|
||||
date: 2017-01-02T15:29:14Z
|
||||
title: "rclone version"
|
||||
slug: rclone_version
|
||||
url: /commands/rclone_version/
|
||||
@@ -49,16 +49,16 @@ rclone version
|
||||
--dump-bodies Dump HTTP headers and bodies - may contain sensitive info
|
||||
--dump-filters Dump the filters to the output
|
||||
--dump-headers Dump HTTP headers - may contain sensitive info
|
||||
--exclude string Exclude files matching pattern
|
||||
--exclude-from string Read exclude patterns from file
|
||||
--files-from string Read list of source-file names from file
|
||||
-f, --filter string Add a file-filtering rule
|
||||
--filter-from string Read filtering patterns from a file
|
||||
--exclude stringArray Exclude files matching pattern
|
||||
--exclude-from stringArray Read exclude patterns from file
|
||||
--files-from stringArray Read list of source-file names from file
|
||||
-f, --filter stringArray Add a file-filtering rule
|
||||
--filter-from stringArray Read filtering patterns from a file
|
||||
--ignore-existing Skip all files that exist on destination
|
||||
--ignore-size Ignore size when skipping use mod-time or checksum.
|
||||
-I, --ignore-times Don't skip files that match size and time - transfer all files
|
||||
--include string Include files matching pattern
|
||||
--include-from string Read include patterns from file
|
||||
--include stringArray Include files matching pattern
|
||||
--include-from stringArray Read include patterns from file
|
||||
--log-file string Log everything to this file
|
||||
--low-level-retries int Number of low level retries to do. (default 10)
|
||||
--max-age string Don't transfer any file older than this in s or suffix ms|s|m|h|d|w|M|y
|
||||
@@ -80,7 +80,8 @@ rclone version
|
||||
--s3-acl string Canned ACL used when creating buckets and/or storing objects in S3
|
||||
--s3-storage-class string Storage class to use when uploading S3 objects (STANDARD|REDUCED_REDUNDANCY|STANDARD_IA)
|
||||
--size-only Skip based on size only, not mod-time or checksum
|
||||
--stats duration Interval to print stats (0 to disable) (default 1m0s)
|
||||
--stats duration Interval between printing stats, e.g 500ms, 60s, 5m. (0 to disable) (default 1m0s)
|
||||
--stats-unit string Show data rate in stats as either 'bits' or 'bytes'/s (default "bytes")
|
||||
--swift-chunk-size int Above this size files will be chunked into a _segments container. (default 5G)
|
||||
--timeout duration IO idle timeout (default 5m0s)
|
||||
--transfers int Number of file transfers to run in parallel. (default 4)
|
||||
@@ -89,6 +90,6 @@ rclone version
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.34-DEV
|
||||
* [rclone](/commands/rclone/) - Sync files and directories to and from local and remote object stores - v1.35-DEV
|
||||
|
||||
###### Auto generated by spf13/cobra on 6-Nov-2016
|
||||
###### Auto generated by spf13/cobra on 2-Jan-2017
|
||||
+34
-1
@@ -390,12 +390,31 @@ modification times in the same way as rclone.
|
||||
|
||||
### --stats=TIME ###
|
||||
|
||||
Rclone will print stats at regular intervals to show its progress.
|
||||
Commands which transfer data (`sync`, `copy`, `copyto`, `move`,
|
||||
`moveto`) will print data transfer stats at regular intervals to show
|
||||
their progress.
|
||||
|
||||
This sets the interval.
|
||||
|
||||
The default is `1m`. Use 0 to disable.
|
||||
|
||||
If you set the stats interval then all command can show stats. This
|
||||
can be useful when running other commands, `check` or `mount` for
|
||||
example.
|
||||
|
||||
### --stats-unit=bits|bytes ###
|
||||
|
||||
By default data transfer rates will be printed in bytes/second.
|
||||
|
||||
This option allows the data rate to be printed in bits/second.
|
||||
|
||||
Data transfer volume will still be reported in bytes.
|
||||
|
||||
The rate is reported as a binary unit, not SI unit. So 1 Mbit/s
|
||||
equals 1,048,576 bits/s and not 1,000,000 bits/s.
|
||||
|
||||
The default is `bytes`.
|
||||
|
||||
### --delete-(before,during,after) ###
|
||||
|
||||
This option allows you to specify when files on your destination are
|
||||
@@ -524,6 +543,20 @@ 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.
|
||||
|
||||
You can set this for a session from a script. For unix like systems
|
||||
save this to a file called `set-rclone-password`:
|
||||
|
||||
```
|
||||
#!/bin/echo Source this file don't run it
|
||||
|
||||
read -s RCLONE_CONFIG_PASS
|
||||
export RCLONE_CONFIG_PASS
|
||||
```
|
||||
|
||||
Then source the file when you want to use it. From the shell you
|
||||
would do `source set-rclone-password`. It will then ask you for the
|
||||
password and set it in the envonment variable.
|
||||
|
||||
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
|
||||
|
||||
+22
-22
@@ -2,41 +2,41 @@
|
||||
title: "Rclone downloads"
|
||||
description: "Download rclone binaries for your OS."
|
||||
type: page
|
||||
date: "2016-11-06"
|
||||
date: "2017-01-02"
|
||||
---
|
||||
|
||||
Rclone Download v1.34
|
||||
Rclone Download v1.35
|
||||
=====================
|
||||
|
||||
* Windows
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.34-windows-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.34-windows-amd64.zip)
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.35-windows-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.35-windows-amd64.zip)
|
||||
* OSX
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.34-osx-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.34-osx-amd64.zip)
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.35-osx-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.35-osx-amd64.zip)
|
||||
* Linux
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.34-linux-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.34-linux-amd64.zip)
|
||||
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.34-linux-arm.zip)
|
||||
* [ARM - 64 Bit](http://downloads.rclone.org/rclone-v1.34-linux-arm64.zip)
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.35-linux-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.35-linux-amd64.zip)
|
||||
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.35-linux-arm.zip)
|
||||
* [ARM - 64 Bit](http://downloads.rclone.org/rclone-v1.35-linux-arm64.zip)
|
||||
* FreeBSD
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.34-freebsd-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.34-freebsd-amd64.zip)
|
||||
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.34-freebsd-arm.zip)
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.35-freebsd-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.35-freebsd-amd64.zip)
|
||||
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.35-freebsd-arm.zip)
|
||||
* NetBSD
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.34-netbsd-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.34-netbsd-amd64.zip)
|
||||
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.34-netbsd-arm.zip)
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.35-netbsd-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.35-netbsd-amd64.zip)
|
||||
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.35-netbsd-arm.zip)
|
||||
* OpenBSD
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.34-openbsd-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.34-openbsd-amd64.zip)
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.35-openbsd-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.35-openbsd-amd64.zip)
|
||||
* Plan 9
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.34-plan9-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.34-plan9-amd64.zip)
|
||||
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.35-plan9-386.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.35-plan9-amd64.zip)
|
||||
* Solaris
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.34-solaris-amd64.zip)
|
||||
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.35-solaris-amd64.zip)
|
||||
|
||||
You can also find a [mirror of the downloads on github](https://github.com/ncw/rclone/releases/tag/v1.34).
|
||||
You can also find a [mirror of the downloads on github](https://github.com/ncw/rclone/releases/tag/v1.35).
|
||||
|
||||
You can also download [the releases using SSL](https://downloads-rclone-org-7d7d567e.cdn.memsites.com/).
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ then rclone will choose a format from the default list.
|
||||
|
||||
If you prefer an archive copy then you might use `--drive-formats
|
||||
pdf`, or if you prefer openoffice/libreoffice formats you might use
|
||||
`--drive-formats ods,odt`.
|
||||
`--drive-formats ods,odt,odp`.
|
||||
|
||||
Note that rclone adds the extension to the google doc, so if it is
|
||||
calles `My Spreadsheet` on google docs, it will be exported as `My
|
||||
|
||||
+53
-12
@@ -19,19 +19,16 @@ and exclude rules like `--include`, `--exclude`, `--include-from`,
|
||||
try them out is using the `ls` command, or `--dry-run` together with
|
||||
`-v`.
|
||||
|
||||
**Important** Due to limitations of the command line parser you can
|
||||
only use any of these options once - if you duplicate them then rclone
|
||||
will use the last one only.
|
||||
|
||||
## Patterns ##
|
||||
|
||||
The patterns used to match files for inclusion or exclusion are based
|
||||
on "file globs" as used by the unix shell.
|
||||
|
||||
If the pattern starts with a `/` then it only matches at the top level
|
||||
of the directory tree, relative to the root of the remote.
|
||||
If it doesn't start with `/` then it is matched starting at the
|
||||
**end of the path**, but it will only match a complete path element:
|
||||
of the directory tree, **relative to the root of the remote** (not
|
||||
necessarily the root of the local drive). If it doesn't start with `/`
|
||||
then it is matched starting at the **end of the path**, but it will
|
||||
only match a complete path element:
|
||||
|
||||
file.jpg - matches "file.jpg"
|
||||
- matches "directory/file.jpg"
|
||||
@@ -120,13 +117,14 @@ Rclone always does a wildcard match so `\` must always escape a `\`.
|
||||
|
||||
## How the rules are used ##
|
||||
|
||||
Rclone maintains a list of include rules and exclude rules.
|
||||
Rclone maintains a combined list of include rules and exclude rules.
|
||||
|
||||
Each file is matched in order against the list until it finds a match.
|
||||
The file is then included or excluded according to the rule type.
|
||||
Each file is matched in order, starting from the top, against the rule
|
||||
in the list until it finds a match. The file is then included or
|
||||
excluded according to the rule type.
|
||||
|
||||
If the matcher falls off the bottom of the list then the path is
|
||||
included.
|
||||
If the matcher fails to find a match after testing against all the
|
||||
entries in the list then the path is included.
|
||||
|
||||
For example given the following rules, `+` being include, `-` being
|
||||
exclude,
|
||||
@@ -157,16 +155,44 @@ based remotes (eg s3, swift, google compute storage, b2).
|
||||
|
||||
Filtering rules are added with the following command line flags.
|
||||
|
||||
### Repeating options ##
|
||||
|
||||
You can repeat the following options to add more than one rule of that
|
||||
type.
|
||||
|
||||
* `--include`
|
||||
* `--include-from`
|
||||
* `--exclude`
|
||||
* `--exclude-from`
|
||||
* `--filter`
|
||||
* `--filter-from`
|
||||
|
||||
Note that all the options of the same type are processed together in
|
||||
the order above, regardless of what order they were placed on the
|
||||
command line.
|
||||
|
||||
So all `--include` options are processed first in the order they
|
||||
appeared on the command line, then all `--include-from` options etc.
|
||||
|
||||
To mix up the order includes and excludes, the `--filter` flag can be
|
||||
used.
|
||||
|
||||
### `--exclude` - Exclude files matching pattern ###
|
||||
|
||||
Add a single exclude rule with `--exclude`.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Eg `--exclude *.bak` to exclude all bak files from the sync.
|
||||
|
||||
### `--exclude-from` - Read exclude patterns from file ###
|
||||
|
||||
Add exclude rules from a file.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Prepare a file like this `exclude-file.txt`
|
||||
|
||||
# a sample exclude rule file
|
||||
@@ -182,6 +208,9 @@ This is useful if you have a lot of rules.
|
||||
|
||||
Add a single include rule with `--include`.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Eg `--include *.{png,jpg}` to include all `png` and `jpg` files in the
|
||||
backup and no others.
|
||||
|
||||
@@ -195,6 +224,9 @@ flexibility then you must use `--filter-from`.
|
||||
|
||||
Add include rules from a file.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Prepare a file like this `include-file.txt`
|
||||
|
||||
# a sample include rule file
|
||||
@@ -219,12 +251,18 @@ This can be used to add a single include or exclude rule. Include
|
||||
rules start with `+ ` and exclude rules start with `- `. A special
|
||||
rule called `!` can be used to clear the existing rules.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Eg `--filter "- *.bak"` to exclude all bak files from the sync.
|
||||
|
||||
### `--filter-from` - Read filtering patterns from a file ###
|
||||
|
||||
Add include/exclude rules from a file.
|
||||
|
||||
This flag can be repeated. See above for the order the flags are
|
||||
processed in.
|
||||
|
||||
Prepare a file like this `filter-file.txt`
|
||||
|
||||
# a sample exclude rule file
|
||||
@@ -248,6 +286,9 @@ This reads a list of file names from the file passed in and **only**
|
||||
these files are transferred. The filtering rules are ignored
|
||||
completely if you use this option.
|
||||
|
||||
This option can be repeated to read from more than one file. These
|
||||
are read in the order that they are placed on the command line.
|
||||
|
||||
Prepare a file like this `files-from.txt`
|
||||
|
||||
# comment
|
||||
|
||||
@@ -147,3 +147,5 @@ names. These can't occur on Windows platforms, but on non-Windows
|
||||
platforms they are common. Rclone will map these names to and from an
|
||||
identical looking unicode equivalent. For example if a file has a `?`
|
||||
in it will be mapped to `?` instead.
|
||||
|
||||
The largest allowed file size is 10GiB (10,737,418,240 bytes).
|
||||
@@ -108,7 +108,7 @@ operations more efficient.
|
||||
| Openstack Swift | Yes † | Yes | No | No | No |
|
||||
| Dropbox | Yes | Yes | Yes | Yes | No [#575](https://github.com/ncw/rclone/issues/575) |
|
||||
| Google Cloud Storage | Yes | Yes | No | No | No |
|
||||
| Amazon Drive | Yes | No | No [#721](https://github.com/ncw/rclone/issues/721) | No [#721](https://github.com/ncw/rclone/issues/721) | No [#575](https://github.com/ncw/rclone/issues/575) |
|
||||
| Amazon Drive | Yes | No | Yes | Yes | No [#575](https://github.com/ncw/rclone/issues/575) |
|
||||
| Microsoft One Drive | Yes | Yes | No [#197](https://github.com/ncw/rclone/issues/197) | No [#197](https://github.com/ncw/rclone/issues/197) | No [#575](https://github.com/ncw/rclone/issues/575) |
|
||||
| Hubic | Yes † | Yes | No | No | No |
|
||||
| Backblaze B2 | No | No | No | No | Yes |
|
||||
|
||||
+50
-20
@@ -12,6 +12,7 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -592,21 +593,30 @@ func (f *Fs) PutUnchecked(in io.Reader, src fs.ObjectInfo) (fs.Object, error) {
|
||||
}
|
||||
|
||||
// Mkdir creates the container if it doesn't exist
|
||||
func (f *Fs) Mkdir() error {
|
||||
return f.dirCache.FindRoot(true)
|
||||
func (f *Fs) Mkdir(dir string) error {
|
||||
err := f.dirCache.FindRoot(true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if dir != "" {
|
||||
_, err = f.dirCache.FindDir(dir, true)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// Rmdir deletes the container
|
||||
//
|
||||
// Returns an error if it isn't empty
|
||||
func (f *Fs) Rmdir() error {
|
||||
err := f.dirCache.FindRoot(false)
|
||||
func (f *Fs) Rmdir(dir string) error {
|
||||
root := path.Join(f.root, dir)
|
||||
dc := f.dirCache
|
||||
rootID, err := dc.FindDir(dir, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var children *drive.ChildList
|
||||
err = f.pacer.Call(func() (bool, error) {
|
||||
children, err = f.svc.Children.List(f.dirCache.RootID()).MaxResults(10).Do()
|
||||
children, err = f.svc.Children.List(rootID).MaxResults(10).Do()
|
||||
return shouldRetry(err)
|
||||
})
|
||||
if err != nil {
|
||||
@@ -616,12 +626,12 @@ func (f *Fs) Rmdir() error {
|
||||
return errors.Errorf("directory not empty: %#v", children.Items)
|
||||
}
|
||||
// Delete the directory if it isn't the root
|
||||
if f.root != "" {
|
||||
if root != "" {
|
||||
err = f.pacer.Call(func() (bool, error) {
|
||||
if *driveUseTrash {
|
||||
_, err = f.svc.Files.Trash(f.dirCache.RootID()).Do()
|
||||
_, err = f.svc.Files.Trash(rootID).Do()
|
||||
} else {
|
||||
err = f.svc.Files.Delete(f.dirCache.RootID()).Do()
|
||||
err = f.svc.Files.Delete(rootID).Do()
|
||||
}
|
||||
return shouldRetry(err)
|
||||
})
|
||||
@@ -629,7 +639,10 @@ func (f *Fs) Rmdir() error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
f.dirCache.ResetRoot()
|
||||
f.dirCache.FlushDir(dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -722,6 +735,12 @@ func (f *Fs) Move(src fs.Object, remote string) (fs.Object, error) {
|
||||
return nil, errors.New("can't move a Google document")
|
||||
}
|
||||
|
||||
// create the destination directory if necessary
|
||||
err := f.dirCache.FindRoot(true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Temporary Object under construction
|
||||
dstObj, dstInfo, err := f.createFileInfo(remote, srcObj.ModTime(), srcObj.bytes)
|
||||
if err != nil {
|
||||
@@ -758,12 +777,16 @@ func (f *Fs) DirMove(src fs.Fs) error {
|
||||
}
|
||||
|
||||
// Check if destination exists
|
||||
f.dirCache.ResetRoot()
|
||||
err := f.dirCache.FindRoot(false)
|
||||
if err == nil {
|
||||
if f.dirCache.FoundRoot() {
|
||||
return fs.ErrorDirExists
|
||||
}
|
||||
|
||||
// Refuse to move to or from the root
|
||||
if f.root == "" || srcFs.root == "" {
|
||||
fs.Debug(src, "DirMove error: Can't move root")
|
||||
return errors.New("can't move root directory")
|
||||
}
|
||||
|
||||
// Find ID of parent
|
||||
leaf, directoryID, err := f.dirCache.FindPath(f.root, true)
|
||||
if err != nil {
|
||||
@@ -786,6 +809,12 @@ func (f *Fs) DirMove(src fs.Fs) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DirCacheFlush resets the directory cache - used in testing as an
|
||||
// optional interface
|
||||
func (f *Fs) DirCacheFlush() {
|
||||
f.dirCache.ResetRoot()
|
||||
}
|
||||
|
||||
// Hashes returns the supported hash sets.
|
||||
func (f *Fs) Hashes() fs.HashSet {
|
||||
return fs.HashSet(fs.HashMD5)
|
||||
@@ -1066,12 +1095,13 @@ func (o *Object) MimeType() string {
|
||||
|
||||
// Check the interfaces are satisfied
|
||||
var (
|
||||
_ fs.Fs = (*Fs)(nil)
|
||||
_ fs.Purger = (*Fs)(nil)
|
||||
_ fs.Copier = (*Fs)(nil)
|
||||
_ fs.Mover = (*Fs)(nil)
|
||||
_ fs.DirMover = (*Fs)(nil)
|
||||
_ fs.PutUncheckeder = (*Fs)(nil)
|
||||
_ fs.Object = (*Object)(nil)
|
||||
_ fs.MimeTyper = &Object{}
|
||||
_ fs.Fs = (*Fs)(nil)
|
||||
_ fs.Purger = (*Fs)(nil)
|
||||
_ fs.Copier = (*Fs)(nil)
|
||||
_ fs.Mover = (*Fs)(nil)
|
||||
_ fs.DirMover = (*Fs)(nil)
|
||||
_ fs.DirCacheFlusher = (*Fs)(nil)
|
||||
_ fs.PutUncheckeder = (*Fs)(nil)
|
||||
_ fs.Object = (*Object)(nil)
|
||||
_ fs.MimeTyper = &Object{}
|
||||
)
|
||||
@@ -23,6 +23,7 @@ func TestFsString(t *testing.T) { fstests.TestFsString(t) }
|
||||
func TestFsRmdirEmpty(t *testing.T) { fstests.TestFsRmdirEmpty(t) }
|
||||
func TestFsRmdirNotFound(t *testing.T) { fstests.TestFsRmdirNotFound(t) }
|
||||
func TestFsMkdir(t *testing.T) { fstests.TestFsMkdir(t) }
|
||||
func TestFsMkdirRmdirSubdir(t *testing.T) { fstests.TestFsMkdirRmdirSubdir(t) }
|
||||
func TestFsListEmpty(t *testing.T) { fstests.TestFsListEmpty(t) }
|
||||
func TestFsListDirEmpty(t *testing.T) { fstests.TestFsListDirEmpty(t) }
|
||||
func TestFsNewObjectNotFound(t *testing.T) { fstests.TestFsNewObjectNotFound(t) }
|
||||
|
||||
+9
-6
@@ -448,30 +448,33 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo) (fs.Object, error) {
|
||||
}
|
||||
|
||||
// Mkdir creates the container if it doesn't exist
|
||||
func (f *Fs) Mkdir() error {
|
||||
entry, err := f.db.Metadata(f.slashRoot, false, false, "", "", metadataLimit)
|
||||
func (f *Fs) Mkdir(dir string) error {
|
||||
root := path.Join(f.slashRoot, dir)
|
||||
entry, err := f.db.Metadata(root, false, false, "", "", metadataLimit)
|
||||
if err == nil {
|
||||
if entry.IsDir {
|
||||
return nil
|
||||
}
|
||||
return errors.Errorf("%q already exists as file", f.root)
|
||||
}
|
||||
_, err = f.db.CreateFolder(f.slashRoot)
|
||||
_, err = f.db.CreateFolder(root)
|
||||
return err
|
||||
}
|
||||
|
||||
// Rmdir deletes the container
|
||||
//
|
||||
// Returns an error if it isn't empty
|
||||
func (f *Fs) Rmdir() error {
|
||||
entry, err := f.db.Metadata(f.slashRoot, true, false, "", "", 16)
|
||||
func (f *Fs) Rmdir(dir string) error {
|
||||
root := path.Join(f.slashRoot, dir)
|
||||
entry, err := f.db.Metadata(root, true, false, "", "", 16)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(entry.Contents) != 0 {
|
||||
return errors.New("directory not empty")
|
||||
}
|
||||
return f.Purge()
|
||||
_, err = f.db.Delete(root)
|
||||
return err
|
||||
}
|
||||
|
||||
// Precision returns the precision
|
||||
|
||||
Loaded 100 of 400 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user