Compare commits

...
Author SHA1 Message Date
Nick Craig-Wood 245fed513a Version v1.48.0 2019-06-15 13:55:41 +01:00
Nick Craig-Wood 52332a4b24 moveto: fix detection of same file name to include the root
Fixes problem introduced in d2be792d5e
2019-06-15 13:55:41 +01:00
Nick Craig-Wood 3087c5d559 webdav: retry on 423 Locked errors #3263 2019-06-15 10:58:13 +01:00
Nick Craig-Wood 75606dcc27 sync: fix tests on union remote 2019-06-15 10:53:36 +01:00
Nick Craig-Wood f3719fe269 fs/cache: unlock mutex in cache.Get to allow recursive calls
This fixes the test lockup in the union tests
2019-06-15 10:42:53 +01:00
Gary Kim d2be792d5e moveto: fix case-insensitive same remote move 2019-06-15 10:06:01 +01:00
Wojciech Smigielski 2793d4b4cc remove duplicate code 2019-06-15 10:02:25 +01:00
Wojciech Smigielski 30ac9d920a enable creating encrypted config through external script invocation - fixes #3127 2019-06-15 10:02:25 +01:00
Gary Kim 6e8e620e71 serve webdav: fix serveDir not being updated with changes from webdav
Fixes an issue where changes such as renaming done using webdav
would not be reflected in the html directory listing
2019-06-15 10:00:46 +01:00
Gary Kim 5597d6d871 serve webdav: add tests for serve http functionality 2019-06-15 10:00:46 +01:00
Gary Kim 622e0d19ce serve webdav: combine serve webdav and serve http 2019-06-15 10:00:46 +01:00
Nick Craig-Wood ce400a8fdc Add rsync.net as a provider #3254 2019-06-15 09:56:17 +01:00
Nick Craig-Wood 49c05cb89b Add notes on --b2-version not working with crypt #1627
See also: https://forum.rclone.org/t/how-to-restore-a-previous-version-of-a-folde/10456/2
2019-06-15 09:56:17 +01:00
Nick Craig-Wood d533de0f5c docs: clarify that s3 can't access Glacier Vault 2019-06-15 09:56:17 +01:00
Nick Craig-Wood 1a4fe4bc6c Add Aleksandar Jankovic to contributors 2019-06-15 09:56:17 +01:00
Aleksandar Jankovic 93207ead9c rc/jobs: make job expiry timeouts configurable 2019-06-15 09:55:32 +01:00
Nick Craig-Wood 22368b997c b2: implement SetModTime #3210
SetModTime() is implemented by copying an object onto itself and
updating the metadata in the process.
2019-06-13 17:31:33 +01:00
Nick Craig-Wood a5bed67016 b2: implement server side copy - fixes #3210 2019-06-13 17:31:33 +01:00
Gary Kim 44f6491731 bin: update make_changelog.py to support semver 2019-06-13 14:51:42 +01:00
Nick Craig-Wood 12c2a750f5 build: fix build lockup by increasing GOMAXPROCS - Fixes #3154
It was discovered after lots of experimentation that the cmd/mount
tests have a tendency to lock up if GOMAXPROCS=1 or 2.  Since the
Travis builders only have 2 vCPUs by default, this happens on the
build server very often.

This workaround increases GOMAXPROCS to make the mount test lockup
less likely.

Ideally this should be fixed in the mount tests at some point.
2019-06-13 13:47:43 +01:00
Nick Craig-Wood 92bbae5cca Add Florian Apolloner to contributors 2019-06-13 13:47:43 +01:00
Florian Apolloner 939b19c3b7 cmd: add support for private repositories in serve restic - fixes #3247 2019-06-12 13:39:38 +01:00
Nick Craig-Wood 64fb4effa7 docs: add FAQ entry about rclone using too much memory
See: #2200 #1391 3196
2019-06-12 11:08:19 +01:00
Nick Craig-Wood 4d195d5a52 gcs: Fix upload errors when uploading pre 1970 files
Before this change rclone attempted to set the "updated" field in
uploaded objects to the modification time.

However when this modification time was before 1970, google drive
would return the rather cryptic error:

    googleapi: Error 400: Invalid value for UnsignedLong: -42000, invalid

However API docs: https://cloud.google.com/storage/docs/json_api/v1/objects#resource
state the "updated" field is read only and tests confirm that.  Even
though the field is read only, it looks like Google parses it.

This change therefore removes the attempt to set the "updated" field
(which was doing nothing anyway) and fixes the problem uploading pre
1970 files.

See #3196 and https://forum.rclone.org/t/invalid-value-for-unsignedlong-file-missing-date-modified/3466
2019-06-12 10:51:49 +01:00
albertony 976a020a2f Use rclone.conf from rclone executable directory if already existing 2019-06-12 10:08:00 +01:00
Nick Craig-Wood 550ab441c5 rc: Skip auth for OPTIONS request
Before this change using --user and --pass was impossible on the rc
from a browser as the browser needed to make the OPTIONS request first
before sending Authorization: headers, but the OPTIONS request
required an Authorization: header.

After this change we allow OPTIONS requests to go through without
checking the Authorization: header.
2019-06-10 19:33:45 +01:00
Nick Craig-Wood e24cadc7a1 box: Fix ineffectual assignment (ineffassign) 2019-06-10 19:33:10 +01:00
Nick Craig-Wood 903ede52cd config: make config create/update encrypt passwords where necessary
Before this change when using "rclone config create" it wasn't
possible to add passwords in one go, it was necessary to call "rclone
config password" to add the passwords afterwards as "rclone config
create" didn't obscure passwords.

After this change "rclone config create" and "rclone config update"
will obscure passwords as necessary as will the corresponding API
calls config/create and config/update.

This makes "rclone config password" and its API config/password
obsolete, however they will be left for backwards compatibility.
2019-06-10 18:08:55 +01:00
Nick Craig-Wood f681d32996 rc: Fix serving bucket based objects with --rc-serve
Before this change serving bucket based objects
`[remote:bucket]/path/to/object` would fail with 404 not found.

