Compare commits
46
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
245fed513a | ||
|
|
52332a4b24 | ||
|
|
3087c5d559 | ||
|
|
75606dcc27 | ||
|
|
f3719fe269 | ||
|
|
d2be792d5e | ||
|
|
2793d4b4cc | ||
|
|
30ac9d920a | ||
|
|
6e8e620e71 | ||
|
|
5597d6d871 | ||
|
|
622e0d19ce | ||
|
|
ce400a8fdc | ||
|
|
49c05cb89b | ||
|
|
d533de0f5c | ||
|
|
1a4fe4bc6c | ||
|
|
93207ead9c | ||
|
|
22368b997c | ||
|
|
a5bed67016 | ||
|
|
44f6491731 | ||
|
|
12c2a750f5 | ||
|
|
92bbae5cca | ||
|
|
939b19c3b7 | ||
|
|
64fb4effa7 | ||
|
|
4d195d5a52 | ||
|
|
976a020a2f | ||
|
|
550ab441c5 | ||
|
|
e24cadc7a1 | ||
|
|
903ede52cd | ||
|
|
f681d32996 | ||
|
|
2c72e7f0a2 | ||
|
|
db8cd1a993 | ||
|
|
2890b69c48 | ||
|
|
66b3795eb8 | ||
|
|
45f41c2c4a | ||
|
|
34f03ce590 | ||
|
|
e2fde62cd9 | ||
|
|
4b27c6719b | ||
|
|
fb6966b5fe | ||
|
|
454dfd3c9e | ||
|
|
e1cf551ded | ||
|
|
bd10344d65 | ||
|
|
1aa65d60e1 | ||
|
|
aa81957586 | ||
|
|
b7800e96d7 | ||
|
|
fb1bbecb41 | ||
|
|
e4c2468244 |
No files matched your search
@@ -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
File diff suppressed because it is too large.
Load diff
+1166
-116
File diff suppressed because it is too large.
Load diff
@@ -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
@@ -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{}
|
||||
|
||||
@@ -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
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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)})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
@@ -0,0 +1 @@
|
||||
three
|
||||
@@ -0,0 +1 @@
|
||||
Directory not found
|
||||
+1
@@ -0,0 +1 @@
|
||||
Not Found
|
||||
@@ -0,0 +1 @@
|
||||
Directory not found
|
||||
+13
@@ -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>
|
||||
Whitespace-only changes.
@@ -0,0 +1 @@
|
||||
Method Not Allowed
|
||||
@@ -0,0 +1 @@
|
||||
Not Found
|
||||
+1
@@ -0,0 +1 @@
|
||||
one%
|
||||
Whitespace-only changes.
@@ -0,0 +1 @@
|
||||
one%
|
||||
+12
@@ -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
@@ -0,0 +1 @@
|
||||
0123456
|
||||
+1
@@ -0,0 +1 @@
|
||||
0123456789
|
||||
+1
@@ -0,0 +1 @@
|
||||
2345
|
||||
+1
@@ -0,0 +1 @@
|
||||
3456789
|
||||
+57
-10
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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" >}}
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
Reference in new issue
Block a user