github.com/artpar/rclone@v1.67.3/docs/content/commands/rclone_serve_sftp.md (about)

     1  ---
     2  title: "rclone serve sftp"
     3  description: "Serve the remote over SFTP."
     4  slug: rclone_serve_sftp
     5  url: /commands/rclone_serve_sftp/
     6  groups: Filter
     7  versionIntroduced: v1.48
     8  # autogenerated - DO NOT EDIT, instead edit the source code in cmd/serve/sftp/ and as part of making a release run "make commanddocs"
     9  ---
    10  # rclone serve sftp
    11  
    12  Serve the remote over SFTP.
    13  
    14  ## Synopsis
    15  
    16  Run an SFTP server to serve a remote over SFTP. This can be used
    17  with an SFTP client or you can make a remote of type [sftp](/sftp) to use with it.
    18  
    19  You can use the [filter](/filtering) flags (e.g. `--include`, `--exclude`)
    20  to control what is served.
    21  
    22  The server will respond to a small number of shell commands, mainly
    23  md5sum, sha1sum and df, which enable it to provide support for checksums
    24  and the about feature when accessed from an sftp remote.
    25  
    26  Note that this server uses standard 32 KiB packet payload size, which
    27  means you must not configure the client to expect anything else, e.g.
    28  with the [chunk_size](/sftp/#sftp-chunk-size) option on an sftp remote.
    29  
    30  The server will log errors.  Use `-v` to see access logs.
    31  
    32  `--bwlimit` will be respected for file transfers.
    33  Use `--stats` to control the stats printing.
    34  
    35  You must provide some means of authentication, either with
    36  `--user`/`--pass`, an authorized keys file (specify location with
    37  `--authorized-keys` - the default is the same as ssh), an
    38  `--auth-proxy`, or set the `--no-auth` flag for no
    39  authentication when logging in.
    40  
    41  If you don't supply a host `--key` then rclone will generate rsa, ecdsa
    42  and ed25519 variants, and cache them for later use in rclone's cache
    43  directory (see `rclone help flags cache-dir`) in the "serve-sftp"
    44  directory.
    45  
    46  By default the server binds to localhost:2022 - if you want it to be
    47  reachable externally then supply `--addr :2022` for example.
    48  
    49  Note that the default of `--vfs-cache-mode off` is fine for the rclone
    50  sftp backend, but it may not be with other SFTP clients.
    51  
    52  If `--stdio` is specified, rclone will serve SFTP over stdio, which can
    53  be used with sshd via ~/.ssh/authorized_keys, for example:
    54  
    55      restrict,command="rclone serve sftp --stdio ./photos" ssh-rsa ...
    56  
    57  On the client you need to set `--transfers 1` when using `--stdio`.
    58  Otherwise multiple instances of the rclone server are started by OpenSSH
    59  which can lead to "corrupted on transfer" errors. This is the case because
    60  the client chooses indiscriminately which server to send commands to while
    61  the servers all have different views of the state of the filing system.
    62  
    63  The "restrict" in authorized_keys prevents SHA1SUMs and MD5SUMs from being
    64  used. Omitting "restrict" and using  `--sftp-path-override` to enable
    65  checksumming is possible but less secure and you could use the SFTP server
    66  provided by OpenSSH in this case.
    67  
    68  ## VFS - Virtual File System
    69  
    70  This command uses the VFS layer. This adapts the cloud storage objects
    71  that rclone uses into something which looks much more like a disk
    72  filing system.
    73  
    74  Cloud storage objects have lots of properties which aren't like disk
    75  files - you can't extend them or write to the middle of them, so the
    76  VFS layer has to deal with that. Because there is no one right way of
    77  doing this there are various options explained below.
    78  
    79  The VFS layer also implements a directory cache - this caches info
    80  about files and directories (but not the data) in memory.
    81  
    82  ## VFS Directory Cache
    83  
    84  Using the `--dir-cache-time` flag, you can control how long a
    85  directory should be considered up to date and not refreshed from the
    86  backend. Changes made through the VFS will appear immediately or
    87  invalidate the cache.
    88  
    89      --dir-cache-time duration   Time to cache directory entries for (default 5m0s)
    90      --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)
    91  
    92  However, changes made directly on the cloud storage by the web
    93  interface or a different copy of rclone will only be picked up once
    94  the directory cache expires if the backend configured does not support
    95  polling for changes. If the backend supports polling, changes will be
    96  picked up within the polling interval.
    97  
    98  You can send a `SIGHUP` signal to rclone for it to flush all
    99  directory caches, regardless of how old they are.  Assuming only one
   100  rclone instance is running, you can reset the cache like this:
   101  
   102      kill -SIGHUP $(pidof rclone)
   103  
   104  If you configure rclone with a [remote control](/rc) then you can use
   105  rclone rc to flush the whole directory cache:
   106  
   107      rclone rc vfs/forget
   108  
   109  Or individual files or directories:
   110  
   111      rclone rc vfs/forget file=path/to/file dir=path/to/dir
   112  
   113  ## VFS File Buffering
   114  
   115  The `--buffer-size` flag determines the amount of memory,
   116  that will be used to buffer data in advance.
   117  
   118  Each open file will try to keep the specified amount of data in memory
   119  at all times. The buffered data is bound to one open file and won't be
   120  shared.
   121  
   122  This flag is a upper limit for the used memory per open file.  The
   123  buffer will only use memory for data that is downloaded but not not
   124  yet read. If the buffer is empty, only a small amount of memory will
   125  be used.
   126  
   127  The maximum memory used by rclone for buffering can be up to
   128  `--buffer-size * open files`.
   129  
   130  ## VFS File Caching
   131  
   132  These flags control the VFS file caching options. File caching is
   133  necessary to make the VFS layer appear compatible with a normal file
   134  system. It can be disabled at the cost of some compatibility.
   135  
   136  For example you'll need to enable VFS caching if you want to read and
   137  write simultaneously to a file.  See below for more details.
   138  
   139  Note that the VFS cache is separate from the cache backend and you may
   140  find that you need one or the other or both.
   141  
   142      --cache-dir string                     Directory rclone will use for caching.
   143      --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
   144      --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
   145      --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
   146      --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
   147      --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
   148      --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)
   149  
   150  If run with `-vv` rclone will print the location of the file cache.  The
   151  files are stored in the user cache file area which is OS dependent but
   152  can be controlled with `--cache-dir` or setting the appropriate
   153  environment variable.
   154  
   155  The cache has 4 different modes selected by `--vfs-cache-mode`.
   156  The higher the cache mode the more compatible rclone becomes at the
   157  cost of using disk space.
   158  
   159  Note that files are written back to the remote only when they are
   160  closed and if they haven't been accessed for `--vfs-write-back`
   161  seconds. If rclone is quit or dies with files that haven't been
   162  uploaded, these will be uploaded next time rclone is run with the same
   163  flags.
   164  
   165  If using `--vfs-cache-max-size` or `--vfs-cache-min-free-size` note
   166  that the cache may exceed these quotas for two reasons. Firstly
   167  because it is only checked every `--vfs-cache-poll-interval`. Secondly
   168  because open files cannot be evicted from the cache. When
   169  `--vfs-cache-max-size` or `--vfs-cache-min-free-size` is exceeded,
   170  rclone will attempt to evict the least accessed files from the cache
   171  first. rclone will start with files that haven't been accessed for the
   172  longest. This cache flushing strategy is efficient and more relevant
   173  files are likely to remain cached.
   174  
   175  The `--vfs-cache-max-age` will evict files from the cache
   176  after the set time since last access has passed. The default value of
   177  1 hour will start evicting files from cache that haven't been accessed
   178  for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0
   179  and will wait for 1 more hour before evicting. Specify the time with
   180  standard notation, s, m, h, d, w .
   181  
   182  You **should not** run two copies of rclone using the same VFS cache
   183  with the same or overlapping remotes if using `--vfs-cache-mode > off`.
   184  This can potentially cause data corruption if you do. You can work
   185  around this by giving each rclone its own cache hierarchy with
   186  `--cache-dir`. You don't need to worry about this if the remotes in
   187  use don't overlap.
   188  
   189  ### --vfs-cache-mode off
   190  
   191  In this mode (the default) the cache will read directly from the remote and write
   192  directly to the remote without caching anything on disk.
   193  
   194  This will mean some operations are not possible
   195  
   196    * Files can't be opened for both read AND write
   197    * Files opened for write can't be seeked
   198    * Existing files opened for write must have O_TRUNC set
   199    * Files open for read with O_TRUNC will be opened write only
   200    * Files open for write only will behave as if O_TRUNC was supplied
   201    * Open modes O_APPEND, O_TRUNC are ignored
   202    * If an upload fails it can't be retried
   203  
   204  ### --vfs-cache-mode minimal
   205  
   206  This is very similar to "off" except that files opened for read AND
   207  write will be buffered to disk.  This means that files opened for
   208  write will be a lot more compatible, but uses the minimal disk space.
   209  
   210  These operations are not possible
   211  
   212    * Files opened for write only can't be seeked
   213    * Existing files opened for write must have O_TRUNC set
   214    * Files opened for write only will ignore O_APPEND, O_TRUNC
   215    * If an upload fails it can't be retried
   216  
   217  ### --vfs-cache-mode writes
   218  
   219  In this mode files opened for read only are still read directly from
   220  the remote, write only and read/write files are buffered to disk
   221  first.
   222  
   223  This mode should support all normal file system operations.
   224  
   225  If an upload fails it will be retried at exponentially increasing
   226  intervals up to 1 minute.
   227  
   228  ### --vfs-cache-mode full
   229  
   230  In this mode all reads and writes are buffered to and from disk. When
   231  data is read from the remote this is buffered to disk as well.
   232  
   233  In this mode the files in the cache will be sparse files and rclone
   234  will keep track of which bits of the files it has downloaded.
   235  
   236  So if an application only reads the starts of each file, then rclone
   237  will only buffer the start of the file. These files will appear to be
   238  their full size in the cache, but they will be sparse files with only
   239  the data that has been downloaded present in them.
   240  
   241  This mode should support all normal file system operations and is
   242  otherwise identical to `--vfs-cache-mode` writes.
   243  
   244  When reading a file rclone will read `--buffer-size` plus
   245  `--vfs-read-ahead` bytes ahead.  The `--buffer-size` is buffered in memory
   246  whereas the `--vfs-read-ahead` is buffered on disk.
   247  
   248  When using this mode it is recommended that `--buffer-size` is not set
   249  too large and `--vfs-read-ahead` is set large if required.
   250  
   251  **IMPORTANT** not all file systems support sparse files. In particular
   252  FAT/exFAT do not. Rclone will perform very badly if the cache
   253  directory is on a filesystem which doesn't support sparse files and it
   254  will log an ERROR message if one is detected.
   255  
   256  ### Fingerprinting
   257  
   258  Various parts of the VFS use fingerprinting to see if a local file
   259  copy has changed relative to a remote file. Fingerprints are made
   260  from:
   261  
   262  - size
   263  - modification time
   264  - hash
   265  
   266  where available on an object.
   267  
   268  On some backends some of these attributes are slow to read (they take
   269  an extra API call per object, or extra work per object).
   270  
   271  For example `hash` is slow with the `local` and `sftp` backends as
   272  they have to read the entire file and hash it, and `modtime` is slow
   273  with the `s3`, `swift`, `ftp` and `qinqstor` backends because they
   274  need to do an extra API call to fetch it.
   275  
   276  If you use the `--vfs-fast-fingerprint` flag then rclone will not
   277  include the slow operations in the fingerprint. This makes the
   278  fingerprinting less accurate but much faster and will improve the
   279  opening time of cached files.
   280  
   281  If you are running a vfs cache over `local`, `s3` or `swift` backends
   282  then using this flag is recommended.
   283  
   284  Note that if you change the value of this flag, the fingerprints of
   285  the files in the cache may be invalidated and the files will need to
   286  be downloaded again.
   287  
   288  ## VFS Chunked Reading
   289  
   290  When rclone reads files from a remote it reads them in chunks. This
   291  means that rather than requesting the whole file rclone reads the
   292  chunk specified.  This can reduce the used download quota for some
   293  remotes by requesting only chunks from the remote that are actually
   294  read, at the cost of an increased number of requests.
   295  
   296  These flags control the chunking:
   297  
   298      --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
   299      --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
   300  
   301  Rclone will start reading a chunk of size `--vfs-read-chunk-size`,
   302  and then double the size for each read. When `--vfs-read-chunk-size-limit` is
   303  specified, and greater than `--vfs-read-chunk-size`, the chunk size for each
   304  open file will get doubled only until the specified value is reached. If the
   305  value is "off", which is the default, the limit is disabled and the chunk size
   306  will grow indefinitely.
   307  
   308  With `--vfs-read-chunk-size 100M` and `--vfs-read-chunk-size-limit 0`
   309  the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
   310  When `--vfs-read-chunk-size-limit 500M` is specified, the result would be
   311  0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on.
   312  
   313  Setting `--vfs-read-chunk-size` to `0` or "off" disables chunked reading.
   314  
   315  ## VFS Performance
   316  
   317  These flags may be used to enable/disable features of the VFS for
   318  performance or other reasons. See also the [chunked reading](#vfs-chunked-reading)
   319  feature.
   320  
   321  In particular S3 and Swift benefit hugely from the `--no-modtime` flag
   322  (or use `--use-server-modtime` for a slightly different effect) as each
   323  read of the modification time takes a transaction.
   324  
   325      --no-checksum     Don't compare checksums on up/download.
   326      --no-modtime      Don't read/write the modification time (can speed things up).
   327      --no-seek         Don't allow seeking in files.
   328      --read-only       Only allow read-only access.
   329  
   330  Sometimes rclone is delivered reads or writes out of order. Rather
   331  than seeking rclone will wait a short time for the in sequence read or
   332  write to come in. These flags only come into effect when not using an
   333  on disk cache file.
   334  
   335      --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
   336      --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)
   337  
   338  When using VFS write caching (`--vfs-cache-mode` with value writes or full),
   339  the global flag `--transfers` can be set to adjust the number of parallel uploads of
   340  modified files from the cache (the related global flag `--checkers` has no effect on the VFS).
   341  
   342      --transfers int  Number of file transfers to run in parallel (default 4)
   343  
   344  ## VFS Case Sensitivity
   345  
   346  Linux file systems are case-sensitive: two files can differ only
   347  by case, and the exact case must be used when opening a file.
   348  
   349  File systems in modern Windows are case-insensitive but case-preserving:
   350  although existing files can be opened using any case, the exact case used
   351  to create the file is preserved and available for programs to query.
   352  It is not allowed for two files in the same directory to differ only by case.
   353  
   354  Usually file systems on macOS are case-insensitive. It is possible to make macOS
   355  file systems case-sensitive but that is not the default.
   356  
   357  The `--vfs-case-insensitive` VFS flag controls how rclone handles these
   358  two cases. If its value is "false", rclone passes file names to the remote
   359  as-is. If the flag is "true" (or appears without a value on the
   360  command line), rclone may perform a "fixup" as explained below.
   361  
   362  The user may specify a file name to open/delete/rename/etc with a case
   363  different than what is stored on the remote. If an argument refers
   364  to an existing file with exactly the same name, then the case of the existing
   365  file on the disk will be used. However, if a file name with exactly the same
   366  name is not found but a name differing only by case exists, rclone will
   367  transparently fixup the name. This fixup happens only when an existing file
   368  is requested. Case sensitivity of file names created anew by rclone is
   369  controlled by the underlying remote.
   370  
   371  Note that case sensitivity of the operating system running rclone (the target)
   372  may differ from case sensitivity of a file system presented by rclone (the source).
   373  The flag controls whether "fixup" is performed to satisfy the target.
   374  
   375  If the flag is not provided on the command line, then its default value depends
   376  on the operating system where rclone runs: "true" on Windows and macOS, "false"
   377  otherwise. If the flag is provided without a value, then it is "true".
   378  
   379  The `--no-unicode-normalization` flag controls whether a similar "fixup" is
   380  performed for filenames that differ but are [canonically
   381  equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
   382  unicode. Unicode normalization can be particularly helpful for users of macOS,
   383  which prefers form NFD instead of the NFC used by most other platforms. It is
   384  therefore highly recommended to keep the default of `false` on macOS, to avoid
   385  encoding compatibility issues.
   386  
   387  In the (probably unlikely) event that a directory has multiple duplicate
   388  filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
   389  flag allows hiding these duplicates. This comes with a performance tradeoff, as
   390  rclone will have to scan the entire directory for duplicates when listing a
   391  directory. For this reason, it is recommended to leave this disabled if not
   392  needed. However, macOS users may wish to consider using it, as otherwise, if a
   393  remote directory contains both NFC and NFD versions of the same filename, an odd
   394  situation will occur: both versions of the file will be visible in the mount,
   395  and both will appear to be editable, however, editing either version will
   396  actually result in only the NFD version getting edited under the hood. `--vfs-block-
   397  norm-dupes` prevents this confusion by detecting this scenario, hiding the
   398  duplicates, and logging an error, similar to how this is handled in `rclone
   399  sync`.
   400  
   401  ## VFS Disk Options
   402  
   403  This flag allows you to manually set the statistics about the filing system.
   404  It can be useful when those statistics cannot be read correctly automatically.
   405  
   406      --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)
   407  
   408  ## Alternate report of used bytes
   409  
   410  Some backends, most notably S3, do not report the amount of bytes used.
   411  If you need this information to be available when running `df` on the
   412  filesystem, then pass the flag `--vfs-used-is-size` to rclone.
   413  With this flag set, instead of relying on the backend to report this
   414  information, rclone will scan the whole remote similar to `rclone size`
   415  and compute the total used space itself.
   416  
   417  _WARNING._ Contrary to `rclone size`, this flag ignores filters so that the
   418  result is accurate. However, this is very inefficient and may cost lots of API
   419  calls resulting in extra charges. Use it as a last resort and only with caching.
   420  
   421  ## Auth Proxy
   422  
   423  If you supply the parameter `--auth-proxy /path/to/program` then
   424  rclone will use that program to generate backends on the fly which
   425  then are used to authenticate incoming requests.  This uses a simple
   426  JSON based protocol with input on STDIN and output on STDOUT.
   427  
   428  **PLEASE NOTE:** `--auth-proxy` and `--authorized-keys` cannot be used
   429  together, if `--auth-proxy` is set the authorized keys option will be
   430  ignored.
   431  
   432  There is an example program
   433  [bin/test_proxy.py](https://github.com/artpar/artpar/blob/master/bin/test_proxy.py)
   434  in the rclone source code.
   435  
   436  The program's job is to take a `user` and `pass` on the input and turn
   437  those into the config for a backend on STDOUT in JSON format.  This
   438  config will have any default parameters for the backend added, but it
   439  won't use configuration from environment variables or command line
   440  options - it is the job of the proxy program to make a complete
   441  config.
   442  
   443  This config generated must have this extra parameter
   444  - `_root` - root to use for the backend
   445  
   446  And it may have this parameter
   447  - `_obscure` - comma separated strings for parameters to obscure
   448  
   449  If password authentication was used by the client, input to the proxy
   450  process (on STDIN) would look similar to this:
   451  
   452  ```
   453  {
   454  	"user": "me",
   455  	"pass": "mypassword"
   456  }
   457  ```
   458  
   459  If public-key authentication was used by the client, input to the
   460  proxy process (on STDIN) would look similar to this:
   461  
   462  ```
   463  {
   464  	"user": "me",
   465  	"public_key": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf"
   466  }
   467  ```
   468  
   469  And as an example return this on STDOUT
   470  
   471  ```
   472  {
   473  	"type": "sftp",
   474  	"_root": "",
   475  	"_obscure": "pass",
   476  	"user": "me",
   477  	"pass": "mypassword",
   478  	"host": "sftp.example.com"
   479  }
   480  ```
   481  
   482  This would mean that an SFTP backend would be created on the fly for
   483  the `user` and `pass`/`public_key` returned in the output to the host given.  Note
   484  that since `_obscure` is set to `pass`, rclone will obscure the `pass`
   485  parameter before creating the backend (which is required for sftp
   486  backends).
   487  
   488  The program can manipulate the supplied `user` in any way, for example
   489  to make proxy to many different sftp backends, you could make the
   490  `user` be `user@example.com` and then set the `host` to `example.com`
   491  in the output and the user to `user`. For security you'd probably want
   492  to restrict the `host` to a limited list.
   493  
   494  Note that an internal cache is keyed on `user` so only use that for
   495  configuration, don't use `pass` or `public_key`.  This also means that if a user's
   496  password or public-key is changed the cache will need to expire (which takes 5 mins)
   497  before it takes effect.
   498  
   499  This can be used to build general purpose proxies to any kind of
   500  backend that rclone supports.  
   501  
   502  
   503  ```
   504  rclone serve sftp remote:path [flags]
   505  ```
   506  
   507  ## Options
   508  
   509  ```
   510        --addr string                            IPaddress:Port or :Port to bind server to (default "localhost:2022")
   511        --auth-proxy string                      A program to use to create the backend from the auth
   512        --authorized-keys string                 Authorized keys file (default "~/.ssh/authorized_keys")
   513        --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
   514        --dir-perms FileMode                     Directory permissions (default 0777)
   515        --file-perms FileMode                    File permissions (default 0666)
   516        --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
   517    -h, --help                                   help for sftp
   518        --key stringArray                        SSH private host key file (Can be multi-valued, leave blank to auto generate)
   519        --no-auth                                Allow connections with no authentication if set
   520        --no-checksum                            Don't compare checksums on up/download
   521        --no-modtime                             Don't read/write the modification time (can speed things up)
   522        --no-seek                                Don't allow seeking in files
   523        --pass string                            Password for authentication
   524        --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
   525        --read-only                              Only allow read-only access
   526        --stdio                                  Run an sftp server on stdin/stdout
   527        --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
   528        --umask int                              Override the permission bits set by the filesystem (not supported on Windows) (default 2)
   529        --user string                            User name for authentication
   530        --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
   531        --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
   532        --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
   533        --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
   534        --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
   535        --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
   536        --vfs-case-insensitive                   If a file name not found, find a case insensitive match
   537        --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
   538        --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
   539        --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
   540        --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
   541        --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
   542        --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
   543        --vfs-refresh                            Refreshes the directory cache recursively in the background on start
   544        --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
   545        --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
   546        --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)
   547  ```
   548  
   549  
   550  ## Filter Options
   551  
   552  Flags for filtering directory listings.
   553  
   554  ```
   555        --delete-excluded                     Delete files on dest excluded from sync
   556        --exclude stringArray                 Exclude files matching pattern
   557        --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
   558        --exclude-if-present stringArray      Exclude directories if filename is present
   559        --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
   560        --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
   561    -f, --filter stringArray                  Add a file filtering rule
   562        --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
   563        --ignore-case                         Ignore case in filters (case insensitive)
   564        --include stringArray                 Include files matching pattern
   565        --include-from stringArray            Read file include patterns from file (use - to read from stdin)
   566        --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
   567        --max-depth int                       If set limits the recursion depth to this (default -1)
   568        --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
   569        --metadata-exclude stringArray        Exclude metadatas matching pattern
   570        --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
   571        --metadata-filter stringArray         Add a metadata filtering rule
   572        --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
   573        --metadata-include stringArray        Include metadatas matching pattern
   574        --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
   575        --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
   576        --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
   577  ```
   578  
   579  See the [global flags page](/flags/) for global options not listed here.
   580  
   581  # SEE ALSO
   582  
   583  * [rclone serve](/commands/rclone_serve/)	 - Serve a remote over a protocol.
   584