This was because the leading `/` in `/path/to/object` was being passed
to NewObject.
2019-06-10 11:59:06 +01:00
Gary Kim 2c72e7f0a2 docs: add implicit FTP over TLS documentation 2019-06-09 16:06:39 +01:00
Gary Kim db8cd1a993 ftp: Add no_check_certificate option for FTPS 2019-06-09 16:06:39 +01:00
Gary Kim 2890b69c48 ftp: Add FTP over TLS support 2019-06-09 16:06:39 +01:00
Gary Kim 66b3795eb8 vendor: update github.com/jlaffaye/ftp 2019-06-09 16:06:39 +01:00
Nick Craig-Wood 45f41c2c4a Add forgems to contributors 2019-06-09 16:02:20 +01:00
Garry McNulty 34f03ce590 operations: ignore negative sizes when calculating total (#3135) 2019-06-09 16:00:41 +01:00
Garry McNulty e2fde62cd9 drive: add --drive-size-as-quota to show storage quota usage for file size - fixes #3135 2019-06-09 16:00:41 +01:00
forgems 4b27c6719b fs: Allow sync of a file and a directory with the same name
When sorting fs.DirEntries we sort by DirEntry type and
when synchronizing files let the directories be before objects,
so when the destintation fs doesn't support duplicate names,
we will only lose duplicated object instead of whole directory.

The enables synchronisation to work with a file and a directory of the same name
which is reasonably common on bucket based remotes.
2019-06-09 15:57:05 +01:00
Nick Craig-Wood fb6966b5fe docs: Fix warnings after hugo upgrade to v0.55 2019-06-08 11:55:51 +01:00
Nick Craig-Wood 454dfd3c9e rc: Add operations/fsinfo: Return information about the remote
This returns a information about the remote including Name, Root,
Hashes and optional Features.
2019-06-08 09:19:07 +01:00
Nick Craig-Wood e1cf551ded fs: add Features.Enabled to return map of enabled features by name 2019-06-08 08:46:53 +01:00
Nick Craig-Wood bd10344d65 rc: add --loopback flag to run commands directly without a server 2019-06-08 08:45:55 +01:00
Nick Craig-Wood 1aa65d60e1 lsjson: add IsBucket field for bucket based remote listing of the root 2019-06-07 17:28:15 +01:00
Nick Craig-Wood aa81957586 drive: add --drive-server-side-across-configs
In #2728 and 55b9a4e we decided to allow server side operations
between google drives with different configurations.

This works in some cases (eg between teamdrives) but does not work in
the general case, and this caused breakage in quite a number of
people's workflows.

This change makes the feature conditional on the
--drive-server-side-across-configs flag which defaults to off.

See: https://forum.rclone.org/t/gdrive-to-gdrive-error-404-file-not-found/9621/10

Fixes #3119
2019-06-07 12:12:49 +01:00
Nick Craig-Wood b7800e96d7 vendor: update golang.org/x/net/webdav - fixes #3002
This fixes duplicacy working with rclone serve webdav
2019-06-07 11:54:57 +01:00
Cnly fb1bbecb41 fstests: add FsRootCollapse test - #3164 2019-06-06 15:48:46 +01:00
Cnly e4c2468244 onedrive: More accurately check if root is found - fixes #3164 2019-06-06 15:48:46 +01:00
304 changed files with 15274 additions and 3195 deletions

No files matched your search

+1
View File
@@ -31,6 +31,7 @@ install:
env:
global:
- GOTAGS=cmount
- GOMAXPROCS=8 # workaround for cmd/mount tests locking up - see #3154
- GO111MODULE=off
- GITHUB_USER=ncw
- secure: gU8gCV9R8Kv/Gn0SmCP37edpfIbPoSvsub48GK7qxJdTU628H0KOMiZW/T0gtV5d67XJZ4eKnhJYlxwwxgSgfejO32Rh5GlYEKT/FuVoH0BD72dM1GDFLSrUiUYOdoHvf/BKIFA3dJFT4lk2ASy4Zh7SEoXHG6goBlqUpYx8hVA=
+867 -149
View File
File diff suppressed because it is too large. Load diff
+1133 -116
View File
File diff suppressed because it is too large. Load diff
+1166 -116
View File
File diff suppressed because it is too large. Load diff
+10
View File
@@ -311,3 +311,13 @@ type CancelLargeFileResponse struct {
AccountID string `json:"accountId"` // The identifier for the account.
BucketID string `json:"bucketId"` // The unique ID of the bucket.
}
// CopyFileRequest is as passed to b2_copy_file
type CopyFileRequest struct {
SourceID string `json:"sourceFileId"` // The ID of the source file being copied.
Name string `json:"fileName"` // The name of the new file being created.
Range string `json:"range,omitempty"` // The range of bytes to copy. If not provided, the whole source file will be copied.
MetadataDirective string `json:"metadataDirective,omitempty"` // The strategy for how to populate metadata for the new file: COPY or REPLACE
ContentType string `json:"contentType,omitempty"` // The MIME type of the content of the file (REPLACE only)
Info map[string]string `json:"fileInfo,omitempty"` // This field stores the metadata that will be stored with the file. (REPLACE only)
}
+102 -18
View File
@@ -1066,6 +1066,58 @@ func (f *Fs) CleanUp() error {
return f.purge(true)
}
// Copy src to this remote using server side copy 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.ErrorCantCopy
func (f *Fs) Copy(src fs.Object, remote string) (fs.Object, error) {
err := f.Mkdir("")
if err != nil {
return nil, err
}
srcObj, ok := src.(*Object)
if !ok {
fs.Debugf(src, "Can't copy - not same remote type")
return nil, fs.ErrorCantCopy
}
srcFs := srcObj.fs
if srcFs.bucket != f.bucket {
fs.Debugf(src, "Can't copy - not same bucket")
return nil, fs.ErrorCantCopy
}
opts := rest.Opts{
Method: "POST",
Path: "/b2_copy_file",
}
var request = api.CopyFileRequest{
SourceID: srcObj.id,
Name: f.root + remote,
MetadataDirective: "COPY",
}
var response api.FileInfo
err = f.pacer.Call(func() (bool, error) {
resp, err := f.srv.CallJSON(&opts, &request, &response)
return f.shouldRetry(resp, err)
})
if err != nil {
return nil, err
}
o := &Object{
fs: f,
remote: remote,
}
err = o.decodeMetaDataFileInfo(&response)
if err != nil {
return nil, err
}
return o, nil
}
// Hashes returns the supported hash sets.
func (f *Fs) Hashes() hash.Set {
return hash.Set(hash.SHA1)
@@ -1154,17 +1206,8 @@ func (o *Object) decodeMetaDataFileInfo(info *api.FileInfo) (err error) {
return o.decodeMetaDataRaw(info.ID, info.SHA1, info.Size, info.UploadTimestamp, info.Info, info.ContentType)
}
// readMetaData gets the metadata if it hasn't already been fetched
//
// Sets
// o.id
// o.modTime
// o.size
// o.sha1
func (o *Object) readMetaData() (err error) {
if o.id != "" {
return nil
}
// getMetaData gets the metadata from the object unconditionally
func (o *Object) getMetaData() (info *api.File, err error) {
maxSearched := 1
var timestamp api.Timestamp
baseRemote := o.remote
@@ -1172,7 +1215,6 @@ func (o *Object) readMetaData() (err error) {
timestamp, baseRemote = api.RemoveVersion(baseRemote)
maxSearched = maxVersions
}
var info *api.File
err = o.fs.list("", true, baseRemote, maxSearched, o.fs.opt.Versions, func(remote string, object *api.File, isDirectory bool) error {
if isDirectory {
return nil
@@ -1187,12 +1229,30 @@ func (o *Object) readMetaData() (err error) {
})
if err != nil {
if err == fs.ErrorDirNotFound {
return fs.ErrorObjectNotFound
return nil, fs.ErrorObjectNotFound
}
return err
return nil, err
}
if info == nil {
return fs.ErrorObjectNotFound
return nil, fs.ErrorObjectNotFound
}
return info, nil
}
// readMetaData gets the metadata if it hasn't already been fetched
//
// Sets
// o.id
// o.modTime
// o.size
// o.sha1
func (o *Object) readMetaData() (err error) {
if o.id != "" {
return nil
}
info, err := o.getMetaData()
if err != nil {
return err
}
return o.decodeMetaData(info)
}
@@ -1231,10 +1291,33 @@ func (o *Object) ModTime() (result time.Time) {
return o.modTime
}
// SetModTime sets the modification time of the local fs object
// SetModTime sets the modification time of the Object
func (o *Object) SetModTime(modTime time.Time) error {
// Not possible with B2
return fs.ErrorCantSetModTime
info, err := o.getMetaData()
if err != nil {
return err
}
info.Info[timeKey] = timeString(modTime)
opts := rest.Opts{
Method: "POST",
Path: "/b2_copy_file",
}
var request = api.CopyFileRequest{
SourceID: o.id,
Name: o.fs.root + o.remote, // copy to same name
MetadataDirective: "REPLACE",
ContentType: info.ContentType,
Info: info.Info,
}
var response api.FileInfo
err = o.fs.pacer.Call(func() (bool, error) {
resp, err := o.fs.srv.CallJSON(&opts, &request, &response)
return o.fs.shouldRetry(resp, err)
})
if err != nil {
return err
}
return o.decodeMetaDataFileInfo(&response)
}
// Storable returns if this object is storable
@@ -1567,6 +1650,7 @@ func (o *Object) ID() string {
var (
_ fs.Fs = &Fs{}
_ fs.Purger = &Fs{}
_ fs.Copier = &Fs{}
_ fs.PutStreamer = &Fs{}
_ fs.CleanUpper = &Fs{}
_ fs.ListRer = &Fs{}
+1 -1
View File
@@ -112,7 +112,7 @@ outer:
return shouldRetry(resp, err)
})
delay := defaultDelay
why := "unknown"
var why string
if err != nil {
// Sometimes we get 400 Error with
// parts_mismatch immediately after uploading
+29 -2
View File
@@ -367,6 +367,14 @@ will download it anyway.`,
Default: false,
Help: "Keep new head revision of each file forever.",
Advanced: true,
}, {
Name: "size_as_quota",
Default: false,
Help: `Show storage quota usage for file size.
The storage used by a file is the size of the current version plus any
older versions that have been set to keep forever.`,
Advanced: true,
}, {
Name: "v2_download_min_size",
Default: fs.SizeSuffix(-1),
@@ -382,6 +390,16 @@ will download it anyway.`,
Default: defaultBurst,
Help: "Number of API calls to allow without sleeping.",
Advanced: true,
}, {
Name: "server_side_across_configs",
Default: false,
Help: `Allow server side operations (eg copy) to work across different drive configs.
This can be useful if you wish to do a server side copy between two
different Google drives. Note that this isn't enabled by default
because it isn't easy to tell if it will work beween any two
configurations.`,
Advanced: true,
}},
})
@@ -424,9 +442,11 @@ type Options struct {
ChunkSize fs.SizeSuffix `config:"chunk_size"`
AcknowledgeAbuse bool `config:"acknowledge_abuse"`
KeepRevisionForever bool `config:"keep_revision_forever"`
SizeAsQuota bool `config:"size_as_quota"`
V2DownloadMinSize fs.SizeSuffix `config:"v2_download_min_size"`
PacerMinSleep fs.Duration `config:"pacer_min_sleep"`
PacerBurst int `config:"pacer_burst"`
ServerSideAcrossConfigs bool `config:"server_side_across_configs"`
}
// Fs represents a remote drive server
@@ -632,6 +652,9 @@ func (f *Fs) list(dirIDs []string, title string, directoriesOnly, filesOnly, inc
if f.opt.SkipChecksumGphotos {
fields += ",spaces"
}
if f.opt.SizeAsQuota {
fields += ",quotaBytesUsed"
}
fields = fmt.Sprintf("files(%s),nextPageToken", fields)
@@ -924,7 +947,7 @@ func NewFs(name, path string, m configmap.Mapper) (fs.Fs, error) {
ReadMimeType: true,
WriteMimeType: true,
CanHaveEmptyDirectories: true,
ServerSideAcrossConfigs: true,
ServerSideAcrossConfigs: opt.ServerSideAcrossConfigs,
}).Fill(f)
// Create a new authorized Drive client.
@@ -1007,13 +1030,17 @@ func (f *Fs) newBaseObject(remote string, info *drive.File) baseObject {
if f.opt.UseCreatedDate {
modifiedDate = info.CreatedTime
}
size := info.Size
if f.opt.SizeAsQuota {
size = info.QuotaBytesUsed
}
return baseObject{
fs: f,
remote: remote,
id: info.Id,
modifiedDate: modifiedDate,
mimeType: info.MimeType,
bytes: info.Size,
bytes: size,
}
}
+31 -7
View File
@@ -2,6 +2,7 @@
package ftp
import (
"crypto/tls"
"io"
"net/textproto"
"os"
@@ -46,11 +47,20 @@ func init() {
Help: "FTP password",
IsPassword: true,
Required: true,
}, {
Name: "tls",
Help: "Use FTP over TLS (Implicit)",
Default: false,
}, {
Name: "concurrency",
Help: "Maximum number of FTP simultaneous connections, 0 for unlimited",
Default: 0,
Advanced: true,
}, {
Name: "no_check_certificate",
Help: "Do not verify the TLS certificate of the server",
Default: false,
Advanced: true,
},
},
})
@@ -58,11 +68,13 @@ func init() {
// Options defines the configuration for this backend
type Options struct {
Host string `config:"host"`
User string `config:"user"`
Pass string `config:"pass"`
Port string `config:"port"`
Concurrency int `config:"concurrency"`
Host string `config:"host"`
User string `config:"user"`
Pass string `config:"pass"`
Port string `config:"port"`
TLS bool `config:"tls"`
Concurrency int `config:"concurrency"`
SkipVerifyTLSCert bool `config:"no_check_certificate"`
}
// Fs represents a remote FTP server
@@ -120,7 +132,15 @@ func (f *Fs) Features() *fs.Features {
// Open a new connection to the FTP server.
func (f *Fs) ftpConnection() (*ftp.ServerConn, error) {
fs.Debugf(f, "Connecting to FTP server")
c, err := ftp.DialTimeout(f.dialAddr, fs.Config.ConnectTimeout)
ftpConfig := []ftp.DialOption{ftp.DialWithTimeout(fs.Config.ConnectTimeout)}
if f.opt.TLS {
tlsConfig := &tls.Config{
ServerName: f.opt.Host,
InsecureSkipVerify: f.opt.SkipVerifyTLSCert,
}
ftpConfig = append(ftpConfig, ftp.DialWithTLS(tlsConfig))
}
c, err := ftp.Dial(f.dialAddr, ftpConfig...)
if err != nil {
fs.Errorf(f, "Error while Dialing %s: %s", f.dialAddr, err)
return nil, errors.Wrap(err, "ftpConnection Dial")
@@ -203,7 +223,11 @@ func NewFs(name, root string, m configmap.Mapper) (ff fs.Fs, err error) {
}
dialAddr := opt.Host + ":" + port
u := "ftp://" + path.Join(dialAddr+"/", root)
protocol := "ftp://"
if opt.TLS {
protocol = "ftps://"
}
u := protocol + path.Join(dialAddr+"/", root)
f := &Fs{
name: name,
root: root,
@@ -1003,7 +1003,6 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
Bucket: o.fs.bucket,
Name: o.fs.root + o.remote,
ContentType: fs.MimeType(src),
Updated: modTime.Format(timeFormatOut), // Doesn't get set
Metadata: metadataFromModTime(modTime),
}
var newObject *storage.Object
+13 -3
View File
@@ -385,9 +385,19 @@ func (f *Fs) readMetaDataForPath(path string) (info *api.Item, resp *http.Respon
var dirCacheFoundRoot bool
var rootNormalizedID string
if f.dirCache != nil {
var ok bool
if rootNormalizedID, ok = f.dirCache.Get(""); ok {
dirCacheFoundRoot = true
var dirCacheRootIDExists bool
rootNormalizedID, dirCacheRootIDExists = f.dirCache.Get("")
if f.root == "" {
// if f.root == "", it means f.root is the absolute root of the drive
// and its ID should have been found in NewFs
dirCacheFoundRoot = dirCacheRootIDExists
} else if _, err := f.dirCache.RootParentID(); err == nil {
// if root is in a folder, it must have a parent folder, and
// if dirCache has found root in NewFs, the parent folder's ID
// should be present.
// This RootParentID() check is a fix for #3164 which describes
// a possible case where the root is not found.
dirCacheFoundRoot = dirCacheRootIDExists
}
}
+1
View File
@@ -146,6 +146,7 @@ func (f *Fs) Features() *fs.Features {
// retryErrorCodes is a slice of error codes that we will retry
var retryErrorCodes = []int{
423, // Locked
429, // Too Many Requests.
500, // Internal Server Error
502, // Bad Gateway
+2 -2
View File
@@ -12,8 +12,8 @@ from collections import defaultdict
IGNORE_RES = [
r"^Add .* to contributors$",
r"^Start v\d+.\d+-DEV development$",
r"^Version v\d.\d+$",
r"^Start v\d+\.\d+(\.\d+)?-DEV development$",
r"^Version v\d+\.\d+(\.\d+)?$",
]
IGNORE_RE = re.compile("(?:" + "|".join(IGNORE_RES) + ")")
+11 -1
View File
@@ -98,6 +98,9 @@ Note that if the config process would normally ask a question the
default is taken. Each time that happens rclone will print a message
saying how to affect the value taken.
If any of the parameters passed is a password field, then rclone will
automatically obscure them before putting them in the config file.
So for example if you wanted to configure a Google Drive remote but
using remote authorization you would do this:
@@ -125,10 +128,14 @@ var configUpdateCommand = &cobra.Command{
Update an existing remote's options. The options should be passed in
in pairs of <key> <value>.
For example to update the env_auth field of a remote of name myremote you would do:
For example to update the env_auth field of a remote of name myremote
you would do:
rclone config update myremote swift env_auth true
If any of the parameters passed is a password field, then rclone will
automatically obscure them before putting them in the config file.
If the remote uses oauth the token will be updated, if you don't
require this add an extra parameter thus:
@@ -168,6 +175,9 @@ should be passed in in pairs of <key> <value>.
For example to set password of a remote of name myremote you would do:
rclone config password myremote fieldname mypassword
This command is obsolete now that "config update" and "config create"
both support obscuring passwords directly.
`,
RunE: func(command *cobra.Command, args []string) error {
cmd.CheckArgs(3, 256, command, args)
+8 -1
View File
@@ -42,13 +42,16 @@ The output is an array of Items, where each Item looks like this
},
"ID": "y2djkhiujf83u33",
"OrigID": "UYOJVTUW00Q1RzTDA",
"IsBucket" : false,
"IsDir" : false,
"MimeType" : "application/octet-stream",
"ModTime" : "2017-05-31T16:15:57.034468261+01:00",
"Name" : "file.txt",
"Encrypted" : "v0qpsdq8anpci8n929v3uu9338",
"EncryptedPath" : "kja9098349023498/v0qpsdq8anpci8n929v3uu9338",
"Path" : "full/path/goes/here/file.txt",
"Size" : 6
"Size" : 6,
"Tier" : "hot",
}
If --hash is not specified the Hashes property won't be emitted.
@@ -66,6 +69,10 @@ If "remote:path" contains the file "subfolder/file.txt", the Path for "file.txt"
will be "subfolder/file.txt", not "remote:path/subfolder/file.txt".
When used without --recursive the Path will always be the same as Name.
If the directory is a bucket in a bucket based backend, then
"IsBucket" will be set to true. This key won't be present unless it is
"true".
The time is in RFC3339 format with up to nanosecond precision. The
number of decimal digits in the seconds will depend on the precision
that the remote can hold the times, so if times are accurate to the
+17
View File
@@ -24,6 +24,7 @@ var (
jsonInput = ""
authUser = ""
authPass = ""
loopback = false
)
func init() {
@@ -33,6 +34,7 @@ func init() {
commandDefintion.Flags().StringVarP(&jsonInput, "json", "", jsonInput, "Input JSON - use instead of key=value args.")
commandDefintion.Flags().StringVarP(&authUser, "user", "", "", "Username to use to rclone remote control.")
commandDefintion.Flags().StringVarP(&authPass, "pass", "", "", "Password to use to connect to rclone remote control.")
commandDefintion.Flags().BoolVarP(&loopback, "loopback", "", false, "If set connect to this rclone instance not via HTTP.")
}
var commandDefintion = &cobra.Command{
@@ -58,6 +60,12 @@ The --json parameter can be used to pass in a JSON blob as an input
instead of key=value arguments. This is the only way of passing in
more complicated values.
Use --loopback to connect to the rclone instance running "rclone rc".
This is very useful for testing commands without having to run an
rclone rc server, eg:
rclone rc --loopback operations/about fs=/
Use "rclone rc" to see a list of all possible commands.`,
Run: func(command *cobra.Command, args []string) {
cmd.CheckArgs(0, 1E9, command, args)
@@ -102,6 +110,15 @@ func setAlternateFlag(flagName string, output *string) {
//
// if err is set, out may be a valid error return or it may be nil
func doCall(path string, in rc.Params) (out rc.Params, err error) {
// If loopback set, short circuit HTTP request
if loopback {
call := rc.Calls.Get(path)
if call == nil {
return nil, errors.Errorf("method %q not found", path)
}
return call.Fn(in)
}
// Do HTTP request
client := fshttp.NewClient(fs.Config)
url += path
+12
View File
@@ -2,6 +2,7 @@
package httplib
import (
"context"
"crypto/tls"
"crypto/x509"
"encoding/base64"
@@ -114,6 +115,11 @@ type Server struct {
HTMLTemplate *template.Template // HTML template for web interface
}
type contextUserType struct{}
// ContextUserKey is a simple context key
var ContextUserKey = &contextUserType{}
// singleUserProvider provides the encrypted password for a single user
func (s *Server) singleUserProvider(user, realm string) string {
if user == s.Opt.BasicUser {
@@ -150,6 +156,11 @@ func NewServer(handler http.Handler, opt *Options) *Server {
authenticator := auth.NewBasicAuthenticator(s.Opt.Realm, secretProvider)
oldHandler := handler
handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// No auth wanted for OPTIONS method
if r.Method == "OPTIONS" {
oldHandler.ServeHTTP(w, r)
return
}
if username := authenticator.CheckAuth(r); username == "" {
authHeader := r.Header.Get(authenticator.Headers.V().Authorization)
if authHeader != "" {
@@ -167,6 +178,7 @@ func NewServer(handler http.Handler, opt *Options) *Server {
}
authenticator.RequireAuth(w, r)
} else {
r = r.WithContext(context.WithValue(r.Context(), ContextUserKey, username))
oldHandler.ServeHTTP(w, r)
}
})
+16 -4
View File
@@ -29,14 +29,16 @@ import (
)
var (
stdio bool
appendOnly bool
stdio bool
appendOnly bool
privateRepos bool
)
func init() {
httpflags.AddFlags(Command.Flags())
Command.Flags().BoolVar(&stdio, "stdio", false, "run an HTTP2 server on stdin/stdout")
Command.Flags().BoolVar(&appendOnly, "append-only", false, "disallow deletion of repository data")
Command.Flags().BoolVar(&privateRepos, "private-repos", false, "users can only access their private repo")
}
// Command definition for cobra
@@ -94,14 +96,14 @@ For example:
$ export RESTIC_PASSWORD=yourpassword
$ restic init
created restic backend 8b1a4b56ae at rest:http://localhost:8080/
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
$ restic backup /path/to/files/to/backup
scan [/path/to/files/to/backup]
scanned 189 directories, 312 files in 0:00
[0:00] 100.00% 38.128 MiB / 38.128 MiB 501 / 501 items 0 errors ETA 0:00
[0:00] 100.00% 38.128 MiB / 38.128 MiB 501 / 501 items 0 errors ETA 0:00
duration: 0:00
snapshot 45c8fdd8 saved
@@ -116,6 +118,10 @@ these **must** end with /. Eg
$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user2repo/
# backup user2 stuff
#### Private repositories ####
The "--private-repos" flag can be used to limit users to repositories starting
with a path of "/<username>/".
` + httplib.Help,
Run: func(command *cobra.Command, args []string) {
cmd.CheckArgs(1, 1, command, args)
@@ -209,6 +215,12 @@ func (s *server) handler(w http.ResponseWriter, r *http.Request) {
remote := makeRemote(path)
fs.Debugf(s.f, "%s %s", r.Method, path)
v := r.Context().Value(httplib.ContextUserKey)
if privateRepos && (v == nil || !strings.HasPrefix(path, "/"+v.(string)+"/")) {
http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden)
return
}
// Dispatch on path then method
if strings.HasSuffix(path, "/") {
switch r.Method {
@@ -8,61 +8,15 @@ import (
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"strings"
"testing"
"github.com/ncw/rclone/cmd"
"github.com/ncw/rclone/cmd/serve/httplib/httpflags"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// declare a few helper functions
// wantFunc tests the HTTP response in res and marks the test as errored if something is incorrect.
type wantFunc func(t testing.TB, res *httptest.ResponseRecorder)
// newRequest returns a new HTTP request with the given params. On error, the
// test is marked as failed.
func newRequest(t testing.TB, method, path string, body io.Reader) *http.Request {
req, err := http.NewRequest(method, path, body)
require.NoError(t, err)
return req
}
// wantCode returns a function which checks that the response has the correct HTTP status code.
func wantCode(code int) wantFunc {
return func(t testing.TB, res *httptest.ResponseRecorder) {
assert.Equal(t, code, res.Code)
}
}
// wantBody returns a function which checks that the response has the data in the body.
func wantBody(body string) wantFunc {
return func(t testing.TB, res *httptest.ResponseRecorder) {
assert.NotNil(t, res.Body)
assert.Equal(t, res.Body.Bytes(), []byte(body))
}
}
// checkRequest uses f to process the request and runs the checker functions on the result.
func checkRequest(t testing.TB, f http.HandlerFunc, req *http.Request, want []wantFunc) {
rr := httptest.NewRecorder()
f(rr, req)
for _, fn := range want {
fn(t, rr)
}
}
// TestRequest is a sequence of HTTP requests with (optional) tests for the response.
type TestRequest struct {
req *http.Request
want []wantFunc
}
// createOverwriteDeleteSeq returns a sequence which will create a new file at
// path, and then try to overwrite and delete it.
func createOverwriteDeleteSeq(t testing.TB, path string) []TestRequest {
@@ -0,0 +1,84 @@
// +build go1.9
package restic
import (
"context"
"crypto/rand"
"io"
"io/ioutil"
"net/http"
"os"
"strings"
"testing"
"github.com/ncw/rclone/cmd/serve/httplib"
"github.com/ncw/rclone/cmd"
"github.com/ncw/rclone/cmd/serve/httplib/httpflags"
"github.com/stretchr/testify/require"
)
// newAuthenticatedRequest returns a new HTTP request with the given params.
func newAuthenticatedRequest(t testing.TB, method, path string, body io.Reader) *http.Request {
req := newRequest(t, method, path, body)
req = req.WithContext(context.WithValue(req.Context(), httplib.ContextUserKey, "test"))
req.Header.Add("Accept", resticAPIV2)
return req
}
// TestResticPrivateRepositories runs tests on the restic handler code for private repositories
func TestResticPrivateRepositories(t *testing.T) {
buf := make([]byte, 32)
_, err := io.ReadFull(rand.Reader, buf)
require.NoError(t, err)
// setup rclone with a local backend in a temporary directory
tempdir, err := ioutil.TempDir("", "rclone-restic-test-")
require.NoError(t, err)
// make sure the tempdir is properly removed
defer func() {
err := os.RemoveAll(tempdir)
require.NoError(t, err)
}()
// globally set private-repos mode & test user
prev := privateRepos
prevUser := httpflags.Opt.BasicUser
prevPassword := httpflags.Opt.BasicPass
privateRepos = true
httpflags.Opt.BasicUser = "test"
httpflags.Opt.BasicPass = "password"
// reset when done
defer func() {
privateRepos = prev
httpflags.Opt.BasicUser = prevUser
httpflags.Opt.BasicPass = prevPassword
}()
// make a new file system in the temp dir
f := cmd.NewFsSrc([]string{tempdir})
srv := newServer(f, &httpflags.Opt)
// Requesting /test/ should allow access
reqs := []*http.Request{
newAuthenticatedRequest(t, "POST", "/test/?create=true", nil),
newAuthenticatedRequest(t, "POST", "/test/config", strings.NewReader("foobar test config")),
newAuthenticatedRequest(t, "GET", "/test/config", nil),
}
for _, req := range reqs {
checkRequest(t, srv.handler, req, []wantFunc{wantCode(http.StatusOK)})
}
// Requesting everything else should raise forbidden errors
reqs = []*http.Request{
newAuthenticatedRequest(t, "GET", "/", nil),
newAuthenticatedRequest(t, "POST", "/other_user", nil),
newAuthenticatedRequest(t, "GET", "/other_user/config", nil),
}
for _, req := range reqs {
checkRequest(t, srv.handler, req, []wantFunc{wantCode(http.StatusForbidden)})
}
}
+57
View File
@@ -0,0 +1,57 @@
// +build go1.9
package restic
import (
"io"
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// declare a few helper functions
// wantFunc tests the HTTP response in res and marks the test as errored if something is incorrect.
type wantFunc func(t testing.TB, res *httptest.ResponseRecorder)
// newRequest returns a new HTTP request with the given params. On error, the
// test is marked as failed.
func newRequest(t testing.TB, method, path string, body io.Reader) *http.Request {
req, err := http.NewRequest(method, path, body)
require.NoError(t, err)
return req
}
// wantCode returns a function which checks that the response has the correct HTTP status code.
func wantCode(code int) wantFunc {
return func(t testing.TB, res *httptest.ResponseRecorder) {
assert.Equal(t, code, res.Code)
}
}
// wantBody returns a function which checks that the response has the data in the body.
func wantBody(body string) wantFunc {
return func(t testing.TB, res *httptest.ResponseRecorder) {
assert.NotNil(t, res.Body)
assert.Equal(t, res.Body.Bytes(), []byte(body))
}
}
// checkRequest uses f to process the request and runs the checker functions on the result.
func checkRequest(t testing.TB, f http.HandlerFunc, req *http.Request, want []wantFunc) {
rr := httptest.NewRecorder()
f(rr, req)
for _, fn := range want {
fn(t, rr)
}
}
// TestRequest is a sequence of HTTP requests with (optional) tests for the response.
type TestRequest struct {
req *http.Request
want []wantFunc
}
+1
View File
@@ -0,0 +1 @@
three
+1
View File
@@ -0,0 +1 @@
Directory not found
+1
View File
@@ -0,0 +1 @@
Not Found
+1
View File
@@ -0,0 +1 @@
Directory not found
+13
View File
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Directory listing of /</title>
</head>
<body>
<h1>Directory listing of /</h1>
<a href="one%25.txt">one%.txt</a><br />
<a href="three/">three/</a><br />
<a href="two.txt">two.txt</a><br />
</body>
</html>
View File
Whitespace-only changes.
+1
View File
@@ -0,0 +1 @@
Method Not Allowed
+1
View File
@@ -0,0 +1 @@
Not Found
+1
View File
@@ -0,0 +1 @@
one%
View File
Whitespace-only changes.
+1
View File
@@ -0,0 +1 @@
one%
+12
View File
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Directory listing of /three</title>
</head>
<body>
<h1>Directory listing of /three</h1>
<a href="a.txt">a.txt</a><br />
<a href="b.txt">b.txt</a><br />
</body>
</html>
+1
View File
@@ -0,0 +1 @@
0123456
+1
View File
@@ -0,0 +1 @@
0123456789
+1
View File
@@ -0,0 +1 @@
2345
+1
View File
@@ -0,0 +1 @@
3456789
+57 -10
View File
@@ -6,10 +6,12 @@ import (
"context"
"net/http"
"os"
"strings"
"github.com/ncw/rclone/cmd"
"github.com/ncw/rclone/cmd/serve/httplib"
"github.com/ncw/rclone/cmd/serve/httplib/httpflags"
"github.com/ncw/rclone/cmd/serve/httplib/serve"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fs/hash"
"github.com/ncw/rclone/fs/log"
@@ -20,14 +22,16 @@ import (
)
var (
hashName string
hashType = hash.None
hashName string
hashType = hash.None
disableGETDir = false
)
func init() {
httpflags.AddFlags(Command.Flags())
vfsflags.AddFlags(Command.Flags())
Command.Flags().StringVar(&hashName, "etag-hash", "", "Which hash to use for the ETag, or auto or blank for off")
Command.Flags().BoolVar(&disableGETDir, "disable-dir-list", false, "Disable HTML directory list on GET request for a directory")
}
// Command definition for cobra
@@ -37,8 +41,8 @@ var Command = &cobra.Command{
Long: `
rclone serve webdav implements a basic webdav server to serve the
remote over HTTP via the webdav protocol. This can be viewed with a
webdav client or you can make a remote of type webdav to read and
write it.
webdav client, through a web browser, or you can make a remote of
type webdav to read and write it.
### Webdav options
@@ -96,8 +100,9 @@ Use "rclone hashsum" to see the full list.
// overwriting another existing file or directory is an error is OS-dependent.
type WebDAV struct {
*httplib.Server
f fs.Fs
vfs *vfs.VFS
f fs.Fs
vfs *vfs.VFS
webdavhandler *webdav.Handler
}
// check interface
@@ -109,17 +114,59 @@ func newWebDAV(f fs.Fs, opt *httplib.Options) *WebDAV {
f: f,
vfs: vfs.New(f, &vfsflags.Opt),
}
handler := &webdav.Handler{
webdavHandler := &webdav.Handler{
FileSystem: w,
LockSystem: webdav.NewMemLS(),
Logger: w.logRequest, // FIXME
}
w.Server = httplib.NewServer(handler, opt)
w.webdavhandler = webdavHandler
w.Server = httplib.NewServer(http.HandlerFunc(w.handler), opt)
return w
}
func (w *WebDAV) handler(rw http.ResponseWriter, r *http.Request) {
urlPath := r.URL.Path
isDir := strings.HasSuffix(urlPath, "/")
remote := strings.Trim(urlPath, "/")
if !disableGETDir && (r.Method == "GET" || r.Method == "HEAD") && isDir {
w.serveDir(rw, r, remote)
return
}
w.webdavhandler.ServeHTTP(rw, r)
}
// serveDir serves a directory index at dirRemote
// This is similar to serveDir in serve http.
func (w *WebDAV) serveDir(rw http.ResponseWriter, r *http.Request, dirRemote string) {
// List the directory
node, err := w.vfs.Stat(dirRemote)
if err == vfs.ENOENT {
http.Error(rw, "Directory not found", http.StatusNotFound)
return
} else if err != nil {
serve.Error(dirRemote, rw, "Failed to list directory", err)
return
}
if !node.IsDir() {
http.Error(rw, "Not a directory", http.StatusNotFound)
return
}
dir := node.(*vfs.Dir)
dirEntries, err := dir.ReadDirAll()
if err != nil {
serve.Error(dirRemote, rw, "Failed to list directory", err)
return
}
// Make the entries for display
directory := serve.NewDirectory(dirRemote, w.HTMLTemplate)
for _, node := range dirEntries {
directory.AddEntry(node.Path(), node.IsDir())
}
directory.Serve(rw, r)
}
// serve runs the http server in the background.
//
// Use s.Close() and s.Wait() to shutdown server
+190
View File
@@ -8,14 +8,22 @@
package webdav
import (
"flag"
"io/ioutil"
"net/http"
"os"
"os/exec"
"strings"
"testing"
"time"
_ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/cmd/serve/httplib"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fs/filter"
"github.com/ncw/rclone/fstest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/webdav"
)
@@ -78,3 +86,185 @@ func TestWebDav(t *testing.T) {
}
assert.NoError(t, err, "Running webdav integration tests")
}
// Test serve http functionality in serve webdav
// While similar to http serve, there are some inconsistencies
// in the handling of some requests such as POST requests
var (
updateGolden = flag.Bool("updategolden", false, "update golden files for regression test")
)
func TestHTTPFunction(t *testing.T) {
// cd to correct directory for testing
err := os.Chdir("../../cmd/serve/webdav")
assert.NoError(t, err, "failed to cd to webdav cmd directory")
// exclude files called hidden.txt and directories called hidden
require.NoError(t, filter.Active.AddRule("- hidden.txt"))
require.NoError(t, filter.Active.AddRule("- hidden/**"))
// Uses the same test files as http tests but with different golden.
f, err := fs.NewFs("../http/testdata/files")
assert.NoError(t, err)
opt := httplib.DefaultOpt
opt.ListenAddr = testBindAddress
// Start the server
w := newWebDAV(f, &opt)
assert.NoError(t, w.serve())
defer func() {
w.Close()
w.Wait()
}()
testURL := w.Server.URL()
pause := time.Millisecond
i := 0
for ; i < 10; i++ {
resp, err := http.Head(testURL)
if err == nil {
_ = resp.Body.Close()
break
}
// t.Logf("couldn't connect, sleeping for %v: %v", pause, err)
time.Sleep(pause)
pause *= 2
}
if i >= 10 {
t.Fatal("couldn't connect to server")
}
HelpTestGET(t, testURL)
}
// check body against the file, or re-write body if -updategolden is
// set.
func checkGolden(t *testing.T, fileName string, got []byte) {
if *updateGolden {
t.Logf("Updating golden file %q", fileName)
err := ioutil.WriteFile(fileName, got, 0666)
require.NoError(t, err)
} else {
want, err := ioutil.ReadFile(fileName)
require.NoError(t, err, "problem")
wants := strings.Split(string(want), "\n")
gots := strings.Split(string(got), "\n")
assert.Equal(t, wants, gots, fileName)
}
}
func HelpTestGET(t *testing.T, testURL string) {
for _, test := range []struct {
URL string
Status int
Golden string
Method string
Range string
}{
{
URL: "",
Status: http.StatusOK,
Golden: "testdata/golden/index.html",
},
{
URL: "notfound",
Status: http.StatusNotFound,
Golden: "testdata/golden/notfound.html",
},
{
URL: "dirnotfound/",
Status: http.StatusNotFound,
Golden: "testdata/golden/dirnotfound.html",
},
{
URL: "hidden/",
Status: http.StatusNotFound,
Golden: "testdata/golden/hiddendir.html",
},
{
URL: "one%25.txt",
Status: http.StatusOK,
Golden: "testdata/golden/one.txt",
},
{
URL: "hidden.txt",
Status: http.StatusNotFound,
Golden: "testdata/golden/hidden.txt",
},
{
URL: "three/",
Status: http.StatusOK,
Golden: "testdata/golden/three.html",
},
{
URL: "three/a.txt",
Status: http.StatusOK,
Golden: "testdata/golden/a.txt",
},
{
URL: "",
Method: "HEAD",
Status: http.StatusOK,
Golden: "testdata/golden/indexhead.txt",
},
{
URL: "one%25.txt",
Method: "HEAD",
Status: http.StatusOK,
Golden: "testdata/golden/onehead.txt",
},
{
URL: "",
Method: "POST",
Status: http.StatusMethodNotAllowed,
Golden: "testdata/golden/indexpost.txt",
},
{
URL: "one%25.txt",
Method: "POST",
Status: http.StatusOK,
Golden: "testdata/golden/onepost.txt",
},
{
URL: "two.txt",
Status: http.StatusOK,
Golden: "testdata/golden/two.txt",
},
{
URL: "two.txt",
Status: http.StatusPartialContent,
Range: "bytes=2-5",
Golden: "testdata/golden/two2-5.txt",
},
{
URL: "two.txt",
Status: http.StatusPartialContent,
Range: "bytes=0-6",
Golden: "testdata/golden/two-6.txt",
},
{
URL: "two.txt",
Status: http.StatusPartialContent,
Range: "bytes=3-",
Golden: "testdata/golden/two3-.txt",
},
} {
method := test.Method
if method == "" {
method = "GET"
}
req, err := http.NewRequest(method, testURL+test.URL, nil)
require.NoError(t, err)
if test.Range != "" {
req.Header.Add("Range", test.Range)
}
resp, err := http.DefaultClient.Do(req)
require.NoError(t, err)
assert.Equal(t, test.Status, resp.StatusCode, test.Golden)
body, err := ioutil.ReadAll(resp.Body)
require.NoError(t, err)
checkGolden(t, test.Golden, body)
}
}
+1
View File
@@ -45,6 +45,7 @@ Rclone is a command line program to sync files and directories to and from:
* {{< provider name="put.io" home="https://put.io/" config="/webdav/#put-io" >}}
* {{< provider name="QingStor" home="https://www.qingcloud.com/products/storage" config="/qingstor/" >}}
* {{< provider name="Rackspace Cloud Files" home="https://www.rackspace.com/cloud/files" config="/swift/" >}}
* {{< provider name="rsync.net" home="https://rsync.net/products/rclone.html" config="/sftp/" >}}
* {{< provider name="Scaleway" home="https://www.scaleway.com/object-storage/" config="/s3/#scaleway" >}}
* {{< provider name="SFTP" home="https://en.wikipedia.org/wiki/SFTP" config="/sftp/" >}}
* {{< provider name="Wasabi" home="https://wasabi.com/" config="/s3/#wasabi" >}}
+3
View File
@@ -261,3 +261,6 @@ Contributors
* Philip Harvey <32467456+pharveybattelle@users.noreply.github.com>
* JorisE <JorisE@users.noreply.github.com>
* garry415 <garry.415@gmail.com>
* forgems <forgems@gmail.com>
* Florian Apolloner <florian@apolloner.eu>
* Aleksandar Jankovic <office@ajankovic.com>
+8 -4
View File
@@ -124,10 +124,9 @@ The modified time is stored as metadata on the object as
in the Backblaze standard. Other tools should be able to use this as
a modified time.
Modified times are used in syncing and are fully supported except in
the case of updating a modification time on an existing object. In
this case the object will be uploaded again as B2 doesn't have an API
method to set the modification time independent of doing an upload.
Modified times are used in syncing and are fully supported. Note that
if a modification time needs to be updated on an object then it will
create a new version of the object.
### SHA1 checksums ###
@@ -178,6 +177,11 @@ the file instead of hiding it.
Old versions of files, where available, are visible using the
`--b2-versions` flag.
**NB** Note that `--b2-versions` does not work with crypt at the
moment [#1627](https://github.com/ncw/rclone/issues/1627). Using
[--backup-dir](/docs/#backup-dir-dir) with rclone is the recommended
way of working around this.
If you wish to remove all the old versions then you can use the
`rclone cleanup remote:bucket` command which will delete all the old
versions of files, leaving the current ones intact. You can also
+2 -2
View File
@@ -420,7 +420,7 @@ The remote name is used as the DB file name.
- Config: db_path
- Env Var: RCLONE_CACHE_DB_PATH
- Type: string
- Default: "/home/ncw/.cache/rclone/cache-backend"
- Default: "$HOME/.cache/rclone/cache-backend"
#### --cache-chunk-path
@@ -436,7 +436,7 @@ then "--cache-chunk-path" will use the same path as "--cache-db-path".
- Config: chunk_path
- Env Var: RCLONE_CACHE_CHUNK_PATH
- Type: string
- Default: "/home/ncw/.cache/rclone/cache-backend"
- Default: "$HOME/.cache/rclone/cache-backend"
#### --cache-db-purge
+86 -1
View File
@@ -1,11 +1,96 @@
---
title: "Documentation"
description: "Rclone Changelog"
date: "2019-04-13"
date: "2019-06-15"
---
# Changelog
## v1.48.0 - 2019-06-15
* New commands
* serve sftp: Serve an rclone remote over SFTP (Nick Craig-Wood)
* New Features
* Multi threaded downloads to local storage (Nick Craig-Wood)
* controlled with `--multi-thread-cutoff` and `--multi-thread-streams`
* Use rclone.conf from rclone executable directory to enable portable use (albertony)
* Allow sync of a file and a directory with the same name (forgems)
* this is common on bucket based remotes, eg s3, gcs
* Add `--ignore-case-sync` for forced case insensitivity (garry415)
* Implement `--stats-one-line-date` and `--stats-one-line-date-format` (Peter Berbec)
* Log an ERROR for all commands which exit with non-zero status (Nick Craig-Wood)
* Use go-homedir to read the home directory more reliably (Nick Craig-Wood)
* Enable creating encrypted config through external script invocation (Wojciech Smigielski)
* build: Drop support for go1.8 (Nick Craig-Wood)
* config: Make config create/update encrypt passwords where necessary (Nick Craig-Wood)
* copyurl: Honor `--no-check-certificate` (Stefan Breunig)
* install: Linux skip man pages if no mandb (didil)
* lsf: Support showing the Tier of the object (Nick Craig-Wood)
* lsjson
* Added EncryptedPath to output (calisro)
* Support showing the Tier of the object (Nick Craig-Wood)
* Add IsBucket field for bucket based remote listing of the root (Nick Craig-Wood)
* rc
* Add `--loopback` flag to run commands directly without a server (Nick Craig-Wood)
* Add operations/fsinfo: Return information about the remote (Nick Craig-Wood)
* Skip auth for OPTIONS request (Nick Craig-Wood)
* cmd/providers: Add DefaultStr, ValueStr and Type fields (Nick Craig-Wood)
* jobs: Make job expiry timeouts configurable (Aleksandar Jankovic)
* serve dlna reworked and improved (Dan Walters)
* serve ftp: add `--ftp-public-ip` flag to specify public IP (calistri)
* serve restic: Add support for `--private-repos` in `serve restic` (Florian Apolloner)
* serve webdav: Combine serve webdav and serve http (Gary Kim)
* size: Ignore negative sizes when calculating total (Garry McNulty)
* Bug Fixes
* Make move and copy individual files obey `--backup-dir` (Nick Craig-Wood)
* If `--ignore-checksum` is in effect, don't calculate checksum (Nick Craig-Wood)
* moveto: Fix case-insensitive same remote move (Gary Kim)
* rc: Fix serving bucket based objects with `--rc-serve` (Nick Craig-Wood)
* serve webdav: Fix serveDir not being updated with changes from webdav (Gary Kim)
* Mount
* Fix poll interval documentation (Animosity022)
* VFS
* Make WriteAt for non cached files work with non-sequential writes (Nick Craig-Wood)
* Local
* Only calculate the required hashes for big speedup (Nick Craig-Wood)
* Log errors when listing instead of returning an error (Nick Craig-Wood)
* Fix preallocate warning on Linux with ZFS (Nick Craig-Wood)
* Crypt
* Make rclone dedupe work through crypt (Nick Craig-Wood)
* Fix wrapping of ChangeNotify to decrypt directories properly (Nick Craig-Wood)
* Support PublicLink (rclone link) of underlying backend (Nick Craig-Wood)
* Implement Optional methods SetTier, GetTier (Nick Craig-Wood)
* B2
* Implement server side copy (Nick Craig-Wood)
* Implement SetModTime (Nick Craig-Wood)
* Drive
* Fix move and copy from TeamDrive to GDrive (Fionera)
* Add notes that cleanup works in the background on drive (Nick Craig-Wood)
* Add `--drive-server-side-across-configs` to default back to old server side copy semantics by default (Nick Craig-Wood)
* Add `--drive-size-as-quota` to show storage quota usage for file size (Garry McNulty)
* FTP
* Add FTP List timeout (Jeff Quinn)
* Add FTP over TLS support (Gary Kim)
* Add `--ftp-no-check-certificate` option for FTPS (Gary Kim)
* Google Cloud Storage
* Fix upload errors when uploading pre 1970 files (Nick Craig-Wood)
* Jottacloud
* Add support for selecting device and mountpoint. (buengese)
* Mega
* Add cleanup support (Gary Kim)
* Onedrive
* More accurately check if root is found (Cnly)
* S3
* Suppport S3 Accelerated endpoints with `--s3-use-accelerate-endpoint` (Nick Craig-Wood)
* Add config info for Wasabi's EU Central endpoint (Robert Marko)
* Make SetModTime work for GLACIER while syncing (Philip Harvey)
* SFTP
* Add About support (Gary Kim)
* Fix about parsing of `df` results so it can cope with -ve results (Nick Craig-Wood)
* Send custom client version and debug server version (Nick Craig-Wood)
* WebDAV
* Retry on 423 Locked errors (Nick Craig-Wood)
## v1.47.0 - 2019-04-13
* New backends
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone"
slug: rclone
url: /commands/rclone/
@@ -79,4 +79,4 @@ rclone [flags]
* [rclone tree](/commands/rclone_tree/) - List the contents of the remote in a tree like fashion.
* [rclone version](/commands/rclone_version/) - Show the version number.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone about"
slug: rclone_about
url: /commands/rclone_about/
@@ -70,4 +70,4 @@ rclone about remote: [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone authorize"
slug: rclone_authorize
url: /commands/rclone_authorize/
@@ -29,4 +29,4 @@ rclone authorize [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone cachestats"
slug: rclone_cachestats
url: /commands/rclone_cachestats/
@@ -28,4 +28,4 @@ rclone cachestats source: [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone cat"
slug: rclone_cat
url: /commands/rclone_cat/
@@ -50,4 +50,4 @@ rclone cat remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone check"
slug: rclone_check
url: /commands/rclone_check/
@@ -44,4 +44,4 @@ rclone check source:path dest:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone cleanup"
slug: rclone_cleanup
url: /commands/rclone_cleanup/
@@ -29,4 +29,4 @@ rclone cleanup remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config"
slug: rclone_config
url: /commands/rclone_config/
@@ -38,4 +38,4 @@ rclone config [flags]
* [rclone config show](/commands/rclone_config_show/) - Print (decrypted) config file, or the config for a single remote.
* [rclone config update](/commands/rclone_config_update/) - Update options in an existing remote.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config create"
slug: rclone_config_create
url: /commands/rclone_config_create/
@@ -23,6 +23,9 @@ Note that if the config process would normally ask a question the
default is taken. Each time that happens rclone will print a message
saying how to affect the value taken.
If any of the parameters passed is a password field, then rclone will
automatically obscure them before putting them in the config file.
So for example if you wanted to configure a Google Drive remote but
using remote authorization you would do this:
@@ -43,4 +46,4 @@ rclone config create <name> <type> [<key> <value>]* [flags]
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config delete"
slug: rclone_config_delete
url: /commands/rclone_config_delete/
@@ -26,4 +26,4 @@ rclone config delete <name> [flags]
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config dump"
slug: rclone_config_dump
url: /commands/rclone_config_dump/
@@ -26,4 +26,4 @@ rclone config dump [flags]
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config edit"
slug: rclone_config_edit
url: /commands/rclone_config_edit/
@@ -29,4 +29,4 @@ rclone config edit [flags]
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config file"
slug: rclone_config_file
url: /commands/rclone_config_file/
@@ -26,4 +26,4 @@ rclone config file [flags]
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config password"
slug: rclone_config_password
url: /commands/rclone_config_password/
@@ -18,6 +18,9 @@ For example to set password of a remote of name myremote you would do:
rclone config password myremote fieldname mypassword
This command is obsolete now that "config update" and "config create"
both support obscuring passwords directly.
```
rclone config password <name> [<key> <value>]+ [flags]
@@ -33,4 +36,4 @@ rclone config password <name> [<key> <value>]+ [flags]
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config providers"
slug: rclone_config_providers
url: /commands/rclone_config_providers/
@@ -26,4 +26,4 @@ rclone config providers [flags]
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config show"
slug: rclone_config_show
url: /commands/rclone_config_show/
@@ -26,4 +26,4 @@ rclone config show [<remote>] [flags]
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone config update"
slug: rclone_config_update
url: /commands/rclone_config_update/
@@ -14,10 +14,14 @@ Update options in an existing remote.
Update an existing remote's options. The options should be passed in
in pairs of <key> <value>.
For example to update the env_auth field of a remote of name myremote you would do:
For example to update the env_auth field of a remote of name myremote
you would do:
rclone config update myremote swift env_auth true
If any of the parameters passed is a password field, then rclone will
automatically obscure them before putting them in the config file.
If the remote uses oauth the token will be updated, if you don't
require this add an extra parameter thus:
@@ -38,4 +42,4 @@ rclone config update <name> [<key> <value>]+ [flags]
* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone copy"
slug: rclone_copy
url: /commands/rclone_copy/
@@ -76,4 +76,4 @@ rclone copy source:path dest:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone copyto"
slug: rclone_copyto
url: /commands/rclone_copyto/
@@ -54,4 +54,4 @@ rclone copyto source:path dest:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone copyurl"
slug: rclone_copyurl
url: /commands/rclone_copyurl/
@@ -29,4 +29,4 @@ rclone copyurl https://example.com dest:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone cryptcheck"
slug: rclone_cryptcheck
url: /commands/rclone_cryptcheck/
@@ -54,4 +54,4 @@ rclone cryptcheck remote:path cryptedremote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone cryptdecode"
slug: rclone_cryptdecode
url: /commands/rclone_cryptdecode/
@@ -38,4 +38,4 @@ rclone cryptdecode encryptedremote: encryptedfilename [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone dbhashsum"
slug: rclone_dbhashsum
url: /commands/rclone_dbhashsum/
@@ -31,4 +31,4 @@ rclone dbhashsum remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone dedupe"
slug: rclone_dedupe
url: /commands/rclone_dedupe/
@@ -107,4 +107,4 @@ rclone dedupe [mode] remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone delete"
slug: rclone_delete
url: /commands/rclone_delete/
@@ -47,4 +47,4 @@ rclone delete remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone deletefile"
slug: rclone_deletefile
url: /commands/rclone_deletefile/
@@ -30,4 +30,4 @@ rclone deletefile remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone genautocomplete"
slug: rclone_genautocomplete
url: /commands/rclone_genautocomplete/
@@ -27,4 +27,4 @@ Run with --help to list the supported shells.
* [rclone genautocomplete bash](/commands/rclone_genautocomplete_bash/) - Output bash completion script for rclone.
* [rclone genautocomplete zsh](/commands/rclone_genautocomplete_zsh/) - Output zsh completion script for rclone.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone genautocomplete bash"
slug: rclone_genautocomplete_bash
url: /commands/rclone_genautocomplete_bash/
@@ -41,4 +41,4 @@ rclone genautocomplete bash [output_file] [flags]
* [rclone genautocomplete](/commands/rclone_genautocomplete/) - Output completion script for a given shell.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone genautocomplete zsh"
slug: rclone_genautocomplete_zsh
url: /commands/rclone_genautocomplete_zsh/
@@ -41,4 +41,4 @@ rclone genautocomplete zsh [output_file] [flags]
* [rclone genautocomplete](/commands/rclone_genautocomplete/) - Output completion script for a given shell.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone gendocs"
slug: rclone_gendocs
url: /commands/rclone_gendocs/
@@ -29,4 +29,4 @@ rclone gendocs output_directory [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone hashsum"
slug: rclone_hashsum
url: /commands/rclone_hashsum/
@@ -43,4 +43,4 @@ rclone hashsum <hash> remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone link"
slug: rclone_link
url: /commands/rclone_link/
@@ -36,4 +36,4 @@ rclone link remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone listremotes"
slug: rclone_listremotes
url: /commands/rclone_listremotes/
@@ -31,4 +31,4 @@ rclone listremotes [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone ls"
slug: rclone_ls
url: /commands/rclone_ls/
@@ -60,4 +60,4 @@ rclone ls remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone lsd"
slug: rclone_lsd
url: /commands/rclone_lsd/
@@ -71,4 +71,4 @@ rclone lsd remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone lsf"
slug: rclone_lsf
url: /commands/rclone_lsf/
@@ -152,4 +152,4 @@ rclone lsf remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+10 -3
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone lsjson"
slug: rclone_lsjson
url: /commands/rclone_lsjson/
@@ -22,13 +22,16 @@ The output is an array of Items, where each Item looks like this
},
"ID": "y2djkhiujf83u33",
"OrigID": "UYOJVTUW00Q1RzTDA",
"IsBucket" : false,
"IsDir" : false,
"MimeType" : "application/octet-stream",
"ModTime" : "2017-05-31T16:15:57.034468261+01:00",
"Name" : "file.txt",
"Encrypted" : "v0qpsdq8anpci8n929v3uu9338",
"EncryptedPath" : "kja9098349023498/v0qpsdq8anpci8n929v3uu9338",
"Path" : "full/path/goes/here/file.txt",
"Size" : 6
"Size" : 6,
"Tier" : "hot",
}
If --hash is not specified the Hashes property won't be emitted.
@@ -46,6 +49,10 @@ If "remote:path" contains the file "subfolder/file.txt", the Path for "file.txt"
will be "subfolder/file.txt", not "remote:path/subfolder/file.txt".
When used without --recursive the Path will always be the same as Name.
If the directory is a bucket in a bucket based backend, then
"IsBucket" will be set to true. This key won't be present unless it is
"true".
The time is in RFC3339 format with up to nanosecond precision. The
number of decimal digits in the seconds will depend on the precision
that the remote can hold the times, so if times are accurate to the
@@ -101,4 +108,4 @@ rclone lsjson remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone lsl"
slug: rclone_lsl
url: /commands/rclone_lsl/
@@ -60,4 +60,4 @@ rclone lsl remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone md5sum"
slug: rclone_md5sum
url: /commands/rclone_md5sum/
@@ -29,4 +29,4 @@ rclone md5sum remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone mkdir"
slug: rclone_mkdir
url: /commands/rclone_mkdir/
@@ -26,4 +26,4 @@ rclone mkdir remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+4 -4
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone mount"
slug: rclone_mount
url: /commands/rclone_mount/
@@ -310,7 +310,7 @@ rclone mount remote:path /path/to/mountpoint [flags]
--dir-perms FileMode Directory permissions (default 0777)
--file-perms FileMode File permissions (default 0666)
--fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp. Repeat if required.
--gid uint32 Override the gid field set by the filesystem. (default 502)
--gid uint32 Override the gid field set by the filesystem. (default 1000)
-h, --help help for mount
--max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads. (default 128k)
--no-checksum Don't compare checksums on up/download.
@@ -319,7 +319,7 @@ rclone mount remote:path /path/to/mountpoint [flags]
-o, --option stringArray Option for libfuse/WinFsp. Repeat if required.
--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable. (default 1m0s)
--read-only Mount read-only.
--uid uint32 Override the uid field set by the filesystem. (default 502)
--uid uint32 Override the uid field set by the filesystem. (default 1000)
--umask int Override the permission bits set by the filesystem.
--vfs-cache-max-age duration Max age of objects in the cache. (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache. (default off)
@@ -335,4 +335,4 @@ rclone mount remote:path /path/to/mountpoint [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone move"
slug: rclone_move
url: /commands/rclone_move/
@@ -54,4 +54,4 @@ rclone move source:path dest:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone moveto"
slug: rclone_moveto
url: /commands/rclone_moveto/
@@ -57,4 +57,4 @@ rclone moveto source:path dest:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone ncdu"
slug: rclone_ncdu
url: /commands/rclone_ncdu/
@@ -57,4 +57,4 @@ rclone ncdu remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone obscure"
slug: rclone_obscure
url: /commands/rclone_obscure/
@@ -26,4 +26,4 @@ rclone obscure password [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone purge"
slug: rclone_purge
url: /commands/rclone_purge/
@@ -30,4 +30,4 @@ rclone purge remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+9 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone rc"
slug: rclone_rc
url: /commands/rclone_rc/
@@ -30,6 +30,12 @@ The --json parameter can be used to pass in a JSON blob as an input
instead of key=value arguments. This is the only way of passing in
more complicated values.
Use --loopback to connect to the rclone instance running "rclone rc".
This is very useful for testing commands without having to run an
rclone rc server, eg:
rclone rc --loopback operations/about fs=/
Use "rclone rc" to see a list of all possible commands.
```
@@ -41,6 +47,7 @@ rclone rc commands parameter [flags]
```
-h, --help help for rc
--json string Input JSON - use instead of key=value args.
--loopback If set connect to this rclone instance not via HTTP.
--no-output If set don't output the JSON result.
--pass string Password to use to connect to rclone remote control.
--url string URL to connect to rclone remote control. (default "http://localhost:5572/")
@@ -51,4 +58,4 @@ rclone rc commands parameter [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone rcat"
slug: rclone_rcat
url: /commands/rclone_rcat/
@@ -48,4 +48,4 @@ rclone rcat remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone rcd"
slug: rclone_rcd
url: /commands/rclone_rcd/
@@ -36,4 +36,4 @@ rclone rcd <path to files to serve>* [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone rmdir"
slug: rclone_rmdir
url: /commands/rclone_rmdir/
@@ -28,4 +28,4 @@ rclone rmdir remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone rmdirs"
slug: rclone_rmdirs
url: /commands/rclone_rmdirs/
@@ -36,4 +36,4 @@ rclone rmdirs remote:path [flags]
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+2 -2
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone serve"
slug: rclone_serve
url: /commands/rclone_serve/
@@ -38,4 +38,4 @@ rclone serve <protocol> [opts] <remote> [flags]
* [rclone serve sftp](/commands/rclone_serve_sftp/) - Serve the remote over SFTP.
* [rclone serve webdav](/commands/rclone_serve_webdav/) - Serve remote:path over webdav.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+11 -4
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone serve dlna"
slug: rclone_serve_dlna
url: /commands/rclone_serve_dlna/
@@ -26,6 +26,11 @@ Use --addr to specify which IP address and port the server should
listen on, eg --addr 1.2.3.4:8000 or --addr :8080 to listen to all
IPs.
Use --name to choose the friendly server name, which is by
default "rclone (hostname)".
Use --log-trace in conjunction with -vv to enable additional debug
logging of all UPNP traffic.
### Directory Cache
@@ -173,14 +178,16 @@ rclone serve dlna remote:path [flags]
--dir-cache-time duration Time to cache directory entries for. (default 5m0s)
--dir-perms FileMode Directory permissions (default 0777)
--file-perms FileMode File permissions (default 0666)
--gid uint32 Override the gid field set by the filesystem. (default 502)
--gid uint32 Override the gid field set by the filesystem. (default 1000)
-h, --help help for dlna
--log-trace enable trace logging of SOAP traffic
--name string name of DLNA server
--no-checksum Don't compare checksums on up/download.
--no-modtime Don't read/write the modification time (can speed things up).
--no-seek Don't allow seeking in files.
--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable. (default 1m0s)
--read-only Mount read-only.
--uid uint32 Override the uid field set by the filesystem. (default 502)
--uid uint32 Override the uid field set by the filesystem. (default 1000)
--umask int Override the permission bits set by the filesystem. (default 2)
--vfs-cache-max-age duration Max age of objects in the cache. (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache. (default off)
@@ -194,4 +201,4 @@ rclone serve dlna remote:path [flags]
* [rclone serve](/commands/rclone_serve/) - Serve a remote over a protocol.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+4 -4
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone serve ftp"
slug: rclone_serve_ftp
url: /commands/rclone_serve_ftp/
@@ -177,7 +177,7 @@ rclone serve ftp remote:path [flags]
--dir-cache-time duration Time to cache directory entries for. (default 5m0s)
--dir-perms FileMode Directory permissions (default 0777)
--file-perms FileMode File permissions (default 0666)
--gid uint32 Override the gid field set by the filesystem. (default 502)
--gid uint32 Override the gid field set by the filesystem. (default 1000)
-h, --help help for ftp
--no-checksum Don't compare checksums on up/download.
--no-modtime Don't read/write the modification time (can speed things up).
@@ -187,7 +187,7 @@ rclone serve ftp remote:path [flags]
--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable. (default 1m0s)
--public-ip string Public IP address to advertise for passive connections.
--read-only Mount read-only.
--uid uint32 Override the uid field set by the filesystem. (default 502)
--uid uint32 Override the uid field set by the filesystem. (default 1000)
--umask int Override the permission bits set by the filesystem. (default 2)
--user string User name for authentication. (default "anonymous")
--vfs-cache-max-age duration Max age of objects in the cache. (default 1h0m0s)
@@ -202,4 +202,4 @@ rclone serve ftp remote:path [flags]
* [rclone serve](/commands/rclone_serve/) - Serve a remote over a protocol.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+4 -4
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone serve http"
slug: rclone_serve_http
url: /commands/rclone_serve_http/
@@ -220,7 +220,7 @@ rclone serve http remote:path [flags]
--dir-cache-time duration Time to cache directory entries for. (default 5m0s)
--dir-perms FileMode Directory permissions (default 0777)
--file-perms FileMode File permissions (default 0666)
--gid uint32 Override the gid field set by the filesystem. (default 502)
--gid uint32 Override the gid field set by the filesystem. (default 1000)
-h, --help help for http
--htpasswd string htpasswd file - if not provided no authentication is done
--key string SSL PEM Private key
@@ -234,7 +234,7 @@ rclone serve http remote:path [flags]
--realm string realm for authentication (default "rclone")
--server-read-timeout duration Timeout for server reading data (default 1h0m0s)
--server-write-timeout duration Timeout for server writing data (default 1h0m0s)
--uid uint32 Override the uid field set by the filesystem. (default 502)
--uid uint32 Override the uid field set by the filesystem. (default 1000)
--umask int Override the permission bits set by the filesystem. (default 2)
--user string User name for authentication.
--vfs-cache-max-age duration Max age of objects in the cache. (default 1h0m0s)
@@ -249,4 +249,4 @@ rclone serve http remote:path [flags]
* [rclone serve](/commands/rclone_serve/) - Serve a remote over a protocol.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
+9 -4
View File
@@ -1,5 +1,5 @@
---
date: 2019-05-10T23:12:21+01:00
date: 2019-06-15T12:00:42+01:00
title: "rclone serve restic"
slug: rclone_serve_restic
url: /commands/rclone_serve_restic/
@@ -61,14 +61,14 @@ For example:
$ export RESTIC_PASSWORD=yourpassword
$ restic init
created restic backend 8b1a4b56ae at rest:http://localhost:8080/
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
$ restic backup /path/to/files/to/backup
scan [/path/to/files/to/backup]
scanned 189 directories, 312 files in 0:00
[0:00] 100.00% 38.128 MiB / 38.128 MiB 501 / 501 items 0 errors ETA 0:00
[0:00] 100.00% 38.128 MiB / 38.128 MiB 501 / 501 items 0 errors ETA 0:00
duration: 0:00
snapshot 45c8fdd8 saved
@@ -83,6 +83,10 @@ these **must** end with /. Eg
$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user2repo/
# backup user2 stuff
#### Private repositories ####
The "--private-repos" flag can be used to limit users to repositories starting
with a path of "/<username>/".
### Server options
@@ -151,6 +155,7 @@ rclone serve restic remote:path [flags]
--key string SSL PEM Private key
--max-header-bytes int Maximum size of request header (default 4096)
--pass string Password for authentication.
--private-repos users can only access their private repo
--realm string realm for authentication (default "rclone")
--server-read-timeout duration Timeout for server reading data (default 1h0m0s)
--server-write-timeout duration Timeout for server writing data (default 1h0m0s)
@@ -162,4 +167,4 @@ rclone serve restic remote:path [flags]
* [rclone serve](/commands/rclone_serve/) - Serve a remote over a protocol.
###### Auto generated by spf13/cobra on 10-May-2019
###### Auto generated by spf13/cobra on 15-Jun-2019
Loaded 100 of 304 files, more files were not shown because too many files have changed in this diff. Show more